/* ============================================================
   QuizFandom — Vibrant Light Design System
   Light-mode, colorful gradients, playful typography
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 999;
  padding: var(--sp-3) var(--sp-5);
  background: var(--text-bright, #0F172A);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: var(--sp-4);
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 3px solid var(--theme, #FF6B6B);
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.quiz-option:focus-visible {
  outline: none;
  border-color: var(--theme);
  box-shadow: 0 0 0 3px var(--theme-glow, rgba(255,107,107,0.2));
}

.share-btn:focus-visible,
.bento-card:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--theme-glow, rgba(255,107,107,0.2));
}

/* ===== DESIGN TOKENS ===== */
:root {
  /* Light palette */
  --bg: #FAFBFF;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --surface: rgba(0,0,0,0.03);
  --surface-hover: rgba(0,0,0,0.06);
  --glass: rgba(255,255,255,0.7);
  --glass-border: rgba(0,0,0,0.08);
  --glass-hover: rgba(255,255,255,0.9);

  /* Text */
  --text: #1A1A2E;
  --text-secondary: #64748B;
  --text-muted: #6B7D94;
  --text-bright: #0F172A;

  /* Playful gradients */
  --gradient-primary: linear-gradient(135deg, #FF6B6B, #FFE66D);
  --gradient-accent: linear-gradient(135deg, #A855F7, #EC4899);
  --gradient-warm: linear-gradient(135deg, #FF9A56, #FF6B6B);
  --gradient-cool: linear-gradient(135deg, #06B6D4, #8B5CF6);
  --gradient-fun: linear-gradient(135deg, #FF6B6B, #A855F7, #06B6D4);

  /* Primary colors */
  --primary: #FF6B6B;
  --primary-light: #FFE8E8;
  --primary-glow: rgba(255,107,107,0.2);
  --accent: #A855F7;
  --accent-light: #F3E8FF;
  --accent-glow: rgba(168,85,247,0.2);

  /* Typography */
  --font-heading: 'Quicksand', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem;
  --sp-4: 1rem; --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem; --sp-10: 2.5rem; --sp-12: 3rem;
  --sp-16: 4rem; --sp-20: 5rem; --sp-24: 6rem;

  /* Layout */
  --container: 1100px;
  --container-narrow: 680px;
  --container-wide: 1280px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 40px var(--primary-glow);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* Theme (overridden per franchise) */
  --theme: var(--primary);
  --theme-light: var(--primary-light);
  --theme-glow: var(--primary-glow);
  --theme-gradient: var(--gradient-primary);
}

/* ===== FRANCHISE THEMES ===== */
[data-franchise="stranger-things"] {
  --theme: #B91C1C;
  --theme-light: #FEE2E2;
  --theme-glow: rgba(185,28,28,0.15);
  --theme-gradient: linear-gradient(135deg, #B91C1C, #FF6B6B);
}

[data-franchise="jujutsu-kaisen"] {
  --theme: #7C3AED;
  --theme-light: #EDE9FE;
  --theme-glow: rgba(124,58,237,0.15);
  --theme-gradient: linear-gradient(135deg, #7C3AED, #06B6D4);
}

[data-franchise="bts"] {
  --theme: #A855F7;
  --theme-light: #F3E8FF;
  --theme-glow: rgba(168,85,247,0.15);
  --theme-gradient: linear-gradient(135deg, #A855F7, #EC4899);
}

[data-franchise="wednesday"] {
  --theme: #7C3AED;
  --theme-light: #EDE9FE;
  --theme-glow: rgba(124,58,237,0.15);
  --theme-gradient: linear-gradient(135deg, #7C3AED, #1E1B4B);
}

[data-franchise="squid-game"] {
  --theme: #EC4899;
  --theme-light: #FCE7F3;
  --theme-glow: rgba(236,72,153,0.15);
  --theme-gradient: linear-gradient(135deg, #EC4899, #14B8A6);
}

[data-franchise="demon-slayer"] {
  --theme: #EF4444;
  --theme-light: #FEE2E2;
  --theme-glow: rgba(239,68,68,0.15);
  --theme-gradient: linear-gradient(135deg, #EF4444, #F97316);
}

[data-franchise="the-boys"] {
  --theme: #DC2626;
  --theme-light: #FEE2E2;
  --theme-glow: rgba(220,38,38,0.15);
  --theme-gradient: linear-gradient(135deg, #DC2626, #1E3A8A);
}

[data-franchise="one-piece-live"] {
  --theme: #EF4444;
  --theme-light: #FEF2F2;
  --theme-glow: rgba(239,68,68,0.15);
  --theme-gradient: linear-gradient(135deg, #EF4444, #3B82F6);
}

[data-franchise="daredevil"] {
  --theme: #DC2626;
  --theme-light: #FEE2E2;
  --theme-glow: rgba(220,38,38,0.15);
  --theme-gradient: linear-gradient(135deg, #DC2626, #7F1D1D);
}

[data-franchise="frieren"] {
  --theme: #6366F1;
  --theme-light: #EEF2FF;
  --theme-glow: rgba(99,102,241,0.15);
  --theme-gradient: linear-gradient(135deg, #6366F1, #A5B4FC);
}

[data-franchise="blackpink"] {
  --theme: #EC4899;
  --theme-light: #FCE7F3;
  --theme-glow: rgba(236,72,153,0.15);
  --theme-gradient: linear-gradient(135deg, #EC4899, #1A1A2E);
}

[data-franchise="seven-kingdoms"] {
  --theme: #B45309;
  --theme-light: #FEF3C7;
  --theme-glow: rgba(180,83,9,0.15);
  --theme-gradient: linear-gradient(135deg, #B45309, #78350F);
}

[data-franchise="the-walking-dead"] {
  --theme: #4B7A5A;
  --theme-light: #ECFDF5;
  --theme-glow: rgba(75,122,90,0.15);
  --theme-gradient: linear-gradient(135deg, #4B7A5A, #1A1A2E);
}

/* ===== BASE ===== */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

p { color: var(--text-secondary); line-height: 1.7; }

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

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

/* ===== LAYOUT ===== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--sp-5); }
.container-wide { width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--sp-5); }

/* ===== NAVIGATION ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav-logo span {
  background: var(--gradient-fun);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: none;
  gap: var(--sp-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 24px), transparent);
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease);
  padding: var(--sp-2) 0;
  flex-shrink: 0;
}

.nav-links a:hover { color: var(--text-bright); }

.nav-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease);
}

.nav-menu-btn:hover { background: var(--surface); color: var(--text); }

/* Nav drawer (mobile) */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: all var(--duration-normal) var(--ease);
}

.nav-drawer.open { visibility: visible; opacity: 1; }

.nav-drawer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
}

.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-elevated);
  padding: var(--sp-8);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  box-shadow: var(--shadow-lg);
}

.nav-drawer.open .nav-drawer-panel { transform: translateX(0); }

.nav-drawer-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.nav-drawer-close:hover { background: var(--surface); color: var(--text); }

.nav-drawer-links { display: flex; flex-direction: column; gap: var(--sp-1); }

.nav-drawer-links a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease);
}

.nav-drawer-links a:hover { background: var(--surface); color: var(--text); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-menu-btn { display: none; }
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: var(--sp-20) 0 var(--sp-16);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse 60% 50% at 20% 10%, rgba(255,107,107,0.13) 0%, transparent 60%),
              radial-gradient(ellipse 50% 60% at 80% 90%, rgba(168,85,247,0.13) 0%, transparent 60%),
              radial-gradient(ellipse 40% 40% at 55% 45%, rgba(6,182,212,0.08) 0%, transparent 55%);
  animation: aurora 20s ease infinite;
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 45% 35% at 75% 15%, rgba(236,72,153,0.08) 0%, transparent 55%),
              radial-gradient(ellipse 35% 45% at 25% 85%, rgba(251,191,36,0.06) 0%, transparent 55%);
  z-index: -1;
  pointer-events: none;
}

@keyframes aurora {
  0%, 100% { transform: rotate(0deg) scale(1); }
  33% { transform: rotate(3deg) scale(1.02); }
  66% { transform: rotate(-2deg) scale(0.98); }
}

/* Hero avatar ring */
.hero-avatars {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-6);
}

.hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);
  object-fit: cover;
  margin-left: -12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: transform var(--duration-normal) var(--ease);
  animation: charPop 0.35s var(--ease) backwards;
}

.hero-avatar:first-child { margin-left: 0; }
.hero-avatar:nth-child(1) { z-index: 7; animation-delay: 0ms; }
.hero-avatar:nth-child(2) { z-index: 6; animation-delay: 60ms; }
.hero-avatar:nth-child(3) { z-index: 5; animation-delay: 120ms; }
.hero-avatar:nth-child(4) { z-index: 4; animation-delay: 180ms; }
.hero-avatar:nth-child(5) { z-index: 3; animation-delay: 240ms; }
.hero-avatar:nth-child(6) { z-index: 2; animation-delay: 300ms; }
.hero-avatar:nth-child(7) { z-index: 1; animation-delay: 360ms; }

.hero-avatar:hover { transform: translateY(-4px) scale(1.1); z-index: 10; }

.hero h1 {
  margin-bottom: var(--sp-4);
  font-size: clamp(2.5rem, 6vw, 4rem);
}

/* Hero subtitle */
.hero-subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 560px;
  margin: 0 auto var(--sp-8);
  line-height: 1.65;
}

.hero-subtitle em {
  font-style: normal;
  color: var(--primary);
  font-weight: 600;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto var(--sp-8);
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-10);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

/* Tinted badge variants */
.hero-badge--quizzes { background: rgba(255,107,107,0.1); border-color: rgba(255,107,107,0.25); color: #FF6B6B; }
.hero-badge--time { background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.2); color: #A855F7; }
.hero-badge--free { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #059669; }

/* Hero CTAs */
.hero-ctas { display: flex; gap: var(--sp-4); justify-content: center; flex-wrap: wrap; }

.btn-arrow {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease);
}

.btn-primary:hover .btn-arrow { transform: translateX(4px); }

/* Staggered hero entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-avatars  { animation: fadeUp 0.5s var(--ease) 0.05s both; }
  .hero h1       { animation: fadeUp 0.5s var(--ease) 0.15s both; }
  .hero-subtitle { animation: fadeUp 0.5s var(--ease) 0.25s both; }
  .hero-badges   { animation: fadeUp 0.5s var(--ease) 0.35s both; }
  .hero-ctas     { animation: fadeUp 0.5s var(--ease) 0.45s both; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--duration-normal) var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--theme-gradient);
  color: white;
  box-shadow: 0 4px 16px var(--theme-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--theme-glow);
}

.btn-primary:active { transform: translateY(0); }

.btn-large {
  padding: var(--sp-4) var(--sp-8);
  font-size: 1.1rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover { background: var(--surface); color: var(--text); }

/* ===== BENTO GRID (Test Cards) ===== */
.section-title {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.section-title h2 { margin-bottom: var(--sp-3); }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-6);
  margin-bottom: var(--sp-16);
}

.bento-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--theme);
}

.bento-card-featured {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card-featured { grid-column: span 1; }

  .hero-avatar { width: 44px; height: 44px; margin-left: -10px; border-width: 2px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn { width: 100%; max-width: 320px; justify-content: center; }
}

.card-gradient {
  height: 6px;
  background: var(--theme-gradient);
}

.card-body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Card character thumbnails — overlapping avatar stack */
.card-characters {
  display: flex;
  margin-bottom: var(--sp-4);
  align-items: center;
}

.card-char-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-card, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-left: -12px;
  transition: transform var(--duration-normal) var(--ease),
              box-shadow var(--duration-normal) var(--ease);
  animation: charPop 0.35s var(--ease) backwards;
}

.card-char-img:first-child { margin-left: 0; }
.card-char-img:nth-child(1) { z-index: 4; animation-delay: 0ms; }
.card-char-img:nth-child(2) { z-index: 3; animation-delay: 80ms; }
.card-char-img:nth-child(3) { z-index: 2; animation-delay: 160ms; }
.card-char-img:nth-child(4) { z-index: 1; animation-delay: 240ms; }

.bento-card:hover .card-char-img {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bento-card-featured .card-char-img {
  width: 56px;
  height: 56px;
  margin-left: -14px;
}

.bento-card-featured .card-char-img:first-child { margin-left: 0; }

.card-emoji {
  font-size: 2.5rem;
  margin-bottom: var(--sp-4);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: var(--sp-2);
  font-family: var(--font-heading);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.card-badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-trending { background: #FEF3C7; color: #92400E; }
.badge-new { background: #DBEAFE; color: #1E40AF; }
.badge-popular { background: #FCE7F3; color: #9D174D; }
.badge-hot { background: #FEE2E2; color: #991B1B; }

/* ===== QUIZ INTRO ===== */
.quiz-intro {
  text-align: center;
  padding: var(--sp-12) 0;
}

.quiz-hero {
  background: var(--theme-gradient);
  border-radius: var(--radius-xl);
  padding: var(--sp-12) var(--sp-8);
  margin-bottom: var(--sp-8);
  color: white;
  position: relative;
  overflow: hidden;
}

.quiz-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.quiz-hero h1 {
  color: white;
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-4);
}

.quiz-hero p {
  color: rgba(255,255,255,0.9);
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.quiz-hero-emoji {
  font-size: 4rem;
  margin-bottom: var(--sp-4);
  position: relative;
  z-index: 1;
}

.quiz-hero-characters {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--sp-4);
  position: relative;
  z-index: 1;
}

.quiz-hero-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.5);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2),
              0 0 20px var(--theme-glow, rgba(255,255,255,0.1));
  margin-left: -12px;
  transition: transform var(--duration-normal) var(--ease),
              box-shadow var(--duration-normal) var(--ease),
              filter var(--duration-normal) var(--ease);
  animation: charPop 0.35s var(--ease) backwards;
}

.quiz-hero-img:first-child { margin-left: 0; }
.quiz-hero-img:nth-child(1) { z-index: 4; animation-delay: 0ms; }
.quiz-hero-img:nth-child(2) { z-index: 3; animation-delay: 100ms; }
.quiz-hero-img:nth-child(3) { z-index: 2; animation-delay: 200ms; }
.quiz-hero-img:nth-child(4) { z-index: 1; animation-delay: 300ms; }

.quiz-hero-img:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3),
              0 0 30px var(--theme-glow, rgba(255,255,255,0.15));
  filter: brightness(1.08);
  z-index: 10;
}

/* Staggered pop-in keyframes */
@keyframes charPop {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

.quiz-meta {
  display: flex;
  justify-content: center;
  gap: var(--sp-8);
  margin: var(--sp-8) 0;
}

.quiz-meta-item {
  text-align: center;
}

.quiz-meta-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-bright);
  font-family: var(--font-heading);
}

.quiz-meta-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quiz-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--sp-6);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border-radius: var(--radius-sm);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== QUIZ AREA ===== */
.quiz-area {
  padding: var(--sp-8) 0;
}

.quiz-progress {
  width: 100%;
  max-width: var(--container-narrow);
  height: 6px;
  background: var(--surface);
  border-radius: var(--radius-full);
  margin: 0 auto var(--sp-8);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--theme-gradient);
  border-radius: var(--radius-full);
  transition: width var(--duration-normal) var(--ease-out);
  width: 0%;
}

.quiz-question-wrapper {
  max-width: var(--container-narrow);
  margin: 0 auto;
  text-align: center;
}

.quiz-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme);
  margin-bottom: var(--sp-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quiz-question-text {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: var(--sp-8);
  font-family: var(--font-heading);
  line-height: 1.3;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 560px;
  margin: 0 auto;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-card);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--duration-fast) var(--ease);
  min-height: 56px;
}

