/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ===== Trang chủ ===== */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.home-title {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.home-subtitle {
    font-size: 1.3rem;
    color: #e0e0ff;
    margin-bottom: 50px;
}

.home-lessons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.lesson-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px 20px;
    width: 100%;
    text-decoration: none;
    color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.lesson-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.lesson-icon {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: bounce 1.5s infinite;
}

.lesson-card h2 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
}

.lesson-card p {
    color: #666;
    margin-bottom: 20px;
}

.lesson-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: transform 0.2s;
}

.lesson-card:hover .lesson-btn {
    transform: scale(1.1);
}

.home-footer {
    margin-top: 50px;
    color: #e0e0ff;
    font-size: 1.1rem;
}

/* ===== Trang chủ - Sections ===== */
.home-section {
    margin-bottom: 50px;
}

.home-section-header {
    text-align: center;
    margin-bottom: 30px;
}

.home-section-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.home-section-title {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 8px;
}

.home-section-subtitle {
    font-size: 1.1rem;
    color: #e0e0ff;
}

.home-special-grid {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.home-special-card {
    max-width: 500px;
    width: 100%;
}

/* ===== Trang học động vật ===== */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 10x;
    background: rgba(255,255,255,0.2);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1rem;
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.4);
}

.page-header h1 {
    font-size: 3rem;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.page-subtitle {
    color: #e0e0ff;
    font-size: 1.2rem;
}

/* ===== Lưới con vật ===== */
.animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.animal-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.animal-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.animal-card:active {
    transform: scale(0.95);
}

.animal-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
}

.animal-emoji {
    font-size: 5rem;
    display: block;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.animal-card:hover .animal-emoji {
    transform: scale(1.2) rotate(10deg);
}

.animal-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.animal-vietnamese {
    font-size: 1rem;
    color: #888;
    background: #f0f0ff;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
}

.animal-sound-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.animal-card:hover .animal-sound-icon {
    opacity: 1;
}

/* ===== Trang mô tả con vật ===== */
.adjectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.adjective-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.adjective-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.adjective-card:active {
    transform: scale(0.95);
}

.adjective-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
}

.adjective-emoji {
    font-size: 5rem;
    display: block;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.adjective-card:hover .adjective-emoji {
    transform: scale(1.2) rotate(10deg);
}

.adjective-sentence {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.adjective-vietnamese {
    font-size: 1.1rem;
    color: #888;
    background: #f0f0ff;
    padding: 5px 15px;
    border-radius: 15px;
    display: inline-block;
}

/* ===== Trang tập đọc - Giảm size emoji ===== */
#sentencesGrid .adjective-emoji {
    font-size: 2.5rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    #sentencesGrid .adjective-emoji {
        font-size: 2rem;
    }
}

/* ===== Trạng thái âm thanh ===== */
.sound-status {
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    padding: 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 15px;
    margin-top: 20px;
    transition: all 0.3s;
}

.sound-status.playing {
    background: rgba(255,255,255,0.3);
    animation: speakPulse 0.5s ease-in-out;
}

