/* ═══════════════════════════════════════
   TOKENS  (mirrors shineneet.css)
═══════════════════════════════════════ */
:root {
  --blue:        #2d3fd4;
  --blue-dark:   #1a2db0;
  --blue-deep:   #132490;
  --blue-light:  #eef1fb;
  --orange:      #f47221;
  --orange-dark: #d9610d;
  --yellow:      #f5c400;

  --bg:          #f4f6fb;
  --surface:     #ffffff;
  --surface-2:   #eef1f8;
  --border:      #dde3f0;
  --border-h:    #b8c4df;

  --text:        #0d1b3e;
  --muted:       #5a6a8a;
  --light:       #8fa0bf;

  --success:     #059669;
  --error:       #dc2626;

  --physics:     #0891b2;
  --chemistry:   #7c3aed;
  --biology:     #059669;

  --r-sm:  8px;
  --r:     12px;
  --r-lg:  18px;
  --nav-h: 66px;
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }

/* ═══════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  box-shadow: 0 1px 4px rgba(45,63,212,.06);
}
.nav__logo {
  font-size: 1.25rem; font-weight: 900; color: var(--blue);
  text-decoration: none; letter-spacing: -0.03em;
}
.nav__links {
  display: flex; gap: 0.2rem; list-style: none; align-items: center;
}
.nav__links a {
  color: var(--muted); text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  padding: 0.45rem 0.9rem; border-radius: var(--r-sm);
  transition: color .15s, background .15s; white-space: nowrap;
}
.nav__links a:hover  { color: var(--blue); background: var(--blue-light); }
.nav__links a.active { color: var(--blue); background: var(--blue-light); font-weight: 700; }
.nav__cta {
  background: var(--orange); color: #fff;
  font-weight: 700; font-size: 0.8rem;
  padding: 0.5rem 1.25rem; border-radius: var(--r-sm);
  text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(244,114,33,.3);
}
.nav__cta:hover { background: var(--orange-dark); transform: translateY(-1px); color: #fff; }

/* ═══════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════ */
.breadcrumb {
  max-width: 1120px; margin: 0 auto;
  padding: 1rem 1.75rem 0;
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; color: var(--light);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════ */
.page { max-width: 1120px; margin: 0 auto; padding: 1.25rem 1.75rem 5rem; }

/* ═══════════════════════════════════════
   HERO HEADER
═══════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 60%, #3d52e8 100%);
  border-radius: var(--r-lg);
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  position: relative; overflow: hidden;
  animation: fadeUp .5s ease both;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.05); pointer-events: none;
}
.hero::before { width: 320px; height: 320px; top: -80px; right: -60px; }
.hero::after  { width: 180px; height: 180px; bottom: -50px; right: 200px; }

.hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.25rem 0.75rem; border-radius: 20px; margin-bottom: 0.65rem;
}
.hero__title {
  font-size: 1.9rem; font-weight: 900; color: #fff;
  letter-spacing: -0.04em; line-height: 1.1;
}
.hero__title span { color: var(--yellow); }
.hero__sub {
  color: rgba(255,255,255,.7); font-size: 0.85rem;
  margin-top: 0.5rem; line-height: 1.6;
}

/* stat pills */
.hero__stats {
  display: flex; gap: 0.75rem; margin-top: 1.4rem; flex-wrap: wrap;
}
.hero__stat {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-sm); padding: 0.5rem 1rem;
  display: flex; flex-direction: column; gap: 0.1rem; min-width: 100px;
}
.hero__stat-val { font-size: 1.2rem; font-weight: 900; color: #fff; line-height: 1; }
.hero__stat-lbl { font-size: 0.65rem; color: rgba(255,255,255,.65); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* CTA in hero */
.hero__actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0; }
.btn-start {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--orange); color: #fff; font-weight: 800; font-size: 0.9rem;
  padding: 0.75rem 1.75rem; border-radius: var(--r-sm); text-decoration: none;
  box-shadow: 0 4px 16px rgba(244,114,33,.5);
  transition: background .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-start:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244,114,33,.5); color:#fff; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: rgba(255,255,255,.8); font-weight: 600; font-size: 0.85rem;
  padding: 0.7rem 1.4rem; border-radius: var(--r-sm); text-decoration: none;
  border: 1px solid rgba(255,255,255,.3);
  transition: background .15s, color .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color:#fff; }

