/* ============================================================
   QuizMaster — Arcade Cosmos Design System
   Retro-Future Arcade Aesthetic
   ============================================================ */

/* 1. GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');


/* 2. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Backgrounds */
  --bg:        #070711;
  --bg-2:      #0e0e1f;
  --bg-3:      #161628;
  --surface:   #1a1a30;
  --surface-2: #22223a;

  /* Borders */
  --border:        rgba(139, 92, 246, 0.2);
  --border-bright: rgba(139, 92, 246, 0.5);

  /* Typography */
  --ink:   #e8e6f0;
  --ink-2: #a89ec0;
  --ink-3: #6b6480;

  /* Neon palette */
  --neon-v: #8b5cf6;
  --neon-c: #06b6d4;
  --neon-y: #f59e0b;
  --neon-g: #10b981;
  --neon-r: #ef4444;
  --neon-p: #ec4899;

  /* Glow shadows */
  --glow-v: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 40px rgba(139, 92, 246, 0.2);
  --glow-c: 0 0 20px rgba(6, 182, 212, 0.4),  0 0 40px rgba(6, 182, 212, 0.2);
  --glow-y: 0 0 20px rgba(245, 158, 11, 0.4), 0 0 40px rgba(245, 158, 11, 0.2);

  /* Radius */
  --radius:    4px;
  --radius-lg: 8px;

  /* Fonts */
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  /* Transitions */
  --transition:    0.2s ease;
  --transition-lg: 0.3s ease;

  /* Navbar */
  --nav-bg: rgba(7, 7, 17, 0.85);

  /* ── Backwards-compatibility aliases (old templates) ── */
  --text:       #e8e6f0;
  --text-2:     #a89ec0;
  --text-3:     #6b6480;
  --glass:      rgba(26, 26, 48, 0.8);
  --glass-border: rgba(139, 92, 246, 0.2);
  --violet:     #8b5cf6;
  --cyan:       #06b6d4;
  --pink:       #ec4899;
  --green:      #10b981;
  --gold:       #f59e0b;
  --orange:     #f59e0b;
  --gradient:   linear-gradient(135deg, #8b5cf6, #06b6d4);
  --t:          0.2s ease;
  --t-spring:   0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius-sm:  4px;
  --glow-violet: 0 0 20px rgba(139,92,246,0.4), 0 0 40px rgba(139,92,246,0.2);
  --bg-card:       #1a1a30;
  --bg-card-hover: #22223a;
  --border-subtle: rgba(139,92,246,0.15);
  --red:           #ef4444;
}

[data-theme="light"] {
  --bg:        #f0eeff;
  --bg-2:      #e8e4ff;
  --bg-3:      #ddd8ff;
  --surface:   #ffffff;
  --surface-2: #f5f3ff;

  --border:        rgba(139, 92, 246, 0.2);
  --border-bright: rgba(139, 92, 246, 0.5);

  --ink:   #1a1040;
  --ink-2: #3d3260;
  --ink-3: #6b5fa0;

  --neon-v: #7c3aed;
  --neon-c: #0891b2;
  --neon-y: #d97706;
  --neon-g: #059669;
  --neon-r: #dc2626;
  --neon-p: #db2777;

  --glow-v: 0 0 12px rgba(124, 58, 237, 0.3);
  --glow-c: 0 0 12px rgba(8, 145, 178, 0.3);
  --glow-y: 0 0 12px rgba(217, 119, 6, 0.3);

  --nav-bg: rgba(240, 238, 255, 0.85);

  /* ── Backwards-compatibility aliases (old templates) ── */
  --text:       #1a1040;
  --text-2:     #3d3260;
  --text-3:     #6b5fa0;
  --glass:      rgba(255, 255, 255, 0.8);
  --glass-border: rgba(139, 92, 246, 0.2);
  --violet:     #7c3aed;
  --cyan:       #0891b2;
  --pink:       #db2777;
  --green:      #059669;
  --gold:       #d97706;
  --orange:     #d97706;
  --gradient:   linear-gradient(135deg, #7c3aed, #0891b2);
  --glow-violet: 0 0 12px rgba(124,58,237,0.3);
  --bg-card:       #ffffff;
  --bg-card-hover: #f5f3ff;
  --border-subtle: rgba(139,92,246,0.15);
  --red:           #dc2626;
}


/* 3. BASE RESET & BODY
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-lg), color var(--transition-lg);
}

a {
  color: var(--neon-v);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--neon-c);
}

img,
video {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font-sans);
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}


/* 4. SCROLLBAR STYLES
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--neon-v);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-c);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon-v) var(--bg-2);
}


/* 5. SCANLINES — DARK THEME ONLY
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

[data-theme="light"] body::before {
  display: none;
}


/* 6. NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-lg), border-color var(--transition-lg);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition);
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--neon-v);
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--neon-v), var(--neon-c));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--glow-v);
}

.nav-logo .logo-text {
  letter-spacing: 0.05em;
}

.nav-logo .logo-text span {
  color: var(--neon-v);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav-link.active {
  color: var(--neon-v);
  background: rgba(139, 92, 246, 0.1);
}

.nav-link.active:hover {
  color: var(--neon-v);
  background: rgba(139, 92, 246, 0.15);
}

.nav-link .nav-icon {
  font-size: 0.875rem;
  opacity: 0.8;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.5rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--surface-2);
  color: var(--neon-y);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--neon-v);
  object-fit: cover;
  flex-shrink: 0;
}

.nav-username {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}


/* 7. MOBILE HAMBURGER
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.5rem;
  transition: background var(--transition), border-color var(--transition);
}

.nav-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-bright);
}

.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink-2);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.nav-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--neon-v);
}

.nav-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--neon-v);
}


/* 8. MOBILE MENU PANEL
   ============================================================ */
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1099;
  background: rgba(7, 7, 17, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition-lg);
}

