/* ===================================================
   ExamPandit — Premium Design System
   Dark mode, glassmorphism, smooth animations
=================================================== */

/* ---------- CSS Variables (Light Mode) ---------- */
:root {
  --bg: #f0f4ff;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-input: #f5f7ff;
  --text: #1a1d2e;
  --text-sub: #5a607a;
  --text-muted: #8891a8;
  --border: #e2e8f8;
  --primary: #5b6ef5;
  --primary-dark: #4557d6;
  --primary-glow: rgba(91, 110, 245, 0.25);
  --accent: #ff6b6b;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --nav-h: 68px;
  --font: 'Inter', system-ui, sans-serif;
  --font-hi: 'Noto Sans Devanagari', 'Inter', sans-serif;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg: #0f1117;
  --bg-card: #1a1d2e;
  --bg-nav: rgba(15, 17, 23, 0.92);
  --bg-input: #1e2235;
  --text: #e8eaf6;
  --text-sub: #9ba3c0;
  --text-muted: #626884;
  --border: #2a2f4a;
  --primary: #7c8fff;
  --primary-dark: #6b7fee;
  --primary-glow: rgba(124, 143, 255, 0.2);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.3);
  --shadow: 0 4px 20px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

.lang-hi body, body.lang-hi {
  font-family: var(--font-hi);
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

h1,h2,h3,h4 { font-weight: 700; line-height: 1.3; }

img { max-width: 100%; }

button { cursor: pointer; font-family: inherit; }

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.35rem;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon { font-size: 1.5rem; }
.logo-accent { color: var(--primary); }

.nav-search {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  max-width: 480px;
}

.nav-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.nav-search input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.nav-search input::placeholder { color: var(--text-muted); }

.search-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.search-btn:hover { color: var(--primary); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 5px 12px;
}

.lang-btn {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.lang-btn.active { color: var(--primary); }
.lang-btn:hover { color: var(--primary); }
.lang-sep { color: var(--border); font-size: 0.9rem; }

/* Theme Toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-nav {
  display: none;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.mobile-search button {
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.breadcrumb-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb-container a { color: var(--text-sub); }
.breadcrumb-container a:hover { color: var(--primary); }
.bc-sep { color: var(--text-muted); }
.bc-current { color: var(--text); font-weight: 500; }

/* ---------- MAIN CONTENT ---------- */
.main-content { min-height: calc(100vh - var(--nav-h) - 200px); }

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 60%, #ec4899 100%);
  color: white;
  padding: 80px 24px 100px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
  color: white;
}

.gradient-text {
  background: linear-gradient(90deg, #fff176, #ffe082);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  padding: 16px 28px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.stat-num { font-size: 1.6rem; font-weight: 800; }
.stat-label { font-size: 0.8rem; opacity: 0.8; }

.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.c1 { width: 300px; height: 300px; top: -100px; right: -80px; }
.c2 { width: 200px; height: 200px; bottom: -60px; left: -60px; }
.c3 { width: 150px; height: 150px; top: 50%; left: 10%; opacity: 0.5; }

/* ---------- SECTION HEADERS ---------- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-sub);
  font-size: 1rem;
}

/* ---------- CATEGORIES SECTION ---------- */
.categories-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 48px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--cat-color, var(--primary));
}

.category-card:hover::before { transform: scaleX(1); }

.cat-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cat-color, var(--primary)) 12%, transparent);
  border-radius: var(--radius);
}

.cat-body { flex: 1; }

.cat-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.cat-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 12px;
  line-height: 1.5;
}

.cat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-count {
  font-size: 0.8rem;
  color: var(--cat-color, var(--primary));
  font-weight: 600;
  background: color-mix(in srgb, var(--cat-color, var(--primary)) 12%, transparent);
  padding: 3px 10px;
  border-radius: 50px;
}

.cat-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform var(--transition), color var(--transition);
}

.category-card:hover .cat-arrow {
  color: var(--cat-color, var(--primary));
  transform: translateX(4px);
}

/* ---------- HOW IT WORKS ---------- */
.how-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 72px 24px;
}

.steps-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.step-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.step-icon { font-size: 2.5rem; margin-bottom: 16px; }

.step-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* ---------- PAGE SECTION (Category/Topic) ---------- */
.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--cat-color, var(--primary));
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.page-header-icon {
  font-size: 3rem;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cat-color, var(--primary)) 12%, transparent);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.page-header-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 4px;
  color: var(--text);
}

.page-header-sub {
  color: var(--text-sub);
  font-size: 0.9rem;
}