.quiz-option:hover {
  border-color: var(--theme);
  background: var(--theme-light);
  transform: translateX(4px);
}

.quiz-option.selected {
  border-color: var(--theme);
  background: var(--theme-light);
  box-shadow: 0 0 0 3px var(--theme-glow);
}

.quiz-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease);
}

.quiz-option:hover .quiz-option-letter,
.quiz-option.selected .quiz-option-letter {
  background: var(--theme);
  color: white;
}

.quiz-back-btn {
  margin-top: var(--sp-6);
  font-size: 0.85rem;
}

/* Quiz fade animation */
.quiz-fade-in {
  animation: quizFadeIn var(--duration-normal) var(--ease-out);
}

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

/* ===== RESULTS ===== */
.quiz-results {
  padding: var(--sp-8) 0;
  text-align: center;
}

/* Calculating animation */
.calculating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-16) 0;
}

.calculating-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--surface);
  border-top-color: var(--theme);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.calculating-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Character result card */
.result-card {
  max-width: 480px;
  margin: 0 auto var(--sp-8);
  background: var(--bg-card);
  border: 2px solid var(--theme);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 40px var(--theme-glow);
}

.result-card-header {
  background: var(--theme-gradient);
  padding: var(--sp-8) var(--sp-6);
  color: white;
  position: relative;
}

