/* ═══════════════════════════════════════════════════════
   TechBanta.com — Sparklin UI v2.0
   Alive. Bouncy. Swiggy/Zomato energy.
   Light theme with rich movement & micro-interactions.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f7fb;
  --bg2: #ffffff;
  --bg3: #f0f0f8;
  --bg4: #e5e5f0;
  --text: #16162a;
  --text2: #4a4a6a;
  --text3: #9090b0;
  --border: #e2e2ee;
  --border2: #eeeef8;

  --blue: #4F46E5;
  --blue-bg: #ededfd;
  --blue-dark: #3730a3;
  --blue-light: #818cf8;
  --blue-glow: rgba(79,70,229,0.18);

  --green: #059669;
  --green-bg: #d1fae5;
  --green-border: #10b981;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --red-border: #ef4444;
  --orange: #d97706;
  --orange-bg: #fef3c7;
  --purple: #7c3aed;
  --purple-bg: #ede9fe;

  --shadow: 0 2px 8px rgba(79,70,229,0.07), 0 1px 3px rgba(0,0,0,0.05);
  --shadow2: 0 8px 32px rgba(79,70,229,0.14), 0 2px 8px rgba(0,0,0,0.06);
  --shadow3: 0 20px 60px rgba(79,70,229,0.18), 0 4px 16px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --font: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  --nav-h: 64px;

  /* Animation speeds */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg2: #17172e;
  --bg3: #1e1e38;
  --bg4: #26264a;
  --text: #e8e8f8;
  --text2: #9494c0;
  --text3: #55557a;
  --border: #2e2e55;
  --border2: #22223f;
  --blue: #818cf8;
  --blue-bg: rgba(129,140,248,0.12);
  --blue-dark: #a5b4fc;
  --blue-light: #c7d2fe;
  --blue-glow: rgba(129,140,248,0.2);
  --green: #34d399;
  --green-bg: rgba(52,211,153,0.12);
  --red: #f87171;
  --red-bg: rgba(248,113,113,0.12);
  --orange: #fbbf24;
  --orange-bg: rgba(251,191,36,0.10);
  --purple: #a78bfa;
  --purple-bg: rgba(167,139,250,0.12);
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow2: 0 8px 32px rgba(0,0,0,0.5);
  --shadow3: 0 20px 60px rgba(0,0,0,0.6);
}

