/* ===== Tutor CSS — Studini: A Magia do Conhecimento ===== */
/*
 * PALETA DE CORES OFICIAL — Studini
 * ──────────────────────────────────
 * Background:    #050505  (preto profundo — todas as telas)
 * Cards:         rgba(35,35,40,0.85)  (cinza escuro translúcido)
 * Card border:   rgba(255,215,0,0.18)  (dourado sutil)
 * Primary:       #FF9600  (laranja — botões, títulos, destaques)
 * Accent:        #FFD700  (dourado — bordas, badges, glow)
 * Text:          #FFFFFF  (branco puro — textos principais)
 * Text muted:    rgba(255,255,255,0.5)  (branco 50% — labels, subtextos)
 * Text faint:    rgba(255,255,255,0.35)  (branco 35% — nav inativo)
 * Active tab:    #FF9600  (laranja — bottom nav ativo)
 * Success:       #58CC02  (verde — progresso, concluído)
 * Error:         #FF4B4B  (vermelho — erros, alertas)
 * ──────────────────────────────────
 */

:root {
    --primary: #FF9600;
    --primary-dark: #E08600;
    --primary-light: #FFB84D;
    --accent: #FFD700;
    --green: #58CC02;
    --green-dark: #46A302;
    --pink: #FD79A8;
    --orange: #FDCB6E;
    --red: #FF4B4B;
    --blue: #1CB0F6;
    --bg: #050505;
    --bg-card: rgba(35,35,40,0.85);
    --bg-surface: rgba(45,45,50,0.85);
    --white: #FFFFFF;
    --text: #FFFFFF;
    --text-light: rgba(255,255,255,0.5);
    --text-muted: rgba(255,255,255,0.35);
    --border: rgba(255,215,0,0.18);
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Nunito', -apple-system, sans-serif;
}

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

html {
    height: 100%;
}
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100%;
    overscroll-behavior: none;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 0 var(--primary-dark);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(1px); box-shadow: 0 3px 0 var(--primary-dark); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-dark); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-lg { padding: 16px 36px; font-size: 18px; }
.btn-block { display: block; width: 100%; }

/* ===== Landing Page ===== */
.landing-page { overflow-x: hidden; background: #0a0a0a; }

/* ===== Studini Landing ===== */
.hero-studini {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 25% center;
    z-index: 0;
}
.hero-video-fallback {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('../img/landing/bg.jpg') 25% center/cover no-repeat;
    z-index: -1;
}

/* Navigation */
.landing-nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
}
.nav-logo-img { height: 40px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 14px; font-weight: 600; transition: color 0.2s; }
.nav-links a:hover { color: #FF9600; }
.nav-actions { display: flex; gap: 12px; }
.nav-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}
.nav-btn-outline { color: #FF9600; border: 2px solid #FF9600; background: transparent; }
.nav-btn-outline:hover { background: rgba(255,150,0,0.15); }
.nav-btn-primary { color: #000; background: #FF9600; border: 2px solid #FF9600; }
.nav-btn-primary:hover { background: #e08600; }
.nav-mobile-toggle { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(0,0,0,0.9);
    position: relative;
    z-index: 10;
}
.mobile-menu a { color: white; text-decoration: none; font-size: 16px; padding: 8px 0; }

/* Hero Content */
.hero-content-studini {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 40px 40px 80px;
    text-align: right;
    background: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 60%);
}
.hero-title-studini {
    font-family: var(--font);
    font-size: 56px;
    font-weight: 900;
    color: #FF9600;
    line-height: 1.15;
    margin-bottom: 16px;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.6);
}
.hero-subtitle-studini {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
    font-weight: 600;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.5);
}
.hero-buttons { display: flex; gap: 16px; }
.hero-btn {
    padding: 14px 36px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-btn-primary { color: #000; background: #FF9600; border: 2px solid #FF9600; }
.hero-btn-primary:hover { background: #e08600; transform: translateY(-2px); }
.hero-btn-secondary { color: #FF9600; border: 2px solid #FF9600; background: rgba(0,0,0,0.5); }
.hero-btn-secondary:hover { background: rgba(255,150,0,0.15); }

/* Feature Cards */
.features-studini {
    padding: 60px 20px;
    background: #0a0a0a;
}
.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}
.feature-card {
    background: rgba(255,150,0,0.05);
    border: 2px solid #FF9600;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px; height: 32px;
    background: #FF9600;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
}
.feature-card-title {
    font-family: var(--font);
    font-size: 20px;
    font-weight: 800;
    color: #FF9600;
    margin: 8px 0 12px;
}
.feature-card-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 16px;
}
.feature-card-img {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 16px;
    display: block;
    border-radius: 12px;
}

/* How it works */
.how-studini {
    padding: 60px 20px;
    background: #111;
}
.section-title-studini {
    font-family: var(--font);
    font-size: 32px;
    font-weight: 900;
    color: #FF9600;
    text-align: center;
    margin-bottom: 40px;
}
.how-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.how-step {
    text-align: center;
    color: white;
}
.how-step-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(255,150,0,0.15);
    border: 2px solid #FF9600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    color: #FF9600;
}
.how-step h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: #FF9600; }
.how-step p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5; }

/* Pricing */
.pricing-studini {
    padding: 60px 20px;
    background: #0a0a0a;
}
.pricing-intro {
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    margin-top: -24px;
    margin-bottom: 40px;
}
.pricing-cards-studini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}
.pricing-card-studini {
    background: #111;
    border: 2px solid #222;
    border-radius: 16px;
    padding: 32px 24px;
    position: relative;
    transition: transform 0.2s;
}
.pricing-card-studini:hover { transform: translateY(-4px); }
.pricing-card-studini.featured {
    border-color: #FF9600;
    background: rgba(255,150,0,0.05);
}
.pricing-badge-studini {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF9600;
    color: #000;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.pricing-card-header-studini {
    text-align: center;
    margin-bottom: 24px;
}
.pricing-card-header-studini h3 {
    color: white;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}
.pricing-price-studini {
    font-size: 40px;
    font-weight: 900;
    color: #FF9600;
}
.pricing-sub-studini {
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-top: -16px;
    margin-bottom: 20px;
}
.pricing-price-studini span { font-size: 24px; }
.pricing-price-studini small { font-size: 14px; color: rgba(255,255,255,0.5); font-weight: 400; }
.pricing-features-studini {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.pricing-features-studini li {
    padding: 8px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pricing-features-studini li i { color: #FF9600; font-size: 12px; }
.pricing-btn-studini {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid #FF9600;
}
.pricing-btn-outline { color: #FF9600; background: transparent; }
.pricing-btn-outline:hover { background: rgba(255,150,0,0.1); }
.pricing-btn-primary { color: #000; background: #FF9600; }
.pricing-btn-primary:hover { background: #e08600; }

/* FAQ */
.faq-studini {
    padding: 60px 20px;
    background: #111;
}
.faq-list-studini {
    max-width: 700px;
    margin: 0 auto;
}
.faq-item-studini {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.faq-question-studini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: white;
    transition: color 0.2s;
}
.faq-question-studini:hover { color: #FF9600; }
.faq-question-studini i { color: #FF9600; font-size: 14px; flex-shrink: 0; margin-left: 12px; }
.faq-answer-studini {
    padding: 0 0 18px;
}
.faq-answer-studini p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
}

/* CTA */
/* Differentials: Exercises Grid */
.diff-studini {
    padding: 60px 20px;
    background: #0a0a0a;
    text-align: center;
}
.diff-intro {
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto 32px;
}
.diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
.diff-item {
    background: rgba(35,35,40,0.85);
    border: 1px solid rgba(255,215,0,0.12);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
}
.diff-icon { font-size: 32px; margin-bottom: 12px; }
.diff-item h4 { color: #FF9600; font-size: 16px; margin-bottom: 8px; }
.diff-item p { color: rgba(255,255,255,0.6); font-size: 13px; line-height: 1.5; }

@media (max-width: 700px) {
    .diff-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
    .diff-grid { grid-template-columns: 1fr; }
}

/* Adaptive Learning */
.adaptive-studini {
    padding: 60px 20px;
    background: linear-gradient(135deg, #0d0800 0%, #0a0a0a 100%);
    text-align: center;
}
.adaptive-features {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}
.adaptive-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    background: rgba(35,35,40,0.6);
    border: 1px solid rgba(255,150,0,0.1);
    border-radius: 12px;
    padding: 20px;
}
.adaptive-icon {
    font-size: 24px;
    color: #FF9600;
    min-width: 40px;
    text-align: center;
    padding-top: 2px;
}
.adaptive-text h4 { color: #fff; font-size: 15px; margin-bottom: 4px; }
.adaptive-text p { color: rgba(255,255,255,0.55); font-size: 13px; line-height: 1.5; }

/* Portfolio / DIY Flow */
.portfolio-studini {
    padding: 60px 20px;
    background: #0a0a0a;
    text-align: center;
}
.portfolio-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto 24px;
    flex-wrap: wrap;
}
.portfolio-step {
    background: rgba(35,35,40,0.85);
    border: 1px solid rgba(255,215,0,0.12);
    border-radius: 16px;
    padding: 20px 16px;
    width: 160px;
    text-align: center;
}
.portfolio-step-icon { font-size: 32px; margin-bottom: 10px; }
.portfolio-step h4 { color: #FF9600; font-size: 14px; margin-bottom: 6px; }
.portfolio-step p { color: rgba(255,255,255,0.55); font-size: 12px; line-height: 1.4; }
.portfolio-arrow { color: rgba(255,150,0,0.4); font-size: 20px; padding-top: 36px; }
.portfolio-note { color: rgba(255,255,255,0.5); font-size: 14px; max-width: 600px; margin: 0 auto; }

@media (max-width: 700px) {
    .portfolio-flow { flex-direction: column; align-items: center; }
    .portfolio-arrow { transform: rotate(90deg); padding: 0; }
    .portfolio-step { width: 80%; max-width: 280px; }
}

/* Comparison Table */
.compare-studini {
    padding: 60px 20px;
    background: linear-gradient(135deg, #0d0800 0%, #0a0a0a 100%);
    text-align: center;
}
.compare-table-wrap {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.compare-table thead th {
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,150,0,0.2);
    text-align: center;
}
.compare-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}
.compare-table tbody td:first-child { text-align: left; color: rgba(255,255,255,0.8); font-weight: 500; }
.compare-highlight {
    background: rgba(255,150,0,0.08) !important;
    color: #FF9600 !important;
    font-weight: 600 !important;
}
.compare-table thead th.compare-highlight { color: #FF9600 !important; }
.ct { color: rgba(255,100,100,0.5); }
.cy { color: rgba(255,200,50,0.6); }
.cg { color: #58CC02; }

@media (max-width: 600px) {
    .compare-table { font-size: 11px; }
    .compare-table thead th, .compare-table tbody td { padding: 8px 4px; }
}

/* Pricing 3 columns */
.pricing-cards-studini.three-cols {
    grid-template-columns: repeat(3, 1fr);
    max-width: 960px;
}
@media (max-width: 800px) {
    .pricing-cards-studini.three-cols { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

.cta-studini {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #1a0a00 0%, #0a0a0a 100%);
}
.cta-desc { color: rgba(255,255,255,0.7); font-size: 16px; margin-bottom: 24px; }

/* Footer v2 */
.footer-studini-v2 {
    background: #050505;
    border-top: 1px solid rgba(255,150,0,0.2);
    padding: 48px 20px 24px;
}
.footer-inner-studini {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}
.footer-brand-studini p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 600;
}
.footer-desc-studini {
    color: rgba(255,255,255,0.4) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    margin-top: 8px;
    line-height: 1.5;
}
.footer-links-studini h4 {
    color: #FF9600;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.footer-links-studini ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links-studini li {
    padding: 4px 0;
}
.footer-links-studini a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
    cursor: pointer;
}
.footer-links-studini a:hover { color: #FF9600; }
.footer-bottom-studini {
    text-align: center;
    padding-top: 24px;
    margin-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.3);
    font-size: 12px;
}

/* Origin Story */
.story-studini {
    padding: 60px 20px;
    background: #111;
}
.story-content-v2 {
    max-width: 800px;
    margin: 0 auto;
}
.story-paragraph {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 16px;
}
.story-img-v2 {
    width: 100%;
    border-radius: 16px;
    margin-top: 32px;
    display: block;
}

/* Contact Page */
.contact-screen-studini {
    min-height: 100vh;
    background: var(--bg);
    padding: 0 16px 40px;
}
.contact-header-studini {
    text-align: center;
    padding: 60px 0 24px;
    position: relative;
}
.contact-back-studini {
    position: absolute;
    left: 0;
    top: 60px;
    color: #FF9600;
    font-size: 20px;
    cursor: pointer;
}
.contact-header-studini h1 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}
.contact-header-studini p {
    color: var(--text-muted);
    margin-top: 8px;
}
.contact-form-card-studini {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
}
.contact-form-card-studini .form-group {
    margin-bottom: 16px;
}
.contact-form-card-studini label {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.contact-form-card-studini .form-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px 14px;
    color: #fff;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    font-family: var(--font);
}
.contact-form-card-studini select.form-input {
    appearance: auto;
}
.contact-form-card-studini textarea.form-input {
    resize: vertical;
    min-height: 100px;
}
.contact-form-card-studini .form-input:focus {
    border-color: #FF9600;
}
.contact-success-studini {
    max-width: 400px;
    margin: 60px auto 0;
    text-align: center;
}
.contact-success-icon-studini {
    font-size: 56px;
    color: #4CAF50;
    margin-bottom: 16px;
}
.contact-success-studini h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 8px;
}
.contact-success-studini p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Old footer (keep for compatibility) */
.footer-studini {
    padding: 32px 20px;
    text-align: center;
    background: #050505;
    border-top: 1px solid rgba(255,150,0,0.2);
}
.footer-content { color: rgba(255,255,255,0.5); font-size: 13px; }

/* Terms Modal */
.terms-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.terms-modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.terms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.terms-tabs {
    display: flex;
    gap: 4px;
}
.terms-tabs button {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.terms-tabs button.active {
    background: #FF9600;
    color: #000;
}
.terms-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    cursor: pointer;
}
.terms-modal-body {
    padding: 24px;
    overflow-y: auto;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.7;
}
.terms-modal-body h1, .terms-modal-body h2, .terms-modal-body h3 {
    color: #FF9600;
    margin: 16px 0 8px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-links, .nav-actions { display: none; }
    .nav-mobile-toggle { display: block; }
    .mobile-menu { display: flex; }
    .mobile-menu[ng-show="mobileMenu"] { display: none; }
    .mobile-menu.ng-hide-remove, .mobile-menu:not(.ng-hide) { display: flex; }
    
    .hero-content-studini {
        align-items: center;
        text-align: center;
        padding: 40px 20px 60px;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    }
    .hero-title-studini { font-size: 36px; }
    .hero-subtitle-studini { font-size: 15px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-btn { text-align: center; justify-content: center; }
    
    .feature-cards { grid-template-columns: 1fr; max-width: 400px; }
    .how-steps { grid-template-columns: repeat(2, 1fr); }
    .pricing-cards-studini { grid-template-columns: 1fr; max-width: 400px; }
    .footer-inner-studini { grid-template-columns: 1fr; text-align: center; }
}

/* Old hero (keep for compatibility) */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #E08600 100%);
    color: var(--white);
    padding: 80px 20px 60px;
    text-align: center;
}
.hero-mascot {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.2);
}
.hero-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 8px;
}
.hero-subtitle {
    font-size: 22px;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 20px;
}
.hero-description {
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto 32px;
    opacity: 0.85;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-primary { background: var(--bg-card); color: var(--primary); box-shadow: 0 4px 0 rgba(0,0,0,0.15); }
.hero-actions .btn-primary:hover { background: #f0f0ff; }
.hero-actions .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.5); }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.15); }

/* Sections */
.section { padding: 60px 20px; }
.section-title {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text);
}

/* Story */
.story-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 680px;
    margin: 0 auto;
}
.story-quote {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    font-style: italic;
}
.story-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 12px;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
.step-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow);
}
.step-icon { font-size: 40px; margin-bottom: 12px; }
.step-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-light); line-height: 1.5; }