/* Character image in result card */
.result-card-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.4);
  margin: 0 auto var(--sp-3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.result-card-emoji {
  font-size: 4rem;
  margin-bottom: var(--sp-3);
}

.result-card-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: var(--sp-2);
}

.result-card-name {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: var(--sp-2);
  color: white;
}

.result-card-tagline {
  font-size: 1rem;
  opacity: 0.9;
}

.result-card-body {
  padding: var(--sp-6);
}

.result-match {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--theme-light);
  border-radius: var(--radius-full);
  font-weight: 700;
  color: var(--theme);
  font-size: 0.9rem;
  margin-bottom: var(--sp-4);
}

.result-close-call {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 var(--sp-3);
  line-height: 1.5;
}

.result-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
}

/* Runner-up */
.runner-up {
  max-width: 480px;
  margin: 0 auto var(--sp-8);
  padding: var(--sp-4) var(--sp-6);
  background: var(--surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* Runner-up image */
.runner-up-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
}

.runner-up-emoji { font-size: 2rem; }

.runner-up-text {
  text-align: left;
}

.runner-up-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.runner-up-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ===== WHY THIS RESULT ===== */
.result-explanation {
  max-width: 480px;
  margin: var(--sp-8) auto;
  padding: var(--sp-6);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.result-explanation h3 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: var(--sp-2);
}

.result-explanation-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.result-explanation-intro strong {
  color: var(--theme);
}

.result-explanation-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.result-explanation-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding-left: var(--sp-4);
  border-left: 3px solid var(--theme);
}