.mobile-backdrop.visible {
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  width: 300px;
  max-width: 90vw;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-lg);
  overflow-y: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.mobile-menu-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-r);
  border-color: var(--neon-r);
}

.mobile-menu-nav {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.mobile-nav-link:hover {
  color: var(--ink);
  background: var(--surface);
}

.mobile-nav-link.active {
  color: var(--neon-v);
  background: rgba(139, 92, 246, 0.1);
}

.mobile-nav-link .mobile-nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.mobile-nav-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.mobile-nav-section-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 1rem 0.5rem;
}

.mobile-menu-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-theme-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  width: 100%;
}

.mobile-theme-btn:hover {
  background: var(--surface-2);
  color: var(--neon-y);
  border-color: rgba(245, 158, 11, 0.4);
}

.mobile-theme-btn .theme-icon {
  font-size: 1rem;
}


/* 9. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--neon-v);
  color: #fff;
  border-color: var(--neon-v);
}

.btn-primary:hover {
  background: transparent;
  color: var(--neon-v);
  box-shadow: var(--glow-v);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--border-bright);
  color: var(--ink);
}

.btn-cyan {
  background: var(--neon-c);
  color: #fff;
  border-color: var(--neon-c);
}

.btn-cyan:hover {
  background: transparent;
  color: var(--neon-c);
  box-shadow: var(--glow-c);
}

.btn-outline {
  background: transparent;
  color: var(--neon-v);
  border-color: var(--neon-v);
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.12);
  box-shadow: var(--glow-v);
  color: var(--neon-v);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-icon:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border-bright);
}

.btn-icon.danger {
  color: var(--neon-r);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-icon.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--neon-r);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.btn-icon.sm {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
}


/* 10. ARCADE CARD
   ============================================================ */
.arcade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  clip-path: polygon(
    0 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% 100%,
    14px 100%,
    0 calc(100% - 14px)
  );
  position: relative;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.arcade-card:hover {
  border-color: var(--border-bright);
}

.arcade-card::after {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% 100%,
    14px 100%,
    0 calc(100% - 14px)
  );
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.arcade-card.glow:hover::after {
  border-color: var(--neon-v);
  box-shadow: var(--glow-v);
}


/* 11. FLASH MESSAGES
   ============================================================ */
.flash-container {
  position: fixed;
  top: 80px;
  right: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 400px;
  width: calc(100vw - 2.5rem);
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease;
  position: relative;
  overflow: hidden;
}

.flash::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.flash-success {
  border-color: rgba(16, 185, 129, 0.3);
}

.flash-success::before {
  background: var(--neon-g);
}

.flash-success .flash-icon {
  color: var(--neon-g);
}

.flash-danger,
.flash-error {
  border-color: rgba(239, 68, 68, 0.3);
}

.flash-danger::before,
.flash-error::before {
  background: var(--neon-r);
}

.flash-danger .flash-icon,
.flash-error .flash-icon {
  color: var(--neon-r);
}

.flash-warning {
  border-color: rgba(245, 158, 11, 0.3);
}

.flash-warning::before {
  background: var(--neon-y);
}

.flash-warning .flash-icon {
  color: var(--neon-y);
}

.flash-info {
  border-color: rgba(6, 182, 212, 0.3);
}

.flash-info::before {
  background: var(--neon-c);
}

.flash-info .flash-icon {
  color: var(--neon-c);
}

.flash-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.flash-message {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink);
}

.flash-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.flash-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}


/* 12. HERO SECTION
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 64px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    var(--bg);
}

#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border-bright);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-v);
}

.hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-v);
  box-shadow: 0 0 8px var(--neon-v);
  animation: pulse-glow 2s infinite;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  max-width: 900px;
}

.hero-title .highlight {
  color: var(--neon-v);
  text-shadow: var(--glow-v);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--ink-2);
  max-width: 600px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
}

.hero-scroll:hover {
  color: var(--neon-v);
}

.hero-scroll .scroll-arrow {
  font-size: 1.2rem;
}


/* 13. STATS STRIP
   ============================================================ */
.stats-strip {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  overflow: hidden;
}

.stats-strip-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  padding: 0.5rem 1rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--neon-v);
  line-height: 1;
  text-shadow: var(--glow-v);
}

.stat-value.cyan {
  color: var(--neon-c);
  text-shadow: var(--glow-c);
}

.stat-value.yellow {
  color: var(--neon-y);
  text-shadow: var(--glow-y);
}

.stat-value.green {
  color: var(--neon-g);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* 14. SECTION HEADERS
   ============================================================ */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-c);
  margin-bottom: 0.75rem;
}

.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--neon-c);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-title .accent {
  color: var(--neon-v);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 560px;
  line-height: 1.7;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin: 0 auto;
}