/* ===== Animations ===== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes speakPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== Trang farm - Phần mục ===== */
.section {
    background: #fff;
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.section-title {
    font-size: 2rem;
    color: #667eea;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e0e0ff;
}

/* ===== Câu mẫu ===== */
.example-sentences {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.example-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 15px;
    padding: 25px 30px;
    min-width: 250px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.example-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.example-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
}

.example-text {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.example-vi {
    display: block;
    font-size: 1.1rem;
    color: #e0e0ff;
    margin-bottom: 15px;
}

.speak-btn {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
}

/* ===== Hội thoại tiếng Anh ===== */
.dialogue-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.dialogue-card {
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dialogue-card.exclamation {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff8e1, #ffffff);
}

.dialogue-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0ff;
}

.dialogue-card.exclamation .dialogue-title {
    color: #ff9800;
    border-bottom-color: #ffe0b2;
}

.dialogue-line {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 15px;
    background: #f0f0ff;
    margin-bottom: 10px;
}

.dialogue-line.answer {
    background: #e8f5e9;
}

.dialogue-card.exclamation .dialogue-line {
    background: #fff8e1;
}

.dialogue-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.dialogue-content {
    flex: 1;
}

.dialogue-en {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.dialogue-vi {
    font-size: 0.95rem;
    color: #888;
}

.dialogue-speak {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.dialogue-speak:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.dialogue-speak.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

.dialogue-card.exclamation .dialogue-speak {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

/* ===== Quiz - Tabs ===== */
.quiz-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.quiz-tab {
    background: #f0f0ff;
    border: 2px solid transparent;
    color: #667eea;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-tab:hover {
    background: #e0e0ff;
    transform: translateY(-2px);
}

.quiz-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: #667eea;
}

/* ===== Quiz Box ===== */
.quiz-container {
    max-width: 600px;
    margin: 0 auto;
}

.quiz-box {
    background: linear-gradient(135deg, #f0f0ff, #ffffff);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 3px solid #667eea;
}

.quiz-question {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
}

.quiz-animal {
    font-size: 6rem;
    margin-bottom: 25px;
    background: #fff;
    display: inline-block;
    padding: 20px 40px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: bounce 2s infinite;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.quiz-option {
    background: #fff;
    border: 3px solid #e0e0ff;
    border-radius: 15px;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover:not(:disabled) {
    background: #667eea;
    color: #fff;
    transform: scale(1.05);
    border-color: #667eea;
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-option.correct {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
    animation: correctPulse 0.5s ease-in-out;
}

.quiz-option.wrong {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
    animation: shake 0.5s ease-in-out;
}

/* ===== Quiz kết quả ===== */
.quiz-result {
    min-height: 50px;
    margin-bottom: 15px;
}

.quiz-feedback {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 15px;
    margin: 10px 0;
}

.correct-feedback {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4CAF50;
}

.wrong-feedback {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

.quiz-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    background: #f0f0ff;
    padding: 20px;
    border-radius: 15px;
}

/* ===== Nút điều hướng ===== */
.next-btn, .check-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    margin-top: 10px;
}

.next-btn:hover, .check-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#nextQuizBtn, #nextFillBtn {
    display: none;
}

/* ===== Quiz tự luận ===== */
.fill-input {
    width: 80%;
    max-width: 400px;
    padding: 15px 20px;
    font-size: 1.3rem;
    border: 3px solid #e0e0ff;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

.fill-input:focus {
    outline: none;
    border-color: #667eea;
}

/* ===== Animations ===== */
@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .quiz-options {
        grid-template-columns: 1fr;
    }
    
    .example-sentences {
        flex-direction: column;
        align-items: center;
    }
    
    .example-card {
        width: 100%;
    }
    
    .quiz-animal {
        font-size: 4rem;
        padding: 15px 30px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .dialogue-line {
        flex-direction: column;
        text-align: center;
    }
    
    .dialogue-icon {
        font-size: 1.5rem;
    }
    
    .dialogue-en {
        font-size: 1.1rem;
    }
}

/* ===== Trang chủ - Responsive ===== */
@media (max-width: 1024px) {
    .home-lessons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .home-title {
        font-size: 2.5rem;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .back-btn {
        position: static;
        display: inline-block;
        margin-bottom: 15px;
    }
    
    .animals-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .animal-emoji {
        font-size: 3.5rem;
    }
    
    .animal-name {
        font-size: 1.2rem;
    }
    
    .adjectives-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .adjective-emoji {
        font-size: 3.5rem;
    }
    
    .adjective-sentence {
        font-size: 1.2rem;
    }
    
    /* Trang chủ - Tablet/iPad */
    .home-lessons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .home-section-title {
        font-size: 2rem;
    }
    
    .home-section-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .home-lessons {
        grid-template-columns: 1fr;
    }
    
    .home-section-title {
        font-size: 1.8rem;
    }
    
    .home-section-icon {
        font-size: 2.2rem;
    }
}

/* ===== Trang Food - Nhiều emoji ===== */
#foodGrid .animal-emoji {
    font-size: 3.5rem;
    line-height: 1.4;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    #foodGrid .animal-emoji {
        font-size: 2.5rem;
    }
}

/* ===== Trang Nhà - Thu nhỏ emoji ===== */
#houseGrid .animal-emoji {
    font-size: 3.5rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    #houseGrid .animal-emoji {
        font-size: 3rem;
    }
}

/* ===== Trang Very First Sentences - Thẻ rộng hơn cho câu dài ===== */
.sentences-page .animals-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.sentences-page .animal-card {
    padding: 20px 25px;
}

.sentences-page .animal-name {
    font-size: 1.2rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.sentences-page .animal-vietnamese {
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .sentences-page .animals-grid {
        grid-template-columns: 1fr;
    }
    
    .sentences-page .animal-name {
        font-size: 1.1rem;
    }
}

/* ===== Trang Tiếng Việt Mầm Non - Thẻ số đếm ===== */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.number-card {
    background: linear-gradient(135deg, #f0f0ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.number-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.number-card:active {
    transform: scale(0.95);
}

.number-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.number-card.speaking .number-value,
.number-card.speaking .number-word {
    color: #fff;
}

.number-value {
    font-size: 3.5rem;
    font-weight: bold;
    color: #667eea;
    line-height: 1.2;
    transition: color 0.3s;
}

.number-word {
    font-size: 1.2rem;
    font-weight: bold;
    color: #888;
    background: rgba(240,240,255,0.8);
    padding: 3px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s;
}

@media (max-width: 600px) {
    .numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 15px;
    }
    
    .number-value {
        font-size: 2.8rem;
    }
    
    .number-word {
        font-size: 1rem;
    }
}

/* ===== Trang Chữa Ngọng - Cặp thẻ ===== */
.pairs-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

.pair-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.pair-card {
    background: linear-gradient(135deg, #f0f0ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 20px;
    padding: 25px 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    flex: 1;
    max-width: 300px;
    min-width: 150px;
}

.pair-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.pair-card:active {
    transform: scale(0.95);
}

.pair-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.pair-card.speaking .pair-word {
    color: #fff;
}

.pair-word {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    transition: color 0.3s;
}

.pair-separator {
    font-size: 2rem;
    color: #e0e0ff;
    font-weight: bold;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .pair-container {
        flex-direction: column;
    }
    
    .pair-card {
        width: 100%;
        max-width: 100%;
        padding: 20px;
    }
    
    .pair-separator {
        transform: rotate(90deg);
    }
    
    .pair-word {
        font-size: 1.5rem;
    }
}

/* ===== Trang Kiểm Tra Kiến Thức ===== */
.test-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

.test-card {
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 20px;
    padding: 20px 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.test-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.test-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0ff;
}

.test-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

.test-speak-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-speak-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.test-speak-btn:active {
    transform: scale(0.95);
}

.test-speak-btn.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

.test-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.test-option {
    background: #fff;
    border: 3px solid #e0e0ff;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
}

.test-option:hover:not(:disabled) {
    background: #667eea;
    color: #fff;
    transform: scale(1.03);
    border-color: #667eea;
}

.test-option:active:not(:disabled) {
    transform: scale(0.95);
}

.test-option.correct {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
    animation: correctPulse 0.5s ease-in-out;
    cursor: default;
}

.test-option.wrong {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
    animation: shake 0.5s ease-in-out;
    cursor: default;
}

@media (max-width: 600px) {
    .test-options {
        grid-template-columns: 1fr;
    }
    
    .test-option {
        font-size: 1.1rem;
        padding: 12px 15px;
    }
}

/* =========================================================
   BÀI 8 - KIỂM TRA HÌNH DẠNG
   ========================================================= */

.shape-test-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 10px;
}

/* Ô đáp án */
.test-shape-option {
    position: relative;

    width: 100%;
    height: 160px;

    padding: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;

    border: 3px solid #e0e0ff;
    border-radius: 15px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;

    box-sizing: border-box;
}

/* Hover */
.test-shape-option:hover:not(:disabled) {
    background: #f8f8ff;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

/* =========================================================
   VÙNG HÌNH TRONG ĐÁP ÁN
   ========================================================= */

.test-shape-option .shape-visual {
    width: 90px;
    height: 90px;

    flex-shrink: 0;

    margin: 0;

    background: #667eea;

    transform: none;
}

/* Khi đáp án được chọn */
.test-shape-option.correct .shape-visual,
.test-shape-option.wrong .shape-visual {
    transform: none;
}

/* =========================================================
   KÍCH THƯỚC TỪNG HÌNH
   ========================================================= */

/* Hình tròn */
.test-shape-option .shape-visual.circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
}

/* Hình vuông - góc 90 độ */
.test-shape-option .shape-visual.square {
    width: 90px;
    height: 90px;
    border-radius: 0;
}

/* Hình chữ nhật - góc 90 độ */
.test-shape-option .shape-visual.rectangle {
    width: 110px;
    height: 70px;
    margin: 0;
    border-radius: 0;
}

/* Hình tam giác */
.test-shape-option .shape-visual.triangle {
    width: 95px;
    height: 90px;

    clip-path: polygon(
        50% 0%,
        100% 100%,
        0% 100%
    );
}

/* Hình thang */
.test-shape-option .shape-visual.trapezoid {
    width: 100px;
    height: 85px;

    clip-path: polygon(
        20% 0%,
        80% 0%,
        100% 100%,
        0% 100%
    );
}

/* Trái tim */
.test-shape-option .shape-visual.heart {
    width: 90px;
    height: 82px;

    clip-path: polygon(
        50% 100%,
        8% 58%,
        5% 38%,
        10% 20%,
        25% 8%,
        42% 10%,
        50% 25%,
        58% 10%,
        75% 8%,
        90% 20%,
        95% 38%,
        92% 58%
    );
}

/* Ngôi sao */
.test-shape-option .shape-visual.star {
    width: 90px;
    height: 90px;

    clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 56%,
        79% 92%,
        50% 70%,
        21% 92%,
        32% 56%,
        2% 35%,
        39% 35%
    );
}

/* Ngũ giác */
.test-shape-option .shape-visual.pentagon {
    width: 90px;
    height: 90px;

    clip-path: polygon(
        50% 0%,
        100% 38%,
        81% 100%,
        19% 100%,
        0% 38%
    );
}

/* =========================================================
   TRẠNG THÁI ĐÚNG / SAI
   ========================================================= */

.test-shape-option.correct {
    background: #eaf8ed;
    border-color: #4CAF50;
    animation: correctPulse 0.5s ease-in-out;
}

.test-shape-option.wrong {
    background: #fff0f0;
    border-color: #f44336;
    animation: shake 0.5s ease-in-out;
}

/* Dấu đúng */
.test-shape-option.correct::after {
    content: "✓";

    position: absolute;
    top: 8px;
    right: 10px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #4CAF50;
    color: #fff;

    font-size: 20px;
    font-weight: bold;
}

/* Dấu sai */
.test-shape-option.wrong::after {
    content: "✗";

    position: absolute;
    top: 8px;
    right: 10px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f44336;
    color: #fff;

    font-size: 20px;
    font-weight: bold;
}


/* =========================================================
   IPAD / TABLET
   ========================================================= */

@media (max-width: 768px) {

    .shape-test-options {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        gap: 14px;
    }

    .test-shape-option {
        height: 140px;
    }

    .test-shape-option .shape-visual {
        transform: scale(0.85);
    }
}


/* =========================================================
   ĐIỆN THOẠI
   ========================================================= */

@media (max-width: 600px) {

    .shape-test-options {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        gap: 12px;
    }

    .test-shape-option {
        height: 125px;
        padding: 10px;
    }

    .test-shape-option .shape-visual {
        transform: scale(0.7);
    }
}

/* =========================================================
   BÀI 10 - KIỂM TRA MÀU SẮC
   ========================================================= */

.test-color-option {
    position: relative;

    min-height: 145px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: #ffffff;

    box-sizing: border-box;
}

/* Ô màu */
.test-color-visual {
    width: 85px;
    height: 85px;

    border-radius: 12px;

    border: 2px solid rgba(0, 0, 0, 0.15);

    box-sizing: border-box;

    transition: transform 0.2s ease;
}

/* Hover */
.test-color-option:hover:not(:disabled) {
    background: #f8f8ff;
    border-color: #667eea;

    transform: translateY(-3px);
}

.test-color-option:hover:not(:disabled) .test-color-visual {
    transform: scale(1.08);
}

/* Đúng */
.test-color-option.correct {
    background: #eaf8ed;
    border-color: #4CAF50;

    animation: correctPulse 0.5s ease-in-out;
}

/* Sai */
.test-color-option.wrong {
    background: #fff0f0;
    border-color: #f44336;

    animation: shake 0.5s ease-in-out;
}

/* Dấu ✓ */
.test-color-option.correct::after {
    content: "✓";

    position: absolute;

    top: 8px;
    right: 10px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #4CAF50;
    color: #fff;

    font-size: 20px;
    font-weight: bold;
}

/* Dấu ✗ */
.test-color-option.wrong::after {
    content: "✗";

    position: absolute;

    top: 8px;
    right: 10px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f44336;
    color: #fff;

    font-size: 20px;
    font-weight: bold;
}

/* ===== Trang Tiếng Việt Mầm Non - Thẻ chữ cái ===== */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.letter-card {
    background: linear-gradient(135deg, #f0f0ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.letter-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.letter-card:active {
    transform: scale(0.95);
}

.letter-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.letter-card.speaking .letter-value,
.letter-card.speaking .letter-word {
    color: #fff;
}

.letter-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    line-height: 1.2;
}

.letter-word {
    font-size: 0.8rem;
    font-weight: bold;
    color: #888;
    background: rgba(240,240,255,0.8);
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 5px;
    display: inline-block;
}

/* ===== Trang Tiếng Việt Mầm Non - Thẻ dấu ===== */
.accents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.accent-card {
    background: linear-gradient(135deg, #f0f0ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.accent-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.accent-card:active {
    transform: scale(0.95);
}

.accent-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.accent-card.speaking .accent-value,
.accent-card.speaking .accent-name {
    color: #fff;
}

.accent-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    line-height: 1.2;
}

.accent-name {
    font-size: 0.7rem;
    font-weight: bold;
    color: #888;
    background: rgba(240,240,255,0.8);
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 5px;
    display: inline-block;
}

/* ===== Trang Tiếng Việt Mầm Non - Thẻ hình dạng ===== */
/* =========================================================
   BÀI 7 - HÌNH DẠNG
   ========================================================= */

.shapes-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 20px;
    padding: 25px 0;
}

/* Card */
.shape-card {
    min-height: 220px;
    background: linear-gradient(145deg, #f5f6ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 20px;
    padding: 20px 12px 15px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    text-align: center;
    cursor: pointer;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

    box-sizing: border-box;
    overflow: hidden;
}

/* Hiệu ứng khi rê chuột */
.shape-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

/* Hiệu ứng khi bấm */
.shape-card:active {
    transform: scale(0.96);
}

/* Khi đang phát âm */
.shape-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    background: linear-gradient(145deg, #667eea, #764ba2);
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.5);
}

/* =========================================================
   VÙNG CHỨA HÌNH
   Tất cả hình đều nằm trong cùng một khung 110 x 110
   ========================================================= */

.shape-visual {
    width: 105px;
    height: 105px;

    flex-shrink: 0;

    display: block;

    background: #667eea;

    margin: 0 auto;

    transition: transform 0.25s ease;
}

/* Khi phát âm, hình phóng nhẹ */
.shape-card.speaking .shape-visual {
    transform: scale(1.08);
}

/* =========================================================
   CÁC HÌNH
   ========================================================= */

/* Hình tròn */
.shape-visual.circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

/* Hình vuông */
.shape-visual.square {
    width: 100px;
    height: 100px;
    border-radius: 0px;
}

/* Hình chữ nhật */
.shape-visual.rectangle {
    width: 105px;
    height: 75px;
    margin-top: 13px;
    margin-bottom: 12px;
    border-radius: 0px;
}

/* Hình tam giác */
.shape-visual.triangle {
    width: 105px;
    height: 100px;

    clip-path: polygon(
        50% 0%,
        100% 100%,
        0% 100%
    );
}

/* Hình thang */
.shape-visual.trapezoid {
    width: 105px;
    height: 90px;

    clip-path: polygon(
        20% 0%,
        80% 0%,
        100% 100%,
        0% 100%
    );
}

/* =========================================================
   HÌNH TRÁI TIM
   ========================================================= */

.shape-visual.heart {
    width: 90px;
    height: 82px;

    background: #667eea;

    clip-path: polygon(
        50% 100%,
        8% 58%,
        5% 38%,
        10% 20%,
        25% 8%,
        42% 10%,
        50% 25%,
        58% 10%,
        75% 8%,
        90% 20%,
        95% 38%,
        92% 58%
    );
}

/* =========================================================
   NGÔI SAO
   ========================================================= */

.shape-visual.star {
    width: 100px;
    height: 100px;

    background: #667eea;

    clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 56%,
        79% 92%,
        50% 70%,
        21% 92%,
        32% 56%,
        2% 35%,
        39% 35%
    );
}

/* =========================================================
   NGŨ GIÁC
   ========================================================= */

.shape-visual.pentagon {
    width: 95px;
    height: 95px;

    background: #667eea;

    clip-path: polygon(
        50% 0%,
        100% 38%,
        81% 100%,
        19% 100%,
        0% 38%
    );
}

/* =========================================================
   TÊN HÌNH
   ========================================================= */

.shape-name {
    display: inline-block;

    font-size: 1rem;
    font-weight: 700;

    color: #666;

    background: rgba(240, 240, 255, 0.9);

    padding: 6px 12px;

    border-radius: 8px;

    margin-top: auto;

    white-space: nowrap;

    line-height: 1.2;
}

/* Tên hình khi đang phát âm */
.shape-card.speaking .shape-name {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

/* =========================================================
   RESPONSIVE - TABLET / IPAD
   ========================================================= */

@media (max-width: 1100px) {
    .shapes-grid {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
        gap: 18px;
    }
}

/* Điện thoại */
@media (max-width: 600px) {
    .shapes-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        gap: 14px;
    }

    .shape-card {
        min-height: 190px;
        padding: 15px 8px 12px;
    }

    .shape-visual {
        transform: scale(0.85);
    }

    .shape-name {
        font-size: 0.9rem;
    }
}

/* ===== Trang Tiếng Việt Mầm Non - Thẻ màu ===== */
.colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.color-card {
    background: linear-gradient(135deg, #f0f0ff, #ffffff);
    border: 3px solid #667eea;
    border-radius: 20px;
    padding: 25px 15px;

    min-height: 145px;

    text-align: center;
    cursor: pointer;

    box-shadow: 0 5px 15px rgba(0,0,0,0.15);

    transition: transform 0.3s, box-shadow 0.3s;

    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}

.color-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.color-card:active {
    transform: scale(0.95);
}

.color-card.speaking {
    animation: speakPulse 0.5s ease-in-out;
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.color-card.speaking .color-name {
    color: #fff;
}

.color-value {
    width: 80px;
    height: 80px;

    border-radius: 12px;

    margin: 0 auto 12px;

    border: 2px solid rgba(0, 0, 0, 0.12);

    box-sizing: border-box;
}

.color-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    line-height: 1.2;
}

/* ===== Animations ===== */
@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}