/* ==========================================================================
   BrainBrew Quiz - High Converting Landing Page Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Core Palette */
  --bg-darkest: #07090E;
  --bg-dark: #0D111D;
  --bg-card: rgba(20, 26, 43, 0.7);
  --bg-card-hover: rgba(28, 36, 61, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-glow: rgba(245, 158, 11, 0.35);

  /* Primary Midnight Violet */
  --indigo-950: #0B0E23;
  --indigo-900: #1E1B4B;
  --indigo-800: #312E81;
  --indigo-700: #4338CA;
  --indigo-500: #6366F1;
  --indigo-400: #818CF8;

  /* Accent Warm Honey / Amber Gold */
  --amber-400: #FBBF24;
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-700: #B45309;
  --amber-glow: rgba(245, 158, 11, 0.4);

  /* Neutral Typography */
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --text-inverse: #0F172A;

  /* App Theme Accents (matching mobile app screenshots) */
  --app-cream: #FAF6F0;
  --app-card: #EFE7DA;
  --app-orange: #FF9500;
  --app-green: #10B981;
  --app-red: #EF4444;

  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 50px rgba(245, 158, 11, 0.22);
  --shadow-indigo-glow: 0 0 60px rgba(99, 102, 241, 0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-darkest);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(245, 158, 11, 0.12), transparent 60%),
    radial-gradient(circle 500px at 10% 60%, rgba(49, 46, 129, 0.15), transparent 70%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.text-gradient {
  background: linear-gradient(135deg, #FFF8E7 20%, var(--amber-400) 60%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-indigo-gradient {
  background: linear-gradient(135deg, #E0E7FF 0%, #A5B4FC 50%, #818CF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(13, 17, 29, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background: rgba(7, 9, 14, 0.92);
  border-bottom-color: rgba(245, 158, 11, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 12px var(--amber-glow));
  transition: transform var(--transition-fast);
}

.brand-logo:hover img {
  transform: rotate(-6deg) scale(1.05);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.brand-name span {
  color: var(--amber-400);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover {
  color: var(--amber-400);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--amber-400);
  transition: width var(--transition-fast);
  border-radius: var(--radius-full);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-download-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #0F172A;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px var(--amber-glow);
  transition: var(--transition-fast);
}

.btn-download-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--amber-glow);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
}

.btn-download-nav svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding-top: 9rem;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-400);
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
  backdrop-filter: blur(8px);
}

.badge-pill .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--amber-400);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--amber-400);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.85rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-subhead {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2.25rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.btn-appstore-primary,
.btn-playstore-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: #000000;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  padding: 0.75rem 1.6rem;
  border-radius: 14px;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.15);
  transition: var(--transition-fast);
}

.btn-appstore-primary:hover,
.btn-playstore-primary:hover {
  border-color: var(--amber-400);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.3);
}

.btn-appstore-primary svg.apple-icon,
.btn-playstore-primary svg.play-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.btn-appstore-primary svg.apple-icon {
  fill: #FFFFFF;
}

.btn-appstore-primary .btn-text-wrap,
.btn-playstore-primary .btn-text-wrap {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.btn-appstore-primary .btn-sub,
.btn-playstore-primary .btn-sub {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #9CA3AF;
  text-transform: uppercase;
  font-weight: 600;
}

.btn-appstore-primary .btn-main,
.btn-playstore-primary .btn-main {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.btn-glass-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 0.9rem 1.6rem;
  border-radius: 14px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  backdrop-filter: blur(12px);
  transition: var(--transition-fast);
}

.btn-glass-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-glow);
  color: var(--amber-400);
  transform: translateY(-2px);
}

.hero-trust-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--amber-400);
  font-size: 0.95rem;
}

.rating-stars span.score-text {
  margin-left: 0.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.rating-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Hero Visual / Phone Mockup
   ========================================================================== */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup-wrapper {
  position: relative;
  width: 320px;
  height: 640px;
  perspective: 1000px;
  z-index: 5;
}

/* Backdrop Radial Glow */
.mockup-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(99, 102, 241, 0.25) 45%, transparent 75%);
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
}

