/* Import font chữ từ Google Fonts (ví dụ: Roboto) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
   
   
    width: 85%;
}

h1 {
    font-size: 2.5rem;
    color: #343a40; /* Màu xám đậm */
    text-align: center;
    margin-bottom: 2rem;
}

h2 {
    color: #333;
}

#problemArea {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
}

.input-button-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#answerInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-right: 15px;
    box-sizing: border-box; /* Bao gồm padding và border trong width */
}

#answerInput:focus {
    outline: none;
    border-color: #007bff; /* Màu xanh khi focus */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2); /* Hiệu ứng shadow nhẹ */
}

.button-container {
    display: flex;
}

button {
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease; /* Hiệu ứng chuyển màu mượt mà */
    margin-left: 10px;
}

button:hover {
    background-color: #218838;
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.5);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#resultArea {
    margin-top: 15px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #f0f0f0;
}
/* CSS cho bảng lịch sử */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px; 
    font-size: 14px;
}

.history-table th,
.history-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.history-table th {
    background-color: #f2f2f2; 
    font-weight: bold;
}

.history-table tr:nth-child(even) {
    background-color: #f9f9f9; 
}

.history-table tr:hover {
    background-color: #f1f1f1;
}

/* CSS cho bảng thống kê */
#statsContainer {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: Arial, sans-serif;  
    font-size: 14px;
}

#statsContainer th, #statsContainer td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center; 
}

#statsContainer th {
    background-color: #28a745; /* Màu xanh lá cây */
    color: white;
    font-weight: bold;
}

#statsContainer tr:nth-child(even) {
    background-color: #f2f2f2; 
}

#statsContainer tr:hover {
    background-color: #ddd;
}

#statsContainer tr:last-child {
    background-color: #ffc107; /* Màu vàng */
    font-weight: bold; 
}