@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --purple: #A29BFE;
    --green: #55EFC4;
    --orange: #FDCB6E;
    --blue: #74B9FF;
    --pink: #FD79A8;
    --bg: #FFF9F0;
    --card-bg: #FFFFFF;
    --text: #2D3436;
    --shadow: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255,107,107,0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(78,205,196,0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(162,155,254,0.05) 0%, transparent 70%);
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FFE66D 100%);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    box-shadow: 0 4px 20px rgba(255,107,107,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: white;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span { font-size: 1.8rem; }

.stars-display {
    background: rgba(255,255,255,0.25);
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    padding: 6px 18px;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.student-badge {
    background: rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 6px 16px;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: white;
    border-bottom: 3px solid #f0f0f0;
    padding: 0 24px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
}

.nav-item {
    padding: 14px 20px;
    text-decoration: none;
    color: #888;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 4px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover { color: var(--primary); background: rgba(255,107,107,0.05); }
.nav-item.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== MAIN CONTENT ===== */
.main-content { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    border: 3px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.15); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* ===== MODULE CARDS ===== */
.module-card {
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.module-card:hover::before { opacity: 1; }
.module-card:hover { transform: scale(1.05) translateY(-6px); }

.module-card .icon { font-size: 4rem; filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2)); }
.module-card h3 { font-family: 'Fredoka One', cursive; font-size: 1.4rem; color: white; }
.module-card p { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 600; }

.mc-english { background: linear-gradient(135deg, #FF6B6B, #FF8E53); }
.mc-math { background: linear-gradient(135deg, #4ECDC4, #44A08D); }
.mc-nepali { background: linear-gradient(135deg, #A29BFE, #6C5CE7); }
.mc-story { background: linear-gradient(135deg, #FD79A8, #E84393); }
.mc-fill { background: linear-gradient(135deg, #FDCB6E, #F39C12); }
.mc-spelling { background: linear-gradient(135deg, #55EFC4, #00B894); }

/* ===== PAGE TITLE ===== */
.page-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-subtitle { color: #888; font-size: 1rem; font-weight: 600; margin-bottom: 24px; }

/* ===== GAME AREA ===== */
.game-area {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.question-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 30px;
    margin: 24px 0;
    font-size: 1.5rem;
    font-weight: 800;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-input {
    font-family: 'Nunito', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 16px 24px;
    border: 4px solid #e0e0e0;
    border-radius: 16px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.answer-input:focus { border-color: var(--primary); }
.answer-input.correct { border-color: #00b894; background: #d4f8ee; }
.answer-input.wrong { border-color: #ff7675; background: #ffe0e0; }

/* ===== BUTTONS ===== */
.btn {
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:active { transform: scale(0.95); }

.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(255,107,107,0.4); }
.btn-primary:hover { background: #ff5252; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,107,107,0.5); }

.btn-success { background: #00b894; color: white; box-shadow: 0 4px 15px rgba(0,184,148,0.4); }
.btn-success:hover { background: #00a381; transform: translateY(-2px); }

.btn-info { background: var(--blue); color: white; box-shadow: 0 4px 15px rgba(116,185,255,0.4); }
.btn-info:hover { transform: translateY(-2px); }

.btn-warning { background: var(--accent); color: #333; box-shadow: 0 4px 15px rgba(255,230,109,0.4); }
.btn-warning:hover { transform: translateY(-2px); }

.btn-purple { background: var(--purple); color: white; box-shadow: 0 4px 15px rgba(162,155,254,0.4); }
.btn-purple:hover { transform: translateY(-2px); }

.btn-lg { font-size: 1.2rem; padding: 18px 42px; }
.btn-sm { font-size: 0.85rem; padding: 8px 20px; }

/* ===== MULTIPLE CHOICE ===== */
.choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

.choice-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 20px;
    border: 4px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.choice-btn:hover { border-color: var(--primary); background: rgba(255,107,107,0.05); transform: scale(1.02); }
.choice-btn.correct { border-color: #00b894; background: #d4f8ee; color: #00b894; }
.choice-btn.wrong { border-color: #ff7675; background: #ffe0e0; color: #ff7675; }

/* ===== SCORE DISPLAY ===== */
.score-bar {
    background: #f0f0f0;
    border-radius: 50px;
    height: 16px;
    overflow: hidden;
    margin: 12px 0;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #55EFC4, #00B894);
    border-radius: 50px;
    transition: width 0.5s ease;
}

/* ===== STAR ANIMATION ===== */
.star-pop {
    display: inline-block;
    animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starPop {
    0% { transform: scale(0) rotate(-20deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ===== FEEDBACK ===== */
.feedback {
    font-size: 1.5rem;
    font-weight: 800;
    padding: 16px;
    border-radius: 16px;
    margin: 16px 0;
    animation: slideIn 0.3s ease;
}

.feedback.correct { background: #d4f8ee; color: #00b894; }
.feedback.wrong { background: #ffe0e0; color: #ff7675; }

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== ALPHABET GRID ===== */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.alpha-card {
    background: white;
    border-radius: 20px;
    padding: 20px 12px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.alpha-card:hover {
    transform: scale(1.1) rotate(-2deg);
    border-color: var(--purple);
    box-shadow: 0 8px 24px rgba(162,155,254,0.3);
}

.alpha-char {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--purple);
    display: block;
    line-height: 1;
}

.alpha-roman {
    font-size: 0.8rem;
    color: #888;
    font-weight: 700;
    margin-top: 4px;
}

.alpha-example {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 4px;
}

/* ===== MATH DISPLAY ===== */
.math-problem {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.math-num { 
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    color: white;
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(116,185,255,0.4);
}

.math-op {
    color: var(--primary);
    font-size: 3rem;
}

/* ===== MULTIPLICATION TABLE ===== */
.mult-table {
    border-collapse: collapse;
    margin: 0 auto;
    font-family: 'Fredoka One', cursive;
}

.mult-table td, .mult-table th {
    width: 48px;
    height: 48px;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mult-table th {
    background: linear-gradient(135deg, #A29BFE, #6C5CE7);
    color: white;
    font-size: 0.9rem;
}

.mult-table td { background: white; color: var(--text); }
.mult-table td:hover { background: var(--accent); transform: scale(1.1); }
.mult-table td.highlight { background: linear-gradient(135deg, #FFE66D, #FDCB6E); }

/* ===== STORY READER ===== */
.story-text {
    font-size: 1.3rem;
    line-height: 2;
    color: #444;
    background: #FFFDF5;
    border: 3px solid var(--accent);
    border-radius: 20px;
    padding: 28px;
    margin: 20px 0;
    text-align: left;
}

/* ===== PROGRESS DISPLAY ===== */
.progress-section {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: var(--radius);
    padding: 28px;
    color: white;
    margin-bottom: 24px;
}

.stars-row { display: flex; gap: 4px; font-size: 1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .site-header { height: 60px; }
    .logo { font-size: 1.5rem; }
    .main-content { padding: 20px 12px; }
    .game-area { padding: 24px 16px; }
    .math-problem { font-size: 2.5rem; }
    .math-num { width: 70px; height: 70px; font-size: 2.5rem; }
    .choices-grid { grid-template-columns: 1fr; }
    .alphabet-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}

/* ===== CONFETTI / FUN EFFECTS ===== */
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes wiggle { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

.bounce { animation: bounce 0.6s ease; }
.spin { animation: spin 0.5s linear; }
.wiggle { animation: wiggle 0.3s ease 3; }

/* ===== LEVEL BADGE ===== */
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #333;
    border-radius: 50px;
    padding: 4px 14px;
    font-size: 0.85rem;
    font-weight: 800;
}

/* ===== WORD DISPLAY (Spelling) ===== */
.word-hint {
    font-size: 3rem;
    margin: 20px 0;
    letter-spacing: 0.3em;
    font-family: 'Fredoka One', cursive;
}

.letter-box {
    display: inline-block;
    width: 52px;
    height: 64px;
    border-bottom: 5px solid var(--primary);
    margin: 4px;
    font-size: 2rem;
    text-align: center;
    line-height: 64px;
    color: var(--text);
    font-family: 'Fredoka One', cursive;
    transition: all 0.2s;
}

.hint-text {
    font-size: 1.3rem;
    color: #888;
    margin: 12px 0;
}

/* ===== TABS ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }

.tab-btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    padding: 10px 22px;
    border: 3px solid #e0e0e0;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== NOTIFICATION TOAST ===== */
.toast {
    position: fixed;
    top: 90px;
    right: 20px;
    background: white;
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 999;
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 6px solid var(--secondary);
}

@keyframes toastIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== HOME HERO ===== */
.hero {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 40%, #FFE66D 100%);
    border-radius: var(--radius);
    padding: 48px 40px;
    color: white;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '🌟 📚 🎨 🔢 🎯 🌈';
    font-size: 2rem;
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    opacity: 0.2;
    letter-spacing: 2rem;
    animation: float 6s ease-in-out infinite;
}

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

.hero h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    margin-bottom: 12px;
}

.hero p { font-size: 1.2rem; font-weight: 600; opacity: 0.9; }