/* ---------- TOPICS GRID ---------- */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.topic-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.topic-card:hover {
  transform: translateX(4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.topic-card-body { flex: 1; }
.topic-name { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.topic-desc { font-size: 0.8rem; color: var(--text-sub); }

.topic-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.topic-qcount, .topic-sections {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.topic-arrow {
  color: var(--primary);
  font-size: 1.1rem;
  transition: transform var(--transition);
}

.topic-card:hover .topic-arrow { transform: translateX(4px); }

/* ---------- SECTIONS GRID ---------- */
.sections-intro {
  margin-bottom: 24px;
  color: var(--text-sub);
  font-size: 0.95rem;
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.section-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.section-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.section-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.section-body { flex: 1; }
.section-label { display: block; font-weight: 600; font-size: 0.95rem; }
.section-range { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.section-go {
  color: var(--primary);
  font-size: 1rem;
  transition: transform var(--transition);
}

.section-card:hover .section-go { transform: translateX(4px); }

/* ---------- QUESTIONS PAGE ---------- */
.questions-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.questions-header {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--cat-color, var(--primary));
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.qh-title {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 4px;
}

.qh-meta {
  color: var(--text-sub);
  font-size: 0.85rem;
}

.lang-badge {
  background: var(--primary);
  color: white;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Progress Bar */
.progress-container {
  height: 8px;
  background: var(--border);
  border-radius: 50px;
  margin-bottom: 32px;
  position: relative;
  overflow: visible;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #a855f7);
  border-radius: 50px;
  transition: width 0.4s ease;
}

.progress-label {
  position: absolute;
  right: 0;
  top: -22px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Questions List */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.question-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.question-card:hover { box-shadow: var(--shadow); }

.question-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.q-num {
  background: var(--primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
}

.q-difficulty {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
}

.difficulty-easy { background: #dcfce7; color: #15803d; }
.difficulty-medium { background: #fef9c3; color: #854d0e; }
.difficulty-hard { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .difficulty-easy { background: rgba(34,197,94,.15); color: #4ade80; }
[data-theme="dark"] .difficulty-medium { background: rgba(234,179,8,.15); color: #fbbf24; }
[data-theme="dark"] .difficulty-hard { background: rgba(239,68,68,.15); color: #f87171; }

.q-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 500;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-glow);
  transform: translateX(3px);
}

.opt-label {
  width: 28px;
  height: 28px;
  background: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
  color: var(--text-sub);
}

.opt-text { flex: 1; }

/* Option States */
.option-btn.correct {
  background: #dcfce7;
  border-color: var(--green);
  color: #15803d;
}

.option-btn.correct .opt-label {
  background: var(--green);
  color: white;
}

.option-btn.wrong {
  background: #fee2e2;
  border-color: var(--red);
  color: #991b1b;
}

.option-btn.wrong .opt-label {
  background: var(--red);
  color: white;
}

.option-btn.unselected-disabled {
  opacity: 0.55;
}

.option-btn:disabled { cursor: default; transform: none; }

[data-theme="dark"] .option-btn.correct { background: rgba(34,197,94,.15); color: #4ade80; }
[data-theme="dark"] .option-btn.wrong { background: rgba(239,68,68,.15); color: #f87171; }

/* Answer Reveal */
.answer-reveal {
  margin-top: 20px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  display: none;
  animation: fadeSlideUp 0.3s ease;
}

.answer-reveal.visible { display: block; }

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

.correct-answer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.ca-label { color: var(--green); font-weight: 700; white-space: nowrap; }
.ca-text { color: var(--text); }

.explanation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  font-size: 0.875rem;
}

.exp-label { color: var(--primary); font-weight: 700; white-space: nowrap; }
.exp-text { color: var(--text-sub); line-height: 1.6; }

/* Questions Navigation */
.questions-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.nav-btn {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover { background: var(--primary-dark); transform: translateY(-2px); color: white; }

.nav-btn-disabled {
  background: var(--border);
  color: var(--text-muted);
  pointer-events: none;
}

.section-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.section-pill {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
}

.section-pill:hover, .section-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Score Summary */
.score-summary {
  margin-top: 40px;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: white;
  text-align: center;
  animation: fadeSlideUp 0.5s ease;
}

.score-content {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.score-details h3 { font-size: 1.3rem; margin-bottom: 6px; }
.score-details p { opacity: 0.85; margin-bottom: 12px; }

.score-stats { display: flex; gap: 20px; font-size: 0.9rem; }

.btn-next-section {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-next-section:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); color: var(--primary-dark); }

/* ---------- SEARCH PAGE ---------- */
.search-page { max-width: 900px; }

.search-header { margin-bottom: 24px; }
.search-header h1 { font-size: 1.8rem; margin-bottom: 6px; }
.search-meta { color: var(--text-sub); font-size: 0.9rem; }

.search-form {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.search-input-lg {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input-lg:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-primary {
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover { background: var(--primary-dark); }

.search-results { display: flex; flex-direction: column; gap: 16px; }

.search-result-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.sr-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.sr-cat-badge {
  background: var(--primary);
  color: white;
  padding: 3px 10px;
  border-radius: 50px;
  font-weight: 600;
}

.sr-sep { color: var(--text-muted); }
.sr-topic { color: var(--text-sub); }
.sr-question { font-size: 0.95rem; font-weight: 500; margin-bottom: 12px; }

.sr-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sr-opt {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-sub);
}

.sr-opt-correct {
  background: #dcfce7;
  border-color: var(--green);
  color: #15803d;
  font-weight: 600;
}

[data-theme="dark"] .sr-opt-correct { background: rgba(34,197,94,.15); color: #4ade80; }

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-sub);
  grid-column: 1 / -1;
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; color: var(--text); }
.empty-state a { color: var(--primary); }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }

.footer-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
}

.footer-tagline {
  color: var(--text-sub);
  font-size: 0.875rem;
  max-width: 320px;
}

.footer-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer-links a {
  color: var(--text-sub);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--primary); }

.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.footer-nav-links a {
  color: var(--text-sub);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav-links a:hover { color: var(--primary); }

.footer-link-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-search { display: none; }
  .mobile-menu-btn { display: flex; }

  .mobile-nav.open { display: block; }

  .hero { padding: 48px 20px 64px; }
  .hero-stats { gap: 12px; }
  .stat-card { padding: 12px 20px; }

  .categories-grid { grid-template-columns: 1fr; }
  .category-card { padding: 20px; }

  .steps-grid { grid-template-columns: 1fr; }

  .options-grid { grid-template-columns: 1fr; }

  .questions-nav { flex-direction: column; align-items: stretch; text-align: center; }
  .nav-btn { text-align: center; justify-content: center; }

  .footer-container { grid-template-columns: 1fr; gap: 32px; }

  .questions-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .topic-card { flex-direction: column; align-items: flex-start; }
  .topic-card-meta { flex-direction: row; }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- SELECTION ---------- */
::selection { background: var(--primary-glow); color: var(--primary); }

/* =====================================================
   STATIC PAGES — About / Privacy / Terms / Contact
   ===================================================== */

.static-page-wrapper {
  padding: 48px 24px 80px;
}

.static-page-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Page header block */
.static-page-header {
  text-align: center;
  padding: 48px 24px 24px;
}

.static-page-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
}

.static-page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text);
  margin-bottom: 10px;
}

.static-page-subtitle {
  color: var(--text-sub);
  font-size: 1rem;
}

/* Content cards */
.static-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.static-card h2 {
  font-size: 1.25rem;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.static-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-top: 8px;
}

.static-card p {
  color: var(--text-sub);
  line-height: 1.8;
  font-size: 0.95rem;
}

.static-card a {
  color: var(--primary);
}

.static-card code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.875rem;
  color: var(--primary);
}

/* Unordered list inside static cards */
.static-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.static-list li {
  color: var(--text-sub);
  font-size: 0.95rem;
  padding-left: 20px;
  position: relative;
  line-height: 1.7;
}

.static-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Disclaimer box */
.static-disclaimer-box {
  background: color-mix(in srgb, var(--yellow) 10%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--yellow) 50%, transparent);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.static-disclaimer-box p {
  color: var(--text);
}

/* Contact info inside static card */
.static-contact-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 1rem;
  margin-top: 8px;
}

.static-contact-info a {
  font-weight: 600;
  color: var(--primary);
}

/* CTA card */
.static-cta-card {
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  border: none;
}

.static-cta-card h2,
.static-cta-card p {
  color: rgba(255,255,255,0.95);
}

.static-cta-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 28px;
  background: white;
  color: var(--primary);
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition);
}

.static-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  color: var(--primary-dark);
}

/* About features grid */
.about-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.about-feature {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
}

.about-feature:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.about-feature-icon { font-size: 2rem; }

.about-feature h3 {
  font-size: 0.95rem;
  color: var(--text);
}

.about-feature p {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin: 0;
}

/* Contact Cards Grid */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.contact-card-icon { font-size: 2.4rem; }

.contact-card h3 {
  font-size: 1rem;
  color: var(--text);
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.6;
}

.contact-card-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.contact-card-link:hover { color: var(--primary-dark); }

/* Contact info block */
.contact-info-block {
  margin-top: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.contact-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.contact-info-row:last-child { border-bottom: none; }

.contact-info-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 160px;
}

.contact-info-value {
  font-size: 0.95rem;
  color: var(--text);
}

.contact-info-value a {
  color: var(--primary);
  font-weight: 600;
}

/* FAQ */
.contact-faq {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.faq-item {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
}

.faq-item h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 0.875rem;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .static-page-wrapper { padding: 24px 16px 60px; }
  .static-card { padding: 22px 18px; }
  .about-features-grid { grid-template-columns: 1fr; }
  .contact-cards-grid { grid-template-columns: 1fr; }
  .contact-info-label { min-width: 120px; }
}

