/* Esperix - Design moderne et coloré */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #ede9fe;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, button { font-family: inherit; }

/* ====== LANDING ====== */
.navbar { background: white; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--primary); }
.nav-links { display: flex; gap: 12px; align-items: center; }
.logo-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 20px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.hero { padding: 80px 0 100px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.hero-content h1 { font-size: 56px; line-height: 1.1; font-weight: 800; margin: 20px 0; letter-spacing: -1px; }
.gradient-text { background: linear-gradient(135deg, #8b5cf6, #ec4899, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.badge-pill { display: inline-block; padding: 8px 16px; background: var(--primary-light); color: var(--primary-dark); border-radius: 99px; font-size: 13px; font-weight: 600; }
.hero-subtitle { font-size: 20px; color: var(--text-light); line-height: 1.6; margin-bottom: 36px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 14px; color: var(--text-light); }

.hero-visual { position: relative; height: 480px; }
.floating-card {
    position: absolute; padding: 20px 24px;
    background: white; border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; gap: 4px;
    min-width: 180px;
    animation: float 6s ease-in-out infinite;
}
.floating-card strong { font-size: 22px; color: var(--text); }
.floating-card span:not(.card-flag) { font-size: 14px; color: var(--text-light); }
.card-flag { font-size: 28px; margin-bottom: 6px; }
.card-1 { top: 30px; left: 20px; animation-delay: 0s; }
.card-2 { top: 50px; right: 20px; animation-delay: 1.5s; transform: rotate(4deg); }
.card-3 { bottom: 80px; left: 40px; animation-delay: 3s; transform: rotate(-3deg); }
.card-4 { bottom: 30px; right: 40px; animation-delay: 4.5s; transform: rotate(2deg); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-15px) rotate(0); } }
.card-2 { animation-name: float2; }
.card-3 { animation-name: float3; }
.card-4 { animation-name: float4; }
@keyframes float2 { 0%, 100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-15px) rotate(4deg); } }
@keyframes float3 { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-15px) rotate(-3deg); } }
@keyframes float4 { 0%, 100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-15px) rotate(2deg); } }

