/* ═══════════════════════════════════════════════════
   11pluspreparation.com — Complete Stylesheet v3
   Premium dark theme · indigo + cyan accent
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ──────────────────────────────────── */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-glow: rgba(99,102,241,0.3);
  --primary-10: rgba(99,102,241,0.1);
  --primary-5: rgba(99,102,241,0.05);
  --secondary: #0ea5e9;
  --secondary-dark: #0284c7;
  --accent: #22d3ee;
  --cyan: #06b6d4;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-input: #1e293b;
  --border: #334155;
  --border-light: rgba(51,65,85,0.6);
  --border-focus: #6366f1;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --success-bg: rgba(16,185,129,0.12);
  --warning: #f59e0b;
  --error: #ef4444;
  --error-bg: rgba(239,68,68,0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 40px -8px rgb(0 0 0 / 0.5);
  --shadow-glow: 0 0 30px rgba(99,102,241,0.25);
  --shadow-glow-sm: 0 0 15px rgba(99,102,241,0.2);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms ease;
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --sidebar-w: 280px;
  --header-h: 64px;
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
  --gradient-brand: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-warm: linear-gradient(135deg, var(--primary), #a855f7);
  --gradient-cool: linear-gradient(135deg, var(--secondary), var(--accent));
}

/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(99,102,241,0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(14,165,233,0.04) 0%, transparent 55%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

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

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99,102,241,0.1);
  z-index: 100;
  display: flex; align-items: center;
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(15,23,42,0.97); border-color: var(--border); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo {
  font-size: 1.2rem; font-weight: 800;
  color: var(--text) !important;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.01em;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--gradient-primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fff;
  box-shadow: 0 0 16px rgba(99,102,241,0.4);
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.cta {
  background: var(--primary); color: #fff !important;
  box-shadow: 0 0 20px rgba(99,102,241,0.3);
  border-radius: var(--radius-sm); padding: 8px 18px;
}
.nav-link.cta:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 30px rgba(99,102,241,0.5);
  transform: translateY(-1px);
}
.glass { background: rgba(15,23,42,0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(99,102,241,0.1); }

/* ── Mobile Menu ────────────────────────────────── */
.mobile-menu-btn {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
  width: 40px; height: 40px;
}
.mobile-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: 0.3s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.user-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 20px;
  background: var(--bg-card); font-size: 0.8rem; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.user-badge .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gradient-primary); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.65rem;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  border: none; transition: var(--transition);
  text-decoration: none !important; cursor: pointer;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: translateX(-100%); transition: 0.5s;
}
.btn:hover::after { transform: translateX(100%); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(99,102,241,0.5);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-card); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Hero ───────────────────────────────────────── */
.hero {
  padding: 136px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.3), transparent);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 7px 16px; border-radius: 100px;
  font-size: 0.83rem; font-weight: 600; color: var(--primary-light);
  margin-bottom: 24px;
  animation: fadeSlideUp 0.6s ease both;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.05; letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeSlideUp 0.65s ease 0.1s both;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  max-width: 580px; font-size: 1.1rem; color: var(--text-secondary);
  line-height: 1.75; margin-bottom: 32px;
  animation: fadeSlideUp 0.65s ease 0.2s both;
}
.hero .btn-group {
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: fadeSlideUp 0.65s ease 0.3s both;
}
.hero-stats {
  display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap;
  animation: fadeSlideUp 0.65s ease 0.45s both;
}
.hero-stat .num { font-size: 1.9rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.hero-stat .label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

.hero-layout { display: flex; align-items: center; gap: 64px; }
.hero-content { flex: 1; min-width: 0; }
.hero-visual {
  flex: 0 0 auto;
  animation: fadeSlideUp 0.8s ease 0.2s both;
}
.hero-visual svg {
  filter: drop-shadow(0 24px 48px rgba(99,102,241,0.2));
}

/* ── Trust Strip ─────────────────────────────────── */
.trust-strip {
  padding: 20px 0;
  background: rgba(30,41,59,0.5);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.trust-strip .container {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center;
}
.trust-label {
  font-size: 0.8rem; color: var(--text-muted); font-weight: 500; white-space: nowrap;
}
.trust-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.trust-badge {
  padding: 5px 14px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
  transition: var(--transition);
}
.trust-badge:hover { border-color: var(--primary-light); color: var(--primary-light); }
.trust-sep { color: var(--border); font-size: 0.75rem; }

/* ── Sections ─────────────────────────────────────── */
.section { padding: 88px 0; }
.section-title { text-align: center; margin-bottom: 56px; }
.section-title .eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--primary-light);
  margin-bottom: 12px;
}
.section-title h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 14px;
}
.section-title p { color: var(--text-secondary); max-width: 520px; margin: 0 auto; font-size: 1rem; }