.section-header.centered .section-eyebrow {
  justify-content: center;
}


/* 15. QUIZ LIST
   ============================================================ */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition-lg);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

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

.quiz-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.quiz-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.12);
  color: var(--neon-v);
  border: 1px solid rgba(139, 92, 246, 0.25);
  white-space: nowrap;
}

.quiz-category-badge.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--neon-c);
  border-color: rgba(6, 182, 212, 0.25);
}

.quiz-category-badge.yellow {
  background: rgba(245, 158, 11, 0.12);
  color: var(--neon-y);
  border-color: rgba(245, 158, 11, 0.25);
}

.quiz-category-badge.green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--neon-g);
  border-color: rgba(16, 185, 129, 0.25);
}

.quiz-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.quiz-description {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quiz-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.quiz-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.quiz-meta-item .meta-icon {
  font-size: 0.85rem;
}

.quiz-difficulty {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
}

.quiz-difficulty.easy {
  color: var(--neon-g);
  background: rgba(16, 185, 129, 0.1);
}

.quiz-difficulty.medium {
  color: var(--neon-y);
  background: rgba(245, 158, 11, 0.1);
}

.quiz-difficulty.hard {
  color: var(--neon-r);
  background: rgba(239, 68, 68, 0.1);
}

.quiz-difficulty.expert {
  color: var(--neon-p);
  background: rgba(236, 72, 153, 0.1);
}


/* 16. CATEGORY FILTER
   ============================================================ */
.category-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--border);
}

.filter-btn.active {
  color: var(--neon-v);
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink-3);
}

.filter-btn.active .filter-count {
  background: rgba(139, 92, 246, 0.2);
  color: var(--neon-v);
}


/* 17. FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: var(--neon-r);
  margin-left: 0.2rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--neon-v);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: var(--bg-3);
}

.form-control::placeholder {
  color: var(--ink-3);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6480' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.form-error {
  font-size: 0.78rem;
  color: var(--neon-r);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}


/* 18. AUTH PAGES
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.auth-left {
  position: relative;
  background:
    radial-gradient(ellipse 80% 70% at 30% 40%, rgba(139, 92, 246, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 70%, rgba(6, 182, 212, 0.2) 0%, transparent 50%),
    var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(139, 92, 246, 0.02) 2px,
    rgba(139, 92, 246, 0.02) 4px
  );
  pointer-events: none;
}

.auth-visual {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.auth-visual-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.auth-visual-title .accent {
  color: var(--neon-v);
  display: block;
  text-shadow: var(--glow-v);
}

.auth-visual-text {
  color: var(--ink-2);
  max-width: 380px;
  line-height: 1.7;
}

.auth-visual-orb {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.5), rgba(6, 182, 212, 0.2), transparent 70%);
  border: 1px solid var(--border-bright);
  position: relative;
  animation: float 6s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: var(--glow-v);
}

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.auth-title {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 2rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--ink-3);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-top: 1.5rem;
}

.auth-footer-link a {
  color: var(--neon-v);
  font-weight: 600;
}

.auth-footer-link a:hover {
  color: var(--neon-c);
}


/* 19. LEADERBOARD
   ============================================================ */
.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.4rem;
}

.leaderboard-table thead th {
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.leaderboard-table thead th:last-child {
  text-align: right;
}

.leaderboard-table tbody tr {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.leaderboard-table tbody tr:hover {
  background: var(--surface-2);
  border-color: var(--border-bright);
}

.leaderboard-table tbody td {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--ink);
  vertical-align: middle;
}

.leaderboard-table tbody td:last-child {
  text-align: right;
}

.rank-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  width: 60px;
  color: var(--ink-3);
}

.rank-1 .rank-cell {
  color: var(--neon-y);
  text-shadow: var(--glow-y);
  font-size: 1.2rem;
}

.rank-2 .rank-cell {
  color: #94a3b8;
  font-size: 1.1rem;
}

.rank-3 .rank-cell {
  color: #cd7f32;
  font-size: 1.05rem;
}

.rank-1 {
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.rank-2 {
  border-color: rgba(148, 163, 184, 0.3) !important;
}

.rank-3 {
  border-color: rgba(205, 127, 50, 0.3) !important;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--ink-3);
  overflow: hidden;
}

.avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}

.avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
}

.player-name {
  font-weight: 600;
  color: var(--ink);
}

.player-handle {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.score-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--neon-v);
}


/* 20. PROFILE PAGE
   ============================================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 80px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.profile-avatar-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--neon-v);
  object-fit: cover;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--ink-3);
  box-shadow: var(--glow-v);
  overflow: hidden;
  position: relative;
}

.profile-username {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 0.25rem;
}

.profile-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.12);
  color: var(--neon-v);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.profile-bio {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.profile-joined {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  margin-top: 0.5rem;
}

.profile-stat {
  background: var(--surface);
  padding: 0.85rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: background var(--transition);
}

.profile-stat:hover {
  background: var(--surface-2);
}

.profile-stat-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--neon-v);
}

.profile-stat-label {
  font-size: 0.7rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color var(--transition), background var(--transition);
  text-decoration: none;
  color: inherit;
}

.result-card:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
  color: inherit;
}

.result-card-info {
  flex: 1;
  min-width: 0;
}

.result-card-title {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-card-meta {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

.result-card-score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--neon-v);
  flex-shrink: 0;
}

.result-card-score.high {
  color: var(--neon-g);
}

.result-card-score.mid {
  color: var(--neon-y);
}

.result-card-score.low {
  color: var(--neon-r);
}


/* 21. QUIZ PLAY
   ============================================================ */