.result-explanation-q {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.result-explanation-a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ===== CHARACTER RANKING ===== */
.ranking-section {
  max-width: 480px;
  margin: var(--sp-8) auto;
}

.ranking-section h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.ranking-item-top {
  border-color: var(--theme);
  background: var(--theme-light, var(--primary-light));
}

.ranking-position {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ranking-item-top .ranking-position {
  background: var(--theme);
  color: white;
}

.ranking-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
}

.ranking-emoji {
  font-size: 1.5rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.ranking-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.ranking-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-1);
}

.ranking-bar-track {
  height: 6px;
  background: var(--surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  background: var(--theme-gradient);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
}

.ranking-percent {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
}

/* ===== QUIZ RECOMMENDATIONS ===== */
.quiz-recommendations {
  max-width: 480px;
  margin: var(--sp-8) auto;
}

.my-results-cta {
  text-align: center;
  margin: var(--sp-6) 0;
}

.my-results-count {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: var(--sp-2);
}

.quiz-recommendations h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.quiz-rec-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.quiz-rec-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease);
}

.quiz-rec-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.quiz-rec-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.quiz-rec-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
}

.quiz-rec-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.quiz-rec-category {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.quiz-rec-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

/* ===== SHARE BUTTONS ===== */
.share-section {
  margin: var(--sp-8) auto;
  max-width: 480px;
}

.share-section h3 {
  font-size: 1rem;
  margin-bottom: var(--sp-4);
  color: var(--text-secondary);
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text);
}

