/* ============================================================
   LATIQUIZZ — Main Stylesheet
   Matches mockup design: lavender bg, white cards, purple + green
   ============================================================ */

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

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

:root {
  --bg:          #EEEAFF;
  --white:       #FFFFFF;
  --purple-900:  #3B0764;
  --purple-700:  #5B21B6;
  --purple-600:  #6D28D9;
  --purple-500:  #7C3AED;
  --purple-400:  #8B5CF6;
  --purple-200:  #DDD6FE;
  --purple-100:  #EDE9FE;
  --purple-50:   #F5F3FF;
  --green:       #22C55E;
  --green-light: #DCFCE7;
  --green-dark:  #16A34A;
  --dark-card:   #1C1033;
  --red:         #EF4444;
  --red-light:   #FEE2E2;
  --gray-900:    #111827;
  --gray-700:    #374151;
  --gray-500:    #6B7280;
  --gray-300:    #D1D5DB;
  --gray-100:    #F3F4F6;
  --font: 'Inter', -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  /* Shorthand purple aliases used across pages */
  --p50:  #F5F3FF;
  --p100: #EDE9FE;
  --p200: #DDD6FE;
  --p400: #8B5CF6;
  --p500: #7C3AED;
  --p600: #6D28D9;
  --p700: #5B21B6;
  --p800: #3B0764;
  /* Extra gray shades used across pages */
  --gray-50:  #F9FAFB;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-800: #1F2937;
}

/* Key term badges — shown after answering if question has key_terms */
.key-term-badge {
  display: inline-block;
  background: var(--p100);
  color: var(--p700);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 700;
}

/* Review modal key terms row */
.review-key-terms {
  margin-top: 8px;
  font-size: .78rem;
  color: var(--p700);
  background: var(--p50);
  border-radius: 10px;
  padding: 8px 12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; }
img { max-width: 100%; display: block; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--purple-200);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 40px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo-circle {
  width: 34px;
  height: 34px;
  background: var(--purple-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  font-weight: 900;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-500);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.15s;
}
.nav-links a:hover  { color: var(--gray-900); background: var(--purple-50); }
.nav-links a.active { color: var(--purple-600); font-weight: 700; border-bottom: 2px solid var(--purple-500); border-radius: 0; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn-login {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  padding: 7px 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  transition: all 0.15s;
}
.btn-login:hover { background: var(--gray-100); }
.btn-cta {
  font-size: 0.88rem;
  font-weight: 700;
  color: white;
  background: var(--purple-500);
  padding: 9px 20px;
  border-radius: 999px;
  border: none;
  transition: all 0.18s;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--purple-600); box-shadow: 0 4px 14px rgba(124,58,237,0.35); }
.btn-green {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  background: var(--green);
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  transition: all 0.18s;
}
.btn-green:hover { background: var(--green-dark); box-shadow: 0 4px 14px rgba(34,197,94,0.35); }
.btn-outline {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--purple-600);
  background: transparent;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--purple-400);
  transition: all 0.18s;
}
.btn-outline:hover { background: var(--purple-50); }

/* ══════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════ */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-breadcrumb {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple-500);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-breadcrumb span { color: var(--gray-400); }
.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--gray-900);
  margin-bottom: 20px;
}
.hero-title em { font-style: normal; color: var(--purple-500); }
.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-500);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-btns { display: flex; gap: 12px; align-items: center; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; }
.stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1;
}
.stat-lbl {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-top: 3px;
}