/* ── Feature Cards ────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 32px 28px; border: 1px solid var(--border);
  transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-brand); opacity: 0;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
}
.feature-card:hover::before { opacity: 1; }
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px; transition: var(--transition-bounce);
}
.feature-card:hover .icon { transform: scale(1.1) rotate(-3deg); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }

/* ── How It Works ─────────────────────────────────── */
.how-it-works { background: var(--bg-card); }
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px; position: relative;
}
.steps-grid::before {
  content: ''; position: absolute; top: 48px; left: calc(16.5% + 24px); right: calc(16.5% + 24px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.3;
}
.step-card {
  text-align: center; padding: 32px 24px;
  border-radius: var(--radius); background: var(--bg);
  border: 1px solid var(--border); position: relative;
  transition: var(--transition);
}
.step-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-glow-sm); }
.step-num {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gradient-brand); color: #fff;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.step-icon { font-size: 2.8rem; margin-bottom: 14px; margin-top: 8px; display: block; }
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }

/* ── Year Cards ───────────────────────────────────── */
.year-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px; max-width: 940px; margin: 0 auto;
}
.year-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 36px 24px; text-align: center;
  border: 1px solid var(--border); cursor: pointer;
  transition: var(--transition); position: relative; overflow: hidden;
}
.year-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  transition: var(--transition);
}
.year-card[data-year="3"]::before { background: linear-gradient(90deg, #818cf8, #a5b4fc); }
.year-card[data-year="4"]::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.year-card[data-year="5"]::before { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.year-card[data-year="6"]::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.year-card:hover {
  border-color: rgba(99,102,241,0.5);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99,102,241,0.15);
}
.year-card .year-emoji { font-size: 2.8rem; margin-bottom: 12px; display: block; transition: var(--transition-bounce); }
.year-card:hover .year-emoji { transform: scale(1.15); }
.year-card .year { font-size: 2.2rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.year-card[data-year="3"] .year { color: #a5b4fc; }
.year-card[data-year="4"] .year { color: #818cf8; }
.year-card[data-year="5"] .year { color: #38bdf8; }
.year-card[data-year="6"] .year { color: #22d3ee; }
.year-card .age { font-size: 0.82rem; color: var(--text-muted); margin: 6px 0; }
.year-card .subjects {
  font-size: 0.8rem; color: var(--text-secondary);
  background: var(--bg); padding: 4px 12px; border-radius: 20px;
  display: inline-block; margin-top: 6px;
}

/* ── Testimonials ─────────────────────────────────── */
.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.testimonial-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 32px; border: 1px solid var(--border);
  transition: var(--transition); position: relative;
}
.testimonial-card::before {
  content: '"'; position: absolute; top: 20px; right: 28px;
  font-size: 5rem; line-height: 1; color: var(--primary); opacity: 0.15;
  font-family: Georgia, serif; pointer-events: none;
}
.testimonial-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.testimonial-stars { font-size: 1rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-quote {
  font-size: 0.95rem; line-height: 1.75; color: var(--text);
  margin-bottom: 24px; font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.testimonial-name { font-size: 0.9rem; font-weight: 700; }
.testimonial-role { font-size: 0.78rem; color: var(--text-muted); }

/* ── Pricing ────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 24px; max-width: 980px; margin: 0 auto; align-items: start;
}
.pricing-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 36px 32px; border: 1px solid var(--border);
  position: relative; transition: var(--transition);
}
.pricing-card:hover { border-color: rgba(99,102,241,0.3); }
.pricing-card.featured {
  background: linear-gradient(145deg, rgba(99,102,241,0.08), rgba(14,165,233,0.05));
  border: 1px solid transparent;
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-xl), 0 0 50px rgba(99,102,241,0.15);
  transform: scale(1.03);
}
.pricing-card.featured::before {
  content: ''; position: absolute; inset: -1px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  z-index: -1; opacity: 0.6;
  animation: pulse 3s ease-in-out infinite;
}
.pricing-card .badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gradient-brand); color: #fff; padding: 5px 18px;
  border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  white-space: nowrap;
}
.pricing-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 5px; }
.pricing-card .subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 22px; }
.pricing-card .price { font-size: 2.8rem; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 4px; }
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: var(--text-secondary); letter-spacing: 0; }
.pricing-card .per { color: var(--text-muted); font-size: 0.83rem; margin-bottom: 26px; }
.pricing-card ul { list-style: none; margin-bottom: 28px; }
.pricing-card ul li {
  padding: 9px 0; color: var(--text-secondary); font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(51,65,85,0.4);
}
.pricing-card ul li:last-child { border-bottom: none; }
.pricing-card ul li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* billing toggle */
.billing-toggle {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 44px;
}
.toggle-switch {
  width: 46px; height: 26px; background: var(--bg-card-hover);
  border-radius: 13px; position: relative; cursor: pointer;
  border: 1px solid var(--border); transition: var(--transition);
}
.toggle-switch.active { background: var(--primary); border-color: var(--primary); }
.toggle-switch::after {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  top: 2px; left: 2px; transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch.active::after { left: 22px; }
.save-badge {
  background: rgba(16,185,129,0.12); color: var(--success);
  padding: 3px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  border: 1px solid rgba(16,185,129,0.2);
}

/* ── FAQ ────────────────────────────────────────────── */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 10px; overflow: hidden; transition: var(--transition);
}
.faq-item:hover { border-color: rgba(99,102,241,0.3); }
.faq-question {
  padding: 20px 24px; background: var(--bg-card);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 600; font-size: 0.95rem; gap: 16px;
  transition: var(--transition);
}
.faq-question:hover { color: var(--primary-light); }
.faq-chevron {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%; background: var(--bg-card-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; transition: var(--transition);
  color: var(--primary-light);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); background: var(--primary-10); }
.faq-answer {
  padding: 0 24px; max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary); font-size: 0.9rem; line-height: 1.75;
}
.faq-item.open .faq-answer { padding: 0 24px 20px; max-height: 400px; }

/* ── CTA Section ────────────────────────────────────── */
.cta-section {
  padding: 88px 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(14,165,233,0.06) 50%, rgba(6,182,212,0.04) 100%);
  border-top: 1px solid rgba(99,102,241,0.15);
  border-bottom: 1px solid rgba(99,102,241,0.15);
  text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, rgba(14,165,233,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; }
.cta-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  padding: 7px 16px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 600; color: var(--primary-light);
  margin-bottom: 20px;
}
.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900;
  letter-spacing: -0.03em; margin-bottom: 16px;
}
.cta-section > .container > p,
.cta-inner p {
  color: var(--text-secondary); font-size: 1.05rem; max-width: 520px; margin: 0 auto 32px; line-height: 1.7;
}
.cta-disclaimer {
  margin-top: 16px; font-size: 0.8rem; color: var(--text-muted);
}

/* ── Auth Pages ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; padding-top: calc(var(--header-h) + 24px);
  background-image:
    radial-gradient(ellipse at 30% 30%, rgba(99,102,241,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(14,165,233,0.05) 0%, transparent 50%);
}
.auth-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 44px 40px; width: 100%; max-width: 440px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99,102,241,0.05);
  position: relative;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-brand); border-radius: var(--radius) var(--radius) 0 0;
}
.auth-card h1 { text-align: center; margin-bottom: 8px; font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; }
.auth-card .subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 28px; font-size: 0.9rem; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  margin-bottom: 6px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.form-group input {
  width: 100%; padding: 12px 16px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.95rem; transition: var(--transition);
}
.form-group input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  background: rgba(99,102,241,0.03);
}
.form-group input.error { border-color: var(--error); }
.form-error { color: var(--error); font-size: 0.8rem; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-divider {
  text-align: center; color: var(--text-muted); font-size: 0.82rem;
  margin: 20px 0; position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.social-btn {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition); margin-bottom: 10px; cursor: pointer;
}
.social-btn:hover { border-color: var(--primary); background: rgba(99,102,241,0.04); transform: translateY(-1px); }
.social-btn:active { transform: scale(0.98); }
.social-btn svg { flex-shrink: 0; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-secondary); }
.auth-footer a { color: var(--primary-light); font-weight: 600; }

/* ── Password Strength ──────────────────────────────── */
.pw-strength { display: flex; gap: 5px; margin-top: 10px; }
.pw-bar { height: 4px; flex: 1; border-radius: 2px; background: var(--border); transition: var(--transition); }
.pw-bar.active.weak { background: var(--error); }
.pw-bar.active.medium { background: var(--warning); }
.pw-bar.active.strong { background: var(--success); }
#pw-label { font-size: 0.73rem; color: var(--text-muted); margin-top: 4px; display: block; }

/* ── App Shell ──────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 50; overflow-y: auto;
}
.sidebar-logo {
  font-size: 1.05rem; font-weight: 800; margin-bottom: 28px;
  display: flex; align-items: center; gap: 10px; color: var(--text);
  padding: 0 4px;
}
.sidebar-nav { flex: 1; }
.sidebar-group { margin-bottom: 22px; }
.sidebar-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  padding: 0 10px; margin-bottom: 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  border: none; background: none; width: 100%; text-align: left;
}
.sidebar-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sidebar-item.active {
  background: rgba(99,102,241,0.15); color: var(--primary-light);
  font-weight: 600;
}
.sidebar-item .icon { width: 22px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.sidebar-item .badge-count {
  margin-left: auto; background: var(--primary-10); color: var(--primary-light);
  padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 700;
}

.sidebar-subject-btn.active,
.sidebar-year-btn.active { background: rgba(99,102,241,0.15); color: var(--primary-light); font-weight: 600; }

.sidebar-upgrade {
  margin-top: auto; padding: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(14,165,233,0.08));
  border-radius: var(--radius-sm); text-align: center;
  border: 1px solid rgba(99,102,241,0.2);
}
.sidebar-upgrade p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
.sidebar-upgrade .btn { width: 100%; justify-content: center; font-size: 0.78rem; padding: 8px 16px; }

/* Main Content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; padding: 32px 36px;
  min-height: 100vh;
}
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-header .breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; flex-wrap: wrap;
}
.page-header .breadcrumb a { color: var(--text-muted); }
.page-header .breadcrumb a:hover { color: var(--primary-light); }
.page-header .breadcrumb .sep { color: var(--border); }

/* ── Subject Toggle ─────────────────────────────────── */
.subject-toggle { display: flex; gap: 8px; margin-bottom: 24px; }
.subject-btn {
  padding: 9px 24px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text-secondary); font-weight: 600; font-size: 0.88rem;
  transition: var(--transition); cursor: pointer;
}
.subject-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.subject-btn:hover:not(.active) { border-color: var(--primary); color: var(--text); }

/* ── Category Grid ──────────────────────────────────── */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.cat-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px 22px; border: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.cat-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-sm), var(--shadow);
  background: var(--bg-card-hover);
}
.cat-card .cat-code {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-xs);
  background: var(--primary-10); color: var(--primary-light);
  font-size: 0.72rem; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.04em;
}
.cat-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.cat-card .skill-count { color: var(--text-muted); font-size: 0.78rem; display: flex; align-items: center; gap: 6px; }
.cat-card .progress-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.cat-card .progress-dot.done { background: var(--success); }
.cat-card .progress-dot.partial { background: var(--warning); }
.cat-card .progress-dot.new { background: var(--text-muted); }

/* ── Skill List ─────────────────────────────────────── */
.skill-list { max-width: 820px; }
.skill-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--bg-card); margin-bottom: 8px;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all var(--transition-fast);
}
.skill-item:hover {
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.06);
  transform: translateX(4px);
}
.skill-item .skill-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  flex-shrink: 0; border: 1px solid var(--border);
}
.skill-item .skill-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.skill-item .skill-status .check { color: var(--success); font-size: 1rem; }
.skill-item .skill-status .star { color: var(--warning); }

