/* ══════════════════════════════════════════════════════
   Kora Kagaz UPSC — Production Stylesheet
   Indian Tricolor Theme: Saffron + Navy + Green
   ══════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Design Tokens (Light) ───────────────────────────── */
:root {
    --primary: #e8364e;
    --primary-light: #ff6b81;
    --primary-lighter: #ffe0e4;
    --primary-dark: #c62839;
    --primary-glow: rgba(232, 54, 78, 0.25);
    --accent: #FF9933;
    --accent-light: #fff3e0;
    --navy: #1b2a4a;
    --navy-light: #2d4373;
    --green: #138808;
    --green-light: #e8f5e9;
    --success: #138808; --success-light: #e8f5e9;
    --warning: #FF9933; --warning-light: #fff3e0;
    --danger: #e8364e; --danger-light: #ffe0e4;
    --info: #1565c0; --info-light: #e3f2fd;
    --bg: #f8f9fc; --bg-alt: #f0f2f8;
    --surface: #ffffff; --surface-hover: #fafafa; --surface-alt: #f0f2f8;
    --text: #0f172a; --text-secondary: #334155; --text-muted: #64748b;
    --border: #e2e8f0; --border-light: #f1f5f9;
    --radius-xs: 6px; --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-full: 9999px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 16px -4px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 28px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 40px -8px rgba(0,0,0,0.12);
    --transition-fast: 0.15s ease; --transition: 0.25s ease; --transition-slow: 0.4s ease;
    --navbar-bg: rgba(255,255,255,0.92);
    --hero-gradient: linear-gradient(135deg, #1b2a4a 0%, #0d47a1 40%, #1565c0 70%, #1b2a4a 100%);
    --card-gradient: linear-gradient(135deg, rgba(232,54,78,0.02), rgba(255,153,51,0.02));
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Design Tokens (Dark) ────────────────────────────── */
[data-theme="dark"] {
    --primary: #ff6b81; --primary-light: #ff8fa0; --primary-lighter: #3d1520;
    --primary-dark: #e8364e; --primary-glow: rgba(255,107,129,0.2);
    --accent: #ffb74d; --accent-light: #3d2e14;
    --navy: #8eadd4; --navy-light: #b8cceb;
    --green: #66bb6a; --green-light: #1b3a1c;
    --success: #66bb6a; --success-light: #1b3a1c;
    --warning: #ffb74d; --warning-light: #3d2e14;
    --danger: #ff6b81; --danger-light: #3d1520;
    --info: #64b5f6; --info-light: #0d2a4a;
    --bg: #0b1120; --bg-alt: #111827;
    --surface: #151f32; --surface-hover: #1a2740; --surface-alt: #1e293b;
    --text: #e2e8f0; --text-secondary: #cbd5e1; --text-muted: #94a3b8;
    --border: #1e3050; --border-light: #1a2740;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.2); --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow: 0 4px 6px rgba(0,0,0,0.3); --shadow-md: 0 8px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.4); --shadow-xl: 0 20px 40px rgba(0,0,0,0.5);
    --navbar-bg: rgba(11,17,32,0.94);
    --hero-gradient: linear-gradient(135deg, #0b1120 0%, #162038 40%, #1a2a4a 70%, #0b1120 100%);
    --card-gradient: linear-gradient(135deg, rgba(255,107,129,0.04), rgba(255,183,77,0.04));
}

/* ── Base ─────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg); color: var(--text); line-height: 1.6;
    min-height: 100vh; transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
::selection { background: var(--primary); color: white; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ── Announcement Bar ────────────────────────────────── */
.announcement-bar {
    background: linear-gradient(90deg, var(--primary), #FF9933, var(--primary));
    background-size: 200% 100%;
    animation: shimmerBg 4s ease infinite;
    color: white; padding: 10px 48px 10px 24px;
    text-align: center; font-size: 0.85rem; font-weight: 600;
    position: relative; z-index: 110;
    font-family: var(--font-body);
}
.announcement-bar.hidden { display: none; }
.announcement-content { overflow: hidden; white-space: nowrap; }
.announcement-text { display: inline-block; animation: marquee 20s linear infinite; }
.announcement-close {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: white; font-size: 1.2rem; padding: 4px 8px; opacity: 0.8;
    transition: opacity var(--transition-fast);
}
.announcement-close:hover { opacity: 1; }
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
@keyframes shimmerBg {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--navbar-bg);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    transition: opacity var(--transition-fast);
}
.logo:hover { opacity: 0.85; }
.logo-badge {
    font-size: 1.5rem; display: flex; align-items: center;
}
.logo-text {
    font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800;
    color: var(--navy);
}
[data-theme="dark"] .logo-text { color: var(--text); }
.logo-accent { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.nav-link {
    font-family: var(--font-heading);
    font-weight: 500; font-size: 0.84rem; color: var(--text-muted);
    padding: 7px 10px; border-radius: var(--radius-sm);
    transition: all var(--transition-fast); white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface-alt); }
.nav-link.active { color: var(--primary); background: var(--primary-lighter); font-weight: 600; }
[data-theme="dark"] .nav-link.active { background: rgba(255,107,129,0.12); }

.auth-nav-link {
    font-weight: 600; font-size: 0.82rem; padding: 7px 14px;
    border-radius: var(--radius-sm); transition: all var(--transition-fast);
    font-family: var(--font-heading); white-space: nowrap;
}
.auth-nav-link.login-btn { color: var(--primary); }
.auth-nav-link.login-btn:hover { background: var(--surface-alt); }
.auth-nav-link.signup-btn { background: var(--primary); color: white; }
.auth-nav-link.signup-btn:hover { background: var(--primary-dark); }
.auth-nav-link.user-btn { color: var(--text); display: flex; align-items: center; gap: 6px; }
.auth-nav-link.user-btn:hover { background: var(--surface-alt); }
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
}

.theme-toggle {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); color: var(--text-muted); transition: all var(--transition-fast);
}
.theme-toggle:hover { color: var(--text); background: var(--surface-alt); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 110; }
.mobile-menu-btn span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Progress Bar ─────────────────────────────────────── */
.progress-bar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 200; transition: width 0.4s ease; border-radius: 0 2px 2px 0;
}
.progress-bar.active { box-shadow: 0 0 8px var(--primary-glow); }