/* ─── RESET ─── */
*, *::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);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); border: none; outline: none; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ─── KEYFRAME ANIMATIONS ─── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.7); }
  60%  { transform: scale(1.05); }
  80%  { transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes wiggle {
  0%,100% { transform: rotate(0deg); }
  25%      { transform: rotate(-8deg); }
  75%      { transform: rotate(8deg); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes progressFill {
  from { width: 0%; }
  to   { width: var(--fill-w, 100%); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--blue-glow); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

/* ─── SCROLL REVEAL CLASSES ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-bounce);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 70ms; }
.stagger > *:nth-child(3) { transition-delay: 140ms; }
.stagger > *:nth-child(4) { transition-delay: 210ms; }
.stagger > *:nth-child(5) { transition-delay: 280ms; }
.stagger > *:nth-child(6) { transition-delay: 350ms; }
.stagger > *:nth-child(7) { transition-delay: 420ms; }
.stagger > *:nth-child(8) { transition-delay: 490ms; }

/* ─── APP CONTAINER ─── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 260px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.35s var(--ease-out), opacity 0.25s, border-color 0.3s;
  z-index: 100;
  overflow: hidden;
}
.sidebar-header {
  height: var(--nav-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.sidebar-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  white-space: nowrap;
  transition: transform 0.2s var(--ease-bounce);
}
.sidebar-logo:hover { transform: scale(1.04); }
.sidebar-logo span { color: var(--blue); }

.sidebar-menu {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar-menu::-webkit-scrollbar { width: 3px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.app-container.sidebar-collapsed .sidebar {
  width: 0;
  opacity: 0;
  pointer-events: none;
  border-right-color: transparent;
}

.sidebar-group-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  margin-bottom: 8px;
  padding: 0 8px;
}
.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-links li a {
  display: flex;
  align-items: center;
  font-size: 13.5px;
  color: var(--text2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease-bounce);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.sidebar-links li a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--blue);
  border-radius: 0 4px 4px 0;
  transition: width 0.2s var(--ease-bounce);
}
.sidebar-links li a:hover {
  background: var(--blue-bg);
  color: var(--blue);
  transform: translateX(4px);
}
.sidebar-links li a:hover::before { width: 3px; }
.sidebar-links li a.active {
  background: var(--blue-bg);
  color: var(--blue);
  font-weight: 600;
}
.sidebar-links li a.active::before { width: 3px; }

/* ─── MAIN COLUMN ─── */
.main-column {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ─── */
.header-nav {
  height: var(--nav-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background 0.3s, border-color 0.3s;
}
[data-theme="dark"] .header-nav {
  background: rgba(23,23,46,0.85);
}
.header-left { display: flex; align-items: center; gap: 12px; }

.menu-toggle-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
}
.menu-toggle-btn:hover {
  background: var(--blue-bg);
  transform: scale(1.1) rotate(5deg);
}
.menu-toggle-btn svg { width: 18px; height: 18px; stroke: var(--text2); fill: none; }

.navbar-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
  pointer-events: none;
  white-space: nowrap;
}
.navbar-brand span { color: var(--blue); }
.app-container.sidebar-collapsed .navbar-brand {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nav-search {
  flex: 1;
  max-width: 440px;
  position: relative;
  margin: 0 16px;
}
.nav-search input {
  width: 100%;
  height: 40px;
  background: var(--bg3);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-full);
  padding: 0 16px 0 40px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: background 0.2s, border-color 0.25s, box-shadow 0.25s, transform 0.2s var(--ease-bounce);
}
.nav-search input:focus {
  background: var(--bg2);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-glow);
  transform: scaleX(1.01);
}
.nav-search svg {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--text3); fill: none;
  pointer-events: none;
  transition: stroke 0.2s;
}
.nav-search:focus-within svg { stroke: var(--blue); }

.header-right { display: flex; align-items: center; gap: 10px; }

.theme-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background 0.2s, transform 0.3s var(--ease-spring);
}
.theme-btn:hover { background: var(--orange-bg); transform: scale(1.15) rotate(-15deg); }
.theme-btn:active { transform: scale(0.9) rotate(30deg); }

/* ─── MAIN CONTENT ─── */
.main-content {
  flex-grow: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
}

/* ─── BREADCRUMBS ─── */
.breadcrumbs {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 24px;
  animation: slideDown 0.4s var(--ease-out);
}
.breadcrumbs a { color: var(--blue); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--blue-dark); }
.breadcrumbs span.active { color: var(--text3); }

/* ─── CONTENT GRID ─── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 1024px) {
  .content-grid { grid-template-columns: 1fr 300px; }
}
.quiz-primary-col { min-width: 0; }

/* QUIZ HEADER */
.quiz-header { margin-bottom: 24px; animation: fadeUp 0.5s var(--ease-out) both; }
.quiz-header h1 {
  font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 12px;
}
.quiz-header h1 span { color: var(--green); }

.meta-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.meta-badge {
  display: flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 12px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text2);
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s;
}
.meta-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.meta-badge svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* QUESTION CARD */
.q-card {
  background: var(--bg2);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s var(--ease-out), border-color 0.2s;
  animation: fadeUp 0.5s var(--ease-out) both;
}
.q-card:hover {
  box-shadow: var(--shadow2);
  transform: translateY(-2px);
  border-color: var(--blue-light);
}
.q-tag-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.q-tag {
  height: 22px; padding: 0 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.q-num-pill {
  font-size: 12px; font-weight: 700; color: var(--text3);
  background: var(--bg3); padding: 3px 12px; border-radius: var(--radius-full);
}
.q-text {
  font-size: 16px; font-weight: 500; color: var(--text);
  line-height: 1.65; margin-bottom: 20px;
}
.q-text code {
  font-family: monospace; font-size: 14px;
  background: var(--bg3); padding: 2px 7px; border-radius: 5px;
  color: var(--blue);
}

/* OPTIONS */
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg2); cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.22s var(--ease-bounce), box-shadow 0.2s;
  text-align: left; width: 100%;
  position: relative;
  overflow: hidden;
}
/* Ripple effect base */
.opt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.3s;
  pointer-events: none;
}
.opt:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-bg);
  transform: translateX(5px) scale(1.005);
  box-shadow: 0 4px 16px var(--blue-glow);
}
.opt:active:not(:disabled) { transform: scale(0.98); }