.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.share-btn-twitter:hover { background: #1DA1F2; color: white; border-color: #1DA1F2; }
.share-btn-facebook:hover { background: #1877F2; color: white; border-color: #1877F2; }
.share-btn-whatsapp:hover { background: #25D366; color: white; border-color: #25D366; }
.share-btn-copy:hover { background: var(--text); color: white; border-color: var(--text); }
.share-btn-messenger:hover { background: #0084FF; color: white; border-color: #0084FF; }
.share-btn-download:hover { background: var(--text-bright); color: white; border-color: var(--text-bright); }

/* ===== SHARE RESULT CARD ===== */
.share-card {
  width: 400px;
  max-width: 100%;
  aspect-ratio: 400 / 520;
  margin: var(--sp-6) auto var(--sp-4);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.08);
}

.share-card-bg {
  position: absolute;
  inset: 0;
  background: var(--theme-gradient);
  z-index: 0;
}

.share-card-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(0,0,0,0.15) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.25) 100%);
}

.share-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  color: white;
}

.share-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.85;
  margin-bottom: var(--sp-4);
}

.share-card-avatar {
  margin-bottom: var(--sp-5);
}

.share-card-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 8px rgba(255,255,255,0.1);
  display: block;
}

.share-card-emoji {
  font-size: 5rem;
  line-height: 1;
}

