/* =====================================================
   WAEC 2026 CORE MATHS — Global Stylesheet
   Design: Dark mode, glassmorphism, premium feel
   ===================================================== */

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

:root {
  --bg-dark:        #0a0d14;
  --bg-card:        rgba(255,255,255,0.04);
  --bg-card-hover:  rgba(255,255,255,0.07);
  --border:         rgba(255,255,255,0.10);
  --border-bright:  rgba(255,255,255,0.18);

  --gold:           #fbbf24;
  --gold-dim:       rgba(251,191,36,0.15);
  --green:          #22c55e;
  --green-dim:      rgba(34,197,94,0.12);
  --red:            #f87171;
  --red-dim:        rgba(248,113,113,0.12);
  --blue:           #60a5fa;
  --blue-dim:       rgba(96,165,250,0.12);
  --purple:         #a78bfa;

  --easy-color:     #34d399;  /* emerald */
  --medium-color:   #fbbf24;  /* amber */
  --hard-color:     #f87171;  /* rose */

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(251,191,36,0.12);

  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #2d3748; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4a5568; }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(251,191,36,0.08) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(96,165,250,0.06) 0%, transparent 50%),
              var(--bg-dark);
}

/* Orbs */
.hero-bg-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: floatOrb 14s ease-in-out infinite;
}
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, #fbbf24, transparent 70%); top: -200px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, #60a5fa, transparent 70%); top: 30%; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, #a78bfa, transparent 70%); bottom: 10%; left: 20%; animation-delay: -10s; }

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -40px) scale(1.05); }
  66%       { transform: translate(-20px, 25px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(251,191,36,0.10);
  border: 1px solid rgba(251,191,36,0.25);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero-content h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.gradient-text {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 40%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s;
}
.stat-chip:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-lbl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #0a0d14;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 4px 24px rgba(251,191,36,0.3);
}
.cta-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 32px rgba(251,191,36,0.45); filter: brightness(1.08); }
.cta-btn:active { transform: scale(0.98); }

.outline-btn {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.outline-btn:hover { background: var(--bg-card-hover); border-color: var(--border-bright); }

/* ═══════════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════════ */
.progress-bar-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,13,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 2rem;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.progress-track {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.difficulty-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.legend-dot.easy   { background: var(--easy-color); }
.legend-dot.medium { background: var(--medium-color); }
.legend-dot.hard   { background: var(--hard-color); }

/* ═══════════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════════ */
#quiz-section { padding: 2.5rem 1.5rem 4rem; max-width: 1100px; margin: 0 auto; }

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--border-bright); color: var(--text-primary); }
.filter-btn.active {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(249,115,22,0.15));
  border-color: rgba(251,191,36,0.5);
  color: var(--gold);
}

/* ═══════════════════════════════════════════════
   QUESTION CARDS
═══════════════════════════════════════════════ */
.questions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.q-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  animation: fadeInUp 0.5s ease both;
  position: relative;
  overflow: hidden;
}
.q-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.q-card.easy::before   { background: var(--easy-color); }
.q-card.medium::before { background: var(--medium-color); }
.q-card.hard::before   { background: var(--hard-color); }

.q-card:hover { border-color: var(--border-bright); transform: translateY(-2px); box-shadow: var(--shadow-card); }

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

/* Card top row */
.q-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.q-number-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}
.q-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-difficulty {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}
.tag-difficulty.easy   { background: rgba(52,211,153,0.15); color: var(--easy-color); }
.tag-difficulty.medium { background: rgba(251,191,36,0.15);  color: var(--medium-color); }
.tag-difficulty.hard   { background: rgba(248,113,113,0.15); color: var(--hard-color); }

.tag-topic {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.tag-context {
  font-size: 0.78rem;
}

/* Question text */
.q-text {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.q-text strong { color: var(--gold); font-weight: 700; }

/* Options */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.5rem;
}
@media (max-width: 580px) { .options-grid { grid-template-columns: 1fr; } }

.option-btn {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.option-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.2s;
}
.option-btn:hover:not(:disabled) {
  border-color: rgba(251,191,36,0.5);
  background: rgba(251,191,36,0.07);
  transform: translateX(3px);
}
.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}
.option-btn:hover:not(:disabled) .option-letter {
  background: rgba(251,191,36,0.2);
  color: var(--gold);
}

/* Answered states */
.option-btn.correct {
  border-color: var(--green) !important;
  background: var(--green-dim) !important;
  pointer-events: none;
}
.option-btn.correct .option-letter {
  background: var(--green);
  color: #0a0d14;
}
.option-btn.wrong {
  border-color: var(--red) !important;
  background: var(--red-dim) !important;
  pointer-events: none;
}
.option-btn.wrong .option-letter {
  background: var(--red);
  color: #0a0d14;
}
.option-btn.reveal-correct {
  border-color: rgba(34,197,94,0.4) !important;
  background: rgba(34,197,94,0.05) !important;
  pointer-events: none;
}
.option-btn.reveal-correct .option-letter {
  background: rgba(34,197,94,0.3);
  color: var(--green);
}
.option-btn:disabled { cursor: not-allowed; }