.opt-key {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg3); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.2s var(--ease-bounce);
}
.opt:hover:not(:disabled) .opt-key {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  transform: scale(1.1) rotate(-3deg);
}
.opt-text { font-size: 15px; color: var(--text); line-height: 1.5; flex: 1; text-align: left; }

/* Answer states */
.opt.correct {
  border-color: var(--green-border); background: var(--green-bg);
  animation: pop 0.4s var(--ease-spring);
}
.opt.correct .opt-key { background: var(--green); border-color: var(--green); color: #fff; animation: bounceIn 0.4s var(--ease-spring); }
.opt.correct .opt-text { color: var(--green); }
.opt.wrong {
  border-color: var(--red-border); background: var(--red-bg);
  animation: wiggle 0.4s ease;
}
.opt.wrong .opt-key { background: var(--red); border-color: var(--red); color: #fff; }
.opt.wrong .opt-text { color: var(--red); }
.opt.dimmed { opacity: 0.4; }
.opt:disabled { cursor: not-allowed; }

/* Q ACTIONS */
.q-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--border2);
}
.view-ans-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 18px;
  background: var(--blue-bg); color: var(--blue);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-bounce), box-shadow 0.2s;
}
.view-ans-btn:hover {
  background: var(--blue); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--blue-glow);
}
.bookmark-inline-btn {
  background: transparent; color: var(--text3);
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; padding: 6px 12px; border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-bounce);
}
.bookmark-inline-btn:hover {
  background: var(--orange-bg); color: var(--orange);
  transform: scale(1.08);
}
.bookmark-inline-btn.saved { color: var(--orange); animation: pop 0.3s var(--ease-spring); }
.bookmark-inline-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform 0.2s var(--ease-bounce); }
.bookmark-inline-btn:hover svg { transform: scale(1.2); }
.bookmark-inline-btn.saved svg { fill: var(--orange); }

/* EXPLANATION */
.explanation {
  margin-top: 14px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  display: none;
  animation: slideDown 0.3s var(--ease-out);
}
.explanation.show { display: block; }
.exp-label {
  font-size: 12px; font-weight: 700; color: var(--blue);
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}
.exp-label svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.exp-text { font-size: 13px; color: var(--text2); line-height: 1.75; }

/* ─── RIGHT SIDEBAR ─── */
.right-ads-col { display: none; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) { .right-ads-col { display: flex; } }
.widget-box {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}
.widget-box:hover { transform: translateY(-3px); box-shadow: var(--shadow2); }
.widget-box h4 { font-size: 14px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.widget-box p { font-size: 13px; color: var(--text2); line-height: 1.5; }
.quick-links-widget {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}
.quick-links-widget:hover { transform: translateY(-3px); box-shadow: var(--shadow2); }
.quick-links-title {
  font-size: 11px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border2);
  padding-bottom: 8px; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .6px;
}
.quick-links-group { margin-bottom: 14px; }
.quick-links-group:last-child { margin-bottom: 0; }
.quick-links-group-title { font-size: 12px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.quick-links-list { list-style: none; display: flex; flex-direction: column; gap: 5px; padding-left: 4px; }
.quick-links-list li a {
  font-size: 13px; color: var(--text2);
  display: flex; align-items: center; gap: 4px;
  transition: color 0.15s, transform 0.2s var(--ease-bounce);
}
.quick-links-list li a::before { content: "›"; font-weight: 700; color: var(--text3); margin-right: 2px; }
.quick-links-list li a:hover { color: var(--blue); transform: translateX(4px); }
.sticky-ad-box {
  background: var(--bg2); border: 1px dashed var(--border);
  border-radius: var(--radius); min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 12px;
  position: sticky; top: 84px;
}
.ad-slot {
  background: var(--bg3); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); min-height: 80px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 12px; margin: 24px 0;
}
/* ─── AD RESPONSIVE VISIBILITY ─── */
@media (max-width: 767px)  { .ad-desktop-only { display: none !important; } }
@media (min-width: 768px)  { .ad-mobile-only  { display: none !important; } }