.quiz-play {
  min-height: calc(100vh - 64px);
  padding-top: 64px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.quiz-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.quiz-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.quiz-header-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.quiz-header-sub {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.quiz-progress {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  flex: 1;
  max-width: 300px;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-v), var(--neon-c));
  border-radius: 2px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.quiz-progress-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.quiz-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.question-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-c);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-number::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--neon-c);
}

.question-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.option-btn:hover {
  background: var(--bg-3);
  border-color: var(--border-bright);
  box-shadow: var(--glow-v);
}

.option-btn.selected {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--neon-v);
  color: var(--ink);
  box-shadow: var(--glow-v);
}

.option-btn.correct {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--neon-g);
  color: var(--ink);
}

.option-btn.wrong {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--neon-r);
  color: var(--ink);
}

.option-btn:disabled {
  cursor: not-allowed;
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.option-btn.selected .option-letter {
  background: var(--neon-v);
  color: #fff;
  border-color: var(--neon-v);
}

.option-btn.correct .option-letter {
  background: var(--neon-g);
  color: #fff;
  border-color: var(--neon-g);
}

.option-btn.wrong .option-letter {
  background: var(--neon-r);
  color: #fff;
  border-color: var(--neon-r);
}

.option-text {
  line-height: 1.5;
  flex: 1;
}

/* Timer Ring */
.timer-ring {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.timer-ring svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

.timer-ring circle {
  fill: none;
  stroke-width: 3;
}

.timer-ring .timer-track {
  stroke: var(--surface-2);
}

.timer-ring .timer-fill {
  stroke: var(--neon-v);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke var(--transition);
}

.timer-ring .timer-fill.warning {
  stroke: var(--neon-y);
}

.timer-ring .timer-fill.danger {
  stroke: var(--neon-r);
}

.timer-ring .timer-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.quiz-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}


/* 22. RESULT PAGE
   ============================================================ */
.result-hero {
  padding: 4rem 0 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
    var(--bg);
}

.result-score-display {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid var(--border-bright);
  background: var(--surface);
  margin: 0 auto 1.5rem;
  box-shadow: var(--glow-v);
}

.result-score-display::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.result-score-number {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--neon-v);
  text-shadow: var(--glow-v);
  line-height: 1;
}

.result-score-suffix {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--ink-3);
  align-self: flex-end;
  margin-bottom: 0.5rem;
}

.result-grade {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid;
  margin-bottom: 1.5rem;
}

.result-grade.s {
  color: var(--neon-v);
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.1);
}

.result-grade.a {
  color: var(--neon-g);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.result-grade.b {
  color: var(--neon-c);
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.1);
}

.result-grade.c {
  color: var(--neon-y);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}

.result-grade.d {
  color: var(--neon-r);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.result-stats-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.result-stat-box {
  flex: 1;
  background: var(--surface);
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background var(--transition);
}

.result-stat-box:hover {
  background: var(--surface-2);
}

.result-stat-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--neon-v);
  line-height: 1;
}

.result-stat-val.green {
  color: var(--neon-g);
}

.result-stat-val.red {
  color: var(--neon-r);
}

.result-stat-val.yellow {
  color: var(--neon-y);
}

.result-stat-lbl {
  font-size: 0.72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.answer-review {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.answer-review-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.answer-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
}

.answer-item.correct {
  border-color: rgba(16, 185, 129, 0.3);
}

.answer-item.wrong {
  border-color: rgba(239, 68, 68, 0.3);
}

.answer-status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.answer-item.correct .answer-status-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-g);
}

.answer-item.wrong .answer-status-icon {
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-r);
}

.answer-content {
  flex: 1;
  min-width: 0;
}

.answer-question-text {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.answer-choices {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.answer-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.answer-choice.user-answer.correct {
  color: var(--neon-g);
  font-weight: 600;
}

.answer-choice.user-answer.wrong {
  color: var(--neon-r);
  text-decoration: line-through;
}

.answer-choice.correct-answer {
  color: var(--neon-g);
  font-weight: 600;
}


/* 23. ADMIN PANEL
   ============================================================ */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - 64px);
  padding-top: 64px;
}

.admin-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav-card {
  padding: 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-nav-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.5rem 0.75rem 0.35rem;
  margin-bottom: 0.15rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.admin-nav-link:hover {
  color: var(--ink);
  background: var(--surface);
}

.admin-nav-link.active {
  color: var(--neon-v);
  background: rgba(139, 92, 246, 0.1);
}

.admin-nav-link .admin-nav-icon {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.8;
}

.admin-nav-link.active .admin-nav-icon {
  opacity: 1;
}

.admin-content {
  padding: 2rem 2.5rem;
  min-width: 0;
  overflow-y: auto;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.admin-page-title {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
}

.admin-page-title .title-accent {
  color: var(--neon-v);
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-stat-card:hover {
  border-color: var(--border-bright);
}

.admin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: rgba(139, 92, 246, 0.1);
  color: var(--neon-v);
}

.admin-stat-icon.cyan {
  background: rgba(6, 182, 212, 0.1);
  color: var(--neon-c);
}

.admin-stat-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--neon-g);
}