/* Differentials */
.diff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
.diff-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}
.diff-item h4 { font-size: 16px; font-weight: 800; margin-bottom: 8px; color: var(--primary); }
.diff-item p { font-size: 14px; color: var(--text-light); line-height: 1.5; }

/* Compare */
.compare-list {
    max-width: 680px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.compare-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.compare-row:last-child { border-bottom: none; }
.compare-header { font-weight: 800; background: var(--bg); font-size: 13px; text-transform: uppercase; }
.compare-row .check { color: var(--green); font-weight: 700; text-align: center; }
.compare-row .no { color: var(--text-muted); text-align: center; font-size: 13px; }
.compare-row .partial { color: var(--orange); text-align: center; font-size: 13px; }
.compare-row .price { font-weight: 700; text-align: center; }

/* Pricing */
.section-pricing { background: var(--bg); }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}
.plan-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}
.plan-featured {
    border: 3px solid var(--primary);
    transform: scale(1.03);
}
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}
.plan-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.plan-price {
    font-size: 40px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 20px;
}
.plan-price span { font-size: 16px; font-weight: 600; color: var(--text-light); }
.plan-features {
    list-style: none;
    margin-bottom: 28px;
    text-align: left;
}
.plan-features li {
    padding: 8px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    padding-left: 24px;
    position: relative;
}
.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 800;
}
.pricing-note {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

/* CTA */
.section-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #E08600 100%);
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}
.section-cta h2 { font-size: 32px; font-weight: 900; margin-bottom: 12px; }
.section-cta p { font-size: 17px; opacity: 0.9; margin-bottom: 28px; }
.section-cta .btn-primary { background: var(--bg-card); color: var(--primary); box-shadow: 0 4px 0 rgba(0,0,0,0.15); }

/* Footer */
.landing-footer {
    padding: 24px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.landing-footer a { color: var(--primary); text-decoration: none; }
.version { font-size: 11px; margin-top: 4px; }

/* ===== User Type Selection ===== */
.user-type-selection {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.btn-user-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
    font-family: var(--font);
    gap: 8px;
}
.btn-user-type:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.user-type-icon {
    font-size: 36px;
    line-height: 1;
}
.user-type-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.user-type-desc {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* ===== Auth Pages ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
}
.auth-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.auth-logo {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--text-light); margin-bottom: 24px; }

.auth-form { text-align: left; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font);
    outline: none;
    transition: border 0.2s;
    background: var(--bg-surface);
    color: var(--text);
}
.form-group input:focus { border-color: var(--primary); }

.auth-error {
    background: rgba(255,75,75,0.1);
    color: var(--red);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
}
.auth-success {
    background: rgba(88,204,2,0.1);
    color: var(--green);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
}
.auth-link {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-light);
}
.auth-link a { color: var(--primary); font-weight: 700; text-decoration: none; }

/* ===== Login Page (Studini themed) ===== */
.login-page-studini {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}
.login-video-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
}
.login-video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
    transition: background 0.6s;
}
.login-video-overlay.login-overlay-dim {
    background: rgba(0,0,0,0.5);
}
.login-video-overlay:not(.login-overlay-dim) {
    background: rgba(0,0,0,0.15);
}
.login-container-studini {
    background: rgba(10,10,10,0.8);
    border: 1px solid rgba(255,150,0,0.2);
    border-radius: 20px;
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(12px);
    transition: opacity 0.5s, transform 0.5s;
}
.login-container-studini.login-hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}
/* Magic button */
.login-magic-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,150,0,0.15);
    border: 1px solid rgba(255,150,0,0.3);
    color: #FF9600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.login-magic-btn:hover {
    background: rgba(255,150,0,0.3);
    transform: rotate(15deg) scale(1.1);
}
/* Return from magic */
.login-magic-return {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,150,0,0.9);
    border: none;
    color: #000;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255,150,0,0.4);
    transition: transform 0.2s;
    animation: magic-pulse 2s ease-in-out infinite;
}
.login-magic-return:hover {
    transform: translateX(-50%) scale(1.1);
}
@keyframes magic-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(255,150,0,0.4); }
    50% { box-shadow: 0 4px 30px rgba(255,150,0,0.7); }
}
.login-logo-studini {
    font-size: 32px;
    font-weight: 900;
    color: #FF9600;
    margin-bottom: 16px;
}
.login-subtitle-studini {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}
.login-type-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.login-type-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(255,150,0,0.05);
    border: 2px solid rgba(255,150,0,0.2);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    text-align: left;
}
.login-type-btn:hover {
    border-color: #FF9600;
    background: rgba(255,150,0,0.1);
}
.login-type-btn-icon {
    font-size: 28px;
    color: #FF9600;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,150,0,0.1);
    border-radius: 12px;
    flex-shrink: 0;
}
.login-type-btn-label {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: white;
}
.login-type-btn-desc {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}
.login-form-studini {
    text-align: center;
}
.login-field {
    margin-bottom: 16px;
    text-align: left;
}
.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.7);
}
.login-field input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 16px;
    font-family: var(--font);
    outline: none;
    background: #1a1a1a;
    color: white;
    transition: border 0.2s;
    box-sizing: border-box;
}
.login-field input:focus { border-color: #FF9600; }
.login-field input::placeholder { color: rgba(255,255,255,0.3); }
.login-submit-studini {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 800;
    font-family: var(--font);
    background: #FF9600;
    color: #000;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.login-submit-studini:hover { background: #e08600; }
.login-submit-studini:disabled { opacity: 0.6; cursor: not-allowed; }
.login-link-studini {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}
.login-link-studini a {
    color: #FF9600;
    font-weight: 700;
    text-decoration: none;
}

/* ===== App Pages (shared) ===== */
.app-page { min-height: calc(100vh - 40px); background: var(--bg); padding-bottom: 40px; }
.section-pad { padding: 16px 20px; }
.section-heading { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.subsection-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--text-light); }

.app-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #050505;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}
.header-greeting { font-size: 18px; font-weight: 800; }
.header-title { font-size: 17px; font-weight: 800; flex: 1; }
.header-left { flex: 1; }
.header-right { display: flex; gap: 8px; }

.btn-icon {
    width: 40px; height: 40px;
    border: none; background: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; color: var(--primary);
}
.btn-icon .icon { font-size: 20px; }

/* Loading & Empty */
.loading-state, .empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 60px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--text-light); margin-bottom: 20px; line-height: 1.5; }
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Children Grid ===== */
.children-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 8px;
}
.child-card-wide {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.child-card-main {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 16px;
}
.child-card-main:active { background: var(--bg); }
.child-avatar-lg {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 900; color: var(--white);
    flex-shrink: 0;
}
.child-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.child-info { flex: 1; min-width: 0; }
.child-name-lg { font-size: 20px; font-weight: 700; }
.child-stats-lg { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.child-arrow { font-size: 28px; color: var(--text-light); font-weight: 300; }
.child-actions-menu {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}
.btn-child-action-menu {
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px;
    height: 52px;
    background: none; border: none;
    font-size: 15px; color: var(--text);
    cursor: pointer; transition: background 0.15s;
    font-family: var(--font);
}
.btn-child-action-menu:not(:last-child) { border-bottom: 1px solid var(--border); }
.btn-child-action-menu:active { background: var(--bg); }
.action-icon-fa { font-size: 18px; width: 24px; text-align: center; color: var(--text-light); }
.action-label { font-weight: 500; }
.btn-action-delete { color: #999; }
.btn-action-delete .action-icon-fa { color: #999; }
.btn-action-delete:active { background: rgba(255,75,75,0.1); }

/* Child card v2 — grid layout */
.child-card-v2 {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 16px;
}
.child-card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 16px;
}
.child-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
}
.child-action-grid .child-grid-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
.child-grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    font-family: var(--font);
    gap: 4px;
}
.child-grid-btn:active { background: var(--bg); }
.child-grid-btn i {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 4px;
}
.grid-btn-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.grid-btn-sub {
    font-size: 11px;
    color: var(--text-light);
}

.btn-add-child {
    border: 2px dashed var(--border);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
    padding: 16px;
    border-radius: var(--radius);
}

/* Add child form */
.add-child-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.add-child-form h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.form-row { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* ===== Trail / Folder Navigation ===== */
.breadcrumb {
    padding: 8px 20px;
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--primary); cursor: pointer; font-weight: 600; }

/* Subject Grid (child root - 2 per row Duolingo style) */
.subject-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 8px 0;
}
.subject-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px 16px;
    background: var(--bg-card);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.15s;
    border: 2px solid var(--border);
}
.subject-card:active {
    transform: scale(0.95);
}
.subject-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    margin-bottom: 12px;
    border-bottom: 4px solid rgba(0,0,0,0.2);
}
.subject-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 4px;
}
.subject-card-progress {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.folder-list { display: flex; flex-direction: column; gap: 10px; }
.folder-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s;
}
.folder-item:active { transform: scale(0.98); }
.folder-locked { opacity: 0.5; cursor: default; }
.folder-locked:active { transform: none; }