/* ── Loading / Spinner ────────────────────────────────── */
.loading-screen {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 120px 24px; gap: 16px; color: var(--text-muted);
}
.spinner {
    width: 36px; height: 36px; border: 3px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
    background: var(--hero-gradient); color: white;
    padding: 80px 24px 100px; text-align: center;
    position: relative;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,153,51,0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(19,136,8,0.08) 0%, transparent 50%);
}
.hero::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, #FF9933 33%, white 33%, white 66%, #138808 66%);
}
.hero > * { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,153,51,0.2); backdrop-filter: blur(8px);
    padding: 8px 20px; border-radius: var(--radius-full);
    font-size: 0.82rem; font-weight: 600; margin-bottom: 24px;
    border: 1px solid rgba(255,153,51,0.3);
    font-family: var(--font-heading);
}
.hero h1 {
    font-size: 3.2rem; font-weight: 900; margin-bottom: 16px;
    letter-spacing: -0.03em; line-height: 1.1;
    background: linear-gradient(135deg, #ffffff, #ffcc80);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 580px; margin: 0 auto 20px; line-height: 1.7; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.hero-cta .btn-hero-primary {
    background: var(--primary); color: white; padding: 14px 36px; border-radius: var(--radius);
    font-weight: 700; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 20px rgba(232,54,78,0.4); transition: all var(--transition-fast);
    font-family: var(--font-heading);
}
.hero-cta .btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(232,54,78,0.5); }
.hero-cta .btn-hero-secondary {
    background: rgba(255,255,255,0.15); color: white; padding: 14px 36px; border-radius: var(--radius);
    font-weight: 600; font-size: 1rem; border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px); transition: all var(--transition-fast);
    font-family: var(--font-heading); display: inline-flex; align-items: center; gap: 8px;
}
.hero-cta .btn-hero-secondary:hover { background: rgba(255,255,255,0.25); }
.hero-stats { display: flex; justify-content: center; gap: 56px; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2.5rem; font-weight: 900; display: block; line-height: 1; margin-bottom: 4px; font-family: var(--font-heading); }
.hero-stat .label { font-size: 0.825rem; opacity: 0.75; font-weight: 500; }