.admin-stat-icon.yellow {
  background: rgba(245, 158, 11, 0.1);
  color: var(--neon-y);
}

.admin-stat-info {
  flex: 1;
  min-width: 0;
}

.admin-stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.admin-stat-label {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: 0.25rem;
}

/* Data Table */
.data-table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.data-table thead th {
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  white-space: nowrap;
}

.data-table thead th:last-child {
  text-align: right;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--surface-2);
}

.data-table tbody td {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: var(--ink);
  vertical-align: middle;
}

.data-table tbody td:last-child {
  text-align: right;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.table-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.table-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-search input {
  padding: 0.45rem 0.85rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
  font-family: var(--font-sans);
}

.table-search input:focus {
  border-color: var(--neon-v);
}

.table-search input::placeholder {
  color: var(--ink-3);
}


/* 24. FOOTER
   ============================================================ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  width: fit-content;
}

.footer-logo:hover {
  color: var(--neon-v);
}

.footer-logo .logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--neon-v), var(--neon-c));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 260px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-v);
  width: fit-content;
}

.footer-nav-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-info {
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.footer-copy a {
  color: var(--neon-v);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-3);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}

.footer-socials a:hover {
  background: var(--surface-2);
  color: var(--neon-v);
  border-color: var(--border-bright);
}

.ornament-footer {
  text-align: center;
  padding: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  opacity: 0.5;
  user-select: none;
}


/* 25. PAGE LAYOUT
   ============================================================ */
.page {
  padding-top: 64px;
  min-height: 100vh;
}

.page-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-header-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-c);
  margin-bottom: 0.5rem;
}

.page-header-title {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container.narrow {
  max-width: 860px;
}

.container.wide {
  max-width: 1440px;
}

.section {
  padding: 5rem 0;
}

.section.sm {
  padding: 3rem 0;
}

.section.lg {
  padding: 7rem 0;
}


/* 26. UTILITY CLASSES
   ============================================================ */
.text-neon-v { color: var(--neon-v); }
.text-neon-c { color: var(--neon-c); }
.text-neon-y { color: var(--neon-y); }
.text-neon-g { color: var(--neon-g); }
.text-neon-r { color: var(--neon-r); }
.text-neon-p { color: var(--neon-p); }

.mono {
  font-family: var(--font-mono);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.1);
  color: var(--neon-v);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.badge.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--neon-g);
  border-color: rgba(16, 185, 129, 0.25);
}

.badge.yellow {
  background: rgba(245, 158, 11, 0.1);
  color: var(--neon-y);
  border-color: rgba(245, 158, 11, 0.25);
}

.badge.cyan {
  background: rgba(6, 182, 212, 0.1);
  color: var(--neon-c);
  border-color: rgba(6, 182, 212, 0.25);
}

.badge.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--neon-r);
  border-color: rgba(239, 68, 68, 0.25);
}

.badge.pink {
  background: rgba(236, 72, 153, 0.1);
  color: var(--neon-p);
  border-color: rgba(236, 72, 153, 0.25);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 5rem 2rem;
  text-align: center;
  color: var(--ink-3);
}

.empty-state .empty-icon {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.empty-state .empty-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-2);
}

.empty-state .empty-text {
  font-size: 0.875rem;
  max-width: 360px;
  line-height: 1.6;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible,
.reveal.revealed,
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.w-full    { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }

.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }

.text-ink   { color: var(--ink); }
.text-ink-2 { color: var(--ink-2); }
.text-ink-3 { color: var(--ink-3); }

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-bright);
}

.card-header {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}


/* 27. ANIMATIONS
   ============================================================ */

/* Glitch */
@keyframes glitch {
  0%, 100% {
    transform: translate(0);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  2% {
    clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%);
    transform: translate(-3px, 2px);
  }
  4% {
    clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%);
    transform: translate(3px, -2px);
  }
  6% {
    clip-path: polygon(0 40%, 100% 40%, 100% 55%, 0 55%);
    transform: translate(-2px, 1px);
  }
  8% {
    transform: translate(0);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  92% {
    transform: translate(0);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  94% {
    clip-path: polygon(0 20%, 100% 20%, 100% 35%, 0 35%);
    transform: translate(2px, -3px);
  }
  96% {
    clip-path: polygon(0 70%, 100% 70%, 100% 85%, 0 85%);
    transform: translate(-2px, 3px);
  }
  98% {
    transform: translate(1px, -1px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch::before {
  color: var(--neon-c);
  animation: glitch 4s infinite linear;
  animation-delay: 0.1s;
  opacity: 0.8;
  left: 2px;
}

.glitch::after {
  color: var(--neon-v);
  animation: glitch 4s infinite linear reverse;
  animation-delay: 0.2s;
  opacity: 0.8;
  left: -2px;
}

/* Bounce */
@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

/* Pulse Glow */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 6px currentColor;
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 2px currentColor;
  }
}

/* Float */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-14px);
  }
}

/* Spin */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* Slide In Right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Neon Flicker */
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.6; }
}