.folder-icon-wrap {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.folder-icon { font-size: 22px; }
.folder-icon-fa { font-size: 20px; color: #fff; }
.folder-info { flex: 1; min-width: 0; }
.folder-title { font-size: 15px; font-weight: 700; }
.folder-meta { font-size: 12px; color: var(--text-light); margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.folder-arrow { font-size: 20px; color: var(--text-muted); font-weight: 700; }
.btn-edit-item {
    background: none; border: none; font-size: 14px; padding: 8px;
    cursor: pointer; opacity: 0.35; transition: opacity 0.2s; color: #FF9600;
}
.btn-edit-item:hover, .btn-edit-item:active { opacity: 1; }
.btn-delete-item {
    background: none; border: none; font-size: 16px; padding: 8px;
    cursor: pointer; opacity: 0.4; transition: opacity 0.2s;
}
.btn-delete-item:hover, .btn-delete-item:active { opacity: 1; }
.color-pick-label {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; cursor: pointer; font-size: 18px;
    position: relative; flex-shrink: 0;
}
.btn-color-pick-hidden {
    position: absolute; opacity: 0; width: 100%; height: 100%;
    cursor: pointer; top: 0; left: 0;
}
.btn-clear-progress {
    background: none; border: none; font-size: 14px; padding: 8px;
    cursor: pointer; opacity: 0.4; transition: opacity 0.2s;
}
.btn-clear-progress:hover, .btn-clear-progress:active { opacity: 1; }
.folder-lock { font-size: 18px; }
.folder-percent { font-size: 12px; font-weight: 700; color: var(--primary); }

.progress-bar-mini { width: 60px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill-mini { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.3s; }

/* Content items */
.content-list { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.content-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border-radius: var(--radius-sm); padding: 14px;
    box-shadow: var(--shadow); cursor: pointer;
}
.content-icon { font-size: 24px; }
.content-info { flex: 1; }
.content-title { font-size: 15px; font-weight: 700; }
.content-type { font-size: 12px; color: var(--text-light); }

/* FAB */
.fab-container { position: fixed; bottom: 80px; right: 24px; z-index: 50; }
.fab {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* ===== Capture Page ===== */
.capture-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.capture-icon { font-size: 48px; margin-bottom: 12px; }
.capture-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.capture-card p { color: var(--text-light); line-height: 1.5; }

.capture-preview { margin: 16px 0; }
.capture-preview img { max-width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

.capture-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.capture-btn { position: relative; overflow: hidden; }

.context-info {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex; gap: 8px; align-items: center;
    font-size: 13px;
}
.context-label { color: var(--text-light); }
.context-path { font-weight: 700; color: var(--primary); }

/* Review */
/* Curation Screen */
.cur-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px;
}
.cur-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.cur-badge-subject { background: rgba(255,150,0,0.2); color: #FF9600; }
.cur-badge-module { background: rgba(255,215,0,0.15); color: #FFD700; }
.cur-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    padding: 6px 0;
}
.cur-input:focus { border-color: var(--primary); outline: none; }

.cur-lesson {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}
.cur-lesson-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px;
    cursor: pointer;
}
.cur-lesson-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.cur-lesson-icon { font-size: 18px; }
.cur-lesson-title {
    flex: 1; min-width: 0;
    background: transparent; border: none;
    color: #fff; font-family: var(--font);
    font-size: 15px; font-weight: 700;
    padding: 2px 0;
}
.cur-lesson-title:focus { border-bottom: 1px solid var(--primary); outline: none; }
.cur-lesson-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cur-q-count { font-size: 12px; color: rgba(255,255,255,0.4); }
.cur-del-btn {
    background: none; border: none; color: rgba(255,100,100,0.5);
    font-size: 13px; cursor: pointer; padding: 4px;
}
.cur-del-btn:hover { color: #FF4B4B; }
.cur-chevron { font-size: 12px; color: rgba(255,255,255,0.3); }

.cur-questions { padding: 0 12px 12px; }
.cur-question {
    background: rgba(20,20,25,0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.cur-q-explanation { border-color: rgba(255,215,0,0.15); background: rgba(255,215,0,0.04); }
.cur-q-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.cur-q-type { font-size: 16px; }
.cur-q-type-label { font-size: 11px; color: rgba(255,255,255,0.4); font-weight: 700; text-transform: uppercase; flex: 1; }
.cur-del-q { margin-left: auto; }
.cur-q-text {
    width: 100%; box-sizing: border-box;
    background: transparent; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px; padding: 8px;
    color: rgba(255,255,255,0.8);
    font-family: var(--font); font-size: 13px;
    resize: vertical;
}
.cur-q-text:focus { border-color: var(--primary); outline: none; }
.cur-te-text { min-height: 80px; }

.cur-choices { margin-top: 6px; }
.cur-choice {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 0;
}
.cur-choice-correct .cur-choice-mark { color: #58CC02; }
.cur-choice-mark { font-size: 14px; color: rgba(255,255,255,0.3); width: 18px; text-align: center; }
.cur-choice-input {
    flex: 1;
    background: transparent; border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    font-family: var(--font); font-size: 13px;
    padding: 3px 0;
}
.cur-choice-input:focus { border-color: var(--primary); outline: none; }

.cur-tf, .cur-dd, .cur-match, .cur-mw, .cur-sa, .cur-te, .cur-tts, .cur-feedback { margin-top: 6px; }
.cur-dd-label { font-size: 11px; color: rgba(255,255,255,0.35); font-weight: 700; margin-right: 6px; }
.cur-tf-select {
    background: var(--bg); color: #FFD700; border: 1px solid rgba(255,215,0,0.2);
    border-radius: 6px; padding: 4px 8px; font-family: var(--font); font-size: 13px;
}
.cur-match-pair { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.cur-match-left, .cur-match-right { flex: 1; }
.cur-match-arrow { color: rgba(255,150,0,0.4); font-size: 12px; }

.cur-summary {
    text-align: center; padding: 12px;
    color: rgba(255,255,255,0.4); font-size: 13px; font-weight: 600;
}

/* Legacy review classes (kept for compatibility) */
.review-item { display: none; }
.review-lessons { display: none; }

.save-progress {
    margin-top: 16px; text-align: center;
}
.progress-bar {
    width: 100%; height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}
.progress-text { font-size: 13px; color: var(--text-light); }

.capture-done { background: var(--bg-card); color: var(--white); border: 1px solid var(--border); }
.capture-done h3 { color: var(--white); }
.capture-done p { color: var(--text-light); }
.capture-done .btn + .btn { margin-top: 12px; }

/* ===== Quiz Page ===== */
.quiz-progress-header { flex: 1; }
.quiz-counter { font-size: 14px; font-weight: 700; color: var(--text-light); white-space: nowrap; }

.quiz-content { padding: 20px; max-width: 600px; margin: 0 auto; }
.question-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: transform 0.3s;
}
.question-number { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.question-text { font-size: 18px; font-weight: 700; line-height: 1.5; color: #fff; }

.shake { animation: shake 0.5s; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.choices-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.choice-btn {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 16px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px; font-weight: 600;
    cursor: pointer; text-align: left;
    transition: all 0.15s;
}
.choice-btn:active { transform: scale(0.98); }
.choice-letter {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: var(--primary);
    flex-shrink: 0;
}
.choice-label { flex: 1; color: #fff; }
.choice-indicator { font-size: 18px; font-weight: 800; }

.choice-selected { border-color: var(--primary); background: rgba(255,150,0,0.15); }
.choice-selected .choice-letter { background: var(--primary); color: var(--white); }
.choice-correct { border-color: var(--green); background: rgba(88,204,2,0.1); }
.choice-correct .choice-letter { background: var(--green); color: var(--white); }
.choice-correct .choice-indicator { color: var(--green); }
.choice-wrong { border-color: var(--red); background: rgba(255,75,75,0.1); }
.choice-wrong .choice-letter { background: var(--red); color: var(--white); }
.choice-wrong .choice-indicator { color: var(--red); }

/* Listen/TTS Style */
.question-listen { text-align: center; padding: 20px 0; }
.btn-listen {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9600, #FFB347);
    border: none;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(255,150,0,0.4);
}
.btn-listen:active { transform: scale(0.95); }
.btn-listen.speaking {
    animation: pulse-speak 1s infinite;
    box-shadow: 0 0 0 0 rgba(255,150,0,0.4);
}
@keyframes pulse-speak {
    0% { box-shadow: 0 0 0 0 rgba(255,150,0,0.5); }
    70% { box-shadow: 0 0 0 16px rgba(255,150,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,150,0,0); }
}
.listen-instruction {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-top: 12px;
}

/* Question text with HTML/images */
.question-text img {
    max-width: 100%;
    border-radius: 12px;
    margin: 8px 0;
}
.question-text .katex { font-size: 1.1em; }

/* Drag and Drop */
.drag-drop-area { margin-bottom: 20px; }
.dd-answer-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 48px;
    padding: 12px;
    background: rgba(35,35,40,0.5);
    border: 2px dashed rgba(255,215,0,0.2);
    border-radius: 12px;
}
.dd-slot {
    min-width: 60px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}
.dd-slot-filled { border-color: var(--primary); background: rgba(255,150,0,0.15); }
.dd-slot-correct { border-color: var(--green) !important; background: rgba(88,204,2,0.15) !important; }
.dd-slot-wrong { border-color: var(--red) !important; background: rgba(255,75,75,0.15) !important; }
.dd-placeholder { color: rgba(255,255,255,0.2); }

.dd-word-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.dd-word {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 2px solid rgba(255,215,0,0.18);
    border-radius: 8px;
    color: #FFD700;
    font-family: var(--font);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.dd-word:active { transform: scale(0.95); }
.dd-word:disabled { opacity: 0.3; cursor: default; }

/* Teacher Explanation */
.te-label { color: #FFD700 !important; font-size: 14px !important; }
.te-label i { margin-right: 6px; }
.teacher-explanation { margin-bottom: 20px; }
.te-content {
    background: rgba(35,35,40,0.85);
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 12px;
    padding: 20px;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.te-content p { margin-bottom: 12px; }
.te-content p:last-child { margin-bottom: 0; }
.te-content strong { color: #FF9600; }
.te-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.te-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 2px solid rgba(255,150,0,0.3);
    border-radius: 12px;
    color: #FF9600;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.te-call-btn:active { background: rgba(255,150,0,0.1); transform: scale(0.98); }
.te-call-btn i { font-size: 18px; }

/* DIY Project */
.diy-area { margin-bottom: 16px; }
.diy-description {
    color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.6;
    margin-bottom: 14px; padding: 12px;
    background: rgba(35,35,40,0.85); border-radius: 10px;
    border-left: 3px solid #FF9600;
}
.diy-section-title {
    font-size: 13px; font-weight: 800; color: #FFD700;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.diy-section-title i { margin-right: 6px; }
.diy-materials { margin-bottom: 14px; }
.diy-material { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: rgba(255,255,255,0.7); font-size: 14px; }
.diy-bullet { color: #FF9600; font-weight: bold; }
.diy-steps { margin-bottom: 14px; }
.diy-step { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.diy-step:last-child { border-bottom: none; }
.diy-step-num {
    min-width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255,150,0,0.2); color: #FF9600;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.diy-step-text { color: rgba(255,255,255,0.75); font-size: 14px; line-height: 1.5; }
.diy-time { color: rgba(255,255,255,0.4); font-size: 12px; margin-bottom: 16px; }
.diy-time i { margin-right: 6px; }
.diy-photo-section { margin-top: 12px; }
.diy-photo-preview { margin-bottom: 12px; border-radius: 12px; overflow: hidden; }
.diy-photo-preview img { width: 100%; border-radius: 12px; }
.diy-photo-btn { margin-bottom: 8px; }
.diy-evaluating {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    padding: 16px; color: rgba(255,255,255,0.5); font-size: 14px;
}
.diy-spinner {
    width: 20px; height: 20px; border: 2px solid rgba(255,150,0,0.3);
    border-top-color: #FF9600; border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.diy-feedback {
    background: rgba(35,35,40,0.85); border-radius: 12px;
    padding: 16px; margin-top: 12px;
}
.diy-feedback-grade { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.grade-great { color: #58CC02; }
.grade-ok { color: #FFD700; }
.grade-retry { color: #FF9600; }
.diy-feedback-text { color: rgba(255,255,255,0.75); font-size: 14px; line-height: 1.6; }

/* PBL Problem Solving */
.pbl-area { margin-bottom: 16px; }
.pbl-scenario {
    color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.6;
    margin-bottom: 14px; padding: 14px;
    background: rgba(35,35,40,0.85); border-radius: 10px;
    border-left: 3px solid #FFD700;
}
.pbl-questions { margin-bottom: 12px; }
.pbl-question { margin-bottom: 14px; }
.pbl-q-prompt {
    display: flex; align-items: flex-start; gap: 8px;
    color: rgba(255,255,255,0.85); font-size: 14px; font-weight: 600;
    margin-bottom: 6px;
}
.pbl-q-num {
    min-width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,215,0,0.15); color: #FFD700;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.pbl-q-type { font-size: 14px; }
.pbl-answer {
    width: 100%; box-sizing: border-box;
    background: rgba(20,20,25,0.6); border: 1px solid rgba(255,215,0,0.15);
    border-radius: 8px; padding: 10px; resize: vertical;
    color: rgba(255,255,255,0.8); font-family: var(--font); font-size: 14px;
}
.pbl-answer:focus { border-color: #FF9600; outline: none; }
.pbl-feedback-area {
    background: rgba(35,35,40,0.85); border-radius: 12px;
    padding: 16px; margin-top: 12px;
}
.pbl-overall { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.pbl-feedback-text { color: rgba(255,255,255,0.75); font-size: 14px; line-height: 1.6; }

/* True/False btn spacing */
.choice-tf .choice-letter { font-size: 16px; }

/* MATCHING */
.matching-area { margin-bottom: 20px; }
.matching-pair {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
}
.matching-correct { border-color: var(--green) !important; background: rgba(88,204,2,0.08) !important; }
.matching-wrong { border-color: var(--red) !important; background: rgba(255,75,75,0.08) !important; }
.matching-left {
    flex: 1;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}
.matching-right { flex: 1; }
.matching-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    color: #FFD700;
    border: 2px solid rgba(255,215,0,0.2);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FFD700'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.matching-select:focus { border-color: var(--primary); outline: none; }

/* SELECT_MISSING_WORDS */
.missing-words-area { margin-bottom: 20px; }
.mw-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 2.2;
    color: #fff;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.mw-select {
    padding: 4px 24px 4px 8px;
    background: var(--bg);
    color: #FFD700;
    border: 2px solid rgba(255,215,0,0.25);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23FFD700'%3E%3Cpath d='M5 7L0 2h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    margin: 0 2px;
    vertical-align: middle;
}
.mw-select:focus { border-color: var(--primary); outline: none; }
.mw-correct { border-color: var(--green) !important; color: var(--green) !important; background-color: rgba(88,204,2,0.1) !important; }
.mw-wrong { border-color: var(--red) !important; color: var(--red) !important; background-color: rgba(255,75,75,0.1) !important; }

/* SHORT_ANSWER */
.short-answer-area { margin-bottom: 20px; }
.short-answer-input {
    width: 100%;
    padding: 16px;
    background: var(--bg-card);
    color: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.short-answer-input:focus { border-color: var(--primary); outline: none; }
.short-answer-input::placeholder { color: rgba(255,255,255,0.3); }
.sa-correct { border-color: var(--green) !important; background: rgba(88,204,2,0.08) !important; }
.sa-wrong { border-color: var(--red) !important; background: rgba(255,75,75,0.08) !important; }

.quiz-actions { margin-top: 16px; }
.btn-green { background: var(--green) !important; box-shadow: 0 4px 0 var(--green-dark) !important; }
.btn-red { background: var(--red) !important; box-shadow: 0 4px 0 #E55050 !important; }

.quiz-feedback {
    text-align: center; padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 700; font-size: 15px;
    margin-top: 12px;
}
.feedback-correct { background: rgba(88,204,2,0.1); color: var(--green); }
.feedback-wrong { background: rgba(255,75,75,0.1); color: var(--red); }
.feedback-explanation {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(108, 92, 231, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
}

/* Quiz Results */
.quiz-results { padding: 20px; max-width: 500px; margin: 0 auto; text-align: center; }
.results-card {
    border-radius: var(--radius);
    padding: 40px 24px;
    margin-bottom: 20px;
}
.results-great { background: linear-gradient(135deg, #00B894, #00CEC9); color: var(--white); }
.results-ok { background: linear-gradient(135deg, #FDCB6E, #F0932B); color: var(--white); }
.results-low { background: linear-gradient(135deg, #74B9FF, #FF9600); color: var(--white); }
.results-emoji { font-size: 64px; margin-bottom: 8px; }
.results-title { font-size: 28px; font-weight: 900; margin: 0 0 8px; }
.results-score { font-size: 18px; font-weight: 600; opacity: 0.9; }
.results-percent-ring { width: 120px; height: 120px; margin: 16px auto; }
.percent-ring { width: 100%; height: 100%; color: white; }
.percent-ring circle:first-child { opacity: 0.3; }
.results-message { font-size: 16px; margin-top: 8px; font-weight: 700; }
.results-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.btn-lg { font-size: 18px; padding: 16px; letter-spacing: 1px; }

/* Celebration results */
.results-character { margin: 20px auto 16px; text-align: center; }
.results-character-img { width: 240px; height: 240px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
.results-title-big { font-size: 28px; font-weight: 900; color: #fff; margin: 8px 0; }
.results-subtitle { font-size: 16px; color: var(--text-light); margin: 4px 0 20px; }
.results-stats-row { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.results-stat-card {
    flex: 1; max-width: 120px; border-radius: 12px; padding: 12px 8px;
    text-align: center; border: 2px solid;
}
.stat-label { font-size: 10px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-value { font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 6px; }
.stat-xp { border-color: #FDCB6E; color: #FDCB6E; background: rgba(253,203,110,0.1); }
.stat-score { border-color: #00B894; color: #00B894; background: rgba(0,184,148,0.1); }
.stat-time { border-color: #74B9FF; color: #74B9FF; background: rgba(116,185,255,0.1); }
/* ===== Edit Child Tabs ===== */
.edit-tabs {
    display: flex; overflow-x: auto; gap: 0;
    border-bottom: 2px solid var(--border); padding: 0 12px;
}
.edit-tab {
    background: none; border: none; padding: 12px 16px;
    font-size: 13px; font-weight: 700; color: var(--text-muted);
    cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent;
    transition: all 0.2s; margin-bottom: -2px;
}
.tab-active { color: var(--primary); border-bottom-color: var(--primary); }

.extracted-info {
    background: var(--bg-surface); border-radius: var(--radius-sm);
    padding: 16px; text-align: left; margin: 16px 0;
    color: var(--text);
}
.extracted-info h4 { margin: 0 0 8px; font-size: 14px; }
.extracted-item { font-size: 13px; margin: 4px 0; }
.success-msg { color: var(--green); font-weight: 700; margin: 12px 0; font-size: 15px; }

/* Character */
.body-photo-area {
    width: 200px; height: 300px; margin: 0 auto 20px;
    border-radius: var(--radius); overflow: hidden; cursor: pointer;
    border: 3px dashed var(--border); display: flex;
    align-items: center; justify-content: center;
}
.body-photo-area:active { border-color: var(--primary); }
.body-photo-preview { width: 100%; height: 100%; object-fit: cover; }
.body-photo-placeholder {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; color: var(--text-muted); font-size: 13px;
}
.character-preview { margin: 20px 0; }
.character-img { max-width: 200px; border-radius: var(--radius); }
.character-style-info { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: var(--text-light); margin: 16px 0; }

/* Transform comparison: photo → character side by side */
.transform-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}
.compare-side {
    flex: 1;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}
.compare-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg);
}
.compare-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    background: var(--bg);
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}
.compare-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.compare-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    font-weight: 600;
}

/* Sounds */
.sound-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sound-card {
    background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
    padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s;
    position: relative;
}
.sound-card:active { transform: scale(0.97); }
.sound-selected { border-color: var(--primary); background: rgba(255, 150, 0, 0.15); color: var(--text); }
.sound-emoji { font-size: 32px; margin-bottom: 4px; }
.sound-name { font-size: 13px; font-weight: 700; }
.btn-play-sound {
    position: absolute; top: 8px; right: 8px;
    background: var(--primary); color: white; border: none;
    width: 28px; height: 28px; border-radius: 50%;
    font-size: 12px; cursor: pointer;
}

/* Stickers */
.sticker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.sticker-item { position: relative; }
.sticker-img { width: 100%; border-radius: var(--radius-sm); }
.sticker-remove {
    position: absolute; top: -6px; right: -6px;
    background: #FF6B6B; color: white; border: none;
    width: 24px; height: 24px; border-radius: 50%;
    font-size: 12px; cursor: pointer; font-weight: 700;
}
.sticker-upload {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 24px; text-align: center; cursor: pointer;
    color: var(--text-muted); display: flex; flex-direction: column;
    align-items: center; gap: 8px;
}
.sticker-upload:active { border-color: var(--primary); }

/* Variations */
.variations-section { margin-top: 8px; }
.variations-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0;
}
.variation-card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; position: relative; border: 2px solid transparent;
    transition: border-color 0.2s;
}
.variation-card.saved { border-color: var(--primary); }
.variation-card.var-approved { border-color: #00B894; }
.variation-card.var-rejected { opacity: 0.4; border-color: #FF6B6B; }
.variation-img {
    width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.variation-img-placeholder {
    width: 100%; aspect-ratio: 1; display: flex; align-items: center;
    justify-content: center; background: var(--bg-darker);
}
.variation-label {
    padding: 8px 10px; font-size: 12px; color: var(--text-light);
    text-align: center; font-weight: 600;
}
.variation-actions {
    display: flex; justify-content: center; gap: 8px; padding: 0 8px 10px;
}
.btn-var-approve {
    background: #00B894; color: white; border: none; border-radius: 50%;
    width: 36px; height: 36px; font-size: 16px; cursor: pointer;
}
.btn-var-reject {
    background: #FF6B6B; color: white; border: none; border-radius: 50%;
    width: 36px; height: 36px; font-size: 16px; cursor: pointer;
}
.btn-var-retry {
    background: var(--bg-darker); color: var(--text-light); border: none;
    border-radius: 20px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.variation-status {
    text-align: center; padding: 4px 8px 10px; font-size: 12px;
}
.variation-remove {
    position: absolute; top: 6px; right: 6px;
    background: rgba(255,107,107,0.9); color: white; border: none;
    width: 28px; height: 28px; border-radius: 50%; font-size: 12px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Character floating alongside lesson bubble */
.duo-character-float {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}
.duo-character-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    animation: char-float 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}
.duo-character-shadow {
    width: 100px;
    height: 16px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.3) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: -4px;
    animation: shadow-pulse 3s ease-in-out infinite;
}
.duo-character-stars {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}
.duo-character-stars i {
    font-size: 18px;
    color: #FFB800;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

@keyframes char-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes shadow-pulse {
    0%, 100% { transform: scaleX(1); opacity: 1; }
    50% { transform: scaleX(0.8); opacity: 0.6; }
}

.parent-test-notice {
    background: #FFF3CD; color: #856404; border-radius: var(--radius-sm);
    padding: 10px 16px; font-size: 13px; font-weight: 600; margin-bottom: 16px;
}

.xp-earned {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-weight: 700;
}
.xp-badge {
    background: var(--orange);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
}

/* Confetti */
/* Confetti canvas */
.confetti-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
}
/* Legacy confetti (quiz) — keep for compat */
.confetti-container {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; z-index: 999;
    overflow: hidden;
}

/* ===== Version Footer ===== */
/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: #050505;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,215,0,0.1);
    z-index: 10000;
    height: 60px;
}
/* Trail page: orange bottom nav like reference design */
body.trail-active .bottom-nav {
    background: #E8962E !important;
    border-top: none !important;
    backdrop-filter: none !important;
}
body.trail-active .bottom-nav .nav-item {
    color: rgba(255,255,255,0.8) !important;
}
body.trail-active .bottom-nav .nav-item.active,
body.trail-active .bottom-nav .nav-item:hover {
    color: #FFFFFF !important;
}
body.trail-active .bottom-nav .nav-item.active::before {
    background: #FFFFFF !important;
}
.bottom-nav-items {
    display: flex;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
    font-weight: 600;
    transition: color 0.25s, transform 0.2s;
    gap: 3px;
    position: relative;
}
.nav-item:hover, .nav-item.active {
    color: #FF9600;
    text-decoration: none;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: #FF9600;
    border-radius: 0 0 3px 3px;
}
.nav-icon {
    font-size: 20px;
    line-height: 1;
}
.nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Adjust app-page bottom padding when bottom nav is visible */
body.has-bottom-nav .app-page {
    padding-bottom: 70px;
}

.app-version {
    position: fixed;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: rgba(255,255,255,0.15);
    pointer-events: none;
    z-index: 9999;
}
body.has-bottom-nav .app-version {
    bottom: 64px;
}

/* ===== Hint Tip ===== */
.hint-tip {
    background: linear-gradient(135deg, #FFF3CD, #FFEDA6);
    border: 1px solid #FFEAA7;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
    color: #8E5A00;
    text-align: center;
    font-weight: 600;
}

.generating-indicator {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
}
.generating-indicator .spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.character-approval {
    text-align: center;
    padding: 16px;
    background: var(--surface);
    border-radius: 16px;
    margin: 12px 0;
}

/* ===== Child Dashboard ===== */
.child-page { background: var(--bg); min-height: 100dvh; padding-bottom: 70px; }
.child-header-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; color: white; overflow: hidden;
    margin-right: 8px;
}
.child-trail { display: flex; flex-direction: column; gap: 16px; padding: 0 4px; }
.trail-node {
    display: flex; align-items: center; gap: 16px;
    background: var(--card); border-radius: var(--radius);
    padding: 16px; box-shadow: var(--shadow); cursor: pointer;
    transition: transform 0.15s;
}
.trail-node:active { transform: scale(0.98); }
.trail-locked { opacity: 0.5; pointer-events: none; }
.trail-node-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
}
.trail-node-info { flex: 1; min-width: 0; }
.trail-node-title { font-size: 17px; font-weight: 700; color: var(--text); }
.trail-node-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.trail-node-percent { font-size: 13px; font-weight: 700; color: var(--text-light); }

/* ===== Wizard ===== */
.wizard-page { background: var(--bg); min-height: 100vh; }
.wizard-progress {
    display: flex; justify-content: center; gap: 24px;
    padding: 16px 20px; margin-bottom: 8px;
}
.wizard-step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--border); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; transition: all 0.3s;
}
.step-active .step-dot { background: var(--primary); color: white; }
.step-done .step-dot { background: var(--green); color: white; }
.step-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.step-active .step-label { color: var(--primary); }

.wizard-content { padding: 20px; text-align: center; max-width: 480px; margin: 0 auto; }
.wizard-icon { font-size: 48px; margin-bottom: 8px; }
.wizard-title { font-size: 24px; font-weight: 800; margin: 0 0 8px; color: var(--text); }
.wizard-subtitle { font-size: 15px; color: var(--text-light); margin: 0 0 24px; }

.wizard-content .form-group { text-align: left; }
.wizard-content textarea {
    width: 100%; padding: 14px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
    resize: vertical; min-height: 120px; box-sizing: border-box;
    background: var(--bg-surface); color: var(--text);
}
.wizard-content textarea:focus { border-color: var(--primary); outline: none; }

.hint-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; justify-content: center; }
.chip {
    background: var(--bg-surface); border: 1px solid var(--border); color: var(--text);
    padding: 6px 14px; border-radius: 20px; font-size: 13px;
    cursor: pointer; transition: all 0.2s; user-select: none;
}
.chip:active { background: var(--primary); color: white; border-color: var(--primary); }

.photo-upload-area {
    width: 180px; height: 180px; margin: 0 auto 24px;
    border-radius: 50%; overflow: hidden; cursor: pointer;
    border: 3px dashed var(--border); display: flex;
    align-items: center; justify-content: center;
    transition: border-color 0.2s;
}
.photo-upload-area:active { border-color: var(--primary); }
.photo-preview-round { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder-round {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 20px; text-align: center;
    color: var(--text-muted); font-size: 13px;
}
.photo-placeholder-icon { font-size: 36px; }

.btn-ghost { background: none; border: none; color: var(--text-muted); font-size: 15px; padding: 12px; cursor: pointer; }

.wizard-done { padding-top: 40px; }
.done-icon { font-size: 64px; }
.done-summary { margin: 24px 0; }
.done-avatar {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 800; color: white; overflow: hidden;
}
.done-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.done-name { font-size: 20px; font-weight: 700; }
.done-email { font-size: 14px; color: var(--text-muted); }

/* ===== Responsive ===== */
/* ===== Chat Page ===== */
.chat-page { display: flex; flex-direction: column; height: 100vh; padding-bottom: 0 !important; }
.chat-page .app-header { flex-shrink: 0; }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
    padding-bottom: 80px;
}

.chat-bubble {
    display: flex; gap: 8px; max-width: 85%;
    animation: fadeInUp 0.2s ease;
}
.chat-bubble.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble.assistant { align-self: flex-start; }

.bubble-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--border); display: flex; align-items: center;
    justify-content: center; font-size: 18px; flex-shrink: 0;
}

.bubble-content { display: flex; flex-direction: column; gap: 2px; }
.bubble-text {
    padding: 10px 14px; border-radius: 16px;
    font-size: 15px; line-height: 1.5; word-wrap: break-word;
}
.assistant .bubble-text { background: var(--bg-card); color: var(--text); border-bottom-left-radius: 4px; box-shadow: var(--shadow); }
.user .bubble-text { background: var(--primary); color: var(--white); border-bottom-right-radius: 4px; }
.bubble-time { font-size: 11px; color: var(--text-muted); padding: 0 4px; }
.user .bubble-time { text-align: right; }

.typing-indicator { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.typing-indicator .dot {
    width: 6px; height: 6px; background: var(--text-muted);
    border-radius: 50%; animation: dotPulse 1.2s infinite;
}
.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chat-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 0 16px 12px; justify-content: center;
}
.chip-btn {
    background: var(--bg-card); border: 1.5px solid var(--primary-light);
    color: var(--primary); padding: 8px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: var(--font); transition: all 0.15s;
}
.chip-btn:active { background: var(--primary); color: var(--white); }

.chat-input-bar {
    position: fixed; bottom: 60px; left: 0; right: 0;
    display: flex; gap: 8px; padding: 10px 12px;
    background: var(--bg-card); border-top: 1px solid var(--border);
    z-index: 100;
}
.chat-input {
    flex: 1; padding: 10px 16px; border: 2px solid var(--border);
    border-radius: 24px; font-size: 15px; font-family: var(--font);
    outline: none; transition: border 0.2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: var(--white); border: none;
    font-size: 18px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: opacity 0.2s;
}
.chat-send-btn:disabled { opacity: 0.4; cursor: default; }

@media (max-width: 600px) {
    .hero-title { font-size: 40px; }
    .hero-subtitle { font-size: 18px; }
    .section-title { font-size: 26px; }
    .compare-row { grid-template-columns: 1.5fr 1fr 1fr 1fr; font-size: 12px; padding: 10px 12px; }
    .plan-featured { transform: none; }
    /* children-list is already full-width */
    .question-text { font-size: 16px; }
}

/* ===== Voice Call UI ===== */
/* Legacy call-ui (kept for backwards compat) */
.call-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 20px;
    flex: 1;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    min-height: calc(100vh - 56px);
}

.call-avatar-large {
    font-size: 80px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 20px rgba(108, 92, 231, 0.4));
}

.call-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.call-status {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.call-status.pulse .call-status-dot {
    animation: callPulse 1.2s ease-in-out infinite;
}

.call-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: #666;
}
.call-status-dot.green { background: #00b894; }
.call-status-dot.yellow { background: #fdcb6e; }

.call-timer {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    font-variant-numeric: tabular-nums;
    margin-bottom: 16px;
}

/* ====== VOICE CALL V2 — immersive orb UI ====== */
.call-ui-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: calc(100vh - 56px);
    background: radial-gradient(ellipse at 50% 40%, #1a1a3e 0%, #0a0a14 70%);
    padding: 40px 20px 30px;
    position: relative;
    overflow: hidden;
}

/* Status */
.call-v2-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.call-v2-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #555;
    transition: background 0.3s;
}
.call-v2-dot.dot-connected { background: #00e676; box-shadow: 0 0 8px #00e676; }
.call-v2-dot.dot-connecting { background: #ffd740; animation: callPulse 1.2s ease-in-out infinite; }
.call-v2-status-text {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}
.call-v2-timer {
    font-size: 28px;
    font-weight: 300;
    color: rgba(255,255,255,0.85);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    margin: 4px 0 2px;
}
.call-v2-name {
    font-size: 14px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 32px;
    font-weight: 500;
}

/* Orb */
.call-v2-orb-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.call-v2-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #888, #444);
    box-shadow: 0 0 30px rgba(120,120,120,0.3);
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.6s ease;
}
.call-v2-orb.orb-active {
    animation: orbPulse 2.5s ease-in-out infinite;
    background: radial-gradient(circle at 35% 35%, #FF9600, #cc6600);
    box-shadow: 0 0 50px rgba(255,150,0,0.5), 0 0 100px rgba(255,150,0,0.2);
}
.call-v2-orb.orb-connecting {
    animation: orbConnect 1.5s ease-in-out infinite;
    background: radial-gradient(circle at 35% 35%, #ffd740, #ff9100);
    box-shadow: 0 0 40px rgba(255,215,64,0.4);
}
.call-v2-orb-inner {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.6), rgba(255,255,255,0));
}

/* Rings */
.call-v2-orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(108,92,231,0.12);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s;
}
.ring-1 { width: 130px; height: 130px; }
.ring-2 { width: 165px; height: 165px; }
.ring-3 { width: 200px; height: 200px; }
.ring-1.ring-active { border-color: rgba(255,150,0,0.25); animation: ringPulse 2.5s ease-in-out infinite 0s; }
.ring-2.ring-active { border-color: rgba(255,150,0,0.18); animation: ringPulse 2.5s ease-in-out infinite 0.3s; }
.ring-3.ring-active { border-color: rgba(255,150,0,0.10); animation: ringPulse 2.5s ease-in-out infinite 0.6s; }

@keyframes orbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@keyframes orbConnect {
    0%, 100% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
}
@keyframes ringPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.5; }
}

/* Wave bars */
.call-v2-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin-bottom: 40px;
}
.wave-bar {
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #6c5ce7, #a29bfe);
    animation: waveAnim 0.8s ease-in-out infinite;
}
.wave-bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 22px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 32px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 38px; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 28px; animation-delay: 0.4s; }
.wave-bar:nth-child(6) { height: 18px; animation-delay: 0.5s; }
.wave-bar:nth-child(7) { height: 10px; animation-delay: 0.6s; }
.wave-bar.wave-muted {
    animation: none !important;
    height: 4px !important;
    background: rgba(255,255,255,0.15);
    transition: height 0.3s, background 0.3s;
}

@keyframes waveAnim {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

/* Controls */
.call-v2-controls {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
    padding-bottom: 80px;
}
.call-v2-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}
.call-v2-mic {
    background: rgba(255,255,255,0.12);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
}
.call-v2-mic:active { transform: scale(0.92); }
.call-v2-mic.mic-muted {
    background: rgba(231,76,60,0.25);
    color: #e74c3c;
    border-color: rgba(231,76,60,0.3);
}
.call-v2-end {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 4px 20px rgba(231,76,60,0.4);
}
.call-v2-end:active { transform: scale(0.92); background: #c0392b; }

/* ===== WHISPER MODE STYLES ===== */
.mode-card-whisper {
    background: rgba(45,45,55,0.9);
    border: 1px solid rgba(98, 126, 234, 0.25);
}
.mode-card-whisper:hover {
    background: rgba(55,55,70,0.95);
    border-color: rgba(98, 126, 234, 0.4);
}

.whisper-ui .call-v2-dot.dot-whisper {
    background: #627eea;
}
.whisper-ui .call-v2-dot.dot-active {
    background: #627eea;
    box-shadow: 0 0 8px #627eea;
}
.whisper-ui .call-v2-dot.dot-processing {
    background: #9b59b6;
    animation: callPulse 1.2s ease-in-out infinite;
}

.whisper-orb.orb-listening {
    animation: whisperPulse 2s ease-in-out infinite;
    background: radial-gradient(circle at 35% 35%, #627eea, #3742fa);
    box-shadow: 0 0 50px rgba(98, 126, 234, 0.5), 0 0 100px rgba(98, 126, 234, 0.2);
}
.whisper-orb.orb-processing {
    animation: whisperProcess 1.5s ease-in-out infinite;
    background: radial-gradient(circle at 35% 35%, #9b59b6, #8e44ad);
    box-shadow: 0 0 40px rgba(155, 89, 182, 0.4);
}
.whisper-orb.orb-speaking {
    animation: whisperSpeak 2.2s ease-in-out infinite;
    background: radial-gradient(circle at 35% 35%, #5dade2, #3498db);
    box-shadow: 0 0 50px rgba(93, 173, 226, 0.5);
}

.whisper-ring.ring-active {
    border-color: rgba(98, 126, 234, 0.3);
    animation: whisperRipple 2s ease-out infinite;
}
.whisper-ring.ring-processing {
    border-color: rgba(155, 89, 182, 0.3);
    animation: whisperProcessRipple 1.5s ease-out infinite;
}
.whisper-ring.ring-speaking {
    border-color: rgba(93, 173, 226, 0.3);
    animation: whisperSpeakRipple 2.2s ease-out infinite;
}

.whisper-state-indicator {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    text-align: center;
    margin: 16px 0;
    min-height: 24px;
}

.whisper-mic {
    background: rgba(98, 126, 234, 0.2);
    border-color: rgba(98, 126, 234, 0.3);
    color: #627eea;
}
.whisper-mic:hover {
    background: rgba(98, 126, 234, 0.3);
}
.whisper-mic:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes whisperPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes whisperProcess {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.02) rotate(180deg); }
}

@keyframes whisperSpeak {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.03); }
    75% { transform: scale(1.02); }
}

@keyframes whisperRipple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

@keyframes whisperProcessRipple {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.3) rotate(360deg); opacity: 0; }
}

@keyframes whisperSpeakRipple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.call-transcript {
    flex: 1;
    width: 100%;
    max-width: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    min-height: 120px;
    max-height: 40vh;
}

.transcript-line {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
}

.transcript-line.child {
    justify-content: flex-end;
}

.transcript-line.child .transcript-text {
    background: rgba(108, 92, 231, 0.3);
    padding: 6px 10px;
    border-radius: 12px;
}

.transcript-line.teacher .transcript-text {
    background: rgba(255,255,255,0.08);
    padding: 6px 10px;
    border-radius: 12px;
}

.transcript-line.current .transcript-text {
    opacity: 0.6;
}

.transcript-role {
    flex-shrink: 0;
    font-size: 18px;
}

.call-controls {
    display: flex;
    gap: 30px;
    padding-bottom: 20px;
}

.btn-call-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.btn-call-action span {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: rgba(255,255,255,0.1);
    transition: background 0.2s;
}

.btn-call-action small {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

.btn-mute.active span {
    background: rgba(231, 76, 60, 0.3);
}

.btn-endcall span {
    background: #e74c3c !important;
    transform: rotate(135deg);
}

.chat-mic-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(108, 92, 231, 0.15);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.chat-mic-btn:hover {
    background: rgba(108, 92, 231, 0.3);
}

@keyframes callPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* ===== Mode Selection ===== */
.mode-select {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 20px;
}

.mode-select-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 32px;
}

.mode-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 340px;
}

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 24px;
    border-radius: 16px;
    border: 1.5px solid rgba(255,215,0,0.18);
    background: rgba(35,35,40,0.85);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.mode-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,150,0,0.06), transparent);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
    width: 200%;
}

.mode-card:active {
    transform: scale(0.97);
    border-color: rgba(255,150,0,0.4);
    box-shadow: 0 0 20px rgba(255,150,0,0.2);
}

.mode-card-chat {
    background: rgba(35,35,40,0.85);
}

.mode-card-call {
    background: rgba(35,35,40,0.85);
}

.mode-card-icon {
    font-size: 44px;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.mode-card-label {
    font-size: 18px;
    font-weight: 800;
    color: #FF9600;
}

.mode-card-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

/* ===== Call History ===== */
.call-history { margin-top: 24px; padding: 0 4px; width: 100%; max-width: 340px; }
.call-history-title { font-size: 12px; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 10px; letter-spacing: 0.5px; font-weight: 600; }
.call-history-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(35,35,40,0.85); border: 1px solid rgba(255,215,0,0.1); border-radius: 12px; margin-bottom: 6px; }
.call-history-icon { font-size: 18px; }
.call-history-info { flex: 1; }
.call-history-date { font-size: 14px; color: rgba(255,255,255,0.7); }
.call-history-duration { font-size: 13px; color: #666; font-weight: 500; }

/* ===== Exam Calendar ===== */
.exams-page .section-pad { padding: 16px; }

.exam-form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.exam-form-card .form-group {
    margin-bottom: 14px;
}

.exam-form-card label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.exam-form-card .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
}

.exam-form-card .form-control:focus {
    border-color: var(--primary);
}

.exam-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--green);
}

.exam-card.exam-past {
    opacity: 0.5;
}

.exam-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exam-subject {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.exam-topic {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 2px;
}

.exam-date {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

.exam-days {
    font-weight: 700;
}

.exam-days-past {
    color: var(--text-muted);
}

.exam-notes {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
    padding: 0;
}

/* ===== Duolingo S-Curve Trail ===== */
.duo-trail-page {
    min-height: 100vh;
    background: #2E2E2E !important;
}
/* Trail page: top nav matches grafite background */
.duo-trail-page .app-header {
    background: #2E2E2E !important;
    border-bottom: none !important;
}
.duo-trail-page .header-title {
    color: #FFFFFF !important;
    font-size: 22px;
    font-weight: 900;
}

.duo-trail-container {
    padding: 0 0 100px 0;
    position: relative;
    overflow-x: hidden;
}

.duo-trail-loading {
    text-align: center;
    padding: 60px 20px;
    color: #8B949E;
}
.duo-trail-loading .spinner {
    border-top-color: #58CC02;
}

.duo-trail {
    position: relative;
    padding: 8px 0;
}
.duo-trail-item {
    margin-bottom: 18px;
}

/* Sticky Active Module Box */
.duo-sticky-module {
    position: sticky;
    top: 56px;
    z-index: 40;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    margin: 4px 12px 8px;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: background-color 0.3s ease;
}
.duo-sticky-module-info { flex: 1; }
.duo-sticky-module-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 2px;
}
.duo-sticky-module-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}
.duo-sticky-module-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-left: 12px;
}

/* Module Divider (text separator in trail flow) */
.duo-module-divider {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #8B949E;
    letter-spacing: 0.5px;
    padding: 20px 0 8px;
    margin-bottom: 4px;
    user-select: none;
}

/* Chest (reward lesson) */
.duo-chest {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}
.duo-chest-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s;
}
.duo-chest:active { transform: scale(0.92) translateY(3px); }
.duo-chest-done .duo-chest-img {
    opacity: 0.5;
    filter: grayscale(1);
}
.duo-chest-locked {
    cursor: not-allowed;
}
.duo-chest-locked .duo-chest-img {
    opacity: 0.35;
    filter: grayscale(1);
}

/* Stone Path Connectors */
.trail-stone-connector {
    overflow: hidden;
    border-radius: 8px;
}
.trail-stone-texture {
    width: 100%;
    height: 100%;
    background-size: 80px 80px;
    background-repeat: repeat;
    border-radius: 8px;
}
.trail-stone-golden {
    background-image: url('../img/magic/trail-golden.png');
    box-shadow: 0 0 12px rgba(255,180,0,0.25);
}
.trail-stone-locked {
    background-image: url('../img/magic/trail-locked.png');
    opacity: 0.6;
}

/* Lesson Bubbles */
.duo-bubble-wrap {
    position: relative;
    width: 83px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

.duo-bubble {
    width: 83px;
    height: 83px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    z-index: 1;
    /* 3D disc effect — tilted perspective */
    transform: perspective(200px) rotateX(15deg);
    border-bottom: 5px solid rgba(0,0,0,0.3);
}
.duo-bubble:active {
    transform: perspective(200px) rotateX(15deg) scale(0.92);
}

.duo-bubble-active {
    /* colors set dynamically via ng-style */
}
.duo-bubble-done {
    /* colors set dynamically via ng-style */
}
.duo-bubble-locked {
    cursor: default;
    background: #3C3C3C !important;
    border-bottom-color: #2A2A2A !important;
}
.duo-bubble-locked:active {
    transform: perspective(200px) rotateX(15deg);
}

.duo-bubble-icon {
    font-size: 28px;
    line-height: 1;
    user-select: none;
    color: #fff;
}

/* Lesson Popup */
.duo-popup {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: #2D2D44;
    border-radius: 16px;
    padding: 16px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    text-align: center;
}
.duo-popup-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #2D2D44;
}
.duo-popup-title {
    font-size: 16px;
    font-weight: 800;
    color: #E6EDF3;
    margin-bottom: 6px;
}
.duo-popup-subtitle {
    font-size: 13px;
    color: #8B949E;
    margin-bottom: 12px;
}
.duo-popup-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.1s;
}
.duo-popup-btn:active {
    transform: scale(0.96);
}
.duo-popup-btn-green {
    background: #58CC02;
    color: #fff;
    box-shadow: 0 4px 0 #46A302;
}
.duo-popup-btn-gray {
    background: #3C3C3C;
    color: #8B949E;
    cursor: default;
    box-shadow: 0 4px 0 #2A2A2A;
}
.duo-popup-btn-gray:active {
    transform: none;
}

/* ============================================================
   PHASE 1 — MAGICAL ATMOSPHERE
   Background particles, glow effects, animations, consistency
   ============================================================ */

/* --- Magic Particle Background (CSS-only stars/sparkles) --- */
@keyframes twinkle {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.6; }
}
@keyframes twinkle2 {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.45; }
}
@keyframes drift {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-8px) translateX(4px); }
    100% { transform: translateY(0) translateX(0); }
}
@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 150, 0, 0.15); }
    50% { box-shadow: 0 0 20px rgba(255, 150, 0, 0.35); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Starfield pseudo-element on all internal app-pages */
.app-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(255,200,100,0.4), transparent),
        radial-gradient(1px 1px at 25% 35%, rgba(255,200,100,0.3), transparent),
        radial-gradient(1.5px 1.5px at 40% 8%, rgba(255,150,0,0.35), transparent),
        radial-gradient(1px 1px at 55% 45%, rgba(255,220,130,0.25), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(255,200,100,0.3), transparent),
        radial-gradient(1.5px 1.5px at 85% 55%, rgba(255,150,0,0.3), transparent),
        radial-gradient(1px 1px at 15% 65%, rgba(255,220,130,0.2), transparent),
        radial-gradient(1px 1px at 35% 80%, rgba(255,200,100,0.25), transparent),
        radial-gradient(1.5px 1.5px at 60% 70%, rgba(255,150,0,0.3), transparent),
        radial-gradient(1px 1px at 80% 85%, rgba(255,220,130,0.2), transparent),
        radial-gradient(1px 1px at 5% 90%, rgba(255,200,100,0.3), transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(255,150,0,0.25), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255,200,100,0.15), transparent),
        radial-gradient(1px 1px at 75% 40%, rgba(255,220,130,0.2), transparent),
        radial-gradient(1.5px 1.5px at 20% 50%, rgba(255,150,0,0.2), transparent),
        radial-gradient(1px 1px at 95% 75%, rgba(255,200,100,0.25), transparent);
    animation: twinkle 4s ease-in-out infinite;
}
/* Second starfield layer — different timing for depth */
.app-page::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 8% 25%, rgba(200,180,255,0.2), transparent),
        radial-gradient(1px 1px at 30% 12%, rgba(200,180,255,0.15), transparent),
        radial-gradient(1.5px 1.5px at 45% 60%, rgba(180,160,255,0.2), transparent),
        radial-gradient(1px 1px at 65% 30%, rgba(200,180,255,0.15), transparent),
        radial-gradient(1px 1px at 82% 70%, rgba(180,160,255,0.18), transparent),
        radial-gradient(1px 1px at 18% 85%, rgba(200,180,255,0.12), transparent),
        radial-gradient(1px 1px at 55% 15%, rgba(180,160,255,0.15), transparent),
        radial-gradient(1px 1px at 72% 92%, rgba(200,180,255,0.12), transparent);
    animation: twinkle2 6s ease-in-out infinite;
}

/* Ensure page content stays above starfield */
.app-page > * {
    position: relative;
    z-index: 1;
}

/* Subtle magical gradient overlay at the top */
.app-page {
    background: linear-gradient(180deg, #0d1520 0%, var(--bg) 30%, var(--bg) 100%) !important;
}

/* Don't apply starfield to landing/login (they have their own backgrounds) */
.landing-page::before, .landing-page::after,
.login-page-studini::before, .login-page-studini::after {
    display: none !important;
}

/* --- Page Content Animations --- */
.section-pad {
    animation: fadeInPage 0.4s ease-out;
}
.duo-trail-container {
    animation: fadeInPage 0.5s ease-out;
}
.quiz-content, .quiz-results {
    animation: fadeInPage 0.4s ease-out;
}
.mode-select {
    animation: fadeInScale 0.4s ease-out;
}
.chat-messages {
    animation: fadeInPage 0.3s ease-out;
}

/* --- Subject Cards: Magical Glow on Hover/Active --- */
.subject-card {
    transition: transform 0.2s, box-shadow 0.3s, border-color 0.3s;
    border: 2px solid rgba(255,150,0,0.15);
    position: relative;
    overflow: hidden;
}
.subject-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,150,0,0.06), transparent);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
    width: 200%;
}
.subject-card:active {
    border-color: rgba(255,150,0,0.4);
    box-shadow: 0 0 16px rgba(255,150,0,0.2);
}

/* --- Subject Card Icon: Subtle glow --- */
.subject-card-icon {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 -2px 4px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s;
}

/* --- Duolingo Bubbles: Magic glow for active/done --- */
.duo-bubble-active {
    box-shadow: 0 0 12px rgba(255,150,0,0.3), 0 4px 0 rgba(0,0,0,0.3);
    animation: pulseGlow 3s ease-in-out infinite;
}
.duo-bubble-done {
    box-shadow: 0 0 10px rgba(88,204,2,0.25), 0 4px 0 rgba(0,0,0,0.3);
}

/* --- Sticky Module: Subtle glow --- */
.duo-sticky-module {
    box-shadow: 0 4px 16px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* --- Quiz: Enhanced feedback animations --- */
.question-card {
    animation: fadeInScale 0.3s ease-out;
}
.choice-btn {
    transition: all 0.2s ease;
    border: 2px solid var(--border);
}
.choice-btn:not(:disabled):active {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(255,150,0,0.2);
}
.choice-correct {
    box-shadow: 0 0 16px rgba(88,204,2,0.3) !important;
}
.choice-wrong {
    box-shadow: 0 0 16px rgba(255,75,75,0.3) !important;
}

/* --- Quiz Results: Enhanced celebration --- */
.results-title-big {
    animation: fadeInScale 0.5s ease-out;
}
.results-stats-row {
    animation: fadeInPage 0.6s ease-out 0.2s both;
}
.results-character-img {
    animation: fadeInScale 0.5s ease-out;
    filter: drop-shadow(0 4px 20px rgba(255,150,0,0.3));
}

/* --- Chat: Magical atmosphere --- */
.chat-page .app-header {
    background: #050505;
    border-bottom: 1px solid rgba(255,150,0,0.1);
}
.chip-btn {
    border-color: rgba(255,150,0,0.3);
    transition: all 0.2s, box-shadow 0.3s;
}
.chip-btn:active {
    box-shadow: 0 0 12px rgba(255,150,0,0.3);
}

/* --- Headers: Subtle glow line at bottom --- */
.app-header {
    border-bottom: 1px solid rgba(255,150,0,0.1) !important;
    background: #050505 !important;
}

/* --- Bottom Nav: Magical styling --- */
.bottom-nav {
    border-top: 1px solid rgba(255,150,0,0.1) !important;
    background: #050505 !important;
}

/* --- Folder Items: Subtle hover glow --- */
.folder-item {
    transition: transform 0.15s, box-shadow 0.3s;
    border: 1px solid rgba(255,150,0,0.08);
}
.folder-item:active {
    box-shadow: 0 0 12px rgba(255,150,0,0.15);
    border-color: rgba(255,150,0,0.2);
}

/* --- Child Avatar: Orange ring glow --- */
.child-header-avatar {
    box-shadow: 0 0 8px rgba(255,150,0,0.3);
    border: 2px solid rgba(255,150,0,0.4);
}
.child-avatar-img {
    border-radius: 50%;
}

/* --- Empty State: Gentler appearance --- */
.empty-state {
    animation: fadeInScale 0.5s ease-out;
}
.empty-icon {
    filter: drop-shadow(0 2px 8px rgba(255,150,0,0.2));
}

/* --- Section Headings: Subtle orange accent --- */
.section-heading {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Trail Character Images: Magical float --- */
.duo-character-img {
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}

/* --- Spinner: Orange magic theme --- */
.spinner {
    border-top-color: var(--primary) !important;
}

/* --- Scrollbar Styling (webkit) --- */
.app-page::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.duo-trail-container::-webkit-scrollbar {
    width: 4px;
}
.app-page::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.duo-trail-container::-webkit-scrollbar-track {
    background: transparent;
}
.app-page::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.duo-trail-container::-webkit-scrollbar-thumb {
    background: rgba(255,150,0,0.2);
    border-radius: 4px;
}

/* ===== Magical Dashboard ===== */
.magical-dashboard {
    padding-bottom: 120px;
    overflow-x: hidden;
    background: #000000 !important;
    position: relative;
}
.magical-dashboard .app-header { display: none !important; }

/* Star particles */
.magic-stars {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.magic-stars::before,
.magic-stars::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    animation: twinkle 4s ease-in-out infinite alternate;
}
.magic-stars::before {
    box-shadow:
        25px 50px 2px 0 rgba(255,215,0,0.6),
        80px 120px 1.5px 0 rgba(255,215,0,0.5),
        150px 30px 2px 0 rgba(255,215,0,0.7),
        200px 180px 1px 0 rgba(255,215,0,0.4),
        300px 80px 2px 0 rgba(255,215,0,0.6),
        50px 300px 1.5px 0 rgba(255,215,0,0.5),
        180px 400px 2px 0 rgba(255,215,0,0.7),
        320px 250px 1px 0 rgba(255,215,0,0.4),
        100px 500px 2px 0 rgba(255,215,0,0.6),
        250px 600px 1.5px 0 rgba(255,215,0,0.5),
        350px 150px 1px 0 rgba(255,215,0,0.3),
        15px 700px 2px 0 rgba(255,215,0,0.6),
        280px 450px 1.5px 0 rgba(255,215,0,0.4),
        370px 550px 2px 0 rgba(255,215,0,0.7);
}
.magic-stars::after {
    box-shadow:
        60px 90px 1.5px 0 rgba(255,215,0,0.5),
        130px 200px 2px 0 rgba(255,215,0,0.6),
        220px 60px 1px 0 rgba(255,215,0,0.4),
        340px 320px 2px 0 rgba(255,215,0,0.7),
        40px 450px 1.5px 0 rgba(255,215,0,0.5),
        190px 350px 2px 0 rgba(255,215,0,0.6),
        310px 500px 1px 0 rgba(255,215,0,0.3),
        70px 620px 2px 0 rgba(255,215,0,0.5),
        260px 100px 1.5px 0 rgba(255,215,0,0.4),
        160px 550px 2px 0 rgba(255,215,0,0.7),
        380px 400px 1px 0 rgba(255,215,0,0.5),
        95px 160px 1.5px 0 rgba(255,215,0,0.6);
    animation-delay: 2s;
    animation-duration: 5s;
}
@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Runic background - full screen, golden tint */
.magic-runes-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('../img/magic/runes-bg.png') center/cover repeat;
    opacity: 0.13;
    pointer-events: none;
    z-index: 0;
    animation: drift 12s ease-in-out infinite;
    filter: sepia(1) saturate(3) hue-rotate(15deg) brightness(1.2);
}

/* Compact Welcome Card */
.magic-welcome-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30,30,30,0.7);
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 14px;
    padding: 10px 16px;
    margin: 24px 16px 16px;
    position: relative;
    z-index: 1;
    animation: fadeInPage 0.5s ease-out;
}