/* ── Features Section ────────────────────────────────── */
.features-section {
    max-width: 1200px; margin: 60px auto 0; padding: 0 24px;
}
.features-section h2 {
    text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 8px;
}
.features-subtitle {
    text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 40px;
}
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px;
}
.feature-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 24px;
    text-align: center; transition: all var(--transition);
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0); transition: transform var(--transition);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-icon { font-size: 2.5rem; margin-bottom: 14px; display: block; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

/* ── Exam Cards (Home) ────────────────────────────────── */
.exam-grid {
    max-width: 1200px; margin: -40px auto 0; padding: 0 24px;
    position: relative; z-index: 2;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.exam-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 24px;
    cursor: pointer; transition: all var(--transition);
    text-align: center; position: relative; overflow: hidden;
}
.exam-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #FF9933, #e8364e, #138808);
    opacity: 0; transition: opacity var(--transition);
}
.exam-card:hover::after { opacity: 1; }
.exam-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.exam-card-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.exam-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.exam-card p { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 12px; line-height: 1.5; }
.exam-card-count { font-size: 0.75rem; font-weight: 600; color: var(--primary); }

/* ── Section ──────────────────────────────────────────── */
.section { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-header h2 { font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-count { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); background: var(--surface-alt); padding: 3px 10px; border-radius: var(--radius-full); }

/* ── Test Series Cards ────────────────────────────────── */
.cards-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px;
}
.card {
    background: var(--surface); background-image: var(--card-gradient);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 28px; transition: all var(--transition); position: relative; overflow: hidden;
}
.card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.card-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: var(--radius-full);
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.price-badge { font-weight: 800; font-size: 0.9rem; }
.price-free { color: var(--success); }
.price-paid { color: var(--primary); }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.card-description {
    color: var(--text-muted); font-size: 0.875rem; margin-bottom: 16px;
    line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
    display: flex; flex-wrap: wrap; gap: 14px;
    font-size: 0.78rem; color: var(--text-muted);
    padding-top: 14px; border-top: 1px solid var(--border-light);
}
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .best-score { color: var(--warning); font-weight: 600; }
.difficulty-badge {
    padding: 2px 8px; border-radius: var(--radius-full);
    font-size: 0.68rem; font-weight: 700;
}
.difficulty-easy { background: var(--success-light); color: var(--success); }
.difficulty-medium { background: var(--warning-light); color: #e65100; }
.difficulty-hard { background: var(--danger-light); color: var(--danger); }
.card-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Coupon Badge ────────────────────────────────────── */
.coupon-strip {
    background: linear-gradient(90deg, var(--accent), #ff7043);
    color: white; border-radius: var(--radius-full);
    padding: 4px 12px; font-size: 0.72rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer; transition: all var(--transition-fast);
}
.coupon-strip:hover { transform: scale(1.05); }

/* ── Testimonials ────────────────────────────────────── */
.testimonials-section {
    max-width: 1200px; margin: 60px auto 0; padding: 0 24px;
}
.testimonials-section h2 {
    text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 8px;
}
.testimonials-subtitle {
    text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 40px;
}
.testimonials-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.testimonial-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px;
    transition: all var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-md); }
