body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    font-size: 16px; 
    line-height: 1.5;
}

.container {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 900px; /* Tăng chiều rộng tối đa để phù hợp với 2 cột */
    text-align: center;
}

h1 {
    color: #0056b3;
    margin-bottom: 15px;
}

.options-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="number"], select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

button {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

#quiz-container.hidden, #quiz-summary.hidden, #next-button.hidden {
    display: none;
}

/* === Bố cục 2 cột cho màn hình lớn hơn 600px === */
.quiz-columns {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.quiz-content, .word-details-column {
    flex: 1;
}

.word-details-column {
    border-left: 2px solid #ddd;
    padding-left: 20px;
    text-align: left;
}

/* Ẩn chi tiết nếu nó không có nội dung */
.word-details-column.hidden {
    border: none;
    padding-left: 0;
    flex: 0;
}

#question-text {
    font-size: 28px;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 20px;
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.choices {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.choice {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-align: center;
}

.choice:hover:not(.disabled) {
    background-color: #e9e9e9;
    transform: scale(1.02);
}

.choice.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
    animation: pulse 0.5s;
}

.choice.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.choice.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

#result-message {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    min-height: 24px;
}

#progress {
    text-align: right;
    font-size: 14px;
    color: #666;
}

#word-details {
    padding: 0;
    border: none;
    background-color: transparent;
}

.word-info-heading {
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.word-info p {
    margin: 5px 0;
}

.example-item {
    background-color: #e6f7ff;
    border-left: 4px solid #4CAF50;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 5px;
}

.example-item .sentence-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.example-item strong.chinese-sentence {
    font-size: 20px;
    color: #007bff;
}

.example-item em.pinyin-sentence {
    font-size: 16px;
    color: #6c757d;
    font-style: normal;
}

.example-item .meaning-sentence {
    font-size: 16px;
    color: #343a40;
    margin-top: 5px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#quiz-summary {
    margin-top: 20px;
}

#restart-button {
    margin-top: 20px;
    background-color: #28a745;
}

#restart-button:hover {
    background-color: #218838;
}

#next-button {
    margin-top: 20px;
    background-color: #6c757d;
}

#next-button:hover {
    background-color: #5a6268;
}

/* === Responsive cho màn hình nhỏ (điện thoại) === */
@media (max-width: 600px) {
    .quiz-columns {
        flex-direction: column;
    }
    .word-details-column {
        border-left: none;
        border-top: 2px solid #ddd;
        padding-top: 20px;
        padding-left: 0;
        margin-top: 20px;
    }
}