.features { padding: 80px 0; background: white; }
.features h2 { font-size: 40px; text-align: center; margin-bottom: 60px; font-weight: 800; letter-spacing: -0.5px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    padding: 32px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all .3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.feature-card h3 { font-size: 20px; margin-bottom: 10px; font-weight: 700; }
.feature-card p { color: var(--text-light); line-height: 1.6; }

.cta-section { padding: 100px 0; background: linear-gradient(135deg, #8b5cf6, #ec4899); color: white; text-align: center; }
.cta-section h2 { font-size: 40px; margin-bottom: 16px; font-weight: 800; }
.cta-section p { font-size: 18px; margin-bottom: 32px; opacity: 0.95; }
.cta-section .btn-primary { background: white; color: var(--primary); }

.footer { padding: 32px 0; background: #111827; color: #9ca3af; text-align: center; }

/* ====== BOUTONS ====== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all .2s;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-light { background: white; color: var(--primary); }
.btn-light:hover { background: #f3f4f6; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
.btn-large { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ====== AUTH ====== */
.auth-body { background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-container { width: 100%; max-width: 440px; }
.logo-large { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.logo-large .logo-icon { width: 48px; height: 48px; font-size: 24px; border-radius: 12px; }
.logo-large .logo-text { font-size: 28px; font-weight: 800; color: var(--text); }
.logo-link { display: block; text-align: center; }
.auth-card { background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 28px; margin-bottom: 8px; font-weight: 800; }
.auth-subtitle { color: var(--text-light); margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 24px; color: var(--text-light); }
.auth-footer a { color: var(--primary); font-weight: 600; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input { width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 15px; transition: border-color .2s; }
.form-group input:focus { outline: none; border-color: var(--primary); }
.form-group input:disabled { background: var(--bg); color: var(--text-muted); }
.form-group small { display: block; margin-top: 4px; color: var(--text-light); font-size: 12px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* ====== APP LAYOUT ====== */
.app-body { background: var(--bg); min-height: 100vh; }
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px;
    background: white;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 50;
    transition: transform .3s;
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--text); }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 15px;
    transition: all .15s;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary-dark); }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }

.mobile-menu-toggle {
    display: none;
    position: fixed; top: 16px; left: 16px; z-index: 60;
    width: 44px; height: 44px; border-radius: 10px;
    background: white; box-shadow: var(--shadow);
    align-items: center; justify-content: center;
}

.main-content { margin-left: 260px; padding: 32px 40px; max-width: 1400px; }

.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.page-header h1 { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.page-header p { color: var(--text-light); }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-light); font-weight: 500; margin-bottom: 20px; transition: color .2s; }
.back-link:hover { color: var(--primary); }

/* ====== STATS CARDS ====== */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: white; padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
}
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-card .stat-content { display: flex; flex-direction: column; }
.stat-num { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-card .stat-label { font-size: 13px; color: var(--text-light); }
.stat-purple .stat-icon { background: #ede9fe; color: #8b5cf6; }
.stat-blue .stat-icon { background: #dbeafe; color: #3b82f6; }
.stat-orange .stat-icon { background: #fef3c7; color: #f59e0b; }
.stat-green .stat-icon { background: #dcfce7; color: #10b981; }

/* ====== LEVEL PROGRESS ====== */
.level-progress-card {
    background: white; padding: 24px; border-radius: var(--radius);
    border: 1px solid var(--border); margin-bottom: 24px;
}
.level-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.level-progress-header h3 { font-size: 18px; }
.level-progress-header p { color: var(--text-light); font-size: 14px; }
.level-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary), #ec4899);
    color: white; font-weight: 700;
    border-radius: 99px; font-size: 13px;
}
.progress-bar { height: 12px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #ec4899); border-radius: 99px; transition: width .5s; }

/* ====== CONTINUE CARD ====== */
.continue-card {
    background: linear-gradient(135deg, var(--theme-color, var(--primary)), color-mix(in srgb, var(--theme-color, var(--primary)) 70%, white));
    color: white; padding: 32px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px;
    gap: 24px;
}
.continue-label { font-size: 13px; font-weight: 600; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.5px; }
.continue-content h2 { font-size: 26px; margin: 8px 0 4px; font-weight: 800; }
.continue-content p { opacity: 0.9; }

/* ====== SECTION ====== */
.dashboard-section { margin-bottom: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.section-header h2 { font-size: 22px; font-weight: 800; }
.section-subtitle { color: var(--text-light); font-size: 14px; }

/* ====== THEMES GRID ====== */
.themes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.theme-card {
    background: white; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px;
    display: flex; gap: 16px; align-items: flex-start;
    transition: all .2s;
}
.theme-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--theme-color); }
.theme-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: color-mix(in srgb, var(--theme-color) 15%, white);
    color: var(--theme-color);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.theme-info { flex: 1; min-width: 0; }
.theme-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.theme-info p { color: var(--text-light); font-size: 13px; margin-bottom: 10px; }
.theme-progress { display: flex; align-items: center; gap: 10px; }
.theme-progress-bar { flex: 1; height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.theme-progress-fill { height: 100%; background: var(--theme-color, var(--primary)); border-radius: 99px; }
.theme-progress span { font-size: 12px; color: var(--text-light); font-weight: 600; }

/* ====== THEME PAGE ====== */
.theme-hero {
    background: linear-gradient(135deg, var(--theme-color), color-mix(in srgb, var(--theme-color) 70%, white));
    color: white; padding: 32px; border-radius: var(--radius-lg);
    display: flex; align-items: center; gap: 24px;
    margin-bottom: 24px;
}
.theme-hero-icon { width: 80px; height: 80px; background: rgba(255,255,255,0.2); border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.theme-hero h1 { font-size: 28px; margin-bottom: 6px; font-weight: 800; }
.theme-hero p { opacity: 0.9; }

.theme-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.action-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: white; border: 1px solid var(--border);
    border-radius: 99px; font-weight: 600; font-size: 14px;
    color: var(--text);
    transition: all .2s;
}
.action-pill:hover { border-color: var(--primary); color: var(--primary); }
.action-pill-primary { background: var(--primary); color: white; border-color: var(--primary); }
.action-pill-primary:hover { background: var(--primary-dark); color: white; }

.lessons-list { display: flex; flex-direction: column; gap: 12px; }
.lesson-item {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    display: flex; align-items: center; gap: 20px;
    transition: all .2s;
}
.lesson-item.completed { border-color: var(--success); }
.lesson-item.locked { opacity: 0.6; }
.lesson-number {
    width: 50px; height: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px;
    background: var(--primary-light); color: var(--primary);
    flex-shrink: 0;
}
.lesson-item.completed .lesson-number { background: #d1fae5; color: var(--success); }
.lesson-item.locked .lesson-number { background: var(--bg); color: var(--text-muted); }
.lesson-content { flex: 1; }
.lesson-content h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.lesson-content p { color: var(--text-light); font-size: 14px; margin-bottom: 8px; }
.lesson-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--text-muted); }
.score-tag { color: var(--success); font-weight: 600; }

/* ====== LESSON PAGE ====== */
.lesson-body { background: white; min-height: 100vh; display: flex; flex-direction: column; }
.lesson-header { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.lesson-close { color: var(--text-light); display: flex; }
.lesson-close:hover { color: var(--text); }
.lesson-progress-bar { flex: 1; height: 14px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.lesson-progress-fill { height: 100%; background: var(--theme-color, var(--primary)); transition: width .4s; border-radius: 99px; }
.lesson-counter { font-weight: 700; color: var(--text-light); font-size: 14px; min-width: 50px; text-align: right; }
.lesson-main { flex: 1; max-width: 700px; margin: 0 auto; padding: 40px 24px; width: 100%; }
.lesson-footer { border-top: 1px solid var(--border); padding: 20px 24px; background: white; position: sticky; bottom: 0; }
.lesson-footer-content { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; min-height: 0; }
.lesson-footer-content.correct, .lesson-footer-content.wrong { padding: 16px; border-radius: 12px; min-height: 60px; }
.lesson-footer-content.correct { background: #d1fae5; color: #065f46; }
.lesson-footer-content.wrong { background: #fee2e2; color: #991b1b; }
.feedback-icon { display: flex; }
.lesson-footer-content strong { display: block; font-size: 16px; margin-bottom: 2px; }
.lesson-footer-content span { font-size: 14px; }

.exercise-container { animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.exercise-type { font-size: 13px; color: var(--text-light); font-weight: 700; letter-spacing: 1px; margin-bottom: 12px; }
.exercise-question { font-size: 26px; font-weight: 800; line-height: 1.3; margin-bottom: 32px; }
.options-grid { display: grid; gap: 12px; }
.option-btn {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    background: white; border: 2px solid var(--border);
    border-radius: 14px;
    text-align: left;
    font-size: 16px;
    transition: all .15s;
}
.option-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.option-btn.selected { border-color: var(--primary); background: var(--primary-light); }
.option-btn .option-text { flex: 1; }
.speak-btn-opt {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(139, 92, 246, 0.1); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all .15s;
}
.speak-btn-opt:hover { background: var(--primary); color: white; transform: scale(1.05); }
.speak-btn-opt:active { transform: scale(0.95); }
.speak-btn-inline {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--primary-light); color: var(--primary);
    vertical-align: middle; margin-left: 8px;
    transition: all .15s;
}
.speak-btn-inline:hover { background: var(--primary); color: white; transform: scale(1.05); }
.speak-btn-inline:active { transform: scale(0.92); }
.option-btn.correct-answer { border-color: var(--success); background: #d1fae5; color: #065f46; }
.option-btn.wrong-answer { border-color: var(--danger); background: #fee2e2; color: #991b1b; }
.option-key {
    width: 32px; height: 32px;
    background: var(--bg); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.option-btn.selected .option-key { background: var(--primary); color: white; }
.option-btn.correct-answer .option-key { background: var(--success); color: white; }
.option-btn.wrong-answer .option-key { background: var(--danger); color: white; }
.exercise-input {
    width: 100%; padding: 16px 20px;
    background: white; border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 18px;
    transition: border-color .15s;
}
.exercise-input:focus { outline: none; border-color: var(--primary); }

.result-container { text-align: center; padding: 40px 20px; animation: fadeIn .5s; }
.result-trophy { color: var(--accent); margin-bottom: 20px; display: inline-flex; padding: 24px; background: #fef3c7; border-radius: 50%; }
.result-container h1 { font-size: 32px; margin-bottom: 8px; font-weight: 800; }
.result-container > p { color: var(--text-light); margin-bottom: 32px; }
.result-stats { display: flex; gap: 16px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.result-stat { background: var(--bg); padding: 20px 28px; border-radius: 16px; min-width: 130px; }
.result-num { font-size: 36px; font-weight: 800; color: var(--primary); display: block; }
.result-label { font-size: 13px; color: var(--text-light); }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.level-up-banner { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; background: linear-gradient(135deg, var(--accent), var(--danger)); color: white; border-radius: 99px; font-weight: 700; margin-bottom: 24px; }

/* ====== QUIZ ====== */
.quiz-header-info { text-align: center; margin-bottom: 20px; }
.quiz-theme-badge { display: inline-block; padding: 6px 14px; border-radius: 99px; color: white; font-size: 13px; font-weight: 600; }

.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 32px; }
.quiz-card {
    background: white; padding: 24px; border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px;
    transition: all .2s;
}
.quiz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quiz-card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: color-mix(in srgb, var(--theme-color) 15%, white);
    color: var(--theme-color);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}
.quiz-card h3 { font-size: 17px; font-weight: 700; }
.quiz-card p { color: var(--text-light); font-size: 13px; flex: 1; margin-bottom: 12px; }
.quiz-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.quiz-badge { padding: 3px 10px; background: var(--bg); border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--text-light); }
.quiz-badge-success { background: #d1fae5; color: #065f46; }
.quiz-badge-new { background: var(--primary-light); color: var(--primary-dark); }

.results-list { display: flex; flex-direction: column; gap: 8px; }
.result-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: white; border: 1px solid var(--border); border-radius: 12px; }
.result-theme { width: 8px; height: 36px; border-radius: 4px; flex-shrink: 0; }
.result-info { flex: 1; display: flex; flex-direction: column; }
.result-info strong { font-size: 15px; }
.result-info span { font-size: 13px; color: var(--text-light); }
.result-score-display { text-align: right; }
.result-score-display span { font-weight: 800; font-size: 18px; display: block; }
.result-score-display small { color: var(--text-light); font-size: 12px; }
.result-score-display .good { color: var(--success); }
.result-score-display .mid { color: var(--accent); }
.result-score-display .bad { color: var(--danger); }

/* ====== VOCABULARY ====== */
.vocab-themes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.vocab-theme-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: white; border: 2px solid var(--border);
    border-radius: 99px;
    font-weight: 600; font-size: 14px;
    color: var(--text);
    transition: all .2s;
}
.vocab-theme-pill:hover { border-color: var(--theme-color); color: var(--theme-color); }
.vocab-theme-pill.active { background: var(--theme-color); border-color: var(--theme-color); color: white; }

.vocab-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.vocab-header h2 { font-size: 22px; font-weight: 800; }
.count-badge { padding: 4px 12px; background: var(--primary-light); color: var(--primary-dark); border-radius: 99px; font-size: 13px; font-weight: 700; }

.flashcard-controls { display: flex; gap: 6px; margin-bottom: 20px; background: var(--bg); padding: 4px; border-radius: 12px; width: fit-content; }
.mode-btn { padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text-light); }
.mode-btn.active { background: white; color: var(--text); box-shadow: var(--shadow-sm); }

.vocab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vocab-card { background: white; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); }
.vocab-spanish { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.vocab-spanish strong { font-size: 18px; color: var(--text); }
.speak-btn { color: var(--text-light); padding: 6px; border-radius: 6px; display: flex; }
.speak-btn:hover { background: var(--bg); color: var(--primary); }
.vocab-french { color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.vocab-example { font-size: 13px; color: var(--text-light); font-style: italic; padding-top: 8px; border-top: 1px dashed var(--border); }

.flashcard-mode { max-width: 480px; margin: 0 auto; }
.flashcard-counter { text-align: center; font-weight: 700; color: var(--text-light); margin-bottom: 16px; }
.flashcard {
    perspective: 1500px;
    cursor: pointer;
    margin-bottom: 24px;
    height: 280px;
}
.flashcard-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d;
    transition: transform .6s;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
    position: absolute; inset: 0;
    background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    backface-visibility: hidden;
    padding: 32px;
    text-align: center;
}
.flashcard-back { transform: rotateY(180deg); background: linear-gradient(135deg, var(--primary), #ec4899); color: white; }
.flashcard-front strong, .flashcard-back strong { font-size: 32px; margin: 12px 0; }
.flashcard-back em { font-style: italic; opacity: 0.9; margin-top: 8px; font-size: 14px; }
.fc-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; opacity: 0.7; }
.fc-hint { font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.flashcard-actions { display: flex; gap: 12px; justify-content: center; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-light); }
.empty-state svg { color: var(--text-muted); margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; margin-bottom: 6px; color: var(--text); }
.empty-state-small { padding: 30px; text-align: center; color: var(--text-light); background: white; border-radius: var(--radius); border: 1px solid var(--border); }

/* ====== PROGRESS ====== */
.chart-card { background: white; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.progress-themes { display: flex; flex-direction: column; gap: 14px; }
.progress-theme-row { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.pt-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pt-info { flex: 1; }
.pt-title { display: flex; justify-content: space-between; margin-bottom: 8px; }
.pt-title strong { font-size: 15px; }
.pt-title span { font-size: 13px; color: var(--text-light); font-weight: 600; }

.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.badge-card {
    background: white; border: 2px solid var(--badge-color);
    padding: 20px; border-radius: var(--radius);
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.badge-icon { color: var(--badge-color); margin-bottom: 6px; }
.badge-card strong { font-size: 15px; }
.badge-card span { font-size: 12px; color: var(--text-light); }

/* ====== SETTINGS ====== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.settings-card { background: white; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.settings-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.settings-card p { color: var(--text-light); font-size: 14px; margin-bottom: 16px; }
.settings-card-domain { background: linear-gradient(135deg, var(--primary-light), #fce7f3); border-color: var(--primary); }
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--text-light); }

.hidden { display: none !important; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; gap: 30px; }
    .hero-visual { height: 360px; }
    .hero-content h1 { font-size: 42px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .themes-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .mobile-menu-toggle { display: flex; }
    .main-content { margin-left: 0; padding: 80px 16px 32px; }
    .hero { padding: 40px 0 60px; }
    .hero-content h1 { font-size: 34px; }
    .hero-subtitle { font-size: 17px; }
    .hero-stats { gap: 24px; }
    .features h2, .cta-section h2 { font-size: 30px; }
    .feature-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .continue-card { flex-direction: column; align-items: stretch; text-align: center; }
    .page-header h1 { font-size: 26px; }
    .theme-hero { flex-direction: column; text-align: center; padding: 24px; }
    .theme-hero-icon { width: 60px; height: 60px; }
    .theme-hero h1 { font-size: 22px; }
    .lesson-item { flex-direction: column; align-items: stretch; text-align: center; }
    .lesson-meta { justify-content: center; }
    .exercise-question { font-size: 22px; }
    .auth-card { padding: 28px 22px; }
    .floating-card { min-width: 140px; padding: 14px 18px; }
    .floating-card strong { font-size: 18px; }
}