/* Hero demo card */
.hero-demo {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--purple-200);
}
.demo-tags {
  padding: 14px 20px 0;
  display: flex;
  gap: 8px;
}
.tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.tag-purple { background: var(--purple-100); color: var(--purple-700); }
.tag-gray   { background: var(--gray-100);   color: var(--gray-500); }
.demo-question {
  padding: 16px 20px 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.4;
}
.demo-options { padding: 0 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.demo-opt {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-opt:hover { border-color: var(--purple-400); background: var(--purple-50); }
.demo-opt.correct-opt {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
}
.demo-opt-letter {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}
.correct-opt .demo-opt-letter { background: var(--green); color: white; }
.demo-tip {
  padding: 12px 20px;
  background: var(--purple-50);
  border-top: 1px solid var(--purple-200);
  font-size: 0.78rem;
  color: var(--purple-700);
  line-height: 1.5;
}
.demo-tip strong { color: var(--purple-700); }

/* Features section */
.features-section {
  background: var(--white);
  padding: 72px 40px;
}
.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--purple-500);
  margin-bottom: 12px;
}
.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--gray-900);
  margin-bottom: 12px;
}
.section-desc {
  font-size: 1rem;
  color: var(--gray-500);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--purple-200);
}
.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.feature-text {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ══════════════════════════════════════════
   TEAS7 PRACTICE PAGE
══════════════════════════════════════════ */
.practice-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px 20px;
}
.practice-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.practice-header p { font-size: 0.9rem; color: var(--gray-500); }

.practice-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 40px;
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 20px;
  align-items: start;
}

/* Left — sections panel */
.sections-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-200);
}
.sections-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--gray-900);
}
.section-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.section-row:hover { background: var(--purple-50); }
.section-row.active { background: var(--purple-50); }
.sec-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sec-row-name { font-size: 0.88rem; font-weight: 600; color: var(--gray-800); }
.sec-row-pct  { font-size: 0.8rem; font-weight: 700; color: var(--purple-600); }
.sec-progress-track {
  height: 5px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.sec-progress-fill {
  height: 100%;
  background: var(--purple-500);
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Middle — question panel */
.question-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-200);
  overflow: hidden;
}
.q-panel-tags {
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.q-panel-body { padding: 16px 20px; }
#q-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.55;
  margin-bottom: 20px;
}
.options-list { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  width: 100%;
}
.opt-btn:hover:not(:disabled) {
  border-color: var(--purple-400);
  background: var(--purple-50);
}
.opt-ltr {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800;
  color: var(--gray-500);
  flex-shrink: 0;
}
.opt-btn.correct-ans { border-color: var(--green); background: var(--green-light); color: #15803D; font-weight: 700; }
.opt-btn.correct-ans .opt-ltr { background: var(--green); border-color: var(--green); color: white; }
.opt-btn.wrong-ans { border-color: var(--red); background: var(--red-light); color: #B91C1C; }
.opt-btn.wrong-ans .opt-ltr { background: var(--red); border-color: var(--red); color: white; }
.opt-btn.dimmed { opacity: 0.45; }

.tip-panel {
  padding: 14px 20px;
  background: var(--purple-50);
  border-top: 1px solid var(--purple-200);
  font-size: 0.82rem;
  color: var(--purple-700);
  line-height: 1.55;
  display: none;
}
.tip-panel.visible { display: block; }
.tip-panel strong { font-weight: 700; }

.explanation-panel {
  padding: 14px 20px;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  font-size: 0.82rem;
  color: var(--gray-700);
  line-height: 1.6;
  display: none;
}
.explanation-panel.visible { display: block; }

/* Right — session card */
.session-card {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 22px;
  color: white;
}
.session-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: white;
}
.session-stat {
  margin-bottom: 16px;
}
.session-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.session-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}
.session-stat-value.green { color: var(--green); }
.session-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 16px 0;
}
.btn-continue-session {
  width: 100%;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.18s;
}
.btn-continue-session:hover { background: var(--green-dark); }
.btn-continue-session:disabled {
  background: rgba(255,255,255,0.15);
  cursor: default;
}

