/* ==========================================================================
   FAIRY GARDEN - LESSON SPECIFIC STYLES
   ========================================================================== */

/* Lesson Tabs Navigation */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.tab-btn {
    padding: 10px 22px;
    font-size: 1.05rem;
    font-weight: 800;
    border: 2px solid rgba(254, 228, 64, 0.35);
    border-radius: 50px;
    background: rgba(36, 0, 70, 0.75);
    color: #f1c0e8;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 1 auto;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 20px rgba(247, 37, 133, 0.6);
    border-color: #fee440;
    color: #ffffff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #f72585 0%, #7209b7 100%);
    color: #ffffff;
    border-color: #fee440;
    box-shadow: 0 0 25px rgba(247, 37, 133, 0.8), 0 0 15px rgba(254, 228, 64, 0.5);
}

.tab-content, .lesson-tab-content {
    display: none;
    animation: fairyFadeIn 0.4s ease-out;
}

.tab-content.active-tab, .lesson-tab-content.active-tab {
    display: block;
}

@keyframes fairyFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CARDS & CONTAINERS (Bright Frosted Glass for Maximum Readability)
   ========================================================================== */
.lesson-card-large, .exercise-card {
    background: rgba(255, 255, 255, 0.97);
    border: 2.5px solid rgba(247, 37, 133, 0.25);
    border-radius: 28px;
    padding: 35px 30px;
    box-shadow: 0 15px 40px rgba(114, 9, 183, 0.25), 0 0 20px rgba(254, 228, 64, 0.2);
    margin-bottom: 30px;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.lesson-title, .exercise-title {
    color: var(--secondary-color);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px dashed rgba(247, 37, 133, 0.4);
    padding-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-box {
    background: #fdf2f8;
    border-right: 5px solid var(--primary-color);
    border: 1.5px solid rgba(247, 37, 133, 0.25);
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 25px;
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1.8;
}

.definition-box h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 900;
}

.qa-box {
    background: #f5f3ff;
    border: 1.5px solid rgba(114, 9, 183, 0.25);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 25px;
}

.question {
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.q-mark {
    color: #f72585;
    margin-left: 5px;
    font-weight: 900;
}

.answer {
    font-size: 1.15rem;
    color: var(--text-main);
    line-height: 1.6;
}

.a-mark {
    color: #10b981;
    margin-left: 5px;
    font-weight: 900;
}

/* Equations (Letter decomposition) */
.equation-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
    align-items: center;
}

.equation {
    background: linear-gradient(135deg, #fdf2f8, #f5f3ff);
    padding: 14px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(114, 9, 183, 0.15);
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(247, 37, 133, 0.35);
    color: var(--text-main);
}

.equation .result {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(247, 37, 133, 0.3);
}

.highlight-text {
    text-align: center;
    background: #fff0f5;
    padding: 22px;
    border-radius: 22px;
    margin-bottom: 30px;
    border: 2px solid rgba(247, 37, 133, 0.4);
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.15);
}

.highlight-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: bold;
}

.final-sentence {
    color: var(--primary-color);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    margin: 12px 0;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(247, 37, 133, 0.4);
}

/* Alphabet Table */
.alphabet-table-container {
    overflow-x: auto;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.alphabet-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background: white;
}

.alphabet-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 900;
}

.alphabet-table td {
    padding: 12px;
    border: 1px solid rgba(114, 9, 183, 0.15);
    font-size: 1.2rem;
    color: var(--text-main);
}

.alphabet-table tr:nth-child(even) {
    background-color: #faf5ff;
}