/* ─── FOOTER ─── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border2);
  padding: 44px 28px 28px; margin-top: 40px;
  transition: background 0.25s, border-color 0.25s;
}
.footer-inner { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 32px; }
.footer-brand h3 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.footer-brand h3 span { color: var(--blue); }
.footer-brand p { font-size: 13px; color: var(--text2); line-height: 1.8; max-width: 240px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 14px; letter-spacing: .3px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 13px; color: var(--text2); transition: color 0.15s, transform 0.2s var(--ease-bounce); display: inline-block; }
.footer-col ul li a:hover { color: var(--blue); transform: translateX(3px); }
.footer-bottom {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 12px; color: var(--text3); }

/* ─── MOBILE OVERLAY ─── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 95;
  backdrop-filter: blur(4px);
}

/* ─── QUIZ PROGRESS BAR ─── */
.quiz-progress-bar {
  position: sticky; top: var(--nav-h); z-index: 80;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 12px 18px;
  margin-bottom: 24px; box-shadow: var(--shadow);
  transition: background 0.25s, border-color 0.25s;
  animation: slideDown 0.4s var(--ease-out) both;
}
.qpb-inner { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.qpb-label { font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap; flex-shrink: 0; }
.qpb-track {
  flex: 1; min-width: 60px; height: 7px;
  background: var(--bg4); border-radius: var(--radius-full); overflow: hidden;
  position: relative;
}
.qpb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--blue-light));
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-out);
  animation: gradient-shift 3s ease infinite;
  position: relative;
}
/* Shimmer on progress bar */
.qpb-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shimmer 2s ease-in-out infinite;
}
.qpb-pct { font-size: 12px; font-weight: 700; color: var(--blue); white-space: nowrap; flex-shrink: 0; min-width: 34px; text-align: right; }
.q-total-of { color: var(--text3); font-weight: 400; }
.load-sentinel { height: 1px; margin: 8px 0; }

/* ─── COMPLETION BANNER ─── */
.completion-banner {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 44px 28px;
  text-align: center; margin-top: 32px;
  box-shadow: var(--shadow2);
  animation: bounceIn 0.6s var(--ease-spring) both;
}
.cb-icon { font-size: 52px; margin-bottom: 12px; animation: float 3s ease-in-out infinite; display: block; }
.completion-banner h3 { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.completion-banner > p { font-size: 14px; color: var(--text2); margin-bottom: 28px; }
.cb-stats { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.cb-stat {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 14px 20px; min-width: 80px;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
  animation: countUp 0.5s var(--ease-spring) both;
}
.cb-stat:hover { transform: translateY(-4px) scale(1.04); box-shadow: var(--shadow2); }
.cb-stat span { display: block; font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 4px; }
.cb-stat small { font-size: 12px; color: var(--text2); }
.cb-correct span { color: var(--green); }
.cb-wrong   span { color: var(--red); }
.cb-pct     span { color: var(--blue); }
.cb-restart-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 36px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  background-size: 200% 200%;
  color: #fff; border-radius: var(--radius-full);
  font-size: 15px; font-weight: 700;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s;
  animation: gradient-shift 3s ease infinite;
}
.cb-restart-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 30px var(--blue-glow);
}

/* ─── SCROLL TO TOP ─── */
.scroll-top-btn {
  position: fixed; bottom: 28px; right: 28px;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px var(--blue-glow);
  opacity: 0; transform: translateY(16px) scale(0.85);
  transition: opacity 0.3s, transform 0.35s var(--ease-bounce);
  z-index: 200; pointer-events: none;
}
.scroll-top-btn::before {
  content: '';
  position: absolute;
  inset: 0; border-radius: 50%;
  background: inherit; opacity: 0.5;
  animation: pulse-ring 2s ease-out infinite;
}
.scroll-top-btn.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.scroll-top-btn:hover { transform: translateY(-4px) scale(1.1); }
.scroll-top-btn svg { width: 20px; height: 20px; position: relative; z-index: 1; }