.magic-welcome-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    border: 2.5px solid rgba(255,215,0,0.4);
    box-shadow: 0 0 14px rgba(255,215,0,0.15);
}
.magic-welcome-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.magic-welcome-avatar-letter {
    font-size: 20px;
    font-weight: 800;
    color: white;
}
.magic-welcome-text {
    flex: 1;
    min-width: 0;
}
.magic-welcome-label {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: none;
}
.magic-welcome-chevron {
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    flex-shrink: 0;
}

/* Top header */
.magic-top-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 0;
    position: relative;
    z-index: 1;
}
.magic-top-title {
    font-size: 22px;
    font-weight: 800;
    color: #FF9600;
    letter-spacing: 0.5px;
}

/* XP & Streak - card grid matching subjects */
.magic-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0 20px 8px;
    position: relative;
    z-index: 1;
}
.magic-stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(35,35,40,0.85);
    border: 1.5px solid rgba(255,215,0,0.18);
    border-radius: 14px;
    padding: 12px 14px;
}
.magic-stat-card-icon {
    width: 44px; height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.35));
}
.magic-stat-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.magic-stat-card-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.magic-stat-card-value {
    font-size: 18px;
    font-weight: 800;
    color: #FF9600;
    line-height: 1.1;
}

/* Subject Grid */
.magic-subject-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 14px;
    padding: 0 4px;
}
.magic-subject-card {
    background: rgba(35,35,40,0.85);
    border-radius: 16px;
    padding: 16px 12px 14px;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid rgba(255,215,0,0.18);
    transition: transform 0.15s, box-shadow 0.3s, border-color 0.3s;
    min-width: 0;
    overflow: hidden;
    position: relative;
    overflow: visible;
}
.magic-subject-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,150,0,0.06), transparent);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
    width: 200%;
}
.magic-subject-card:active {
    transform: scale(0.97);
    border-color: rgba(255,150,0,0.4);
    box-shadow: 0 0 20px rgba(255,150,0,0.2);
}