.alphabet-table td:nth-child(2), .alphabet-table td:nth-child(5) {
    font-weight: 900;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* ==========================================================================
   EXERCISES & INPUTS
   ========================================================================== */
.exercise-instruction {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.6;
}

.word-list {
    color: var(--primary-color);
    font-size: 1.35rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 15px;
    background: #fdf2f8;
    padding: 12px;
    border-radius: 15px;
}

.exercise-note {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 20px;
}

.example-note {
    background: #ecfdf5;
    padding: 15px 20px;
    border-radius: 15px;
    border-right: 5px solid #10b981;
    margin-top: 20px;
    color: #065f46;
    font-size: 1.1rem;
    font-weight: 600;
}

.table-exercise {
    display: flex;
    justify-content: center;
    border: 2px solid rgba(114, 9, 183, 0.3);
    border-radius: 20px;
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.table-exercise .column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.table-exercise .header {
    background: linear-gradient(135deg, var(--secondary-color), #3a0ca3);
    font-weight: 900;
    padding: 14px;
    text-align: center;
    color: white;
    font-size: 1.1rem;
}

.table-exercise .words-col {
    border-left: 2px solid rgba(114, 9, 183, 0.2);
}

.cell {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(114, 9, 183, 0.15);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}

.cell:last-child {
    border-bottom: none;
}

.cell input {
    width: 70px;
    text-align: center;
    font-size: 1.2rem;
    padding: 6px;
    border: 2px solid rgba(114, 9, 183, 0.3);
    border-radius: 10px;
    font-weight: 800;
    color: var(--secondary-color);
}

.cell input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(247, 37, 133, 0.3);
}

/* Match Words Exercise */
.match-words {
    position: relative;
    display: flex;
    justify-content: space-between;
    max-width: 520px;
    margin: 40px auto;
}

.words-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 2;
}

.word-node {
    background: #ffffff;
    border: 2px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.2);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.word-node:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.4);
}

.word-node.selected {
    background: var(--secondary-color);
    color: white;
    border-color: #fee440;
    box-shadow: 0 0 20px rgba(254, 228, 64, 0.7);
    transform: scale(1.08);
}