/* ─── COMPLETION HISTORY ─── */
.cb-history {
  display: flex; justify-content: center; gap: 24px;
  flex-wrap: wrap; margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border2);
}
.cb-hist-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.cb-hist-item svg { width: 15px; height: 15px; stroke: var(--blue); flex-shrink: 0; }
.cb-hist-item strong { color: var(--text); }

/* ═══════════════════════════════════════════════
   HOMEPAGE — Alive & Moving
   ═══════════════════════════════════════════════ */

/* ─── HERO ─── */
.hero {
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  padding: 0;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow2);
  background: #0a0a1a;
  animation: fadeIn 0.6s ease both;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0.45; pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0;
  
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  padding: 56px 40px;
}
.hero .hero-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(6px);
}
.hero h1 { color: #fff !important; }
.hero h1 em { color: #fff !important; font-style: normal; }
.hero .hero-sub { color: rgba(255,255,255,0.82); }
[data-theme="dark"] .hero-video { opacity: 0.3; }
[data-theme="dark"] .hero-overlay { background: linear-gradient(135deg, rgba(5,5,15,0.7) 0%, rgba(79,70,229,0.4) 100%); }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-bg); color: var(--blue);
  font-size: 12px; font-weight: 700;
  padding: 6px 16px; border-radius: var(--radius-full);
  margin-bottom: 16px; letter-spacing: .3px;
  animation: bounceIn 0.6s var(--ease-spring) 0.2s both;
}
.hero h1 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800; line-height: 1.2;
  color: #fff; margin-bottom: 14px;
  letter-spacing: -1px;
  animation: fadeUp 0.6s var(--ease-out) 0.3s both;
}
.hero h1 em { font-style: normal; }
.hero-sub {
  font-size: 16px; color: var(--text2);
  max-width: 580px; margin: 0 auto 8px; line-height: 1.75;
  animation: fadeUp 0.6s var(--ease-out) 0.4s both;
}

/* ─── HERO CTAs ─── */
.hero-cta-wrap {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 24px;
  animation: fadeUp 0.6s var(--ease-out) 0.5s both;
}
.hero-cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  background-size: 200% 200%;
  color: #fff; font-size: 15px; font-weight: 700;
  padding: 13px 30px; border-radius: var(--radius-full);
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
  animation: gradient-shift 4s ease infinite;
  position: relative; overflow: hidden;
}
.hero-cta-primary::before {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: rgba(255,255,255,0.25);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.hero-cta-primary:hover::before { left: 130%; }
.hero-cta-primary:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 36px rgba(79,70,229,0.4);
}
.hero-cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff; font-size: 15px; font-weight: 600;
  padding: 13px 26px; border-radius: var(--radius-full);
  transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease-bounce);
  backdrop-filter: blur(6px);
}
.hero-cta-secondary:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}

/* ─── STATS BAR ─── */
.stats-bar {
  display: flex; gap: 0;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s var(--ease-out) 0.1s both;
}
.stats-bar[data-low="true"] { display: none; }
.stats-item {
  flex: 1; text-align: center;
  padding: 18px 8px;
  border-right: 1px solid var(--border);
  transition: background 0.2s, transform 0.25s var(--ease-bounce);
  cursor: default;
}
.stats-item:last-child { border-right: none; }
.stats-item:hover { background: var(--blue-bg); transform: scale(1.03); }
.stats-num {
  font-size: 24px; font-weight: 800; color: var(--blue); line-height: 1;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stats-lbl { font-size: 11px; color: var(--text3); margin-top: 4px; letter-spacing: .2px; font-weight: 600; }

/* ─── SECTION HEADER ─── */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sec-title {
  font-size: 19px; font-weight: 800; color: var(--text);
  letter-spacing: -.4px;
  display: flex; align-items: center; gap: 10px;
}
.sec-title-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  flex-shrink: 0;
  animation: pulse-ring 2.5s ease-out infinite;
  position: relative;
}
.see-all {
  font-size: 13px; color: var(--blue); font-weight: 700;
  display: flex; align-items: center; gap: 4px;
  transition: gap 0.2s var(--ease-bounce), color 0.2s;
}
.see-all:hover { gap: 8px; }