.share-card-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--sp-3);
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.share-card-match {
  display: inline-block;
  padding: var(--sp-2) var(--sp-5);
  background: rgba(255,255,255,0.18);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--sp-4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
}

.share-card-tagline {
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.8;
  max-width: 300px;
  line-height: 1.5;
  margin-bottom: var(--sp-4);
}

.share-card-quiz {
  font-size: 0.75rem;
  opacity: 0.45;
  margin-top: var(--sp-4);
}

.share-card-branding {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.55;
  letter-spacing: 0.05em;
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255,255,255,0.15);
  width: 60%;
  text-align: center;
}

/* Download button below the card */
.share-card-download-wrap {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.share-card-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--theme-gradient);
  color: white;
  border: none;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-fast) var(--ease);
}

.share-card-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.share-card-download-btn:active {
  transform: translateY(0);
}

.share-card-download-btn svg {
  flex-shrink: 0;
}

/* Mobile: scale down the card slightly */
@media (max-width: 440px) {
  .share-card {
    width: 100%;
    border-radius: var(--radius-lg);
  }
  .share-card-name {
    font-size: 1.6rem;
  }
  .share-card-img {
    width: 110px;
    height: 110px;
  }
}

/* ===== AD SLOTS ===== */
.ad-slot {
  display: none; /* Hidden until real AdSense is integrated */
  text-align: center;
  padding: var(--sp-4) 0;
  margin: var(--sp-6) auto;
  max-width: var(--container);
}

.ad-slot-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  min-height: 90px;
  width: 100%;
  max-width: 728px;
}

/* Ad slots show as placeholders until real ads are integrated.
   Replace .ad-slot-inner content with AdSense code when ready. */

/* ===== MORE QUIZZES ===== */
.more-quizzes {
  margin: var(--sp-12) auto;
  max-width: var(--container);
}