/* Realistic iPhone Bezel */
.iphone-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 48px;
  background: #1C1B22;
  border: 10px solid #2B2933;
  box-shadow: 
    0 0 0 2px #4E4B59,
    0 25px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(245, 158, 11, 0.15);
  overflow: hidden;
  z-index: 3;
  display: flex;
  flex-direction: column;
}

/* Glass Reflection Layer */
.iphone-frame::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 30%, transparent 60%);
  pointer-events: none;
  z-index: 10;
}

/* iPhone Dynamic Island & Status Bar */
.iphone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  background: #FAF6F0;
  overflow: hidden;
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.3s ease;
}

/* Floating Glass Stat Chips */
.floating-chip {
  position: absolute;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(13, 17, 29, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: floatChip 4.5s ease-in-out infinite;
}

.chip-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}

.chip-text {
  display: flex;
  flex-direction: column;
}

.chip-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.chip-val {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.chip-val span {
  color: var(--amber-400);
}

.chip-streak {
  top: 10%;
  left: -24%;
  animation-delay: 0s;
}

.chip-rank {
  bottom: 22%;
  right: -24%;
  animation-delay: 1.5s;
}

.chip-accuracy {
  bottom: 6%;
  left: -18%;
  animation-delay: 3s;
}

@keyframes floatChip {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.02);
  }
}

/* ==========================================================================
   Stats Bar Counter
   ========================================================================== */
.stats-section {
  padding: 2.5rem 0;
  background: rgba(18, 22, 37, 0.5);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border-glass);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-number span.plus {
  color: var(--amber-400);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Interactive Showcase Section
   ========================================================================== */
.showcase-section {
  background: radial-gradient(circle at 50% 30%, rgba(30, 27, 75, 0.4) 0%, transparent 60%);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-400);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Interactive Tabs Switcher */
.showcase-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(245, 158, 11, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(99, 102, 241, 0.18));
  border-color: var(--amber-400);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.tab-btn .tab-emoji {
  font-size: 1.1rem;
}

/* Showcase Stage */
.showcase-stage {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 3.5rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.showcase-stage::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.showcase-device {
  display: flex;
  justify-content: center;
  position: relative;
}

.showcase-device .iphone-frame {
  width: 290px;
  height: 590px;
  border-radius: 44px;
}

.showcase-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--indigo-400);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.showcase-info h3 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.showcase-info p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.showcase-feature-points {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  list-style: none;
  margin-top: 0.5rem;
}

.showcase-feature-points li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1rem;
  color: var(--text-main);
}

.showcase-feature-points li svg {
  width: 20px;
  height: 20px;
  fill: var(--amber-400);
  flex-shrink: 0;
}

/* ==========================================================================
   Bento Box Features Grid
   ========================================================================== */
.features-section {
  position: relative;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.12);
}

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

.bento-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  transition: transform var(--transition-fast);
}

.bento-card:hover .bento-icon-box {
  transform: scale(1.1) rotate(4deg);
}

.bento-card h4 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #FFFFFF;
}

.bento-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.bento-card .highlight-tag {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-400);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Interactive Mini-Quiz Teaser
   ========================================================================== */
.quiz-teaser-section {
  position: relative;
}

.quiz-card {
  max-width: 780px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(13, 17, 29, 0.9) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}

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

.quiz-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-400);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
}

.quiz-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.quiz-question {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 2rem;
  color: #FFFFFF;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quiz-opt-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-glass);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  transition: var(--transition-fast);
}

.quiz-opt-btn .opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.quiz-opt-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--amber-400);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.quiz-opt-btn:hover:not(:disabled) .opt-letter {
  background: var(--amber-500);
  color: #0F172A;
}

.quiz-opt-btn.correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10B981 !important;
  color: #A7F3D0 !important;
}