.testimonial-stars { color: #f59e0b; font-size: 1rem; margin-bottom: 12px; }
.testimonial-text { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 16px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700; color: white;
}
.testimonial-info h4 { font-size: 0.9rem; font-weight: 700; }
.testimonial-info p { font-size: 0.78rem; color: var(--text-muted); }

/* ── FAQ Section ─────────────────────────────────────── */
.faq-page, .faq-section { max-width: 800px; margin: 0 auto; padding: 48px 24px; }
.faq-page h2, .faq-section h2 { text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.faq-subtitle { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 40px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: all var(--transition);
}
.faq-item:hover { border-color: var(--primary-light); }
.faq-question {
    width: 100%; padding: 18px 24px; display: flex; justify-content: space-between;
    align-items: center; gap: 16px; font-weight: 600; font-size: 0.95rem;
    text-align: left; color: var(--text); transition: all var(--transition-fast);
    font-family: var(--font-heading);
}
.faq-question:hover { color: var(--primary); }
.faq-toggle {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--surface-alt); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0; transition: all var(--transition);
    color: var(--text-muted);
}
.faq-item.open .faq-toggle { transform: rotate(45deg); color: var(--primary); background: var(--primary-lighter); }
.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 24px 18px; }
.faq-answer p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* ── Contact Page ────────────────────────────────────── */
.contact-page {
    max-width: 1000px; margin: 48px auto; padding: 0 24px;
    animation: fadeSlideUp 0.4s ease;
}
.contact-page h2 { text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.contact-subtitle { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-info-cards { display: flex; flex-direction: column; gap: 16px; }
.contact-info-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    display: flex; align-items: flex-start; gap: 16px;
    transition: all var(--transition);
}
.contact-info-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.contact-icon {
    width: 48px; height: 48px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.contact-icon.whatsapp { background: #25D366; color: white; }
.contact-icon.email { background: var(--primary); color: white; }
.contact-icon.phone { background: var(--accent); color: white; }
.contact-icon.location { background: var(--info); color: white; }
.contact-info-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.contact-info-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.contact-info-card a { color: var(--primary); font-weight: 600; }
.contact-form-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px;
}
.contact-form-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9rem; transition: all var(--transition-fast);
    border: none; cursor: pointer; white-space: nowrap;
    font-family: var(--font-heading);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 8px var(--primary-glow); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(0.9); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(0.9); }
.btn-warning { background: var(--warning); color: #1a1a1a; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { filter: brightness(0.9); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Auth Forms ───────────────────────────────────────── */
.auth-page {
    max-width: 440px; margin: 60px auto; padding: 0 24px;
    animation: fadeSlideUp 0.4s ease;
}
.auth-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 40px;
    box-shadow: var(--shadow-md);
}
.auth-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-card .subtitle { color: var(--text-muted); text-align: center; margin-bottom: 28px; font-size: 0.9rem; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.form-input {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.92rem; font-family: inherit;
    background: var(--bg); color: var(--text); transition: all var(--transition-fast); outline: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 4px; }
.form-textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.92rem; font-family: inherit;
    background: var(--bg); color: var(--text); transition: all var(--transition-fast); outline: none;
    resize: vertical; min-height: 100px;
}
.form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-divider {
    display: flex; align-items: center; gap: 12px; margin: 20px 0;
    color: var(--text-muted); font-size: 0.82rem;
}
.form-divider::before, .form-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.google-btn {
    width: 100%; padding: 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface);
    font-weight: 600; font-size: 0.9rem; display: flex;
    align-items: center; justify-content: center; gap: 10px;
    transition: all var(--transition-fast); color: var(--text);
}
.google-btn:hover { background: var(--surface-alt); box-shadow: var(--shadow-sm); }
.auth-footer {
    text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted);
}
.auth-footer a { color: var(--primary); font-weight: 600; cursor: pointer; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Profile Page ─────────────────────────────────────── */
.profile-page { max-width: 600px; margin: 48px auto; padding: 0 24px; animation: fadeSlideUp 0.4s ease; }
.profile-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 36px; box-shadow: var(--shadow-sm);
}
.profile-header { text-align: center; margin-bottom: 28px; }
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; font-weight: 800; margin: 0 auto 12px;
}
.profile-header h2 { font-size: 1.3rem; font-weight: 700; }
.profile-header .email { color: var(--text-muted); font-size: 0.88rem; }