/* ═══════════════════════════════════════
   REGISTER NOTICE (guest state)
═══════════════════════════════════════ */
.notice {
  background: #fff8f0; border: 1px solid #fdd0a8;
  border-left: 4px solid var(--orange);
  border-radius: var(--r); padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
  animation: fadeUp .5s .08s ease both;
}
.notice__icon { font-size: 1.2rem; flex-shrink: 0; margin-top: .1rem; }
.notice__body { flex: 1; }
.notice__body p { font-size: 0.83rem; color: var(--muted); line-height: 1.6; }
.notice__body a { color: var(--orange); font-weight: 700; text-decoration: none; }
.notice__body a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   PERFORMANCE SUMMARY CARD
═══════════════════════════════════════ */
.perf-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  margin-bottom: 1.5rem;
  animation: fadeUp .5s .12s ease both;
  box-shadow: 0 2px 12px rgba(45,63,212,.04);
}
.perf-card__head {
  background: linear-gradient(90deg, var(--blue-deep), var(--blue-dark));
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.perf-card__head h2 {
  font-size: 0.875rem; font-weight: 800; color: #fff;
  letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem;
}
.perf-card__badge {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85); font-size: 0.68rem; font-weight: 700;
  padding: 0.2rem 0.65rem; border-radius: 20px; letter-spacing: 0.04em;
}

.perf-stats {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0; border-top: 1px solid var(--border);
}
.perf-stat {
  padding: 1.1rem 1.25rem;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.2rem;
}
.perf-stat:last-child { border-right: none; }
.perf-stat__val {
  font-size: 1.4rem; font-weight: 900; color: var(--blue);
  letter-spacing: -0.04em; line-height: 1;
}
.perf-stat__val--zero { color: var(--light); }
.perf-stat__lbl {
  font-size: 0.67rem; font-weight: 700; color: var(--light);
  text-transform: uppercase; letter-spacing: 0.07em;
}

/* empty state inside perf */
.perf-empty {
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.perf-empty p { font-size: 0.82rem; color: var(--muted); }
.perf-empty__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--light); flex-shrink: 0;
}

/* ═══════════════════════════════════════
   LAYOUT: sidebar + question list
═══════════════════════════════════════ */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }

/* ═══════════════════════════════════════
   STICKY SIDEBAR
═══════════════════════════════════════ */
.sidebar {
  position: sticky; top: calc(var(--nav-h) + 1rem);
  display: flex; flex-direction: column; gap: 1rem;
  animation: fadeUp .5s .16s ease both;
}

.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 2px 8px rgba(45,63,212,.04);
}
.sidebar-card__head {
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue));
  font-size: 0.72rem; font-weight: 800; color: rgba(255,255,255,.9);
  letter-spacing: 0.07em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-card__head span {
  background: rgba(255,255,255,.15); border-radius: 20px;
  padding: 0.15rem 0.6rem; font-size: 0.65rem;
}