/* Card book - inside card */
.magic-card-book-wrap {
    width: 90px; height: 120px;
    margin: 0 auto 10px;
    position: relative;
    z-index: 2;
}
.magic-card-book-img {
    width: 100%; height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.magic-card-book-icon {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    color: #FFFFFF;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
    z-index: 3;
}
/* Legacy icon classes kept for compatibility */
.magic-card-icon-wrap {
    width: 80px; height: 80px;
    margin: 0 auto 10px;
    border-radius: 16px;
    overflow: visible;
    position: relative;
    z-index: 2;
}
.magic-card-icon-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(20,20,25,0.9);
    border: 2px solid rgba(255,215,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #FFD700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.magic-card-icon-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Card title - fantasy style */
.magic-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
}

/* Progress bar - thicker, potion icon, no percentage */
.magic-card-progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.magic-card-progress-wrap::before {
    content: '';
    display: inline-block;
    width: 34px; height: 34px;
    background: url('../img/magic/icon-potion.png') center/contain no-repeat;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(255,150,0,0.35));
}
.magic-card-progress-bar {
    flex: 1;
    height: 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
}
.magic-card-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #FF6B00, #FF9600, #FFBF40);
    box-shadow: 0 0 8px rgba(255,150,0,0.4);
    transition: width 0.6s ease;
    min-width: 0;
}