.flicker {
  animation: flicker 5s infinite;
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fadeInUp  { animation: fadeInUp 0.5s ease both; }
.animate-scaleIn   { animation: scaleIn 0.4s ease both; }
.animate-float     { animation: float 6s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }


/* 28. RESPONSIVE MEDIA QUERIES
   ============================================================ */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .admin-layout {
    grid-template-columns: 200px 1fr;
  }

  .admin-content {
    padding: 1.5rem;
  }

  .profile-layout {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-menu {
    display: none;
  }

  .nav-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-backdrop {
    display: block;
  }

  /* Auth */
  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    min-height: 100vh;
    padding: 5rem 1rem 2rem;
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  /* Hero */
  #hero {
    min-height: auto;
    padding-top: 64px;
  }

  .hero-inner {
    padding: 3rem 1rem 5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  /* Stats */
  .stats-strip-inner {
    gap: 0;
  }

  .stat-item {
    padding: 0.5rem 0.75rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  /* Quiz grid */
  .quiz-grid {
    grid-template-columns: 1fr;
  }

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

  /* Admin */
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5rem;
    overflow-x: auto;
    gap: 0;
  }

  .admin-nav-card {
    flex-direction: row;
    padding: 0;
  }

  .admin-nav-title {
    display: none;
  }

  .admin-nav-link {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .admin-content {
    padding: 1.25rem;
  }

  /* Profile */
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }

  /* Leaderboard — hide extra columns */
  .leaderboard-table thead th:nth-child(n+4) {
    display: none;
  }

  .leaderboard-table tbody td:nth-child(n+4) {
    display: none;
  }

  /* Form row */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Question card */
  .question-card {
    padding: 1.25rem;
  }

  /* Quiz header */
  .quiz-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .quiz-progress {
    width: 100%;
    max-width: none;
    order: 3;
  }

  /* Result stats */
  .result-stats-row {
    gap: 0;
  }

  .result-stat-box {
    padding: 1rem 0.5rem;
  }

  .result-score-display {
    width: 140px;
    height: 140px;
  }

  .result-score-number {
    font-size: 2.5rem;
  }

  /* Section padding */
  .section {
    padding: 3rem 0;
  }

  .section.lg {
    padding: 4rem 0;
  }

  /* Category filter horizontal scroll */
  .category-filter {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  /* Page header */
  .page-header {
    padding: 1.75rem 0;
  }

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

  /* Flash */
  .flash-container {
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
    width: auto;
  }

  /* Table scroll */
  .data-table-wrapper {
    overflow-x: auto;
  }

  /* Table header stacked */
  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-search {
    width: 100%;
  }

  .table-search input {
    width: 100%;
    flex: 1;
  }

  /* Admin page header stacked */
  .admin-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-badge {
    font-size: 0.65rem;
  }

  .quiz-card {
    padding: 1.1rem;
  }

  .result-stats-row {
    flex-direction: column;
  }

  .result-stat-box {
    border-top: 1px solid var(--border);
  }

  .result-stat-box:first-child {
    border-top: none;
  }

  .option-btn {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .answer-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* ── Backwards-compatibility layout classes ── */

/* Glass card (old templates) */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(12px);
}
.glass-card:hover {
  border-color: var(--border-bright);
}

/* Hero section (old index.html) */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 50%),
    var(--bg);
  padding-top: 64px;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 1.5rem 6rem;
}
.hero-title {
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--ink);
}
.hero-subtitle {
  color: var(--ink-2);
  line-height: 1.6;
}
.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.ring-1 { width: 300px; height: 300px; top: -150px; right: -150px; }
.ring-2 { width: 500px; height: 500px; top: -250px; right: -250px; opacity: 0.5; }
.ring-3 { width: 700px; height: 700px; top: -350px; right: -350px; opacity: 0.2; }
.floating-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  animation: float 4s ease-in-out infinite;
}
.card-1 { position: absolute; top: -60px; right: 160px; animation-delay: 0s; }
.card-2 { position: absolute; top: 80px;  right: 20px;  animation-delay: -1.5s; }
.card-3 { position: absolute; top: 220px; right: 140px; animation-delay: -3s; }

/* Gradient text */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* pulseSlow animation used by index.html orbs */
@keyframes pulseSlow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

/* Quizzes grid */
.quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) {
  .quizzes-grid { grid-template-columns: 1fr; }
}

/* Quiz card header row */
.quiz-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0;
}
.quiz-cat-icon { font-size: 1.1rem; }
.quiz-cat-name { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.5px; }
.quiz-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.quiz-desc  { font-size: 0.85rem; color: var(--ink-2); line-height: 1.5; }
.quiz-meta  { display: flex; flex-wrap: wrap; gap: 12px; }
.quiz-meta-item { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--ink-3); font-family: var(--font-mono); }
.quiz-meta-item i { font-size: 0.7rem; color: var(--neon-v); }

/* Difficulty badges */
.difficulty-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}
.difficulty-easy   { background: rgba(16,185,129,0.15);  color: var(--neon-g); border: 1px solid rgba(16,185,129,0.3); }
.difficulty-medium { background: rgba(245,158,11,0.15);  color: var(--neon-y); border: 1px solid rgba(245,158,11,0.3); }
.difficulty-hard   { background: rgba(239,68,68,0.15);   color: var(--neon-r); border: 1px solid rgba(239,68,68,0.3); }