/* ── Instructions Page ────────────────────────────────── */
.instructions-page { max-width: 700px; margin: 48px auto; padding: 0 24px; animation: fadeSlideUp 0.4s ease; }
.instructions-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 44px; box-shadow: var(--shadow-md);
}
.instructions-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.instructions-card .sub { color: var(--text-muted); margin-bottom: 28px; font-size: 0.95rem; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
.info-item {
    text-align: center; padding: 16px 8px; background: var(--bg);
    border-radius: var(--radius); border: 1px solid var(--border-light);
}
.info-item .value { font-size: 1.35rem; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.info-item .label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.instructions-list { list-style: none; margin-bottom: 32px; }
.instructions-list li {
    padding: 14px 0; border-bottom: 1px solid var(--border-light);
    display: flex; gap: 14px; font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6;
}
.instructions-list li:last-child { border-bottom: none; }
.instructions-list .icon {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; margin-top: 2px;
}
.instructions-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ── Test Interface ───────────────────────────────────── */
.test-interface {
    max-width: 1060px; margin: 0 auto; padding: 20px 24px;
    display: grid; grid-template-columns: 1fr 260px; gap: 20px;
    min-height: calc(100vh - 64px);
}
.test-header {
    grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 24px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; box-shadow: var(--shadow-xs);
}
.test-title { font-weight: 700; font-size: 1rem; }
.test-progress-text { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; display: block; }
.timer {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.05rem; font-weight: 700; color: var(--primary);
    background: var(--primary-lighter); padding: 8px 16px; border-radius: var(--radius-sm);
    transition: all var(--transition); font-family: var(--font-heading);
}
[data-theme="dark"] .timer { background: rgba(255,107,129,0.12); }
.timer.warning { color: #e65100; background: var(--warning-light); }
.timer.danger { color: var(--danger); background: var(--danger-light); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.question-area {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-xs);
}
.question-number { font-size: 0.8rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.question-text { font-size: 1.15rem; font-weight: 600; margin-bottom: 28px; line-height: 1.65; }
.options-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.option {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 20px; border: 2px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
    transition: all var(--transition-fast); font-size: 0.95rem; background: var(--surface);
}
.option:hover { border-color: var(--primary-light); background: var(--primary-lighter); }
[data-theme="dark"] .option:hover { background: rgba(255,107,129,0.08); }
.option.selected { border-color: var(--primary); background: var(--primary-lighter); box-shadow: 0 0 0 3px var(--primary-glow); }
[data-theme="dark"] .option.selected { background: rgba(255,107,129,0.12); }
.option-marker {
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.82rem; flex-shrink: 0; transition: all var(--transition-fast);
}
.option.selected .option-marker { background: var(--primary); border-color: var(--primary); color: white; }
.option.correct { border-color: var(--success); background: var(--success-light); cursor: default; }
.option.correct .option-marker { background: var(--success); border-color: var(--success); color: white; }
.option.wrong { border-color: var(--danger); background: var(--danger-light); cursor: default; }
.option.wrong .option-marker { background: var(--danger); border-color: var(--danger); color: white; }
.question-nav-buttons { display: flex; justify-content: space-between; gap: 12px; }
.nav-buttons-right { display: flex; gap: 10px; }

/* ── Question Palette ─────────────────────────────────── */
.question-palette {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    height: fit-content; position: sticky; top: 88px; box-shadow: var(--shadow-xs);
}
.palette-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 16px; }
.palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.palette-btn {
    width: 100%; aspect-ratio: 1; border-radius: var(--radius-xs);
    border: 2px solid var(--border); background: var(--surface);
    font-weight: 600; font-size: 0.82rem; transition: all var(--transition-fast);
    display: flex; align-items: center; justify-content: center; color: var(--text);
}
.palette-btn:hover { border-color: var(--primary-light); }
.palette-btn.current { border-color: var(--primary); background: var(--primary); color: white; }
.palette-btn.answered { border-color: var(--success); background: var(--success); color: white; }
.palette-btn.marked { border-color: var(--warning); background: var(--warning); color: #1a1a1a; }
.palette-btn.marked-answered { border-color: var(--warning); background: var(--warning); color: #1a1a1a; position: relative; }
.palette-btn.marked-answered::after {
    content: ''; position: absolute; bottom: 2px; right: 2px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); border: 1.5px solid white;
}
.palette-legend {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 0.75rem; color: var(--text-muted);
    padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legend-dot.current { background: var(--primary); }
.legend-dot.answered { background: var(--success); }
.legend-dot.marked { background: var(--warning); }
.legend-dot.unanswered { border: 2px solid var(--border); }
.palette-submit { margin-top: 14px; width: 100%; }

/* ── Results Page ─────────────────────────────────────── */
.results-page { max-width: 800px; margin: 48px auto; padding: 0 24px; animation: fadeSlideUp 0.5s ease; }
.results-header { text-align: center; margin-bottom: 40px; }
.results-header h2 { font-size: 1.75rem; font-weight: 900; margin-bottom: 6px; }
.results-header .subtitle { color: var(--text-muted); font-size: 0.95rem; }
.score-ring { width: 180px; height: 180px; margin: 28px auto; position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.score-ring-fill { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s ease; }
.score-ring-fill.excellent { stroke: var(--success); }
.score-ring-fill.good { stroke: #1565c0; }
.score-ring-fill.average { stroke: var(--warning); }
.score-ring-fill.poor { stroke: var(--danger); }
.score-ring-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring-value { font-size: 2.75rem; font-weight: 900; color: var(--primary); line-height: 1; font-family: var(--font-heading); }
.score-ring-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-top: 2px; }
.score-message { text-align: center; font-size: 1rem; font-weight: 600; margin-bottom: 32px; padding: 10px 20px; border-radius: var(--radius-full); display: inline-block; }
.score-message.excellent { background: var(--success-light); color: var(--success); }
.score-message.good { background: var(--info-light); color: var(--info); }
.score-message.average { background: var(--warning-light); color: #e65100; }
.score-message.poor { background: var(--danger-light); color: var(--danger); }

.results-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 36px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 12px; text-align: center;
}
.stat-card .num { font-size: 1.35rem; font-weight: 800; display: block; margin-bottom: 2px; font-family: var(--font-heading); }
.stat-card .label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-card.correct .num { color: var(--success); }
.stat-card.wrong .num { color: var(--danger); }
.stat-card.skipped .num { color: var(--warning); }
.stat-card.time .num { color: var(--info); }
.results-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 44px; }

/* ── Review Section ───────────────────────────────────── */
.review-section { margin-top: 8px; }
.review-section h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; }
.review-question {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; margin-bottom: 14px;
}
.review-question .q-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.review-question .q-num { font-weight: 700; font-size: 0.85rem; color: var(--primary); }
.result-badge { padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.result-badge.correct { background: var(--success-light); color: var(--success); }
.result-badge.wrong { background: var(--danger-light); color: var(--danger); }
.result-badge.skipped { background: var(--warning-light); color: #e65100; }
.review-question .q-text { font-weight: 600; margin-bottom: 16px; line-height: 1.55; }
.explanation { margin-top: 12px; padding: 12px 16px; background: var(--bg-alt); border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--text-secondary); border-left: 3px solid var(--primary); }

/* ── Results History ──────────────────────────────────── */
.results-history { max-width: 800px; margin: 48px auto; padding: 0 24px; animation: fadeSlideUp 0.4s ease; }
.results-history > h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.results-history > .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.stats-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 32px; }
.dashboard-stats { grid-template-columns: repeat(4, 1fr); }
.overview-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.overview-card .num { font-size: 1.75rem; font-weight: 900; color: var(--primary); display: block; font-family: var(--font-heading); }
.overview-card .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.history-list-header { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 12px; }
.history-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 24px; margin-bottom: 10px;
    display: flex; align-items: center; justify-content: space-between;
    transition: all var(--transition-fast);
}
.history-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.history-info h4 { font-weight: 600; font-size: 0.95rem; margin-bottom: 3px; }
.history-info .date { font-size: 0.8rem; color: var(--text-muted); }
.history-score { text-align: right; }
.history-score .score { font-size: 1.25rem; font-weight: 800; color: var(--primary); display: block; font-family: var(--font-heading); }
.history-score .detail { font-size: 0.75rem; color: var(--text-muted); }

.empty-state { text-align: center; padding: 80px 24px; color: var(--text-muted); }
.empty-state .empty-icon {
    width: 80px; height: 80px; margin: 0 auto 20px; background: var(--surface-alt);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; opacity: 0.6;
}
.empty-state h3 { font-size: 1.15rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { max-width: 360px; margin: 0 auto 20px; font-size: 0.9rem; }

/* ── Dialog ───────────────────────────────────────────── */
.dialog-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center; z-index: 200;
    backdrop-filter: blur(6px); animation: fadeIn 0.2s ease;
}
.dialog {
    background: var(--surface); border-radius: var(--radius-lg); padding: 32px;
    max-width: 420px; width: 90%; box-shadow: var(--shadow-xl); animation: scaleIn 0.25s ease;
    border: 1px solid var(--border);
}
.dialog h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.dialog p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; line-height: 1.6; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Coupon Dialog ───────────────────────────────────── */
.coupon-dialog { max-width: 460px; }
.coupon-message { font-size: 0.82rem; margin-top: 8px; font-weight: 600; }
.coupon-message.success { color: var(--success); }
.coupon-message.error { color: var(--danger); }

/* ── Toast ────────────────────────────────────────────── */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; font-weight: 500;
    animation: slideInRight 0.3s ease; pointer-events: auto; max-width: 360px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.removing { animation: slideOutRight 0.3s ease forwards; }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Confetti ─────────────────────────────────────────── */
.confetti-container { position: fixed; inset: 0; z-index: 250; pointer-events: none; overflow: hidden; }
.confetti-piece {
    position: absolute; width: 10px; height: 10px; top: -10px;
    animation: confettiFall var(--fall-duration, 3s) ease-in forwards;
    animation-delay: var(--delay, 0s);
}
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } 100% { transform: translateY(100vh) rotate(var(--rotation, 720deg)) scale(0.5); opacity: 0; } }

/* ── WhatsApp Float ──────────────────────────────────── */
.whatsapp-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 150;
    width: 60px; height: 60px; border-radius: 50%;
    background: #25D366; color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: all var(--transition);
    animation: floatBounce 3s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.5); }