/* ══════════════════════════════════════════
   PRICING PAGE
══════════════════════════════════════════ */
.pricing-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 40px;
}
.pricing-header { text-align: center; margin-bottom: 48px; }
.pricing-header h1 {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.pricing-header p { font-size: 1rem; color: var(--gray-500); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.price-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1.5px solid var(--purple-200);
  box-shadow: var(--shadow);
  position: relative;
}
.price-card.featured {
  background: var(--dark-card);
  border-color: var(--dark-card);
  color: white;
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.plan-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.featured .plan-name { color: rgba(255,255,255,0.55); }

.plan-price {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--gray-900);
  margin-bottom: 4px;
  line-height: 1;
}
.featured .plan-price { color: white; }
.plan-price sup { font-size: 1.2rem; font-weight: 700; vertical-align: top; margin-top: 8px; }

.plan-period {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 14px;
}
.featured .plan-period { color: rgba(255,255,255,0.45); }

.plan-tagline {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}
.featured .plan-tagline {
  color: rgba(255,255,255,0.6);
  border-bottom-color: rgba(255,255,255,0.1);
}

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.4;
}
.featured .plan-features li { color: rgba(255,255,255,0.85); }
.plan-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-plan {
  width: 100%;
  border-radius: 999px;
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-plan-outline {
  background: var(--purple-50);
  color: var(--purple-600);
  border: 1.5px solid var(--purple-300);
}
.btn-plan-outline:hover { background: var(--purple-100); }
.btn-plan-green {
  background: var(--green);
  color: white;
}
.btn-plan-green:hover { background: var(--green-dark); box-shadow: 0 4px 14px rgba(34,197,94,0.3); }

/* ══════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--purple-200);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-user {
  background: var(--purple-50);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
}
.sidebar-avatar {
  width: 40px;
  height: 40px;
  background: var(--purple-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.sidebar-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-900);
}
.sidebar-role {
  font-size: 0.72rem;
  color: var(--gray-500);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.sidebar-link:hover { background: var(--purple-50); color: var(--purple-700); }
.sidebar-link.active {
  background: var(--purple-100);
  color: var(--purple-700);
  font-weight: 700;
}
.sidebar-icon { font-size: 1rem; }

/* Dashboard main */
.dashboard-main {
  padding: 32px 36px;
  background: var(--bg);
  overflow-y: auto;
}
.dash-header { margin-bottom: 28px; }
.dash-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.dash-header p { font-size: 0.88rem; color: var(--gray-500); }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--purple-200);
  box-shadow: var(--shadow);
}
.dash-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.dash-big-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--purple-600);
  line-height: 1;
  letter-spacing: -1px;
}
.dash-big-sub {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 4px;
}

/* Weak topic card */
.weak-card {
  background: var(--purple-50);
  border: 1.5px solid var(--purple-200);
  border-radius: var(--radius);
  padding: 22px;
}
.weak-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.weak-icon {
  width: 36px; height: 36px;
  background: var(--purple-100);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.weak-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-500);
}
.weak-topic {
  font-size: 1rem;
  font-weight: 800;
  color: var(--purple-700);
  margin-bottom: 4px;
}
.weak-rec {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* Recent answers table */
.answers-table { width: 100%; border-collapse: collapse; }
.answers-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 0 0 10px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.answers-table td {
  padding: 10px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.answers-table tr:last-child td { border-bottom: none; }
.ans-correct { color: var(--green); font-weight: 700; font-size: 0.78rem; }
.ans-wrong   { color: var(--red);   font-weight: 700; font-size: 0.78rem; }

/* Next phase card */
.next-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.next-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--gray-700);
}
.next-list li::before {
  content: '→';
  color: var(--purple-400);
  font-weight: 800;
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════
   LANGUAGE TOGGLE
══════════════════════════════════════════ */
.lang-toggle {
  border: 1.5px solid var(--purple-200);
  background: var(--white);
  color: var(--purple-600);
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  letter-spacing: 0.3px;
}
.lang-toggle:hover {
  background: var(--purple-50);
  border-color: var(--purple-400);
}

/* ══════════════════════════════════════════
   HAMBURGER / MOBILE MENU
══════════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.hamburger:hover { background: var(--purple-50); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--gray-700);
  border-radius: 999px;
  transition: all 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-6px); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--purple-200);
  flex-direction: column;
  padding: 12px 20px 20px;
  gap: 4px;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  animation: slideDown 0.2s ease;
}
.mobile-menu.open { display: flex; }
@keyframes slideDown {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}
.mobile-menu a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  padding: 11px 14px;
  border-radius: 10px;
  transition: background 0.15s;
  text-decoration: none;
}
.mobile-menu a:hover  { background: var(--purple-50); color: var(--purple-700); }
.mobile-menu a.active { color: var(--purple-600); background: var(--purple-50); }
.mobile-menu .mobile-cta {
  margin-top: 8px;
  background: var(--purple-500);
  color: white;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
}

/* Free questions banner in session card */
#free-banner {
  display: none;
  background: #FEF3C7;
  color: #B45309;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  text-align: center;
}