/* ── Quiz Interface ─────────────────────────────────── */
.quiz-container { max-width: 700px; margin: 0 auto; animation: scaleIn 0.3s ease; }
.quiz-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.quiz-meta { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.quiz-progress-bar {
  width: 100%; height: 7px; background: var(--bg);
  border-radius: 4px; overflow: hidden; margin-bottom: 24px;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.quiz-timer {
  font-size: 1rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card); padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border);
}
.quiz-question {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 32px; border: 1px solid var(--border);
  margin-bottom: 20px;
}
.quiz-question .q-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--primary-light); margin-bottom: 14px;
}
.quiz-question .q-text { font-size: 1.1rem; line-height: 1.75; font-weight: 500; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.quiz-option {
  padding: 15px 20px; border-radius: var(--radius-sm);
  background: var(--bg); border: 2px solid var(--border);
  color: var(--text); font-size: 0.95rem; cursor: pointer;
  transition: all var(--transition-fast); text-align: left;
  display: flex; align-items: center; gap: 0;
}
.quiz-option:hover:not(.disabled) {
  border-color: var(--primary);
  background: rgba(99,102,241,0.08);
  transform: translateX(4px);
}
.quiz-option:active:not(.disabled) { transform: scale(0.99); }
.quiz-option.selected { border-color: var(--primary-light); box-shadow: 0 0 0 2px rgba(99,102,241,0.3); }
.quiz-option.correct { border-color: var(--success) !important; background: rgba(16,185,129,0.12) !important; color: var(--success) !important; }
.quiz-option.wrong { border-color: var(--error) !important; background: rgba(239,68,68,0.12) !important; color: var(--error) !important; }
.quiz-option.disabled { pointer-events: none; }
.quiz-option .option-letter {
  display: inline-flex; width: 26px; height: 26px;
  align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-card); text-align: center;
  font-size: 0.78rem; font-weight: 800; margin-right: 14px;
  flex-shrink: 0; border: 1px solid var(--border);
  transition: var(--transition-fast);
}
.quiz-option.correct .option-letter { background: var(--success); color: #fff; border-color: var(--success); }
.quiz-option.wrong .option-letter { background: var(--error); color: #fff; border-color: var(--error); }

.quiz-feedback {
  padding: 16px 20px; border-radius: var(--radius-sm); margin: 16px 0;
  font-weight: 600; text-align: center; animation: slideUp 0.25s ease;
}
.quiz-feedback.correct { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.quiz-feedback.wrong { background: rgba(239,68,68,0.1); color: var(--error); border: 1px solid rgba(239,68,68,0.25); }
.quiz-feedback .explanation { margin-top: 8px; color: var(--text-secondary); font-size: 0.85rem; font-weight: 400; }
.animate-feedback { animation: slideUp 0.3s ease; }

.quiz-nav { display: flex; justify-content: space-between; gap: 12px; }
.quiz-nav .btn { min-width: 120px; justify-content: center; }

.quiz-score { text-align: center; padding: 48px 24px; animation: scaleIn 0.4s ease; }
.quiz-score .score-num {
  font-size: 3.5rem; font-weight: 900; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.quiz-score .score-label { color: var(--text-secondary); margin: 4px 0 20px; font-size: 1rem; }
.quiz-score .score-details {
  display: flex; justify-content: center; gap: 28px; margin-top: 24px; flex-wrap: wrap;
}
.quiz-score .score-stat {
  text-align: center; background: var(--bg-card); padding: 16px 24px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  min-width: 90px; transition: var(--transition);
}
.quiz-score .score-stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.quiz-score .score-stat .num { font-size: 1.6rem; font-weight: 800; }
.quiz-score .score-stat .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* celebration */
@keyframes celebration {
  0% { transform: scale(1); }
  30% { transform: scale(1.02); }
  60% { transform: scale(0.99); }
  100% { transform: scale(1); }
}

/* ── Progress Dashboard ──────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .stat-icon { font-size: 1.5rem; margin-bottom: 10px; }
.stat-card .stat-num { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.stat-card .stat-change { font-size: 0.78rem; margin-top: 6px; }
.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--error); }

.progress-section { margin-bottom: 32px; }
.progress-section h3 { margin-bottom: 16px; font-size: 1.05rem; font-weight: 700; }
.subject-progress { display: flex; gap: 24px; flex-wrap: wrap; }
.subject-progress .sp-item { flex: 1; min-width: 200px; }
.subject-progress .sp-label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.subject-progress .sp-bar { height: 9px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.subject-progress .sp-fill { height: 100%; border-radius: 5px; transition: width 600ms ease; }
.subject-progress .sp-fill.maths { background: var(--gradient-primary); }
.subject-progress .sp-fill.english { background: var(--gradient-cool); }
.subject-progress .sp-pct { font-size: 0.88rem; font-weight: 700; margin-top: 5px; }

/* ── Search ─────────────────────────────────────────── */
.search-box { position: relative; max-width: 400px; margin-bottom: 24px; }
.search-box input {
  width: 100%; padding: 12px 16px 12px 44px;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.9rem;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.search-box .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.9rem;
}

/* ── Year Tabs (app) ────────────────────────────────── */
.year-tabs {
  display: flex; margin-bottom: 24px;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 4px; max-width: fit-content; border: 1px solid var(--border);
}
.year-tab {
  padding: 8px 20px; border-radius: 7px;
  font-size: 0.83rem; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition); border: none; background: none;
}
.year-tab:hover { color: var(--text); }
.year-tab.active { background: var(--primary); color: #fff; }

/* ── Account Page ───────────────────────────────────── */
.account-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 32px; border: 1px solid var(--border); margin-bottom: 20px;
}
.account-card h2 { font-size: 1.1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.account-profile { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.account-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--gradient-brand); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; font-weight: 800;
  box-shadow: 0 0 20px rgba(99,102,241,0.3);
}
.account-info h3 { font-size: 1.15rem; font-weight: 700; }
.account-info p { color: var(--text-secondary); font-size: 0.9rem; }

.plan-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 700;
}
.plan-badge.free { background: rgba(100,116,139,0.15); color: var(--text-secondary); border: 1px solid rgba(100,116,139,0.2); }
.plan-badge.premium { background: rgba(99,102,241,0.15); color: var(--primary-light); border: 1px solid rgba(99,102,241,0.25); }
.plan-badge.premium-plus { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.25); }

/* ── Loading ────────────────────────────────────────── */
.loader { display: flex; align-items: center; justify-content: center; padding: 80px; }
.spinner {
  width: 32px; height: 32px; 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); } }