/* Mascot - much bigger */
.magic-mascot {
    position: fixed;
    bottom: 70px;
    right: 10px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    animation: fadeInScale 0.6s ease-out 0.3s both;
}
.magic-mascot-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(255,150,0,0.3));
    animation: drift 5s ease-in-out infinite;
}

/* Speech bubble - comic style */
.magic-speech-bubble {
    background: #ffffff;
    border: 2px solid #ccc;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 14px;
    color: #000;
    max-width: 210px;
    margin-bottom: 8px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    font-weight: 500;
    line-height: 1.35;
}
.magic-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 28px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 2px 1px rgba(0,0,0,0.1));
}

/* ========================================
   Child Profile Page
   ======================================== */
.magical-profile .app-header { display: none !important; }

.profile-magic-card {
    text-align: center;
    padding: 40px 20px 24px;
    position: relative;
    z-index: 1;
    animation: fadeInPage 0.5s ease-out;
}
.profile-magic-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.profile-magic-avatar-ring {
    width: 120px; height: 120px;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.3), rgba(255,255,255,0.7), rgba(255,255,255,0.3), rgba(255,255,255,0.7));
    box-shadow: 0 0 24px rgba(255,255,255,0.15), 0 0 60px rgba(255,255,255,0.05);
}
.profile-magic-avatar {
    width: 100%; height: 100%;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    border: 3px solid var(--bg);
}
.profile-magic-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.profile-magic-avatar-letter {
    font-size: 40px;
    font-weight: 800;
    color: white;
}
.profile-magic-name {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}
.profile-magic-role {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.profile-magic-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    margin-top: 20px;
    background: rgba(30,30,30,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 14px 32px;
}
.profile-magic-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.profile-magic-stat-icon {
    width: 32px; height: 32px;
    object-fit: contain;
}
.profile-magic-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}
.profile-magic-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    text-transform: uppercase;
}
.profile-magic-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.12);
}