/* subject filter buttons */
.filter-group { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.filter-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.85rem; border-radius: var(--r-sm);
  border: 1.5px solid transparent; cursor: pointer;
  font-family: inherit; font-size: 0.8rem; font-weight: 600;
  transition: all .15s; text-align: left; background: var(--surface-2);
  color: var(--muted);
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.filter-btn.active { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.filter-btn.active.phys  { background: #ecfeff; border-color: var(--physics); color: var(--physics); }
.filter-btn.active.chem  { background: #f5f3ff; border-color: var(--chemistry); color: var(--chemistry); }
.filter-btn.active.bio   { background: #ecfdf5; border-color: var(--biology); color: var(--biology); }
.filter-badge {
  font-size: 0.65rem; font-weight: 800;
  padding: 0.1rem 0.5rem; border-radius: 20px;
  background: rgba(0,0,0,.07); color: inherit;
}

/* quick-jump grid */
.qjump { padding: 0.75rem; 
         max-height: 220px;        /* shows ~6 rows of buttons */
         overflow-y: auto;
         overflow-x: hidden;
}

.qjump-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
}
.qjump-btn {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  border: 1px solid var(--border); transition: all .12s;
  text-decoration: none;
}
.qjump-btn:hover { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }

/* ═══════════════════════════════════════
   QUESTION LIST
═══════════════════════════════════════ */
.q-list { display: flex; flex-direction: column; gap: 1rem; animation: fadeUp .5s .2s ease both; }

.q-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 2px 8px rgba(45,63,212,.03);
  transition: box-shadow .15s, border-color .15s;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.q-card:hover { box-shadow: 0 4px 20px rgba(45,63,212,.08); border-color: var(--border-h); }

/* subject accent stripe */
.q-card[data-subject="physics"]   { border-left: 3px solid var(--physics); }
.q-card[data-subject="chemistry"] { border-left: 3px solid var(--chemistry); }
.q-card[data-subject="biology"]   { border-left: 3px solid var(--biology); }

.q-card__head {
  padding: 0.75rem 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.q-num {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 900; color: #fff; background: var(--blue);
  letter-spacing: -0.02em;
}
.q-card[data-subject="physics"]   .q-num { background: var(--physics); }
.q-card[data-subject="chemistry"] .q-num { background: var(--chemistry); }
.q-card[data-subject="biology"]   .q-num { background: var(--biology); }

.q-subject-chip {
  font-size: 0.63rem; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 20px;
}
.q-subject-chip--physics   { background: #ecfeff; color: var(--physics); border: 1px solid #a5f3fc; }
.q-subject-chip--chemistry { background: #f5f3ff; color: var(--chemistry); border: 1px solid #ddd6fe; }
.q-subject-chip--biology   { background: #ecfdf5; color: var(--biology); border: 1px solid #6ee7b7; }
.q-subject-chip--general   { background: var(--blue-light); color: var(--blue); border: 1px solid #c7d2f8; }
.q-marks {
  margin-left: auto; font-size: 0.7rem; color: var(--muted);
  font-weight: 600; display: flex; align-items: center; gap: 0.3rem;
}
.q-marks-good { color: var(--success); }
.q-marks-bad  { color: var(--error); }

/* question body */
.q-card__body { padding: 1.25rem 1.5rem; }

.q-stem {
  font-size: 0.925rem; color: var(--text); line-height: 1.75;
  margin-bottom: 1.1rem; font-weight: 500;
}
.q-stem img { margin: 0.75rem 0; max-height: 180px; border-radius: var(--r-sm); }

/* options grid */
.q-options {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.q-option {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.7rem 0.9rem; border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer;
  transition: all .15s; font-size: 0.85rem; line-height: 1.55;
  color: var(--text);
}
.q-option:hover { border-color: var(--blue); background: var(--blue-light); }
.q-option__key {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 900; letter-spacing: 0;
  background: var(--surface-2); color: var(--muted); border: 1.5px solid var(--border);
  transition: all .15s;
}
.q-option:hover .q-option__key { background: var(--blue); color: #fff; border-color: var(--blue); }
.q-option__text { flex: 1; }
.q-option__text img { margin-top: 0.4rem; max-height: 100px; }

/* section dividers */
.section-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.5rem 0 0.25rem;
}
.section-divider__line { flex: 1; height: 1px; background: var(--border); }
.section-divider__label {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 0.3rem 0.9rem; border-radius: 20px;
  white-space: nowrap;
}
.section-divider--physics   .section-divider__label { background: #ecfeff; color: var(--physics); border: 1px solid #a5f3fc; }
.section-divider--chemistry .section-divider__label { background: #f5f3ff; color: var(--chemistry); border: 1px solid #ddd6fe; }
.section-divider--biology   .section-divider__label { background: #ecfdf5; color: var(--biology); border: 1px solid #6ee7b7; }

/* ═══════════════════════════════════════
   START TEST STICKY FOOTER
═══════════════════════════════════════ */
.sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(45,63,212,.08);
  padding: 0.85rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.sticky-bar__info { font-size: 0.78rem; color: var(--muted); }
.sticky-bar__info strong { color: var(--text); font-weight: 800; }
.sticky-bar__actions { display: flex; gap: 0.75rem; align-items: center; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 1.5rem 2.5rem; margin-top: 2rem;
  padding-bottom: calc(1.5rem + 60px); /* account for sticky bar */
}
.footer__inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; font-size: 0.775rem; color: var(--muted);
}
.footer__inner strong { color: var(--blue); font-weight: 800; }

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .perf-stats { grid-template-columns: repeat(3, 1fr); }
  .perf-stat:nth-child(3) { border-right: none; }
  .q-options { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav { padding: 0 1rem; }
  .nav__links { display: none; }
  .page { padding: 1rem 1rem 5rem; }
  .breadcrumb { padding: 0.75rem 1rem 0; }
  .hero { padding: 1.5rem 1.25rem; }
  .hero__title { font-size: 1.45rem; }
  .perf-stats { grid-template-columns: repeat(2, 1fr); }
  .sticky-bar { padding: 0.75rem 1rem; }
}

/* ═══════════════════════════════════════
   NO SIDEBAR ON PHONES / TABLETS
   The filter sidebar is for computer screens only. On small screens (portrait or
   landscape) it is hidden so the questions are what the student sees first.
═══════════════════════════════════════ */
@media (max-width: 960px), (pointer: coarse) and (max-height: 520px) {
  .sidebar { display: none !important; }
  .layout { grid-template-columns: 1fr !important; }
}