/* ── Toast / Notifications ──────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 22px;
  box-shadow: var(--shadow-xl); z-index: 1000;
  display: flex; align-items: center; gap: 12px;
  animation: slideUp 0.3s ease;
  max-width: 380px; min-width: 260px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.info { border-left: 4px solid var(--primary); }

/* ── Utility ────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; } .mb-8 { margin-bottom: 32px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .justify-center { justify-content: center; }
.hidden { display: none !important; }

/* ── Premium Gating ─────────────────────────────────── */
.pro-only { display: none; }
.pro-plus-only { display: none; }
body.premium .pro-only { display: block; }
body.premium-plus .pro-only { display: block; }
body.premium-plus .pro-plus-only { display: block; }
.free-only { display: block; }
body.premium .free-only { display: none; }
body.premium-plus .free-only { display: none; }
.upgrade-cta { display: block; }
body.premium .upgrade-cta, body.premium-plus .upgrade-cta { display: none; }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px; color: var(--text-secondary); font-size: 0.85rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px; margin-bottom: 40px;
}
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; line-height: 1.65; max-width: 240px; }
.footer h4 { color: var(--text); margin-bottom: 14px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; }
.footer a { display: block; padding: 4px 0; color: var(--text-secondary); font-size: 0.82rem; }
.footer a:hover { color: var(--primary-light); }
.footer-bottom {
  border-top: 1px solid var(--border-light); padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 0.78rem; color: var(--text-muted); padding: 0; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .nav-links {
    display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(15,23,42,0.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 20px 16px 28px; gap: 4px;
    border-bottom: 1px solid var(--border); z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link { padding: 12px 16px; font-size: 0.95rem; }
  .nav-links .nav-link.cta { display: flex; justify-content: center; }

  .hero { padding: 110px 0 64px; }
  .hero-layout { flex-direction: column; gap: 40px; }
  .hero h1 { text-align: center; }
  .hero-sub { text-align: center; }
  .hero .btn-group { justify-content: center; }
  .hero-stats { justify-content: center; gap: 28px; }
  .hero-visual { display: none; }
  .hero-badge { display: flex; margin: 0 auto 24px; }

  .trust-strip .container { flex-direction: column; gap: 12px; }

  .steps-grid { grid-template-columns: 1fr; gap: 20px; }
  .steps-grid::before { display: none; }

  .features-grid { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .pricing-grid { gap: 16px; }
  .pricing-card.featured { transform: none; }

  .sidebar {
    width: 100%; position: fixed; top: 0; left: 0; bottom: auto;
    min-height: auto; padding: 12px 16px;
    flex-direction: row; align-items: center; overflow: visible;
    border-right: none; border-bottom: 1px solid var(--border); z-index: 100;
  }
  .sidebar-logo { margin-bottom: 0; margin-right: auto; }
  .sidebar-nav { display: none; }
  .sidebar-nav.open {
    display: flex; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--bg-card); padding: 20px 16px;
    flex-direction: column; overflow-y: auto; z-index: 99;
  }
  .sidebar-upgrade { display: none; }
  .main-content { margin-left: 0; padding: 80px 16px 32px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .cat-grid { grid-template-columns: 1fr; }
  .quiz-question { padding: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .year-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: 1fr; display: grid; gap: 16px; justify-items: center; }
  .hero h1 { font-size: 2.2rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .score-details { flex-direction: column; align-items: center; }
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS & POLISH
   ═══════════════════════════════════════════════════ */

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes heroBarFill {
  from { width: 0; }
  to { width: 110px; }
}
@keyframes heroScoreAppear {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes heroSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Hero SVG animations */
#hero-bar-fill { animation: heroBarFill 1.5s ease-out 0.7s both; }
#hero-score-g { animation: heroScoreAppear 0.6s ease-out 1.1s both; }
#hero-skill-1 { animation: heroSlideIn 0.4s ease-out 1.0s both; }
#hero-skill-2 { animation: heroSlideIn 0.4s ease-out 1.2s both; }
#hero-skill-3 { animation: heroSlideIn 0.4s ease-out 1.4s both; }
#hero-badge-g { animation: heroScoreAppear 0.5s ease-out 1.6s both; }
#hero-card { animation: fadeIn 0.5s ease-out 0.3s both; }

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 16px; width: 80%; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; width: 100%; margin-bottom: 12px; }

/* ── Entrance Animations ── */
.cat-grid .cat-card { animation: fadeSlideUp 0.4s ease forwards; opacity: 0; }
.cat-grid .cat-card:nth-child(1) { animation-delay: 0.02s; }
.cat-grid .cat-card:nth-child(2) { animation-delay: 0.05s; }
.cat-grid .cat-card:nth-child(3) { animation-delay: 0.08s; }
.cat-grid .cat-card:nth-child(4) { animation-delay: 0.11s; }
.cat-grid .cat-card:nth-child(5) { animation-delay: 0.14s; }
.cat-grid .cat-card:nth-child(6) { animation-delay: 0.17s; }
.cat-grid .cat-card:nth-child(7) { animation-delay: 0.20s; }
.cat-grid .cat-card:nth-child(8) { animation-delay: 0.23s; }
.cat-grid .cat-card:nth-child(n+9) { animation-delay: 0.26s; }

.skill-item { animation: fadeSlideUp 0.3s ease forwards; opacity: 0; }
.skill-list .skill-item:nth-child(n) { animation-delay: calc(n * 0.03s); }

.feature-card { animation: fadeSlideUp 0.5s ease forwards; opacity: 0; }
.feature-card:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2) { animation-delay: 0.12s; }
.feature-card:nth-child(3) { animation-delay: 0.19s; }
.feature-card:nth-child(4) { animation-delay: 0.26s; }
.feature-card:nth-child(5) { animation-delay: 0.33s; }
.feature-card:nth-child(6) { animation-delay: 0.40s; }

.step-card { animation: fadeSlideUp 0.5s ease forwards; opacity: 0; }
.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }

.testimonial-card { animation: fadeSlideUp 0.5s ease forwards; opacity: 0; }
.testimonial-card:nth-child(1) { animation-delay: 0.05s; }
.testimonial-card:nth-child(2) { animation-delay: 0.15s; }
.testimonial-card:nth-child(3) { animation-delay: 0.25s; }

.pricing-card { animation: fadeSlideUp 0.5s ease forwards; opacity: 0; }
.pricing-card:nth-child(1) { animation-delay: 0.05s; }
.pricing-card:nth-child(2) { animation-delay: 0.15s; }
.pricing-card:nth-child(3) { animation-delay: 0.25s; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; font-size: 1.1rem; }
.empty-state p { font-size: 0.88rem; max-width: 300px; margin: 0 auto; }

/* ── Progress Ring (SVG) ── */
.progress-ring { transform: rotate(-90deg); }
.progress-ring .ring-track { fill: none; stroke: var(--border); }
.progress-ring .ring-fill {
  fill: none; stroke: url(#ring-gradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Section backgrounds ── */
.section-alt { background: var(--bg-card); }
.section-gradient {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(99,102,241,0.03) 50%, var(--bg) 100%);
}

/* ── Tags / Chips ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
}
.tag.primary { background: var(--primary-10); border-color: rgba(99,102,241,0.2); color: var(--primary-light); }
.tag.success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); color: var(--success); }

/* ── Floating label inputs (optional enhanced variant) ── */
.input-wrap { position: relative; }
.input-wrap input { width: 100%; padding: 18px 16px 6px; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem; transition: var(--transition); }
.input-wrap label { position: absolute; left: 16px; top: 14px; font-size: 0.9rem; color: var(--text-muted); pointer-events: none; transition: var(--transition); }
.input-wrap input:focus + label,
.input-wrap input:not(:placeholder-shown) + label { top: 5px; font-size: 0.68rem; font-weight: 600; color: var(--primary-light); text-transform: uppercase; letter-spacing: 0.04em; }
.input-wrap input:focus { outline: none; border-color: var(--primary); background: rgba(99,102,241,0.03); }

/* ── Doc pages (privacy/terms) ── */
.doc-page { padding: 40px 0 80px; }
.doc-content { max-width: 760px; margin: 0 auto; }
.doc-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.doc-content .last-updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 40px; }
.doc-content h2 { font-size: 1.2rem; font-weight: 700; margin: 32px 0 10px; color: var(--text); }
.doc-content p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.75; margin-bottom: 16px; }
.doc-content ul { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.75; margin: 0 0 16px 24px; }
.doc-content ul li { margin-bottom: 6px; }


/* ═══════════════════════════════════════════════════
   Phase 1: Momentum Bar, Mini-Lessons & Quest System
   ═══════════════════════════════════════════════════ */

/* ── Momentum Bar ── */
.momentum-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.momentum-bar {
  flex: 1;
  display: flex;
  gap: 3px;
  height: 14px;
  align-items: stretch;
}

.momentum-segment {
  flex: 1;
  border-radius: 4px;
  background: var(--border);
  transition: background 0.4s ease, transform 0.3s ease;
  min-width: 6px;
}

.momentum-segment.correct {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16,185,129,0.4);
}

.momentum-segment.wrong {
  background: var(--error);
  animation: shake 0.5s ease;
}

.streak-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
  white-space: nowrap;
  min-width: 50px;
  transition: all 0.3s ease;
}