/* Profile Actions */
.profile-magic-actions {
    padding: 24px 20px 0;
    position: relative;
    z-index: 1;
}
.profile-magic-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: rgba(30,30,30,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
}
.profile-magic-btn:active {
    background: rgba(50,50,50,0.8);
    border-color: rgba(255,255,255,0.15);
}
.profile-magic-btn i:first-child {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: rgba(255,255,255,0.5);
}
.profile-magic-btn span {
    flex: 1;
}
.profile-magic-btn-arrow {
    font-size: 12px !important;
    color: rgba(255,255,255,0.25) !important;
}
.profile-magic-btn.logout {
    margin-top: 20px;
    border-color: rgba(255,80,80,0.25);
    color: #FF6B6B;
}
.profile-magic-btn.logout i {
    color: #FF6B6B !important;
}
.profile-magic-btn.logout:active {
    background: rgba(255,80,80,0.1);
}

.profile-magic-version {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.2);
    position: relative;
    z-index: 1;
}

/* === SPEAK (STT) === */
.speak-area { text-align: center; padding: 16px 0; }
.speak-instruction { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.speak-listen-btn { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,150,0,0.15); border: 2px solid #FF9600; color: #FF9600; font-size: 22px; cursor: pointer; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.speak-listen-btn.speaking { background: rgba(255,150,0,0.3); animation: pulse-speak 1s infinite; }
.speak-expected-text { font-size: 18px; font-weight: 600; color: #fff; margin-top: 8px; padding: 12px 16px; background: rgba(255,255,255,0.05); border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }

.speak-record-section { margin: 24px 0 16px; }
.speak-record-btn { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #FF4B4B; background: rgba(255,75,75,0.1); color: #FF4B4B; font-size: 28px; cursor: pointer; margin: 0 auto; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.speak-record-btn.recording { background: #FF4B4B; color: #fff; animation: pulse-speak 0.8s infinite; }
.speak-record-btn:disabled { opacity: 0.5; }
.speak-record-label { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 8px; }
.recording-pulse { color: #FF4B4B !important; font-weight: 600; }

@keyframes pulse-speak { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.speak-transcript { margin: 16px 0; padding: 16px; background: rgba(35,35,40,0.85); border-radius: 12px; border: 1px solid rgba(255,215,0,0.18); }
.speak-transcript-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.speak-transcript-text { font-size: 16px; color: #FFD700; font-style: italic; margin-bottom: 12px; }
.speak-actions { display: flex; gap: 8px; justify-content: center; }
.speak-actions .btn { flex: 1; max-width: 160px; font-size: 13px; }

.speak-feedback-area { margin-top: 16px; }
.speak-similarity-bar { position: relative; height: 24px; background: rgba(255,255,255,0.1); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.speak-similarity-fill { height: 100%; border-radius: 12px; transition: width 0.5s ease; }
.speak-similarity-fill.sim-great { background: linear-gradient(90deg, #58CC02, #7ED321); }
.speak-similarity-fill.sim-ok { background: linear-gradient(90deg, #FF9600, #FFD700); }
.speak-similarity-fill.sim-low { background: linear-gradient(90deg, #FF4B4B, #FF6B6B); }
.speak-similarity-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }

.speak-grade-badge { font-size: 16px; font-weight: 700; padding: 8px 16px; border-radius: 12px; margin-bottom: 8px; }
.speak-feedback-text { font-size: 14px; color: rgba(255,255,255,0.85); line-height: 1.5; }
.speak-what-you-said { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 8px; }
.speak-label-small { font-weight: 600; }

/* === ESSAY (AI-GRADED) === */
.essay-area { padding: 8px 0; }
.essay-instructions { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 12px; line-height: 1.5; }
.essay-meta { font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.essay-textarea { width: 100%; background: rgba(35,35,40,0.85); border: 1px solid rgba(255,215,0,0.18); border-radius: 12px; color: #fff; font-size: 15px; padding: 14px; line-height: 1.6; resize: vertical; min-height: 160px; font-family: inherit; }
.essay-textarea:focus { outline: none; border-color: #FF9600; }
.essay-textarea:disabled { opacity: 0.6; }
.essay-word-count { text-align: right; font-size: 12px; color: rgba(255,255,255,0.35); margin: 4px 4px 12px 0; }

.essay-feedback-area { margin-top: 16px; }
.essay-grade-badge { font-size: 16px; font-weight: 700; padding: 8px 16px; border-radius: 12px; margin-bottom: 12px; text-align: center; }
.essay-feedback-text { font-size: 14px; color: rgba(255,255,255,0.85); line-height: 1.5; margin-bottom: 16px; }

.essay-scores { margin-bottom: 16px; }
.essay-score-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.essay-score-label { font-size: 13px; color: rgba(255,255,255,0.7); width: 110px; flex-shrink: 0; }
.essay-score-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.essay-score-fill { height: 100%; background: linear-gradient(90deg, #FF9600, #FFD700); border-radius: 4px; transition: width 0.5s ease; }
.essay-score-val { font-size: 12px; color: rgba(255,255,255,0.5); width: 36px; text-align: right; flex-shrink: 0; }

.essay-section-title { font-size: 13px; font-weight: 700; color: #FFD700; margin-bottom: 6px; }
.essay-corrections, .essay-suggestions { margin-bottom: 12px; padding: 12px; background: rgba(255,255,255,0.03); border-radius: 10px; border: 1px solid rgba(255,255,255,0.06); }
.essay-correction, .essay-suggestion { font-size: 13px; color: rgba(255,255,255,0.7); padding: 4px 0; line-height: 1.4; }
.essay-correction::before { content: "• "; color: #FF9600; }
.essay-suggestion::before { content: "💡 "; }

/* Shared grade badge styles (reused across DIY/PBL/Speak/Essay) */
.grade-great { background: rgba(88,204,2,0.15); color: #58CC02; border: 1px solid rgba(88,204,2,0.3); }
.grade-ok { background: rgba(255,150,0,0.15); color: #FF9600; border: 1px solid rgba(255,150,0,0.3); }
.grade-retry { background: rgba(255,75,75,0.15); color: #FF6B6B; border: 1px solid rgba(255,75,75,0.3); }

/* === MULTI-PAGE SCANNER === */
.multi-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.page-thumb { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,215,0,0.18); background: rgba(35,35,40,0.85); }
.page-thumb img { width: 100%; height: 100%; object-fit: cover; }
.page-thumb-num { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,0.7); color: #FFD700; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; }
.page-thumb-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,75,75,0.85); border: none; color: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.page-counter { text-align: center; font-size: 13px; color: rgba(255,255,255,0.5); margin: 8px 0; }
.analyze-progress { text-align: center; padding: 12px; color: #FF9600; font-size: 14px; font-weight: 600; }

/* === PORTFOLIO === */
.portfolio-page { padding: 20px; max-width: 600px; margin: 0 auto; padding-top: 70px; }
.portfolio-filter { margin-bottom: 16px; }
.portfolio-filter select { width: 100%; background: rgba(35,35,40,0.85); border: 1px solid rgba(255,215,0,0.18); border-radius: 10px; color: #fff; padding: 10px 14px; font-size: 14px; -webkit-appearance: none; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.portfolio-card { background: rgba(35,35,40,0.85); border-radius: 14px; border: 1px solid rgba(255,215,0,0.18); overflow: hidden; cursor: pointer; transition: transform 0.2s; position: relative; }
.portfolio-card:active { transform: scale(0.97); }
.portfolio-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.portfolio-card-body { padding: 10px 12px; }
.portfolio-card-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portfolio-card-subject { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.portfolio-card-grade { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.portfolio-card-date { font-size: 11px; color: rgba(255,255,255,0.3); float: right; margin-top: 2px; }
.portfolio-published { position: absolute; top: 8px; right: 8px; background: rgba(88,204,2,0.85); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 8px; z-index: 2; }
.portfolio-empty { text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.4); }
.portfolio-empty i { font-size: 48px; margin-bottom: 12px; display: block; color: rgba(255,255,255,0.15); }
.portfolio-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.portfolio-modal-content { background: #1a1a2e; border-radius: 16px; max-width: 400px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; }
.portfolio-modal-img { width: 100%; border-radius: 16px 16px 0 0; }
.portfolio-modal-body { padding: 16px; }
.portfolio-modal-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.portfolio-modal-subject { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.portfolio-modal-feedback { font-size: 14px; color: rgba(255,255,255,0.8); line-height: 1.5; margin-bottom: 16px; }
.portfolio-modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.6); border: none; color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }

/* === GALLERY === */
.gallery-page { background: #050505; min-height: 100vh; }
.gallery-container { padding: 20px; max-width: 600px; margin: 0 auto; padding-top: 70px; }
.gallery-subtitle { text-align: center; font-size: 14px; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-card { background: rgba(35,35,40,0.85); border-radius: 14px; border: 1px solid rgba(255,215,0,0.18); overflow: hidden; cursor: pointer; transition: transform 0.2s; }
.gallery-card:active { transform: scale(0.97); }
.gallery-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery-card-body { padding: 10px 12px; }
.gallery-card-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-card-author { font-size: 11px; color: rgba(255,255,255,0.35); margin-bottom: 6px; }
.gallery-card-footer { display: flex; justify-content: space-between; align-items: center; }
.gallery-card-subject { font-size: 11px; color: rgba(255,150,0,0.7); }
.gallery-card-likes { font-size: 13px; color: rgba(255,255,255,0.5); cursor: pointer; }
.gallery-card-likes i { margin-right: 3px; transition: color 0.2s; }
.gallery-modal-likes { display: flex; align-items: center; gap: 8px; font-size: 15px; color: rgba(255,255,255,0.6); cursor: pointer; padding: 8px 0; }
.gallery-modal-likes i { font-size: 18px; transition: color 0.2s; }

/* === NOTIFICATIONS === */
.notif-container { padding: 20px; max-width: 600px; margin: 0 auto; padding-top: 70px; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: rgba(35,35,40,0.85); border-radius: 12px; border: 1px solid rgba(255,255,255,0.06); cursor: pointer; position: relative; transition: background 0.2s; }
.notif-item:active { background: rgba(50,50,55,0.85); }
.notif-unread { border-color: rgba(255,150,0,0.25); }
.notif-icon { font-size: 24px; flex-shrink: 0; width: 36px; text-align: center; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.notif-text { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.4; }
.notif-time { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 4px; }
.notif-dot { position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: #FF9600; }

/* Notification bell */
.notif-bell { position: relative; background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; }
.notif-bell-badge { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: #FF4B4B; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* === CAPTURE TABS === */
.capture-tabs { display: flex; gap: 0; margin-bottom: 16px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,215,0,0.18); }
.capture-tab { flex: 1; padding: 12px 16px; background: rgba(35,35,40,0.85); border: none; color: rgba(255,255,255,0.5); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.capture-tab:first-child { border-right: 1px solid rgba(255,215,0,0.18); }
.capture-tab-active { background: rgba(255,150,0,0.15); color: #FF9600; }
.capture-textarea { width: 100%; background: rgba(20,20,25,0.85); border: 1px solid rgba(255,215,0,0.18); border-radius: 12px; color: #fff; font-size: 15px; padding: 14px; line-height: 1.6; resize: vertical; min-height: 160px; font-family: inherit; margin-top: 12px; }
.capture-textarea:focus { outline: none; border-color: #FF9600; }
.capture-textarea::placeholder { color: rgba(255,255,255,0.25); }
.capture-char-count { text-align: right; font-size: 12px; color: rgba(255,255,255,0.3); margin: 4px 4px 12px 0; }