.word-node.matched {
    background: #10b981;
    border-color: #059669;
    color: white;
    cursor: default;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

#lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

line {
    stroke: #d1d5db;
    stroke-width: 3;
    stroke-linecap: round;
}

line.matched-line {
    stroke: #10b981;
    stroke-width: 4;
}

/* Common Exercise Grid */
.interactive-grid, .madda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.exercise-item-box {
    background: #fdf2f8;
    padding: 16px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    border: 1.5px solid rgba(247, 37, 133, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.exercise-item-box input, .wasl-row input {
    width: 100%;
    text-align: center;
    padding: 8px 12px;
    border: 2px solid rgba(114, 9, 183, 0.25);
    border-radius: 12px;
    font-size: 1.15rem;
    background: #ffffff;
    color: var(--text-main);
    font-weight: 800;
    transition: all 0.2s ease;
}

.exercise-item-box input:focus, .wasl-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(247, 37, 133, 0.3);
}

.correct-input {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
}

.wrong-input {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.btn {
    display: block;
    margin: 25px auto 0;
    padding: 12px 35px;
    font-size: 1.15rem;
    border: 2px solid #fee440;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 900;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 18px rgba(247, 37, 133, 0.5);
}

.btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.8), 0 0 20px rgba(254, 228, 64, 0.6);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* ==========================================================================
   READING LESSON & VOCABULARY STYLES (Fairy Garden Theme)
   ========================================================================== */
.reading-content-box {
    background: #ffffff;
    border: 3px solid rgba(247, 37, 133, 0.35);
    border-radius: 28px;
    margin: 25px 0 35px 0;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(114, 9, 183, 0.15), 0 0 25px rgba(254, 228, 64, 0.15);
    box-sizing: border-box;
}

.reading-header {
    background: linear-gradient(135deg, #7209b7, #f72585);
    color: #ffffff;
    padding: 16px 25px;
    font-weight: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.reading-header span {
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.reading-header span i {
    color: #fee440;
    filter: drop-shadow(0 0 8px rgba(254, 228, 64, 0.8));
}

.audio-btn {
    background: #fee440 !important;
    color: #12002b !important;
    border: 2px solid #ffffff !important;
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 1.05rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.audio-btn:hover {
    background: #ffffff !important;
    color: #f72585 !important;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(254, 228, 64, 0.8);
}

.audio-btn.playing {
    background: #ef4444 !important;
    color: #ffffff !important;
    animation: pulseBtn 1s infinite alternate;
}

@keyframes pulseBtn {
    from { transform: scale(1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
    to { transform: scale(1.06); box-shadow: 0 0 22px rgba(239, 68, 68, 0.9); }
}

.reading-text-body {
    padding: 35px 30px;
    font-size: clamp(1.35rem, 2.3vw, 1.7rem);
    line-height: 2.3;
    color: #12002b;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.reading-text-body .verse {
    font-family: 'Alexandria', 'Cairo', sans-serif;
    font-size: clamp(1.45rem, 2.5vw, 1.95rem);
    color: #065f46;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    padding: 30px 35px;
    border-radius: 22px;
    display: block;
    margin: 15px auto;
    border: 2.5px solid #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15), inset 0 0 20px rgba(16, 185, 129, 0.05);
    line-height: 2.4;
    text-align: center;
    position: relative;
}

.reading-text-body .source {
    font-size: 1.1rem;
    color: #92400e;
    background: rgba(254, 228, 64, 0.2);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    padding: 8px 24px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 18px;
    font-weight: 900;
    text-align: center;
}

.clickable-sentence {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: inline;
}

.clickable-sentence:hover {
    background: rgba(247, 37, 133, 0.15);
    color: #f72585;
    box-shadow: 0 2px 8px rgba(247, 37, 133, 0.2);
}

.clickable-sentence.playing-sentence {
    background: rgba(254, 228, 64, 0.45);
    color: #7209b7;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(254, 228, 64, 0.8);
    border-radius: 8px;
}

/* Poem / Anthems (المحفوظات والأناشيد) */
.poem-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 25px;
    background: linear-gradient(135deg, #fff0f5, #fdf2f8);
    border-radius: 24px;
    border: 2px solid rgba(247, 37, 133, 0.3);
    margin: 15px auto;
    max-width: 850px;
    box-sizing: border-box;
}

.poem-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 12px 25px;
    background: #ffffff;
    border-radius: 18px;
    border: 1.5px solid rgba(254, 228, 64, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.poem-row .shatr {
    flex: 1;
    font-size: 1.45rem;
    font-weight: 800;
    color: #240046;
    text-align: center;
}

/* Ordered Expression (التعبير الكتابي المرتب) */
.expression-ordered {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: right;
    margin: 20px auto;
    max-width: 850px;
    box-sizing: border-box;
}

.expression-ordered p {
    background: linear-gradient(135deg, #ffffff 0%, #fff7fa 100%);
    border: 2px solid rgba(247, 37, 133, 0.25);
    border-right: 7px solid #7209b7;
    border-radius: 18px;
    padding: 18px 24px;
    font-size: 1.35rem;
    line-height: 1.85;
    color: #240046;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    margin: 0;
    box-sizing: border-box;
}

.expression-ordered p:hover {
    transform: translateX(-6px);
    border-color: #fee440;
    border-right-color: #f72585;
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.2);
}

/* Control Section: Vocabulary & Concepts (معاني المفردات والمعنى العام) */
.control-section {
    background: linear-gradient(135deg, #ffffff 0%, #fff7fa 100%);
    border: 2.5px solid rgba(247, 37, 133, 0.35);
    border-radius: 26px;
    padding: 30px;
    margin: 35px 0;
    box-shadow: 0 12px 35px rgba(114, 9, 183, 0.1), 0 0 20px rgba(254, 228, 64, 0.15);
    position: relative;
    box-sizing: border-box;
}

.control-head {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.85rem;
    font-weight: 900;
    color: #7209b7;
    margin-bottom: 12px;
    border-bottom: 2px dashed rgba(247, 37, 133, 0.25);
    padding-bottom: 12px;
}

.badge {
    background: linear-gradient(135deg, #f72585, #fee440);
    color: #12002b;
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.4);
    border: 2px solid #ffffff;
    flex-shrink: 0;
}

.control-section > p {
    font-size: 1.15rem;
    color: #5c0d75;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Vocabulary Grid Cards (شبكة بطاقات معاني المفردات المنظمة) */
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.highlight-box {
    background: #ffffff;
    border: 2px solid rgba(114, 9, 183, 0.2);
    border-right: 7px solid #f72585;
    padding: 16px 20px;
    border-radius: 18px;
    font-size: 1.25rem;
    line-height: 1.7;
    color: #1e1b4b;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.highlight-box:hover {
    transform: translateY(-4px);
    border-color: #fee440;
    border-right-color: #7209b7;
    box-shadow: 0 10px 25px rgba(247, 37, 133, 0.25);
}

.highlight-box strong {
    color: #f72585;
    font-weight: 900;
    font-size: 1.35rem;
    background: rgba(247, 37, 133, 0.1);
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid rgba(247, 37, 133, 0.2);
}

.example-item {
    background: #ffffff;
    padding: 14px 20px;
    border-radius: 16px;
    border: 2px solid rgba(247, 37, 133, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.35rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.example-item .old {
    color: #9ca3af;
    text-decoration: line-through;
}

.example-item .new {
    color: #10b981;
    font-weight: 900;
}

.word-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.word-cloud span {
    background: linear-gradient(135deg, #fdf2f8, #f5d0fe);
    border: 1.5px solid rgba(247, 37, 133, 0.3);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #7209b7;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

/* Q & A Box */
.qa-box {
    background: #ffffff;
    border: 2.5px solid rgba(16, 185, 129, 0.4);
    border-radius: 22px;
    padding: 22px 25px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.qa-box .question {
    color: #065f46;
    font-weight: 900;
    font-size: 1.35rem;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.qa-box .q-mark {
    background: #10b981;
    color: white;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 1rem;
}

.qa-box .answer {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.7;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.qa-box .a-mark {
    background: #f72585;
    color: white;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 1rem;
}

/* Final Sentence & Highlight Text */
.highlight-text {
    background: linear-gradient(135deg, rgba(254, 228, 64, 0.2), rgba(247, 37, 133, 0.15));
    border: 2px solid #fee440;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.final-sentence {
    color: #7209b7;
    font-size: 2rem;
    font-weight: 900;
    margin-top: 8px;
}

/* ==========================================================================
   DICTATION & VOICE COACH (Fairy Garden Theme)
   ========================================================================== */
.dictation-container {
    background: linear-gradient(135deg, #ffffff 0%, #fff7fa 100%);
    border-radius: 28px;
    padding: 35px 25px;
    border: 3px solid rgba(247, 37, 133, 0.35);
    color: #240046;
    box-shadow: 0 15px 40px rgba(114, 9, 183, 0.15), 0 0 25px rgba(254, 228, 64, 0.15);
    max-width: 900px;
    margin: 20px auto;
    box-sizing: border-box;
}

.dictation-header {
    text-align: center;
    margin-bottom: 25px;
}

.dictation-header h3 {
    color: #7209b7;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 10px;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(114, 9, 183, 0.2);
}

.dictation-header h3 i {
    color: #fee440;
    filter: drop-shadow(0 0 8px rgba(254, 228, 64, 0.8));
}

.dictation-header p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: #f72585;
    font-weight: 700;
    margin: 0;
}

.sub-tabs-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.dictation-sub-btn {
    background: #ffffff;
    color: #7209b7;
    border: 2px solid rgba(114, 9, 183, 0.25);
    border-radius: 50px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 900;
    font-size: 1.05rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.dictation-sub-btn.active, .dictation-sub-btn:hover {
    background: linear-gradient(135deg, #f72585, #7209b7);
    color: #ffffff !important;
    border-color: #fee440;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 18px rgba(247, 37, 133, 0.4), 0 0 10px rgba(254, 228, 64, 0.4);
}

.dictation-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.dictation-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
}

/* Action Buttons (Fairy Garden Style) */
.action-btn {
    padding: 13px 26px !important;
    border-radius: 50px !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: 2px solid #fee440 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
}

.action-btn i {
    font-size: 1.25rem;
}

/* Play Dictation Button */
.cosmic-btn {
    background: linear-gradient(135deg, #f72585, #7209b7) !important;
    color: #ffffff !important;
}

.cosmic-btn:hover {
    background: linear-gradient(135deg, #7209b7, #f72585) !important;
    box-shadow: 0 10px 25px rgba(247, 37, 133, 0.6), 0 0 15px rgba(254, 228, 64, 0.6) !important;
}

/* Clear Canvas Button */
.btn-secondary {
    background: linear-gradient(135deg, #4cc9f0, #7209b7) !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7209b7, #4cc9f0) !important;
    box-shadow: 0 10px 25px rgba(76, 201, 240, 0.6) !important;
}

/* Show Answer Button */
.success-btn {
    background: linear-gradient(135deg, #fee440, #f72585) !important;
    color: #12002b !important;
    border-color: #ffffff !important;
    text-shadow: none !important;
}

.success-btn:hover {
    background: linear-gradient(135deg, #f72585, #fee440) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(254, 228, 64, 0.8) !important;
}

/* Dictation Blackboard Canvas Frame */
.canvas-wrapper {
    background: #180b2c;
    border: 3.5px solid #fee440;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(114, 9, 183, 0.35), 0 0 25px rgba(254, 228, 64, 0.3);
    width: 100%;
    max-width: 750px;
    box-sizing: border-box;
}

#dictation-board {
    display: block;
    width: 100%;
    cursor: crosshair;
    touch-action: none;
}

.dictation-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
}

.dictation-answer {
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 900;
    color: #7209b7;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 3px dashed #f59e0b;
    border-radius: 22px;
    padding: 16px 40px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25);
    margin-top: 15px;
    letter-spacing: 2px;
    animation: fairyAnswerPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fairyAnswerPop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.voice-coach-container {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(114, 9, 183, 0.2);
    border: 2.5px solid var(--primary-color);
    padding: 35px 25px;
    margin-top: 20px;
}

.mic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 2.5rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #fee440;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(247, 37, 133, 0.5);
    transition: all 0.3s ease;
}

.mic-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(247, 37, 133, 0.8), 0 0 25px rgba(254, 228, 64, 0.6);
}

/* Games Menu in Lesson */
.games-menu {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    padding: 20px;
}

/* ==========================================================================
   FAIRY GAMES & CANVASES STYLING (Fairy Garden Theme)
   ========================================================================== */
.games-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    box-sizing: border-box;
}

.games-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 15px 10px;
    box-sizing: border-box;
}

.games-menu h3 {
    color: #fee440 !important;
    font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
    font-weight: 900 !important;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(254, 228, 64, 0.6);
}

.game-menu-btn {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, rgba(36, 0, 70, 0.95), rgba(114, 9, 183, 0.9));
    border: 2px solid #fee440;
    border-radius: 50px;
    padding: 18px 25px;
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(247, 37, 133, 0.4);
    box-sizing: border-box;
}

.game-menu-btn i {
    font-size: 1.6rem;
    color: #fee440;
    filter: drop-shadow(0 0 8px rgba(254, 228, 64, 0.8));
    transition: transform 0.3s ease;
}

.game-menu-btn:hover {
    transform: translateY(-5px) scale(1.03);
    background: linear-gradient(135deg, #f72585, #7209b7);
    border-color: #ffffff;
    box-shadow: 0 12px 35px rgba(247, 37, 133, 0.7), 0 0 25px rgba(254, 228, 64, 0.8);
}

.game-menu-btn:hover i {
    transform: rotate(15deg) scale(1.2);
}

#games-views {
    width: 100%;
    display: flex;
    justify-content: center;
}

.game-card {
    background: linear-gradient(135deg, rgba(26, 0, 51, 0.98), rgba(46, 0, 89, 0.98));
    border: 3px solid #fee440 !important;
    border-radius: 28px !important;
    padding: 30px 25px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(247, 37, 133, 0.4), inset 0 0 20px rgba(114, 9, 183, 0.3);
    width: 100%;
    max-width: 900px;
    margin: 10px auto;
    position: relative;
    box-sizing: border-box;
    animation: fairyFadeIn 0.35s ease-out;
}

.back-to-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f72585, #7209b7);
    color: #ffffff;
    border: 2px solid #fee440;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.back-to-menu-btn:hover {
    transform: translateY(-2px) scale(1.06);
    background: linear-gradient(135deg, #fee440, #f72585);
    color: #12002b;
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(254, 228, 64, 0.8);
}

.game-title {
    color: #fee440 !important;
    font-size: clamp(1.6rem, 3vw, 2.3rem) !important;
    font-weight: 900 !important;
    text-align: center;
    margin-bottom: 12px;
    margin-top: 15px;
    text-shadow: 0 0 18px rgba(254, 228, 64, 0.6);
}

.game-desc {
    color: #f1c0e8 !important;
    font-size: clamp(1.1rem, 2vw, 1.3rem) !important;
    font-weight: 700 !important;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.6;
}

.game-msg {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 900;
    margin-top: 20px;
    min-height: 35px;
    color: #fee440;
    text-shadow: 0 0 10px rgba(254, 228, 64, 0.8);
}

/* Drag & Drop in Fairy Theme */
.drag-drop-game {
    display: flex;
    flex-direction: column;
    gap: 35px;
    align-items: center;
    margin-top: 10px;
}

.ships-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    width: 100%;
}

.spaceship {
    width: 115px;
    height: 115px;
    border: 3px dashed #fee440;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
    background: rgba(247, 37, 133, 0.2);
    box-shadow: 0 0 20px rgba(114, 9, 183, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spaceship i {
    font-size: 2.2rem;
    color: #fee440;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 8px rgba(254, 228, 64, 0.8));
}

.spaceship.drag-over {
    background: rgba(254, 228, 64, 0.35);
    border-color: #ffffff;
    border-style: solid;
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(254, 228, 64, 0.9);
}

.meteors-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    min-height: 80px;
}

.meteor {
    background: linear-gradient(135deg, #f72585, #7209b7);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1.35rem;
    border: 2px solid #fee440;
    cursor: grab;
    box-shadow: 0 0 20px rgba(247, 37, 133, 0.6);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.meteor:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 0 25px rgba(254, 228, 64, 0.8);
}

.meteor:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.meteor.hide {
    display: none;
}

/* Fairy Memory Game */
.memory-game {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 18px;
    max-width: 650px;
    margin: 0 auto;
    perspective: 1000px;
}

.mem-card {
    height: 110px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.mem-card.flip {
    transform: rotateY(180deg);
}

.mem-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    border: 2.5px solid #fee440;
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.4);
    box-sizing: border-box;
}

.mem-front {
    background: linear-gradient(135deg, #240046, #12002b);
    color: #fee440;
}

.mem-front::after {
    content: '🧚‍♀️';
    font-size: 2.2rem;
}

.mem-back {
    background: linear-gradient(135deg, #f72585, #7209b7);
    color: #ffffff;
    transform: rotateY(180deg);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* Sequence Game */
.sequence-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.portal-target {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.portal-slot {
    width: 65px;
    height: 65px;
    border: 2.5px solid #fee440;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fee440;
    background: rgba(247, 37, 133, 0.15);
    box-shadow: inset 0 0 15px rgba(254, 228, 64, 0.4);
}

.floating-orbs {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.letter-orb {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f72585, #fee440);
    color: #12002b;
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(254, 228, 64, 0.7);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: orbFloat 3s ease-in-out infinite alternate;
}

@keyframes orbFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.letter-orb:hover {
    transform: scale(1.18);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
}

/* Cannon & Ammo Buttons */
.cannons-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cannon-btn {
    background: linear-gradient(135deg, #7209b7, #f72585);
    color: #ffffff;
    border: 2px solid #fee440;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
}

.cannon-btn:hover, .cannon-btn.active {
    background: linear-gradient(135deg, #fee440, #f72585);
    color: #12002b;
    border-color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(254, 228, 64, 0.8);
}


/* ==========================================================================
   INTERACTIVE TEACHER & WHITEBOARD STYLES (Fairy Garden Theme)
   ========================================================================== */
.classroom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), #fff0f5);
    padding: 30px 25px;
    border-radius: 28px;
    border: 2.5px solid rgba(247, 37, 133, 0.35);
    box-shadow: 0 15px 40px rgba(114, 9, 183, 0.15), 0 0 25px rgba(254, 228, 64, 0.2);
    margin: 25px 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.whiteboard {
    background: linear-gradient(145deg, #10002b 0%, #240046 100%);
    border: 10px solid #7209b7;
    outline: 3px solid #fee440;
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    min-height: 280px;
    padding: 30px 25px;
    color: #ffffff;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.85), 0 12px 30px rgba(114, 9, 183, 0.35);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.whiteboard::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 10%;
    width: 80%;
    height: 10px;
    background: linear-gradient(90deg, #7209b7, #fee440, #7209b7);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.wb-content, .scene-content {
    animation: fairyFadeIn 0.4s ease-out;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes fairyFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wb-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #fee440;
    margin-bottom: 18px;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(254, 228, 64, 0.6);
}

.wb-text {
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    line-height: 1.8;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 700;
}

.wb-example {
    background: rgba(247, 37, 133, 0.25);
    border: 1.5px solid rgba(254, 228, 64, 0.5);
    padding: 12px 25px;
    border-radius: 16px;
    margin: 12px auto;
    max-width: 90%;
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    color: #fee440;
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.teacher-area {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 820px;
    gap: 20px;
    margin-top: 10px;
    box-sizing: border-box;
}

.teacher-avatar {
    width: 110px !important;
    height: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    border-radius: 50% !important;
    border: 3.5px solid #fee440 !important;
    background: linear-gradient(135deg, #f72585, #7209b7) !important;
    overflow: hidden !important;
    box-shadow: 0 0 25px rgba(247, 37, 133, 0.6), 0 0 15px rgba(254, 228, 64, 0.5) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    animation: teacherFloat 3s ease-in-out infinite;
}

@keyframes teacherFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.teacher-avatar img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.speech-bubble {
    background: #ffffff;
    border: 2px solid rgba(247, 37, 133, 0.35);
    border-radius: 22px;
    padding: 18px 25px;
    position: relative;
    box-shadow: 0 8px 25px rgba(114, 9, 183, 0.12);
    flex-grow: 1;
    font-size: 1.25rem;
    line-height: 1.7;
    color: #240046;
    font-weight: 800;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 35px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(247, 37, 133, 0.35);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 35px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.teacher-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 820px;
    margin-top: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-teacher {
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 900;
    color: white !important;
    border: 2px solid #fee440;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-teacher-start {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.btn-teacher-pause {
    background: linear-gradient(135deg, #fb8500, #d97706) !important;
}

.btn-teacher-stop {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.btn-teacher:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(254, 228, 64, 0.6);
}

@media (max-width: 768px) {
    .teacher-area {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .speech-bubble::before, .speech-bubble::after {
        display: none;
    }
}