.streak-indicator.blaze {
  font-size: 1.4rem;
  text-shadow: 0 0 12px rgba(245,158,11,0.6);
}

.streak-count {
  font-weight: 700;
  color: var(--warning);
  font-size: 0.9rem;
}

/* ── Milestone Popup ── */
.milestone-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(99,102,241,0.4);
  animation: slideIn 0.5s ease forwards;
  display: flex;
  align-items: center;
  gap: 12px;
}

.milestone-popup.hiding {
  animation: slideOut 0.5s ease forwards;
}

/* ── Quest Briefing ── */
.quest-briefing {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 500px;
  margin: 40px auto;
}

.quest-briefing .quest-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.quest-briefing h2 {
  color: var(--text);
  margin-bottom: 8px;
}

.quest-briefing .quest-difficulty {
  margin: 12px 0;
  font-size: 1.2rem;
}

.quest-briefing .quest-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.quest-briefing .btn-start-quest {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ── Quest Complete Overlay ── */
.quest-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15,23,42,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

.quest-complete {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  border: 1px solid var(--border);
  animation: scaleIn 0.4s ease;
}

.quest-complete .qc-icon {
  font-size: 4rem;
  margin-bottom: 12px;
}

.quest-complete h2 {
  color: var(--text);
  margin-bottom: 4px;
}

.quest-complete .qc-score {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 16px 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quest-complete .qc-details {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 20px 0;
}

.quest-complete .qc-stat {
  text-align: center;
}

.quest-complete .qc-stat .num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.quest-complete .qc-stat .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.quest-complete .qc-xp {
  background: var(--primary-10);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin: 16px 0;
  font-size: 1.2rem;
  color: var(--warning);
  font-weight: 600;
}

.quest-complete .qc-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--warning), #f97316);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 8px 0;
}

