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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --bg-glass: rgba(30, 41, 72, 0.6);
  --border: rgba(99, 130, 255, 0.15);
  --border-hover: rgba(99, 130, 255, 0.35);
  --text-primary: #f0f2ff;
  --text-secondary: #8b95b8;
  --text-muted: #5a6380;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99,102,241,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(236,72,153,0.06) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 1;
}

/* ===== HEADER ===== */
.hero {
  text-align: center;
  padding: 32px 16px 24px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #f0f2ff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.hero p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}

/* ===== NAME INPUT ===== */
.name-section {
  margin-bottom: 20px;
}
.input-group {
  position: relative;
}
.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}
.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-group input::placeholder { color: var(--text-muted); }

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 4px;
}
.tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  user-select: none;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ===== EXAM PANEL ===== */
.exam-panel { display: none; }
.exam-panel.active { display: block; animation: fadeIn 0.25s ease; }

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

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-label .calc-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.calc-badge.no-calc { background: rgba(239,68,68,0.15); color: #f87171; }
.calc-badge.calc { background: rgba(16,185,129,0.15); color: #34d399; }

/* ===== PROBLEM GRID ===== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.problem-grid.frq { grid-template-columns: repeat(3, 1fr); }

.prob-btn {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.prob-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.prob-btn.selected {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 2px 12px var(--accent-glow);
  transform: scale(1.05);
}
.prob-btn.frq-btn {
  aspect-ratio: auto;
  padding: 14px 8px;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}

/* ===== EXPANDED HELP PANEL ===== */
.help-panel {
  display: none;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin: 8px 0 16px;
  animation: slideDown 0.25s ease;
}
.help-panel.visible { display: block; }

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

.help-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.help-header .q-num {
  font-weight: 700;
  font-size: 15px;
}
.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
.answer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16,185,129,0.15);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}
.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
}
.help-link:hover { transform: translateY(-1px); }
.help-link.ai {
  background: rgba(236,72,153,0.12);
  color: #f472b6;
  border-color: rgba(236,72,153,0.2);
}
.help-link.ai:hover { background: rgba(236,72,153,0.2); }
.help-link.video {
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border-color: rgba(239,68,68,0.2);
}
.help-link.video:hover { background: rgba(239,68,68,0.2); }
.help-link.khan {
  background: rgba(6,182,212,0.12);
  color: #22d3ee;
  border-color: rgba(6,182,212,0.2);
}
.help-link.khan:hover { background: rgba(6,182,212,0.2); }

/* ===== CONFIDENCE ===== */
.confidence-section {
  margin: 24px 0 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.confidence-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.confidence-row {
  display: flex;
  gap: 8px;
}
.conf-btn {
  flex: 1;
  padding: 10px 4px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.conf-btn:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.conf-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ===== WORRY TEXT ===== */
.worry-section {
  margin: 16px 0;
}
.worry-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.worry-section textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: var(--transition);
}
.worry-section textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== SUBMIT ===== */
.submit-section { margin: 24px 0 40px; }
.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.submit-btn.success {
  background: linear-gradient(135deg, var(--success), #34d399);
}

.counter {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.counter strong { color: var(--accent); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: transform 0.3s ease;
  backdrop-filter: blur(12px);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.stat-card {
  flex: 1;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.stat-card .stat-val {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ===== DASHBOARD STYLES ===== */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.dash-card h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.heat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.heat-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  position: relative;
}
.heat-cell.h1 { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.heat-cell.h2 { background: rgba(99,102,241,0.25); color: #a5b4fc; }
.heat-cell.h3 { background: rgba(99,102,241,0.4); color: white; }
.heat-cell.h4 { background: rgba(99,102,241,0.6); color: white; }
.heat-cell.h5 { background: rgba(239,68,68,0.5); color: white; }

.trouble-list { list-style: none; }
.trouble-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.trouble-item:last-child { border-bottom: none; }
.trouble-rank {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 28px;
}
.trouble-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}
.trouble-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  transition: width 0.5s ease;
}
.trouble-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 20px;
  text-align: right;
}
.topic-bar-container { margin-bottom: 10px; }
.topic-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 13px;
}
.topic-bar-label span:first-child { color: var(--text-secondary); font-weight: 600; }
.topic-bar-label span:last-child { color: var(--text-muted); }

.response-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
}
.response-card .resp-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.response-card .resp-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}
.empty-state .emoji { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ===== VIEW QUESTION & GOOGLE BUTTONS ===== */
.help-link.view-q {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.2);
  cursor: pointer;
  font-family: inherit;
}
.help-link.view-q:hover { background: rgba(245,158,11,0.2); }
.help-link.google {
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  border-color: rgba(59,130,246,0.2);
}
.help-link.google:hover { background: rgba(59,130,246,0.2); }

/* ===== QUESTION IMAGE LIGHTBOX ===== */
#qOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#qOverlay.show {
  opacity: 1;
  pointer-events: all;
}
.q-lightbox {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 95vw;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: lbIn 0.25s ease;
}
@keyframes lbIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.q-lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.q-lb-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}
.q-lb-close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.q-lb-body {
  overflow: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}