/* ─── CATEGORY SECTION HEAD ─── */
.cat-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cat-count-badge {
  display: inline-flex; align-items: center;
  background: var(--blue-bg); color: var(--blue);
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: var(--radius-full);
  margin-left: 8px;
}
.view-all-link {
  font-size: 13px; color: var(--blue); font-weight: 700;
  display: flex; align-items: center; gap: 4px;
  transition: gap 0.2s var(--ease-bounce);
}
.view-all-link:hover { gap: 8px; }

/* ─── DIRECTORY GRID ─── */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; margin-bottom: 24px;
}
.directory-panel {
  background: var(--bg2);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  transition: box-shadow 0.3s, border-color 0.25s, transform 0.3s var(--ease-bounce);
  overflow: hidden;
}
/* Animated top border */
.directory-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--blue-light));
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
  animation: gradient-shift 3s ease infinite;
}
.directory-panel:hover::before { transform: scaleX(1); }
.directory-panel:hover {
  box-shadow: var(--shadow2);
  border-color: var(--blue-light);
  transform: translateY(-4px);
}
.panel-header {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 14px;
}
.panel-icon {
  font-size: 20px;
  background: linear-gradient(135deg, var(--blue-bg), var(--purple-bg));
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  transition: transform 0.3s var(--ease-bounce);
}
.directory-panel:hover .panel-icon { transform: scale(1.15) rotate(-5deg); }
.panel-title { font-size: 16px; font-weight: 700; }
.panel-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.panel-links li a {
  font-size: 14px; color: var(--text2);
  display: flex; align-items: center; gap: 8px;
  transition: color 0.2s, padding-left 0.2s var(--ease-bounce);
  font-weight: 500;
}
.panel-links li a::before {
  content: "›"; font-size: 18px; font-weight: bold;
  color: var(--blue-light); line-height: 1;
  transition: transform 0.2s var(--ease-bounce);
}
.panel-links li a:hover { color: var(--blue); padding-left: 6px; }
.panel-links li a:hover::before { transform: translateX(3px); }
.panel-footer-link {
  font-size: 13px; font-weight: 700; color: var(--blue);
  text-align: right; margin-top: auto; padding-top: 10px;
  transition: color 0.2s, transform 0.2s var(--ease-bounce);
  opacity: .8; display: inline-flex; align-items: center; gap: 4px;
  justify-content: flex-end;
}
.panel-footer-link:hover { opacity: 1; transform: translateX(3px); }

/* ─── QUIZ CARDS ─── */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px; margin-bottom: 24px;
}
.quiz-card {
  background: var(--bg2);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow 0.3s, border-color 0.25s, transform 0.3s var(--ease-bounce);
  position: relative; overflow: hidden;
}
.quiz-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.quiz-card:hover::after { transform: scaleX(1); }
.quiz-card:hover {
  box-shadow: var(--shadow2);
  border-color: var(--blue-light);
  transform: translateY(-4px);
}
.quiz-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.quiz-card-left { flex: 1; }
.quiz-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.45; margin-bottom: 6px; }
.quiz-sub { font-size: 13px; color: var(--text2); line-height: 1.5; }
.quiz-badge-wrap { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.badge {
  font-size: 11.5px; font-weight: 700; padding: 4px 11px;
  border-radius: var(--radius-full); white-space: nowrap;
  transition: transform 0.2s var(--ease-bounce);
}
.badge:hover { transform: scale(1.08); }
.badge-easy { background: var(--green-bg); color: var(--green); }
.badge-med  { background: var(--orange-bg); color: var(--orange); }
.badge-hard { background: var(--red-bg); color: var(--red); }
.badge-new  { background: var(--blue-bg); color: var(--blue); }
.badge-hot  { background: var(--red-bg); color: var(--red); }

/* Pulsing NEW badge */
.badge-new {
  position: relative;
  animation: borderGlow 2s ease-in-out infinite;
}

.quiz-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border2);
}
.quiz-stats { font-size: 12px; color: var(--text3); display: flex; gap: 12px; }
.quiz-stat { display: flex; align-items: center; gap: 4px; }
.quiz-stat svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.start-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 20px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; border: none; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
  white-space: nowrap; position: relative; overflow: hidden;
}
.start-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: rgba(255,255,255,0.2);
  transform: skewX(-20deg);
  transition: left 0.4s ease;
}
.start-btn:hover::before { left: 100%; }
.start-btn:hover {
  transform: scale(1.07) translateY(-1px);
  box-shadow: 0 8px 24px var(--blue-glow);
}