.quest-complete .qc-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* ── Mini-Lesson ── */
.mini-lesson-card {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
  animation: slideUp 0.4s ease;
  position: relative;
  overflow: hidden;
}

.mini-lesson-card.english {
  border-left-color: var(--secondary);
}

.mini-lesson-card .ml-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mini-lesson-card .ml-icon {
  font-size: 1.5rem;
}

.mini-lesson-card .ml-title {
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
}

.mini-lesson-card .ml-body {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.mini-lesson-card .ml-worked {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-family: Georgia, serif;
  color: var(--text);
  line-height: 1.7;
}

.mini-lesson-card .ml-timer {
  position: absolute;
  bottom: 12px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--pct, 100%), var(--border) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-lesson-card .ml-timer-inner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.mini-lesson-card .ml-retry-btn {
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.mini-lesson-card .ml-retry-btn:hover {
  background: var(--primary-dark);
}

.mini-lesson-banner {
  color: var(--warning);
  font-weight: 600;
  margin-bottom: 8px;
  animation: pulse 1s ease infinite;
}

/* ── XP Toast ── */
.xp-toast {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 10px 18px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 998;
  animation: slideUp 0.3s ease, fadeOut 0.5s ease 2s forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Level badge in sidebar ── */
.level-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 8px 0;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.level-badge .lb-icon {
  font-size: 1.2rem;
}

.level-badge .lb-level {
  font-weight: 700;
  color: var(--text);
}

.level-badge .lb-xp {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.level-badge .lb-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 4px;
}

.level-badge .lb-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--warning), #f97316);
  transition: width 0.5s ease;
}

/* ── Badges Grid ── */
.badges-section {
  margin-top: 24px;
}

.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.badge-item.earned {
  border-color: var(--warning);
  background: rgba(245,158,11,0.1);
}

.badge-item.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

/* ── Animations ── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@keyframes slideIn {
  from { transform: translateX(-50%) translateY(-120%); }
  to { transform: translateX(-50%) translateY(0); }
}

@keyframes slideOut {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(-120%); }
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(99,102,241,0.4); }
  50% { box-shadow: 0 0 24px rgba(99,102,241,0.7); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-200px) rotate(720deg); opacity: 0; }
}

@keyframes celebration {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ── Progress badge in sidebar ── */
.sidebar .pro-badge {
  display: none;
}

.pro-sidebar .pro-badge {
  display: block;
}
