/* Import font chữ từ Google Fonts (thay thế bằng font bạn muốn) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f8f9fa; /* Màu nền nhạt, dễ chịu */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column; /* Căn giữa theo chiều dọc */
    gap: 20px;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    	width: 85%;
}

h1 {
    font-size: 2.5rem;
    color: #343a40; /* Màu xám đậm */
    text-align: center;
    margin-bottom: 2rem;
}

#problemDisplay {
    font-size: 20px;
    margin-bottom: 20px;
    line-height: 1.5; /* Khoảng cách giữa các dòng */
}

.input-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

#answerInput {
    padding: 10px;
    border: 1px solid #ced4da; /* Màu xám nhạt */
    border-radius: 5px;
    width: 150px;
    font-size: 16px;
    transition: border-color 0.3s ease; /* Hiệu ứng chuyển màu mượt */
}

#answerInput:focus {
    outline: none;
    border-color: #007bff; /* Màu xanh khi focus */
}

button {
    background-color: #007bff; /* Màu xanh dương */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease; /* Hiệu ứng chuyển màu mượt */
}

button:hover {
    background-color: #0062cc; /* Màu xanh đậm hơn khi hover */
}

button:disabled {
    background-color: #adb5bd; /* Màu xám nhạt khi disabled */
    cursor: default;
}

#result {
    margin-top: 10px;
    font-weight: bold;
    font-size: 18px;
}

.solution {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    display: none;
    white-space: pre-line; /* Giữ nguyên định dạng xuống dòng */
}

/* CSS cho bảng lịch sử */
#historyDisplay table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#historyDisplay th, #historyDisplay td {
    border: 1px solid #dee2e6; /* Màu xám nhạt */
    padding: 8px;
    text-align: left;
}

#historyDisplay th {
    background-color: #e9ecef; /* Màu xám nhạt */
}

/* CSS cho thống kê */
#statsContainer {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'Open Sans', sans-serif;
}

#statsContainer th, #statsContainer td {
    padding: 10px;
    border: 1px solid #dee2e6; /* Màu xám nhạt */
    text-align: center;
}

#statsContainer th {
    background-color: #007bff; /* Màu xanh dương */
    color: white;
    font-weight: bold;
}

#statsContainer tr:nth-child(even) {
    background-color: #f2f2f2;
}

#statsContainer tr:last-child {
    background-color: #ffc107; /* Màu vàng */
    font-weight: bold;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

table th {
    background-color: #f2f2f2;
    color: #333;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

table td {
    vertical-align: top;
}