/* ─── FEATURED BANNER ─── */
.featured {
  background: linear-gradient(135deg, #4F46E5 0%, #7c3aed 50%, #4F46E5 100%);
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
  border-radius: var(--radius); padding: 32px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 40px;
  overflow: hidden; position: relative;
  box-shadow: 0 12px 40px rgba(79,70,229,0.3);
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s;
}
.featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(79,70,229,0.4);
}
.featured::before {
  content: ''; position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  animation: float 4s ease-in-out infinite;
}
.featured::after {
  content: ''; position: absolute;
  right: 80px; bottom: -80px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
  animation: float 5s ease-in-out 1s infinite reverse;
}
.featured-text { position: relative; z-index: 1; }
.featured-text h3, .featured-title { font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 8px; line-height: 1.4; }
.featured-text p { font-size: 14px; color: rgba(255,255,255,0.88); line-height: 1.6; max-width: 340px; }
.featured-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  position: relative; z-index: 1;
  height: 44px; padding: 0 26px;
  background: #fff; color: var(--blue);
  border: none; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 800;
  white-space: nowrap; flex-shrink: 0;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}
.featured-btn:hover { transform: scale(1.07) translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.22); }

/* ─── RECENTLY ADDED ─── */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 14px;
}
.recent-card {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow 0.25s, border-color 0.2s, transform 0.25s var(--ease-bounce);
}
.recent-card:hover {
  box-shadow: var(--shadow2); border-color: var(--blue);
  transform: translateY(-3px);
}
.recent-card-title { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.4; }
.recent-card-meta  { font-size: 12px; color: var(--text3); }
.recent-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }

/* ─── SECTION FOOTER CTA ─── */
.sec-footer { text-align: center; margin-top: 22px; }
.sec-footer-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--blue);
  background: var(--bg2); border: 1.5px solid var(--border);
  padding: 10px 24px; border-radius: var(--radius-full);
  transition: background 0.2s, border-color 0.2s, transform 0.25s var(--ease-bounce), box-shadow 0.2s;
}
.sec-footer-link:hover {
  background: var(--blue-bg); border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--blue-glow);
}
.sec-footer-link svg { transition: transform 0.2s var(--ease-bounce); }
.sec-footer-link:hover svg { transform: translateX(4px); }

/* ─── CATEGORY BOTTOM CTA ─── */
.category-bottom-cta {
  margin-top: 32px;
  background: linear-gradient(135deg, var(--blue-bg) 0%, var(--purple-bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}
.category-bottom-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow2); }
.category-bottom-cta p { font-size: 15px; color: var(--text); font-weight: 600; }
.category-bottom-cta span { font-size: 13px; color: var(--text2); font-weight: 400; display: block; margin-top: 3px; }