/* Result message */
.result-msg {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  animation: fadeInUp 0.3s ease;
}
.result-msg.correct { display: flex; background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.result-msg.wrong   { display: flex; background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(248,113,113,0.25); }

/* Workings panel */
.workings-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 1rem;
  display: none;
  animation: fadeInUp 0.3s ease;
}
.workings-panel.visible { display: block; }
.workings-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.workings-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
}
.distractor-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 10px;
  line-height: 1.6;
}
.distractor-text strong { color: var(--red); }

/* Pro-Tip */
.protip-panel {
  background: linear-gradient(135deg, rgba(251,191,36,0.07), rgba(249,115,22,0.05));
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: none;
  align-items: flex-start;
  gap: 8px;
  animation: fadeInUp 0.3s ease;
}
.protip-panel.visible { display: flex; }
.protip-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.protip-text { font-size: 0.85rem; color: var(--gold); line-height: 1.6; }
.protip-text strong { color: #fff; }

/* ═══════════════════════════════════════════════
   RESULTS SECTION
═══════════════════════════════════════════════ */
.results-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}
.results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  animation: fadeInUp 0.5s ease;
}
.results-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(251,191,36,0.06), transparent);
  pointer-events: none;
}
.results-emoji { font-size: 4rem; margin-bottom: 1rem; }
.results-card h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.results-card p { color: var(--text-secondary); margin-bottom: 1.5rem; }

.results-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}
.breakdown-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
}
.breakdown-num { font-size: 1.6rem; font-weight: 800; }
.breakdown-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; }
.breakdown-item.easy-bd .breakdown-num   { color: var(--easy-color); }
.breakdown-item.medium-bd .breakdown-num { color: var(--medium-color); }
.breakdown-item.hard-bd .breakdown-num   { color: var(--hard-color); }

.results-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  line-height: 1.8;
}
.footer-note { margin-top: 4px; font-size: 0.75rem; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .q-card { padding: 1.5rem; }
  .hero-content h1 { font-size: clamp(2.2rem, 10vw, 4rem); }
  .results-breakdown { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 420px) {
  .hero-stats { flex-direction: column; align-items: center; }
  .results-breakdown { grid-template-columns: 1fr; }
  .results-actions { flex-direction: column; }
}

/* ═══════════════════════════════════════════════
   APP WRAPPER (blur gate)
═══════════════════════════════════════════════ */
#appWrapper {
  transition: filter 0.4s ease, opacity 0.4s ease;
}
#appWrapper.blurred {
  filter: blur(6px) brightness(0.4);
  pointer-events: none;
  user-select: none;
}

/* ═══════════════════════════════════════════════
   AUTH OVERLAY
═══════════════════════════════════════════════ */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;

  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;

  background: radial-gradient(ellipse 90% 70% at 50% 10%, rgba(251,191,36,0.06), transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 90%, rgba(96,165,250,0.05), transparent 50%),
              rgba(10,13,20,0.75);
  backdrop-filter: blur(24px);
}
.auth-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Floating orbs inside overlay */
.auth-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: floatOrb 16s ease-in-out infinite;
}
.auth-orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, #fbbf24, transparent 70%); top: -150px; left: -80px; animation-delay: 0s; }
.auth-orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, #60a5fa, transparent 70%); bottom: 0; right: -80px; animation-delay: -6s; }
.auth-orb-3 { width: 280px; height: 280px; background: radial-gradient(circle, #a78bfa, transparent 70%); bottom: 30%; left: 5%; animation-delay: -12s; }

/* ─── Auth Card ─── */
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: rgba(15,18,28,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2.25rem 2rem;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.6),
    0 0 0 1px rgba(251,191,36,0.06) inset,
    0 1px 0 rgba(255,255,255,0.08) inset;
  animation: authCardIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  backdrop-filter: blur(20px);
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Branding ─── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
}
.auth-logo {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(249,115,22,0.15));
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 24px rgba(251,191,36,0.15);
}
.auth-brand-text { display: flex; flex-direction: column; }
.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.auth-title-accent {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3px;
  font-weight: 600;
}

/* ─── Tabs ─── */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 1.75rem;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 9px 1rem;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
}
.auth-tab:hover { color: var(--text-secondary); }
.auth-tab-active {
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(249,115,22,0.12));
  border: 1px solid rgba(251,191,36,0.35) !important;
  color: var(--gold) !important;
  box-shadow: 0 2px 12px rgba(251,191,36,0.12);
}

/* ─── Forms ─── */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 1.1rem;
  animation: fadeInUp 0.3s ease;
}
.auth-form.form-active { display: flex; }

.field-group { display: flex; flex-direction: column; gap: 5px; }

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.forgot-link {
  color: var(--gold);
  font-size: 0.78rem;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 1; }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}
.auth-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 42px 11px 40px;
  font-family: var(--font-main);
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.auth-input::placeholder { color: var(--text-muted); font-size: 0.88rem; }
.auth-input:focus {
  border-color: rgba(251,191,36,0.55);
  background: rgba(251,191,36,0.04);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
}
.auth-input.input-error {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(248,113,113,0.15) !important;
}

.eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 4px;
}
.eye-btn:hover { opacity: 0.9; }

/* ─── Strength meter ─── */
.strength-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.strength-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 100px;
  overflow: hidden;
}
.strength-bar {
  height: 100%;
  border-radius: 100px;
  width: 0%;
  transition: width 0.4s ease, background 0.4s ease;
}
.strength-label {
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
  letter-spacing: 0.04em;
  transition: color 0.4s;
}

/* ─── Field errors ─── */
.field-error {
  display: none;
  font-size: 0.77rem;
  color: var(--red);
  font-weight: 500;
  padding-left: 2px;
  animation: fadeInUp 0.2s ease;
}
.general-error {
  text-align: center;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

/* ─── Submit button ─── */
.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 1rem;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #0a0d14;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(251,191,36,0.3);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  margin-top: 4px;
}
.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(251,191,36,0.45);
  filter: brightness(1.06);
}
.auth-submit-btn:active { transform: scale(0.98); }
.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s;
}
.auth-submit-btn:hover .btn-arrow { transform: translateX(3px); }

/* ─── Divider ─── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Guest button ─── */
.guest-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.guest-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-bright);
  color: var(--text-primary);
}

/* ─── Success toast ─── */
.auth-success-toast {
  position: absolute;
  bottom: -70px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(34,197,94,0.25), rgba(34,197,94,0.12));
  border: 1px solid rgba(34,197,94,0.4);
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 100px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease, bottom 0.3s ease;
  pointer-events: none;
}
.auth-success-toast.toast-visible {
  opacity: 1;
  bottom: -60px;
}

/* ─── Disclaimer ─── */
.auth-disclaimer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Form shake animation ─── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}
.form-shake { animation: shake 0.45s ease; }

/* ═══════════════════════════════════════════════
   USER CHIP (progress bar)
═══════════════════════════════════════════════ */
.progress-meta-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px 4px 6px;
  font-size: 0.8rem;
  animation: fadeInUp 0.3s ease;
}
.user-avatar {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0a0d14;
  flex-shrink: 0;
}
.user-name {
  color: var(--text-secondary);
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  transition: color 0.2s;
  line-height: 1;
}
.logout-btn:hover { color: var(--red); }

/* ─── Auth responsive ─── */
@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.5rem 1.75rem; }
  .auth-title { font-size: 1.15rem; }
  .progress-meta { flex-direction: column; gap: 6px; }
  .progress-meta-right { justify-content: space-between; }
}

/* ═══════════════════════════════════════════════
   BACK BUTTON (quiz page → dashboard)
═══════════════════════════════════════════════ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.back-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-bright);
  background: rgba(255,255,255,0.05);
  transform: translateX(-2px);
}
.back-arrow {
  font-size: 1rem;
  transition: transform 0.2s;
}
.back-btn:hover .back-arrow { transform: translateX(-3px); }
.back-label { white-space: nowrap; }

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}
.nav-subject-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
@media (max-width: 560px) { .nav-subject-label { display: none; } }

/* ═══════════════════════════════════════════════
   SHARED AUTH CARD STYLES (used in login.html)
═══════════════════════════════════════════════ */
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -40px) scale(1.05); }
  66%       { transform: translate(-20px, 25px) scale(0.95); }
}

/* ═══════════════════════════════════════════════
   ABOUT SECTION
═══════════════════════════════════════════════ */
.about-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.about-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}
.about-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.about-avatar {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0a0d14;
  flex-shrink: 0;
  border: 4px solid var(--border);
  box-shadow: 0 0 0 1px var(--border-bright);
}
.about-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.about-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.about-body p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.instagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.instagram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 39, 67, 0.4);
}

/* =====================================================
   MOBILE OVERRIDES (Global)
   ===================================================== */
@media (max-width: 768px) {
  :root {
    --radius-lg: 16px;
    --radius-xl: 20px;
  }

  .hero h1 { font-size: 2.5rem !important; }
  .hero-content { padding: 1.5rem !important; }

  /* 💡 Navigation / Header */
  .dashboard-header {
    flex-direction: column !important;
    gap: 1rem !important;
    padding: 1.5rem !important;
    text-align: center !important;
  }
  .header-actions {
    width: 100% !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  .user-profile {
    padding: 6px 12px !important;
  }
  .logout-btn {
    padding: 8px 12px !important;
  }

  /* 💡 Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* 💡 Subjects Grid */
  .subjects-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* 💡 Sections */
  section {
    padding: 3rem 1.25rem !important;
  }

  .section-title {
    font-size: 1.75rem !important;
  }

  /* 💡 Footer */
  .site-footer {
    padding: 2rem 1rem !important;
    font-size: 0.8rem !important;
  }

  /* 💡 Quiz Cards */
  .question-card {
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* Specific fix for Quiz Filters */
@media (max-width: 600px) {
  .categories-nav {
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding-bottom: 12px !important;
    justify-content: flex-start !important;
    display: flex !important;
    gap: 8px !important;
    -webkit-overflow-scrolling: touch;
  }
  .category-btn {
    flex: 0 0 auto !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
  }
}