/* Categories grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 24px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--cat-color, 139, 92, 246), 0.2);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.category-glow {
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--cat-color, var(--neon-v));
}
.category-icon { font-size: 2.5rem; line-height: 1; }
.category-name { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.category-desc { font-size: 0.82rem; color: var(--ink-2); line-height: 1.5; }
.category-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.category-count { font-size: 0.75rem; color: var(--ink-3); font-family: var(--font-mono); }
.category-arrow { color: var(--neon-v); font-size: 0.9rem; }

/* Section header row */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -0.5px; }
.section-subtitle { color: var(--ink-2); margin-top: 8px; font-size: 1rem; }
.section-link { display: inline-flex; align-items: center; gap: 6px; color: var(--neon-v); font-weight: 600; font-size: 0.875rem; white-space: nowrap; margin-top: 4px; }
.section-link:hover { color: var(--neon-c); }

/* Page section */
.page-section { padding: 48px 0; }

/* Input wrapper (old login.html) */
.input-wrapper { position: relative; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  border-color: var(--neon-v);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.form-input::placeholder { color: var(--ink-3); }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.85rem;
}
.form-input:has(+ .input-icon), .input-icon + .form-input,
.input-wrapper .form-input { padding-left: 42px; }
.input-toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink-3);
}
.btn-full { width: 100%; justify-content: center; }

/* auth-header / auth-form used in old login.html */
.auth-header { text-align: center; margin-bottom: 2rem; }

/* ── Quiz play section legacy classes ── */
.quiz-play-section {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px 80px;
  padding-top: 84px;
}

/* Loading / submitting screens */
.quiz-loading, .quiz-submitting {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; min-height: 300px; color: var(--ink-2); font-size: 1rem;
}
.loading-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--neon-v);
  animation: spin 0.8s linear infinite;
}

/* Start card */
.quiz-start {
  max-width: 520px; width: 100%; padding: 40px; text-align: center;
}
.start-icon { font-size: 4rem; margin-bottom: 16px; }
.start-title { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.start-desc { color: var(--ink-2); font-size: 0.9rem; margin-bottom: 24px; line-height: 1.6; }
.start-rules { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; text-align: left; }
.rule-item { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--ink-2); padding: 8px 12px; background: var(--bg-2); border-radius: var(--radius); }
.rule-item strong { color: var(--ink); }

/* Progress bar (thin bar at top of question) */
.quiz-progress-bar {
  width: 100%; max-width: 820px; height: 4px; background: var(--surface-2);
  border-radius: 2px; overflow: hidden; margin-bottom: 12px;
}
.quiz-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--neon-v), var(--neon-c));
  border-radius: 2px; transition: width 0.4s ease;
}

/* Top bar (question counter + score) */
.quiz-top-bar {
  width: 100%; max-width: 820px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-3);
}
.quiz-score-display { display: flex; align-items: center; gap: 6px; }
.score-value { font-size: 1rem; font-weight: 700; color: var(--neon-v); }
.score-label { font-size: 0.78rem; color: var(--ink-3); }

/* Timer inside question card */
.timer-container {
  position: relative; width: 72px; height: 72px;
  flex-shrink: 0; align-self: flex-start;
}
.timer-svg { width: 72px; height: 72px; transform: rotate(-90deg); display: block; }
.timer-bg { fill: none; stroke: var(--surface-2); stroke-width: 4; }
.timer-ring { fill: none; stroke: var(--neon-v); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.3s; }
.timer-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--ink);
}

/* Question card with timer row */
.question-card {
  width: 100%; max-width: 820px;
  display: flex; flex-direction: column; gap: 20px;
}
.question-top-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}

/* Answer grid */
.answer-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media(max-width: 600px) { .answer-grid { grid-template-columns: 1fr; } }

.answer-btn {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; text-align: left;
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; color: var(--ink);
  transition: all 0.2s; line-height: 1.4;
}
.answer-btn:hover:not(:disabled) { border-color: var(--neon-v); background: rgba(139,92,246,0.07); }
.answer-btn.selected { border-color: var(--neon-v); background: rgba(139,92,246,0.1); }
.answer-btn.correct  { border-color: var(--neon-g); background: rgba(16,185,129,0.1); }
.answer-btn.wrong    { border-color: var(--neon-r); background: rgba(239,68,68,0.1); }
.answer-btn:disabled { cursor: not-allowed; }