.quiz-opt-btn.correct .opt-letter {
  background: #10B981 !important;
  color: #FFFFFF !important;
}

.quiz-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #EF4444 !important;
  color: #FECACA !important;
}

.quiz-opt-btn.wrong .opt-letter {
  background: #EF4444 !important;
  color: #FFFFFF !important;
}

.quiz-feedback {
  display: none;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.quiz-feedback.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

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

.feedback-text h5 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.feedback-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-try-again {
  background: var(--amber-500);
  color: #0F172A;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.btn-try-again:hover {
  background: var(--amber-400);
  transform: scale(1.05);
}

/* ==========================================================================
   Download CTA & QR Section
   ========================================================================== */
.download-section {
  padding: 6rem 0;
  position: relative;
}

.download-banner {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.85) 0%, rgba(30, 27, 75, 0.95) 50%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-xl);
  padding: 4.5rem 3.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(245, 158, 11, 0.15);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
  position: relative;
  overflow: hidden;
}

.download-banner::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -20%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.banner-content h2 {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.banner-content p {
  font-size: 1.15rem;
  color: #CBD5E1;
  line-height: 1.6;
  margin-bottom: 2.25rem;
  max-width: 520px;
}

.banner-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.qr-box-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.qr-code-img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #FFFFFF;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.qr-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.qr-desc span {
  color: var(--amber-400);
  font-weight: 700;
}

/* ==========================================================================
   Footer & Legal Hub
   ========================================================================== */
.footer {
  background: #05070B;
  border-top: 1px solid var(--border-glass);
  padding: 4.5rem 0 2rem;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--amber-400);
  padding-left: 4px;
}

.footer-contact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.footer-contact-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--amber-400);
  font-weight: 600;
  font-size: 0.92rem;
}

.contact-email-btn:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
  font-size: 0.88rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-legal-bar a {
  color: var(--text-muted);
}

.footer-legal-bar a:hover {
  color: var(--amber-400);
}

/* ==========================================================================
   In-Page Interactive Legal Modal
   ========================================================================== */
.legal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.legal-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.legal-modal-window {
  background: #0E121E;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 860px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(245, 158, 11, 0.15);
  overflow: hidden;
  animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.92) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: rgba(18, 24, 40, 0.8);
  border-bottom: 1px solid var(--border-glass);
}

.modal-nav-tabs {
  display: flex;
  gap: 0.5rem;
}

.modal-tab-btn {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.modal-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.modal-tab-btn.active {
  color: #FFFFFF;
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--amber-400);
}

.modal-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: #FFFFFF;
  transform: scale(1.1);
}

.legal-modal-body {
  padding: 2.25rem;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #CBD5E1;
}

.legal-modal-body h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 1.5rem 0 0.75rem;
}

.legal-modal-body h3:first-child {
  margin-top: 0;
}

.legal-modal-body p {
  margin-bottom: 1rem;
}

.legal-modal-body ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.legal-modal-body li {
  margin-bottom: 0.4rem;
}

.legal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(18, 24, 40, 0.8);
  border-top: 1px solid var(--border-glass);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-open-dedicated {
  color: var(--amber-400);
  font-weight: 600;
}

.btn-open-dedicated:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-subhead {
    margin: 0 auto 2.25rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-trust-row {
    justify-content: center;
  }

  .showcase-stage {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 2.5rem;
    text-align: center;
  }

  .showcase-badge {
    margin: 0 auto;
  }

  .showcase-feature-points {
    align-items: center;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .download-banner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3.5rem 2rem;
  }

  .banner-content p {
    margin: 0 auto 2rem;
  }

  .banner-buttons {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0B0E17;
    border-bottom: 1px solid var(--border-glass);
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .mobile-toggle {
    display: flex;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .chip-streak, .chip-rank, .chip-accuracy {
    display: none; /* Hide floating chips on small mobile to avoid overflow */
  }

  .phone-mockup-wrapper {
    width: 270px;
    height: 550px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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