/* Import font chữ rõ ràng, dễ đọc */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f4f4f4; /* Màu nền nhạt, dễ chịu */
    margin: 0;
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 800px; /* Giới hạn chiều rộng để nội dung không bị dàn trải quá */
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    color: #343a40; /* Màu xám đậm */
    text-align: center;
    margin-bottom: 2rem;
}
/* Bố cục cho phép tính */
#problem {
    display: flex;
    align-items: center;
    font-size: 2.5rem;
    gap: 15px; /* Khoảng cách giữa các phần tử */
    margin-bottom: 20px;
}

.fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fraction span {
    font-size: 1.5rem;
}

.denom {
    border-top: 2px solid #333;
    padding-top: 5px;
}

#operator {
    font-size: 2rem;
}

/* Ô input nhập kết quả */
input[type="text"] {
    width: 150px;
    padding: 10px;
    font-size: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

/* Nút "Kiểm tra" */
button {
    background-color: #007bff; /* Màu xanh dương */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease; /* Hiệu ứng chuyển màu mượt mà */
}

button:hover {
    background-color: #0069d9;
}

/* Kết quả */
#result {
    margin-top: 15px;
    font-size: 1.2rem;
    text-align: center;
}

/* Lịch sử */
#calculationHistory {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 1rem;
}

#calculationHistory th, #calculationHistory td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

#calculationHistory th {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Thống kê */
#statsContainer {
    margin-top: 30px;
}

#statsContainer table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

#statsContainer th, #statsContainer td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

#statsContainer th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 600px) {
    #problem {
        font-size: 2rem;
    }

    input[type="text"] {
        width: 120px;
    }
}
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;
}