.q-lb-body img {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
  background: white;
}

/* ===== NAV BAR ===== */
.nav-bar {
  display: flex; gap: 6px; margin-bottom: 20px; padding: 4px;
  background: var(--bg-secondary); border-radius: var(--radius);
}
.nav-link {
  flex: 1; padding: 10px 8px; text-align: center; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; transition: var(--transition); white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { background: var(--accent); color: white; }

/* ===== FORMS (extended) ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 14px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-family: inherit; font-size: 15px;
  outline: none; transition: var(--transition);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text-muted); }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; display: none; }

/* ===== CARDS (extended) ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px;
}
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius); font-family: inherit;
  font-size: 15px; font-weight: 700; border: none; cursor: pointer;
  transition: var(--transition); text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: white; width: 100%; box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 6px 24px var(--accent-glow); }
.btn-success { background: linear-gradient(135deg, var(--success), #34d399); color: white; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #f87171); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== PILL SELECTORS ===== */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  flex: 1; min-width: 80px; padding: 12px 8px; text-align: center;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: var(--bg-secondary);
  border: 1px solid var(--border); cursor: pointer; transition: var(--transition);
}
.pill:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.pill.active { background: var(--accent); border-color: var(--accent); color: white; }

/* ===== TIMER ===== */
.timer-display { font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; z-index: 1; }
.timer-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px;
  border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
}
.badge-calc { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-nocalc { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-unit { background: rgba(99,102,241,0.15); color: #a5b4fc; margin: 2px; }

/* ===== SCORE INPUT ===== */
.score-slider-wrap { margin: 16px 0; }
.score-display {
  text-align: center; font-size: 64px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px;
}
.score-slider { width: 100%; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 4px; background: var(--bg-secondary); outline: none; }
.score-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 8px var(--accent-glow); }
.score-label-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== PROGRESS BARS ===== */
.progress-bar-wrap { margin-bottom: 12px; }
.progress-bar-header { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.progress-bar-header span:first-child { color: var(--text-secondary); font-weight: 600; }
.progress-bar-header span:last-child { color: var(--text-muted); }
.progress-bar-bg { height: 8px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; background: linear-gradient(90deg, var(--accent), var(--pink)); }
.progress-bar-fill.green { background: linear-gradient(90deg, var(--success), #34d399); }
.progress-bar-fill.yellow { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress-bar-fill.red { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ===== DATA TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 8px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid rgba(99,130,255,0.08); color: var(--text-secondary); }
.data-table tr:hover td { color: var(--text-primary); background: rgba(99,102,241,0.04); }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; max-width: 480px; width: 100%; }

/* ===== TOGGLE ROW ===== */
.toggle-row { display: flex; margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.toggle-btn { flex: 1; padding: 12px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px; background: transparent; color: var(--text-secondary); transition: var(--transition); border: none; font-family: inherit; }
.toggle-btn.active { background: var(--accent); color: white; }
.toggle-btn:hover:not(.active) { background: rgba(139,92,246,0.1); }

/* ===== RESPONSIVE ===== */
@media (max-width: 500px) {
  .problem-grid { grid-template-columns: repeat(5, 1fr); }
  .hero h1 { font-size: 22px; }
  .help-links { flex-direction: column; }
  .q-lightbox { max-width: 100vw; border-radius: var(--radius); }
  .stats-bar { flex-wrap: wrap; }
  .stat-card { min-width: calc(50% - 4px); }
  .timer-display { font-size: 36px; }
  .pill-row { flex-wrap: wrap; }
  .pill { min-width: calc(33% - 6px); }
  .nav-bar { flex-wrap: wrap; }
  .nav-link { min-width: calc(33% - 4px); font-size: 11px; }
}