/* ══════════════════════════════════════════
   MODAL BASE
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }

.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: popIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
@keyframes popIn {
  from { opacity:0; transform:scale(0.85); }
  to   { opacity:1; transform:scale(1); }
}
.modal-emoji { font-size: 3rem; margin-bottom: 12px; }
.modal-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--gray-900);
}
.modal-text {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 24px;
}
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ══════════════════════════════════════════
   MICRO-REVIEW MODAL
══════════════════════════════════════════ */
.mr-card {
  background: var(--white);
  border-radius: 20px;
  padding: 0;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  animation: popIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  text-align: left;
}
.mr-header {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-500));
  padding: 20px 24px;
  color: white;
}
.mr-header-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}
.mr-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 6px;
}
.mr-header p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}
.mr-body { padding: 20px 24px; }
.mr-keywords {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.mr-keywords li {
  font-size: 0.85rem;
  color: var(--gray-700);
  padding: 8px 12px;
  background: var(--purple-50);
  border-radius: 8px;
  border-left: 3px solid var(--purple-400);
  line-height: 1.4;
}
.mr-tip {
  background: var(--yellow-light, #FEF3C7);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #78350F;
  line-height: 1.55;
  margin-bottom: 16px;
}
.mr-tip strong { font-weight: 800; }
.mr-actions { padding: 0 24px 24px; display: flex; gap: 10px; }

/* Timer warning colors */
.timer-normal  { color: white; }
.timer-warning { color: #FCD34D; }
.timer-danger  { color: #F87171; animation: timerPulse 0.8s ease infinite; }
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Bookmark button */
.btn-bookmark {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.btn-bookmark:hover     { border-color: var(--purple-400); color: var(--purple-600); }
.btn-bookmark.saved     { background: var(--purple-50); border-color: var(--purple-400); color: var(--purple-700); }

/* ══════════════════════════════════════════
   REVIEW MODE MODAL
══════════════════════════════════════════ */
.review-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.review-modal.open { display: flex; }

.review-card {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: popIn 0.22s cubic-bezier(0.34,1.56,0.64,1) both;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.review-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.review-header h3 { font-size: 1rem; font-weight: 800; color: var(--gray-900); }
.review-filters {
  display: flex;
  gap: 6px;
}
.review-filter-btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-500);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.review-filter-btn.active {
  background: var(--purple-100);
  border-color: var(--purple-400);
  color: var(--purple-700);
}
.review-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.review-q-number {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 6px;
}
.review-q-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.5;
  margin-bottom: 16px;
}
.review-answer-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.review-answer-item {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-answer-item.correct-bg { background: var(--green-light); color: #065F46; border: 1px solid #A7F3D0; }
.review-answer-item.wrong-bg   { background: var(--red-light); color: #7F1D1D; border: 1px solid #FCA5A5; }
.review-answer-item.neutral-bg { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.review-answer-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 4px;
  opacity: 0.7;
}
.review-explanation {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 12px;
  font-size: 0.82rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 10px;
  border: 1px solid var(--gray-200);
}
.review-tip {
  background: var(--purple-50);
  border-radius: 10px;
  padding: 12px;
  font-size: 0.82rem;
  color: var(--purple-700);
  line-height: 1.55;
  border: 1px solid var(--purple-200);
}
.review-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 10px;
}
.review-nav-btn {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  color: var(--gray-700);
}
.review-nav-btn:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-400); }
.review-nav-btn:disabled { opacity: 0.35; cursor: default; }
.review-counter {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
}
.review-result-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}
.review-result-badge.correct { background: var(--green-light); color: var(--green); }
.review-result-badge.wrong   { background: var(--red-light);   color: var(--red);   }

/* Back button for sub-pages */
.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--gray-500);
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
}
.page-back-btn:hover { color: var(--p600); }

/* Mobile-only elements — hidden on desktop/tablet */
.mobile-section-tabs,
.mobile-session-row { display: none; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .practice-grid { grid-template-columns: 1fr 1fr; }
  .session-card { grid-column: 1 / -1; }
  .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* ── Navbar ── */
  .navbar { padding: 0 16px; }
  .nav-links, .btn-login { display: none; }
  .hamburger { display: flex; }

  /* ── Landing ── */
  .hero-section { grid-template-columns: 1fr; padding: 36px 20px; gap: 32px; }
  .hero-title { font-size: 2rem; }
  .hero-demo { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .features-section { padding: 40px 16px; }

  /* ── Smart Practice page ── */
  .practice-header { padding: 16px 16px 4px; }
  .practice-header h1 { font-size: 1.4rem; }
  .practice-header p  { font-size: .78rem; }
  .practice-grid { grid-template-columns: 1fr; padding: 0 12px 20px; }
  .sections-panel { display: none; }

  /* Mobile section tabs — horizontal scrollable strip */
  .mobile-section-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mobile-section-tabs::-webkit-scrollbar { display: none; }
  .msec-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    transition: all .15s;
  }
  .msec-tab.active {
    background: var(--p600);
    border-color: var(--p600);
    color: white;
    font-weight: 700;
  }

  /* Mobile session controls: size picker + new session button */
  .mobile-session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 14px;
  }
  .mobile-session-size {
    flex: 1;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--gray-300);
    font-family: var(--font);
    font-size: .82rem;
    color: var(--gray-700);
    background: white;
  }
  .mobile-new-session {
    flex-shrink: 0;
    padding: 9px 16px !important;
    font-size: .82rem !important;
    border-radius: 10px !important;
  }

  /* Continue button — sticky at viewport bottom */
  .btn-continue-session {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 80;
    border-radius: 0;
    margin-top: 0;
    padding: 16px 20px;
    font-size: 1rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,.18);
  }
  .btn-continue-session:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    box-shadow: none;
    cursor: default;
  }
  /* Prevent content hiding behind sticky button */
  body { padding-bottom: 64px; }

  /* Session card — compact on mobile */
  .session-card { padding: 16px; }
  .session-title { font-size: .82rem; margin-bottom: 10px; }
  .session-stat { margin-bottom: 8px; }
  .session-stat-label { font-size: .6rem; }
  .session-stat-value { font-size: 1rem; }
  .session-divider { margin: 8px 0; }

  /* ── Pricing ── */
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .pricing-section { padding: 36px 16px; }

  /* ── Dashboard ── */
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .dashboard-main { padding: 20px 16px; }
  .dash-grid   { grid-template-columns: 1fr; }
  .dash-grid-3 { grid-template-columns: 1fr; }

  /* ── Modals ── */
  .modal-card { padding: 28px 20px; }
  .mr-card { margin: 0 4px; }
  .review-card { max-height: 95vh; }
}