/* ─── MOBILE SEARCH ─── */
.mobile-search-btn {
  display: none; width: 38px; height: 38px;
  border-radius: 50%; background: var(--bg3);
  border: 1px solid var(--border2);
  align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
}
.mobile-search-btn:hover { transform: scale(1.1); background: var(--blue-bg); }
.mobile-search-btn svg { width: 17px; height: 17px; stroke: var(--text2); fill: none; stroke-width: 2; }
@media(max-width:768px) { .mobile-search-btn { display: flex; } }
.mobile-search-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 12px 16px; z-index: 200;
  gap: 10px; align-items: center;
  box-shadow: var(--shadow2);
}
.mobile-search-overlay.open { display: flex; animation: slideDown 0.3s var(--ease-out); }
.mobile-search-overlay input {
  flex: 1; height: 42px; background: var(--bg3);
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  padding: 0 16px; font-size: 15px; color: var(--text);
  font-family: var(--font); outline: none;
}
.mobile-search-overlay input:focus { border-color: var(--blue); }
.mobile-search-close {
  background: transparent; color: var(--text2);
  font-size: 22px; padding: 4px 8px; border-radius: var(--radius-sm);
  transition: color 0.15s, transform 0.2s var(--ease-bounce);
}
.mobile-search-close:hover { color: var(--text); transform: scale(1.2) rotate(90deg); }

/* ─── STATS BAR HIDE ─── */
.stats-bar[data-low="true"] { display: none; }

/* ─── FEATURED TITLE ─── */
.featured-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; line-height: 1.4; }

/* ─── RESPONSIVE ─── */
@media(max-width:768px) {
  .nav-search { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    box-shadow: var(--shadow3);
  }
  .app-container.mobile-sidebar-open .sidebar-overlay { display: block; }
  .app-container.mobile-sidebar-open .sidebar { transform: translateX(0); }
  .navbar-brand { opacity: 1 !important; transform: translateX(0) !important; pointer-events: auto !important; }
  .main-content { padding: 16px; max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1/-1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .q-text { font-size: 15px; }
  .opt-text { font-size: 14px; }
  .directory-grid { grid-template-columns: 1fr; gap: 16px; }
  .quiz-grid { grid-template-columns: 1fr; }
  .featured { flex-direction: column; align-items: flex-start; }
  .featured-btn { width: 100%; justify-content: center; }
  .hero-content { padding: 36px 20px; }
  .scroll-top-btn { bottom: 18px; right: 16px; width: 42px; height: 42px; }
  .cb-stats { gap: 10px; }
  .cb-stat { padding: 10px 14px; min-width: 64px; }
  .cb-stat span { font-size: 22px; }
  .qpb-label, .qpb-pct { font-size: 11px; }
  .qpb-pct { min-width: 28px; }
}
@media(max-width:480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
/* ── Sidebar Bottom — Bookmarks ── */
.sidebar-bottom {
  flex-shrink: 0;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border2);
}
.sidebar-bm-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: var(--bg3);
  border: 1px solid var(--border2);
  transition: background .2s, border-color .2s, transform .15s var(--ease-bounce);
  position: relative;
  overflow: hidden;
}
.sidebar-bm-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--orange);
  border-radius: 0 3px 3px 0;
  transition: width .2s var(--ease-bounce);
}
.sidebar-bm-btn:hover,
.sidebar-bm-btn.active {
  background: var(--orange-bg);
  border-color: var(--orange);
  transform: translateX(3px);
}
.sidebar-bm-btn:hover::before,
.sidebar-bm-btn.active::before { width: 3px; }
.sbm-icon {
  width: 16px; height: 16px;
  stroke: var(--text3);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  transition: stroke .2s, fill .2s;
}
.sidebar-bm-btn:hover .sbm-icon,
.sidebar-bm-btn.active .sbm-icon {
  stroke: var(--orange);
  fill: var(--orange-bg);
}
.sbm-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  flex: 1;
  transition: color .2s;
}
.sidebar-bm-btn:hover .sbm-label,
.sidebar-bm-btn.active .sbm-label { color: var(--orange); }
.sbm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* ─── MOBILE SIDEBAR FIX — Bookmarks always visible at bottom ─── */
@media(max-width:768px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    height: 100dvh; /* dvh = dynamic viewport height — mobile browser bar consider karta hai */
  }
  .sidebar-menu {
    flex: 1 1 0;
    min-height: 0;   /* flex overflow fix */
    overflow-y: auto;
  }
  .sidebar-bottom {
    flex-shrink: 0;  /* kabhi shrink nahi hoga — hamesha visible */
  }
}