@keyframes floatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
    background: var(--navy); color: white; margin-top: 80px;
    position: relative;
}
.footer::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #FF9933 33%, white 33%, white 66%, #138808 66%);
}
[data-theme="dark"] .footer { background: #0a0f1a; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 48px 24px 24px; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
    padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}
.footer-logo {
    font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem;
    display: block; margin-bottom: 12px;
}
.footer-tagline { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin-bottom: 20px; line-height: 1.6; }
.footer-social { display: flex; gap: 12px; }
.social-link {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
    transition: all var(--transition-fast); color: rgba(255,255,255,0.7);
}
.social-link:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.footer-col h4 {
    font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem;
    margin-bottom: 16px; color: white;
}
.footer-col a {
    display: block; color: rgba(255,255,255,0.6); font-size: 0.85rem;
    padding: 4px 0; transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--accent); }
.footer-contact-item { color: rgba(255,255,255,0.6); font-size: 0.85rem; padding: 4px 0; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { color: rgba(255,255,255,0.4); font-size: 0.78rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.4); font-size: 0.78rem; transition: color var(--transition-fast); }
.footer-bottom-links a:hover { color: white; }

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
.animate-in { animation: fadeSlideUp 0.45s ease both; }
.stagger-1 { animation-delay: 0.05s; } .stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; } .stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; } .stagger-6 { animation-delay: 0.3s; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--surface); flex-direction: column;
        padding: 80px 24px 24px; gap: 8px;
        border-left: 1px solid var(--border); box-shadow: var(--shadow-xl);
        transition: right var(--transition); z-index: 105;
    }
    .nav-links.open { right: 0; }
    .nav-link { padding: 12px 16px; }
    .theme-toggle { align-self: flex-start; margin-top: 8px; }
    .hero h1 { font-size: 2.25rem; }
    .hero { padding: 56px 20px 72px; }
    .hero-stats { gap: 28px; }
    .exam-grid { grid-template-columns: repeat(2, 1fr); margin-top: -28px; }
    .test-interface { grid-template-columns: 1fr; padding: 10px; gap: 10px; min-height: auto; }
    .test-header { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
    .test-title { font-size: 0.85rem; }
    .timer { font-size: 0.9rem; padding: 6px 12px; }
    .question-palette { position: static; order: 3; }
    .question-area { padding: 16px; }
    .question-text { font-size: 1rem; margin-bottom: 18px; }
    .question-number { font-size: 0.75rem; margin-bottom: 10px; }
    .option { padding: 12px 14px; gap: 10px; font-size: 0.9rem; }
    .option-marker { width: 28px; height: 28px; font-size: 0.75rem; }
    .palette-grid { gap: 6px; }
    .palette-btn { width: 32px; height: 32px; font-size: 0.7rem; }
    .part-tabs { flex-wrap: wrap; padding: 6px 10px !important; }
    .part-tabs .btn { font-size: 0.75rem; padding: 4px 10px; }
    .cards-grid { grid-template-columns: 1fr; }
    .results-stats { grid-template-columns: repeat(3, 1fr); }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .instructions-card { padding: 28px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .toast-container { left: 16px; right: 16px; }
    .toast { max-width: none; }
    .announcement-bar { font-size: 0.78rem; padding: 8px 40px 8px 16px; }
}
@media (max-width: 480px) {
    .hero { padding: 40px 16px 60px; }
    .hero h1 { font-size: 1.85rem; }
    .hero-stats { flex-direction: column; gap: 12px; }
    .hero-stat { display: flex; align-items: center; gap: 8px; justify-content: center; }
    .exam-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .exam-card { padding: 20px 16px; }
    .question-nav-buttons { flex-direction: column; gap: 8px; }
    .nav-buttons-right { justify-content: stretch; flex-wrap: wrap; }
    .nav-buttons-right .btn { flex: 1; min-width: 0; font-size: 0.8rem; padding: 8px 6px; }
    .instructions-actions { flex-direction: column; }
    .results-stats { grid-template-columns: repeat(2, 1fr); }
    .stats-overview, .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .whatsapp-float { width: 52px; height: 52px; bottom: 16px; right: 16px; }
    .test-interface { padding: 6px; gap: 8px; }
    .question-area { padding: 12px; }
    .question-text { font-size: 0.92rem; line-height: 1.55; margin-bottom: 14px; }
    .option { padding: 10px 12px; font-size: 0.85rem; }
    .option-marker { width: 26px; height: 26px; font-size: 0.72rem; }
    .test-header { padding: 8px 10px; }
    .test-title { font-size: 0.8rem; }
    .test-progress-text { font-size: 0.7rem; }
    .timer { font-size: 0.8rem; padding: 5px 10px; }
    .question-palette { padding: 12px; }
    .palette-title { font-size: 0.8rem; margin-bottom: 10px; }
    .palette-btn { width: 28px; height: 28px; font-size: 0.65rem; }
    .palette-legend { font-size: 0.7rem; gap: 6px; }
    .results-actions { flex-direction: column; }
    .results-actions .btn { width: 100%; }
    .review-question { padding: 14px; }
    .q-text { font-size: 0.9rem; }
    .info-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .instructions-card { padding: 20px 14px; }
    .instructions-list li { font-size: 0.85rem; }
    .score-ring svg { width: 100px; height: 100px; }
}

/* ── Auth Divider ─────────────────────────────────────── */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.auth-divider span { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Reduced Motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}

@media print {
    .navbar, .footer, .toast-container, .progress-bar, .whatsapp-float, .announcement-bar, .results-actions, .dialog-overlay, .question-nav-buttons, .question-palette { display: none !important; }
    body { background: white !important; color: black !important; font-size: 12pt; }
    .results-page, .review-section { max-width: 100% !important; }
    .review-question { break-inside: avoid; page-break-inside: avoid; border: 1px solid #ccc !important; margin-bottom: 8px; }
    .option { border: 1px solid #ddd !important; padding: 6px 10px !important; }
    .option.correct { border-color: green !important; background: #e8f5e9 !important; }
    .option.wrong { border-color: red !important; background: #ffebee !important; }
    .score-ring { width: 120px !important; height: 120px !important; }
    .stat-card { border: 1px solid #ddd !important; }
    .explanation { border-left: 3px solid #e8364e !important; background: #f9f9f9 !important; }
    h2, h3 { color: black !important; }
    * { box-shadow: none !important; }
    img { max-width: 100% !important; }
    .review-question img { max-height: 200px !important; }
    #search-results { display: none !important; }
}