.answer-letter {
  width: 26px; height: 26px; border-radius: var(--radius); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--ink-3);
  transition: all 0.2s;
}
.answer-btn.selected .answer-letter { background: var(--neon-v); color: #fff; border-color: var(--neon-v); }
.answer-btn.correct  .answer-letter { background: var(--neon-g); color: #fff; border-color: var(--neon-g); }
.answer-btn.wrong    .answer-letter { background: var(--neon-r); color: #fff; border-color: var(--neon-r); }

/* Feedback overlay */
.answer-feedback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px; text-align: center; border-radius: var(--radius);
  background: var(--surface-2); animation: fadeInUp 0.3s ease;
}
.feedback-icon { font-size: 2.5rem; }
.feedback-text { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.feedback-explanation { font-size: 0.875rem; color: var(--ink-2); }
.feedback-points { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--neon-g); }

/* Leaderboard list inside quiz detail */
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius); background: var(--bg-2); font-size: 0.875rem; }
.lb-rank { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; color: var(--ink-3); width: 20px; text-align: center; flex-shrink: 0; }
.lb-avatar-sm { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.lb-name { flex: 1; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-family: var(--font-mono); font-weight: 700; color: var(--neon-v); }
.lb-acc { color: var(--ink-3); font-size: 0.78rem; font-family: var(--font-mono); }

/* Profile page extra vars */
--bg-card: var(--surface);
--bg-card-hover: var(--surface-2);
--border-subtle: var(--border);

/* ── Results page legacy classes ── */
.results-section { min-height: calc(100vh - 64px); padding-top: 84px; }

.score-circle-container {
  position: relative; width: 180px; height: 180px; margin: 0 auto 24px;
}
.score-ring-svg { width: 180px; height: 180px; transform: rotate(-90deg); display: block; }
.score-ring-bg  { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.score-ring-fill {
  fill: none; stroke: var(--neon-v); stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.4,0,0.2,1);
}
.score-circle-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-big   { font-family: var(--font-mono); font-size: 2.2rem; font-weight: 700; color: var(--neon-v); line-height: 1; }
.score-label { font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }

.result-acc-badge {
  display: inline-block; padding: 8px 20px; border-radius: 100px;
  font-size: 0.9rem; font-weight: 700; margin-bottom: 24px;
}
.acc-excellent { background: rgba(16,185,129,0.12);  color: var(--neon-g); border: 1px solid rgba(16,185,129,0.3); }
.acc-good      { background: rgba(6,182,212,0.12);   color: var(--neon-c); border: 1px solid rgba(6,182,212,0.3); }
.acc-ok        { background: rgba(245,158,11,0.12);  color: var(--neon-y); border: 1px solid rgba(245,158,11,0.3); }
.acc-poor      { background: rgba(239,68,68,0.12);   color: var(--neon-r); border: 1px solid rgba(239,68,68,0.3); }

.result-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin: 0 auto 20px; max-width: 500px;
}
@media(max-width:540px) { .result-stats-row { grid-template-columns: repeat(2,1fr); } }

.glass-card-inner { background: var(--surface); padding: 16px 12px; }
.rstat-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  transition: background var(--transition);
}
.rstat-card:hover { background: var(--surface-2); }
.rstat-icon  { font-size: 1.3rem; }
.rstat-val   { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--neon-v); }
.rstat-label { font-size: 0.68rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }

.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.result-quiz-title { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.motivation-emoji  { font-size: 3rem; margin-bottom: 16px; }

/* Admin-specific legacy classes ── */
.admin-section { padding-top: 84px; padding-bottom: 48px; min-height: 100vh; }

.admin-header { margin-bottom: 24px; }
.admin-title { font-size: 1.6rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.admin-subtitle { color: var(--ink-2); font-size: 0.9rem; }

.admin-nav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 24px;
}
.admin-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius);
  color: var(--ink-2); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.admin-nav-btn:hover { color: var(--ink); background: var(--surface-2); }
.admin-nav-btn.active { color: var(--neon-v); background: rgba(139,92,246,0.1); }

.admin-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.admin-stat-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
}
.astat-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.astat-info { display: flex; flex-direction: column; gap: 2px; }
.astat-val { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--neon-v); line-height: 1; }
.astat-label { font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }

.admin-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-card { padding: 0; overflow: hidden; }
.admin-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.admin-card-title { font-weight: 700; font-size: 0.9rem; color: var(--ink); display: flex; align-items: center; gap: 8px; }

.admin-table-wrapper { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 10px 16px; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); text-align: left; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.admin-table td { padding: 10px 16px; font-size: 0.875rem; color: var(--ink); border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:hover td { background: var(--surface-2); }
.admin-table tbody tr:last-child td { border-bottom: none; }
.td-desc { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

.admin-empty { padding: 32px; text-align: center; color: var(--ink-3); font-size: 0.875rem; }

.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; padding: 2px 8px; border-radius: 100px;
  background: rgba(139,92,246,0.12); color: var(--neon-v);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
}

.user-avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

.btn-ghost {
  background: transparent; border: 1px solid var(--border);
  color: var(--ink-2); padding: 5px 12px; border-radius: var(--radius);
  font-size: 0.8rem; cursor: pointer; text-decoration: none;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.btn-ghost:hover { border-color: var(--neon-v); color: var(--neon-v); }
.btn-xs { padding: 4px 10px !important; font-size: 0.75rem !important; }
.btn-danger { background: var(--neon-r); color: #fff; border-color: var(--neon-r); }
.btn-danger:hover { filter: brightness(1.1); }
.btn-success { background: var(--neon-g); color: #fff; border-color: var(--neon-g); }

/* gradient-text (used in admin title and index) */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* page-title / page-subtitle used in quiz_list header */
.page-title { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 900; color: var(--ink); }
.page-subtitle { color: var(--ink-2); }

/* ── Print ── */
@media print {
  .navbar,
  .flash-container,
  .theme-toggle-btn,
  .nav-toggle,
  .mobile-menu,
  .mobile-backdrop,
  body::before {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page {
    padding-top: 0;
  }
}