.more-quizzes h3 {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.more-quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.more-quiz-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease);
  text-decoration: none;
}

.more-quiz-card:hover {
  border-color: var(--theme);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.more-quiz-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
}

.more-quiz-emoji { font-size: 2rem; }

.more-quiz-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.more-quiz-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: var(--sp-16) 0;
  text-align: center;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-8);
  margin-top: var(--sp-8);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.how-step {
  padding: var(--sp-6);
}

.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--theme-gradient);
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: var(--sp-4);
}

.how-step h3 { margin-bottom: var(--sp-2); font-size: 1.1rem; }

.how-step p { font-size: 0.9rem; }

/* ===== FOOTER ===== */
.footer {
  padding: var(--sp-12) 0 var(--sp-8);
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

.footer-brand span {
  background: var(--gradient-fun);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease);
}

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

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== CONFETTI ===== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== HIDDEN UTILITY ===== */
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero { padding: var(--sp-12) 0 var(--sp-8); }
  .quiz-hero { padding: var(--sp-8) var(--sp-4); border-radius: var(--radius-lg); }
  .quiz-meta { gap: var(--sp-4); }
  .result-card-name { font-size: 1.5rem; }
  .share-btn { padding: var(--sp-2) var(--sp-3); font-size: 0.8rem; }
}

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
}

.filter-tab {
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  transition: all var(--duration-fast) var(--ease);
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--text);
}

.filter-tab.active {
  background: var(--gradient-fun);
  color: white;
  border-color: transparent;
}

.bento-card.filter-hidden {
  display: none;
}

/* ===== COMPLETION BADGE ===== */
.card-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  background: #ECFDF5;
  color: #059669;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== PRINT ===== */
@media print {
  .nav, .ad-slot, .share-section, .more-quizzes, .footer { display: none; }
}

/* ===== MATURITY BADGE ===== */
.maturity-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F172A;
    --bg-elevated: #1E293B;
    --bg-card: #1E293B;
    --surface: rgba(255,255,255,0.06);
    --surface-hover: rgba(255,255,255,0.1);
    --glass: rgba(30,41,59,0.8);
    --glass-border: rgba(255,255,255,0.1);
    --glass-hover: rgba(30,41,59,0.9);

    --text: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-bright: #F8FAFC;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  }

  body { background: var(--bg); color: var(--text); }

  .nav { background: rgba(15, 23, 42, 0.85); }

  .nav-drawer::before { background: rgba(0,0,0,0.6); }
  .nav-drawer-panel { background: var(--bg-elevated); }

  .hero::before {
    background: radial-gradient(circle at 30% 20%, rgba(255,107,107,0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(168,85,247,0.05) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(6,182,212,0.03) 0%, transparent 50%);
  }

  .card-completed-badge { background: #064E3B; color: #6EE7B7; }

  .card-char-img {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.08);
  }

  .quiz-hero-img {
    border-color: rgba(255,255,255,0.35);
  }

  .filter-tab { background: var(--bg-card); border-color: var(--glass-border); color: var(--text-secondary); }
  .filter-tab:hover { color: var(--text-bright); }
  .filter-tab.active { background: var(--gradient-fun); color: white; }

  details { background: var(--bg-card); border-color: var(--glass-border); }

  .ranking-item { background: var(--bg-card); border-color: var(--glass-border); }
  .ranking-item-top { background: var(--theme-light); }

  .quiz-rec-card { background: var(--bg-card); border-color: var(--glass-border); }
  .quiz-rec-card:hover { border-color: var(--primary); }
  .quiz-rec-img { border-color: rgba(255,255,255,0.15); }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .bento-card:hover .card-char-img,
  .quiz-hero-img:hover,
  .quiz-rec-card:hover {
    transform: none !important;
  }
}

/* ===== SIMULATED ADSENSE ===== */
.ad-sim {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.ad-sim::after {
  content: 'Ad';
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 10px;
  color: #888;
  background: rgba(255,255,255,0.8);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: Arial, sans-serif;
}

.ad-sim-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ad-sim-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a0dab;
  text-decoration: none;
}

.ad-sim-desc {
  font-size: 13px;
  color: #555;
  max-width: 500px;
}

.ad-sim-cta {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 20px;
  background: #1a73e8;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.ad-sim-url {
  font-size: 12px;
  color: #006621;
}

@media (prefers-color-scheme: dark) {
  .ad-sim {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-color: #2a2a4a;
  }
  .ad-sim::after {
    color: #666;
    background: rgba(0,0,0,0.5);
  }
  .ad-sim-title { color: #8ab4f8; }
  .ad-sim-desc { color: #aaa; }
  .ad-sim-url { color: #5bb974; }
  .ad-sim-cta { background: #4285f4; }
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: var(--sp-4) var(--sp-6);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.cookie-consent.visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-consent-text {
  text-align: center;
  line-height: 1.5;
}

.cookie-consent-text a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.cookie-consent-text a:hover {
  color: var(--accent);
}

.cookie-consent-actions {
  display: flex;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.cookie-consent-btn {
  padding: var(--sp-2) var(--sp-5);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.2s, transform 0.1s;
}

.cookie-consent-btn:active {
  transform: scale(0.97);
}

.cookie-btn-accept {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.cookie-btn-accept:hover {
  box-shadow: 0 4px 16px var(--primary-glow);
}

.cookie-btn-decline {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.cookie-btn-decline:hover {
  background: var(--surface-hover);
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .cookie-consent {
    background: rgba(15, 23, 42, 0.88);
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 600px) {
  .cookie-consent {
    flex-direction: column;
    padding: var(--sp-4);
    gap: var(--sp-3);
  }
  .cookie-consent-actions {
    width: 100%;
  }
  .cookie-consent-btn {
    flex: 1;
    text-align: center;
  }
}

/* ===== PERSONALITY DNA (My Results page) ===== */
.personality-dna {
  margin-bottom: var(--sp-12);
  padding: var(--sp-8);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.dna-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.dna-header h2 {
  margin-bottom: var(--sp-2);
}

.dna-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Top trait cards */
.dna-top-traits {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.dna-trait-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: transform var(--duration-normal) var(--ease);
}

.dna-trait-card:hover {
  transform: translateY(-1px);
}

.dna-trait-primary {
  background: var(--bg-elevated);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-glow), var(--shadow-md);
}

.dna-trait-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: white;
  letter-spacing: 0.02em;
}

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

.dna-trait-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}

.dna-trait-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
}

.dna-trait-percent {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: var(--sp-1);
}

.dna-trait-desc {
  margin-top: var(--sp-3);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Bar chart */
.dna-chart {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--glass-border);
}

.dna-chart-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
}

.dna-bar-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.dna-bar-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
  width: 170px;
}

.dna-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: white;
  background: var(--text-muted);
  flex-shrink: 0;
}

.dna-bar-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dna-bar-track {
  flex: 1;
  height: 10px;
  background: var(--surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.dna-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .dna-bar-fill {
    transition: none;
  }
}

.dna-bar-value {
  flex-shrink: 0;
  width: 36px;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Responsive: stack bar labels on small screens */
@media (max-width: 540px) {
  .dna-bar-label {
    width: 110px;
  }
  .dna-bar-name {
    font-size: 0.72rem;
  }
  .personality-dna {
    padding: var(--sp-5);
  }
  .dna-trait-card {
    padding: var(--sp-4);
  }
  .dna-trait-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .dna-trait-name {
    font-size: 1.05rem;
  }
}

/* Dark mode adjustments for Personality DNA */
@media (prefers-color-scheme: dark) {
  .dna-trait-primary {
    background: rgba(255, 107, 107, 0.06);
    border-color: rgba(255, 107, 107, 0.3);
  }
  .dna-bar-track {
    background: rgba(255, 255, 255, 0.08);
  }
}
