/* ========================================
   SLEEPMAXX - OURA RING INSPIRED DESIGN
   Premium dark theme, luxury wellness aesthetic
   ======================================== */

/* Google Fonts — Manrope (Premium variable font, warm & substantial, luxury wellness) */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ========================================
   OURA DESIGN SYSTEM - CSS VARIABLES
   ======================================== */

:root {
  /* Primary Colors - Oura Palette (EXACT SPEC) */
  --bg-deep: #0D0D0F;
  --bg-card: #1A1A1C;
  --bg-card-elevated: #1F1F22;
  --bg-card-hover: #222225;
  
  /* Accent Colors - Soft & Muted */
  --accent-teal: #5AC8C8;
  --accent-teal-dim: rgba(90, 200, 200, 0.15);
  --accent-teal-glow: rgba(90, 200, 200, 0.4);
  --accent-purple: #8B7FD4;
  --accent-purple-dim: rgba(139, 127, 212, 0.15);
  --accent-purple-glow: rgba(139, 127, 212, 0.4);
  
  /* Gradient */
  --accent-gradient: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-purple) 100%);
  --accent-gradient-soft: linear-gradient(135deg, rgba(90, 200, 200, 0.2) 0%, rgba(139, 127, 212, 0.2) 100%);
  
  /* Status Colors - From Spec */
  --color-success: #34D399;
  --color-warning: #FBBF24;
  --color-danger: #F87171;
  --color-info: #93C5FD;
  
  /* Text Colors - From Spec */
  --text-primary: #FFFFFF;
  --text-secondary: #9CA3AF;
  --text-muted: rgba(156, 163, 175, 0.6);
  --text-accent: var(--accent-teal);
  
  /* Borders - From Spec */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: #3C3C44;
  --border-focus: var(--accent-teal);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-teal: 0 0 30px var(--accent-teal-glow);
  --shadow-glow-purple: 0 0 30px var(--accent-purple-glow);
  
  /* Typography — Manrope for premium warmth, substantial wellness feel */
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-weight-light: 400;      /* Lifted: 300 was too thin for dark screens */
  --font-weight-regular: 500;    /* Body text — medium weight for comfort */
  --font-weight-medium: 600;     /* Numbers, metrics, emphasis */
  --font-weight-semibold: 700;   /* Headings, question titles, buttons */
  --font-weight-bold: 800;       /* Strong display — big numbers, heroes */
  
  /* Legacy alias for thin (maps to regular for backward compatibility) */
  --font-weight-thin: 400;
  
  /* Letter Spacing - FROM SPEC */
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-headers: 0.02em;  /* Headers */
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  
  /* Spacing - Generous padding (Oura Premium) */
  --spacing-xs: 10px;
  --spacing-sm: 16px;
  --spacing-md: 20px;
  --spacing-lg: 28px;        /* Card padding */
  --spacing-xl: 40px;        /* Between sections */
  --spacing-2xl: 56px;
  
  /* Border Radius - FROM SPEC */
  --radius-sm: 12px;         /* Inputs */
  --radius-md: 16px;         /* Cards */
  --radius-lg: 16px;         /* Cards (same) */
  --radius-xl: 24px;
  --radius-full: 9999px;     /* Pills/Buttons */
  
  /* Safe Areas for iPhone X */
  --safe-top: env(safe-area-inset-top, 44px);
  --safe-bottom: env(safe-area-inset-bottom, 34px);
  
  /* Glass Morphism */
  --glass-bg: rgba(22, 22, 24, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
}

/* ========================================
   GLOBAL SVG WEIGHT OVERRIDE
   Force heavy strokes on ALL UI icons across the quiz.
   Overrides hardcoded stroke-width="1.5" presentation attributes.
   ======================================== */
.option-emoji svg,
.option-icon-svg svg,
.option-icon svg,
.challenge-avatar svg,
.permission-card-icon svg,
.permission-icon svg,
.window-icon svg,
.logo-icon svg,
.update-icon svg,
.fact-icon svg {
  stroke-width: 2.5 !important;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-weight: var(--font-weight-regular);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: var(--tracking-normal);
}

/* ========================================
   APP CONTAINER - iPhone X Dimensions
   ======================================== */

.app-container {
  width: 100%;
  max-width: 375px;
  height: 100vh;
  height: 100dvh;
  max-height: 812px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}

/* Desktop centering with elegant frame */
@media (min-height: 813px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body, #050507);
  }
  
  .app-container {
    border-radius: 44px;
    box-shadow: 
      0 0 0 1px var(--border-subtle),
      var(--shadow-lg),
      0 0 100px rgba(90, 200, 200, 0.05);
    height: 812px;
    position: relative;
  }
  
  /* Constrain header within phone frame on desktop */
  .app-header {
    position: absolute;
    max-width: 375px;
    border-radius: 44px 44px 0 0;
  }
  
  /* Constrain buttons within phone frame on desktop */
  .btn-continue {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    transform: none;
    width: calc(100% - 48px);
    max-width: 327px;
    margin: 0 auto;
  }
  
  .btn-next {
    position: absolute;
    right: 24px;
    bottom: 24px;
  }
}

/* ========================================
   APP HEADER - Logo + Progress
   ======================================== */

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 375px;
  margin: 0 auto;
  z-index: 200;
  padding-top: 60px; /* Generous padding for safe area + comfort inside phone frame */
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
  padding-bottom: 16px;
  background: linear-gradient(to bottom, var(--bg-deep) 0%, var(--bg-deep) 80%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;              /* Bold logo — substantial brand presence */
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.progress-dots-top {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.progress-dots-top .progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-dots-top .progress-dot.active {
  background: var(--accent-teal);
  width: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-glow-teal);
}

.progress-dots-top .progress-dot.completed {
  background: rgba(90, 200, 200, 0.4);
}

/* ========================================
   TWILIGHT SUNSET BACKGROUND - Quote Slides
   Late sunset vibe: deep purple twilight meets warm horizon glow
   ======================================== */

.slide[data-slide="1"],
.slide[data-slide="2"] {
  background: 
    /* Radial glow from below horizon — muted dusk twilight */
    radial-gradient(
      ellipse 180% 100% at 50% 110%,
      rgba(110, 55, 40, 0.22) 0%,       /* muted dusk horizon glow */
      rgba(88, 42, 48, 0.18) 18%,       /* cool twilight fade */
      rgba(58, 32, 55, 0.12) 38%,       /* deep violet */
      rgba(38, 22, 42, 0.07) 58%,       /* near-black purple */
      transparent 76%
    ),
    /* Vertical gradient: deep blue-violet to near-black */
    linear-gradient(
      180deg,
      #14101E 0%,                       /* deep blue-violet sky */
      #1C1428 15%,                      /* rich deep indigo */
      #241830 30%,                      /* dusk violet */
      #2A1C2E 45%,                      /* muted warm violet */
      #281C1C 60%,                      /* cool deep warm */
      #201414 80%,                      /* near-black warm */
      #160E0E 100%                      /* dark earth */
    );
}

/* Quote Slides — Premium frosted glass button */
.slide[data-slide="1"] .btn-continue,
.slide[data-slide="2"] .btn-continue {
  background: rgba(16, 12, 24, 0.68);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.50), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(248, 244, 240, 0.96);
}

.slide[data-slide="1"] .btn-continue:hover:not(.disabled),
.slide[data-slide="2"] .btn-continue:hover:not(.disabled) {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.60), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(20, 16, 30, 0.74);
}

/* Default dusk quote marks — muted, elegant */
.slide[data-slide="1"] .quote-mark,
.slide[data-slide="2"] .quote-mark {
  color: rgba(160, 130, 100, 0.10);
  font-size: 52px;
}

/* Default dusk quote text */
.slide[data-slide="1"] .quote-text,
.slide[data-slide="2"] .quote-text {
  color: rgba(240, 228, 215, 0.95);
}

/* Default dusk quote author */
.slide[data-slide="1"] .quote-author,
.slide[data-slide="2"] .quote-author {
  color: rgba(175, 150, 130, 0.60);
}

/* Warmer progress dots on sunset slides */
.slide[data-slide="1"].active ~ .app-header .progress-dot.active,
.slide[data-slide="2"].active ~ .app-header .progress-dot.active {
  background: rgba(200, 160, 120, 0.9);
  box-shadow: 0 0 20px rgba(200, 160, 120, 0.5);
}

/* Warmer header gradient for sunset slides - via JS class */
body.sunset-active .app-header {
  background: linear-gradient(to bottom, 
    rgba(24, 12, 36, 0.95) 0%, 
    rgba(24, 12, 36, 0.8) 60%, 
    transparent 100%
  );
}

body.sunset-active .logo-text {
  color: rgba(255, 240, 220, 0.9);
}

body.sunset-active .progress-dot.active {
  background: rgba(200, 160, 120, 0.9);
  box-shadow: 0 0 20px rgba(200, 160, 120, 0.5);
}

body.sunset-active .progress-dot.completed {
  background: rgba(200, 160, 120, 0.35);
}

/* ========================================
   SLIDE SYSTEM
   ======================================== */

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Account for header (60px top + logo + progress ~120px total) and bottom button (~100px) */
  padding: 120px var(--spacing-md) calc(var(--safe-bottom) + 100px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* CRITICAL FIX: Ensure inactive slides are completely hidden */
  z-index: -1;
  pointer-events: none;
  /* Hide content completely when not active */
  display: none;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  /* CRITICAL FIX: Ensure active slide is on top and visible */
  z-index: 10;
  pointer-events: auto;
  display: flex;
}

.slide.exit {
  opacity: 0;
  transform: translateX(-20px);
  z-index: 5;
}

.slide-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  max-height: 100%;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  padding: 0 var(--spacing-sm);
  /* Ensure content is visible */
  opacity: 1;
  visibility: visible;
}

.center-content {
  align-items: center;
  text-align: center;
  justify-content: center;
}

/* Ensure active slide content is always visible */
.slide.active .slide-content {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   TYPOGRAPHY — Cal AI-inspired hierarchy
   Heavy headlines, warm body, crystal-clear CTAs
   ======================================== */

/* Quote Slides - Elegant & Spacious */
.quote-slide {
  padding: var(--spacing-2xl) var(--spacing-xl);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.quote-mark {
  font-size: 72px;
  line-height: 1;
  color: var(--accent-teal);
  opacity: 0.15;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: -24px;
  text-align: center;
  width: 100%;
}

.quote-text {
  font-size: clamp(22px, 5.6vw, 28px);
  font-weight: 600;               /* Semibold — quotes should have weight */
  line-height: 1.45;
  letter-spacing: -0.015em;
  margin-bottom: var(--spacing-xl);
  color: var(--accent-teal);
  display: block;
  text-align: center;
  width: 100%;
}

.quote-text span {
  display: inline !important;
}

.quote-author {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Big Text — Bold display headlines */
.big-text {
  font-size: clamp(36px, 9.5vw, 46px);
  font-weight: 800;               /* ExtraBold — this is the HERO text */
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--spacing-sm);
}

.medium-text {
  font-size: clamp(21px, 5.2vw, 25px);
  font-weight: 600;               /* SemiBold — substantial supporting text */
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-lg);
}

.small-text {
  font-size: 15px;
  font-weight: 500;               /* Medium — never light on dark screens */
  line-height: 1.55;
}

.body-text {
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 500;               /* Medium — warm, readable, never too thin */
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

.body-text strong {
  color: var(--text-primary);
  font-weight: 700;               /* Bold for inline emphasis */
}

/* Accent Colors */
.highlight {
  color: var(--accent-teal);
}

.highlight-purple {
  color: var(--accent-purple);
}

.subtle {
  color: var(--text-muted);
}

/* Question Titles — Bold & clear, the user needs to know exactly what to do */
.question-title {
  font-size: clamp(22px, 5.6vw, 26px);
  font-weight: 700;               /* Bold — decisive, clear instruction */
  line-height: 1.3;
  letter-spacing: -0.018em;
  margin-bottom: var(--spacing-2xl);
  text-align: center;
  color: var(--text-primary);
}

.question-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  margin-top: calc(-1 * var(--spacing-lg));
  margin-bottom: var(--spacing-xl);
  letter-spacing: 0.01em;
}

/* ========================================
   BUTTONS - Sticky at Bottom
   ======================================== */

/* Primary Continue Button — Solid, confident, impossible to miss */
.btn-continue {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 20px) + 24px);
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: none;
  width: calc(100% - 48px);
  max-width: 327px;
  height: 60px;               /* Slightly taller for a more substantial feel */
  min-height: 44px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #5AC8C8, #8B7FD4);
  border: none;
  color: white;
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 700;            /* Bold — the CTA needs presence */
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 30px rgba(90, 200, 200, 0.4);
  z-index: 100;
  text-align: center;
}

.btn-continue:hover:not(.disabled) {
  box-shadow: 
    var(--shadow-glow-teal),
    0 14px 45px rgba(90, 200, 200, 0.35);
}

.btn-continue:active:not(.disabled) {
  /* handled by themes.css glass active state */
}

.btn-continue.disabled {
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  border: 1px solid var(--border-subtle);
}

/* Circle Arrow Button - Fixed at bottom right */
.btn-next {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 24px);
  right: 24px;
  width: 60px;
  height: 60px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glow-teal);
  z-index: 100;
}

/* Constrain btn-next within phone frame on desktop */
@media (min-height: 813px) {
  .btn-next {
    right: calc(50% - 187.5px + 24px);
  }
}

.btn-next:hover {
  transform: scale(1.1);
  box-shadow: 
    var(--shadow-glow-teal),
    0 0 60px rgba(90, 200, 200, 0.45);
}

.btn-next:active {
  transform: scale(0.95);
}

.btn-next .arrow {
  font-size: 24px;
  color: var(--bg-deep);
  font-weight: var(--font-weight-medium);
}

/* ========================================
   CARDS - Glass Morphism
   ======================================== */

/* Base Card Style */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all 0.3s ease;
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* ========================================
   OPTIONS & SELECTIONS - Premium Feel
   ======================================== */

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
  width: 100%;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: 100%;
  max-height: calc(100vh - 400px);
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 80px;
}

/* Full Width Option Button — Generous, tactile, premium */
.option-btn-full {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  min-height: 72px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.option-btn-full:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-teal);
  border-width: 2px;
  transform: translateX(3px);
}

/* SELECTED STATE — Strong, unmistakable, Cal AI style */
.option-btn-full.selected {
  background: linear-gradient(135deg,
    rgba(70, 168, 168, 0.30) 0%,
    rgba(123, 114, 188, 0.22) 100%
  );
  border: 2.5px solid var(--accent-teal);
  box-shadow:
    0 0 0 2px var(--accent-teal-dim),
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Grid Option Button — Tall, spacious, inviting */
.option-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg) var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.option-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-teal);
  transform: translateY(-2px);
}

/* SELECTED STATE — Strong, unmistakable */
.option-btn.selected {
  background: linear-gradient(135deg,
    rgba(70, 168, 168, 0.30) 0%,
    rgba(123, 114, 188, 0.22) 100%
  );
  border: 2.5px solid var(--accent-teal);
  box-shadow:
    0 0 0 2px var(--accent-teal-dim),
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* =====================================================
   ICON SYSTEM — Substantial, not wispy
   Background badge + heavy stroke = visual weight
   ===================================================== */

/* Full-width list button icons — badge container */
.option-emoji,
.option-icon-svg {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  /* Badge background gives icons visual anchor */
  background: rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  transition: background 250ms ease, border-color 250ms ease, color 250ms ease;
}

/* Emoji inside badge — large, centered, no filter */
.option-emoji:not(:has(svg)),
.option-icon-svg:not(:has(svg)) {
  font-size: 24px;
  line-height: 1;
}

/* Force heavy strokes — overrides hardcoded stroke-width="1.5" HTML attribute */
.option-emoji svg,
.option-icon-svg svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5 !important;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Selected icon badge glows with accent */
.option-btn-full.selected .option-emoji,
.option-btn-full.selected .option-icon-svg,
.option-btn.selected .option-emoji,
.option-btn.selected .option-icon-svg {
  color: var(--accent-teal);
  background: rgba(70, 168, 168, 0.22);
  border-color: rgba(70, 168, 168, 0.40);
}

/* Grid button icons — badge container */
.option-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  margin-bottom: 4px;
  transition: background 250ms ease, border-color 250ms ease, color 250ms ease;
}

.option-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5 !important;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.option-btn.selected .option-icon {
  color: var(--accent-teal);
  background: rgba(70, 168, 168, 0.22);
  border-color: rgba(70, 168, 168, 0.40);
}

.option-text {
  font-size: 15px;              /* Slightly larger for readability */
  font-weight: 600;             /* SemiBold — warm and readable, not too thin */
  color: var(--text-secondary);
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.option-label {
  font-size: 15px;
  font-weight: 700;             /* Bold — grid options need strong weight */
  color: var(--text-secondary);
  letter-spacing: -0.005em;
  text-align: center;
}

.option-btn-full.selected .option-text,
.option-btn.selected .option-label {
  color: var(--text-primary);
  font-weight: 700;             /* Bold on selected for extra pop */
}

/* Age Grid */
.age-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

.age-grid .option-btn.wide {
  grid-column: span 2;
}

/* Selection Animation - Basic */
@keyframes selectPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.option-btn.selected,
.option-btn-full.selected {
  animation: selectPulse 0.3s ease-out;
}

/* ========================================
   AUTO-ADVANCE PULSE ANIMATION
   For single-select questions
   ======================================== */

@keyframes pulseSelect {
  0% { 
    transform: scale(1);
    box-shadow: var(--shadow-glow-teal);
  }
  30% { 
    transform: scale(1.03);
    box-shadow: 0 0 40px var(--accent-teal-glow), 0 0 60px rgba(90, 200, 200, 0.2);
  }
  100% { 
    transform: scale(1);
    box-shadow: var(--shadow-glow-teal);
  }
}

.option-btn.pulse-select,
.option-btn-full.pulse-select,
.challenge-card.pulse-select {
  animation: pulseSelect 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none; /* Prevent double-taps during animation */
}

/* Permanent checkmark on selected full-width options */
.option-btn-full.selected::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  width: 22px;
  height: 22px;
  background: var(--accent-teal);
  border-radius: 50%;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23050508' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* Animated checkmark on pulse (auto-advance) */
.option-btn.pulse-select::after,
.option-btn-full.pulse-select::after,
.challenge-card.pulse-select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 16px;
  width: 22px;
  height: 22px;
  background: var(--accent-teal);
  border-radius: 50%;
  transform: translateY(-50%) scale(0);
  animation: checkmarkPop 0.3s ease-out 0.1s forwards;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23050508' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px;
  background-repeat: no-repeat;
  background-position: center;
}

@keyframes checkmarkPop {
  0% { 
    transform: translateY(-50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translateY(-50%) scale(1.2);
    opacity: 1;
  }
  100% { 
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

/* Smooth slide transitions for auto-advance */
.slide {
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.35s;
}

.slide.active {
  transition-delay: 0.05s;
}

/* Hide continue button on single-select slides when not needed */
.slide[data-slide="7"] .btn-continue.disabled,
.slide[data-slide="8"] .btn-continue.disabled,
.slide[data-slide="9"] .btn-continue.disabled,
.slide[data-slide="10"] .btn-continue.disabled,
.slide[data-slide="15"] .btn-continue.disabled,
.slide[data-slide="16"] .btn-continue.disabled,
.slide[data-slide="18"] .btn-continue.disabled,
.slide[data-slide="19"] .btn-continue.disabled,
.slide[data-slide="21"] .btn-continue.disabled,
.slide[data-slide="22"] .btn-continue.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Branch slides single-select continue buttons */
.branch-slide .btn-continue.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ========================================
   CHALLENGE CARDS
   ======================================== */

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.challenge-card {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 120px;
  max-height: 140px;
  -webkit-tap-highlight-color: transparent;
}

.challenge-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-teal);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* SELECTED — Strong, high contrast */
.challenge-card.selected {
  background: linear-gradient(135deg,
    rgba(70, 168, 168, 0.30) 0%,
    rgba(123, 114, 188, 0.22) 100%
  );
  border: 2.5px solid var(--accent-teal);
  box-shadow:
    0 0 0 2px var(--accent-teal-dim),
    0 4px 20px rgba(0, 0, 0, 0.25),
    0 0 20px rgba(90, 200, 200, 0.15);
}

/* Challenge Avatar — emoji + SVG both supported */
.challenge-avatar {
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  /* Emoji rendering */
  font-size: 30px;
  line-height: 1;
  transition: background 250ms ease, border-color 250ms ease, color 250ms ease;
}

.challenge-avatar svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.5 !important;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.challenge-card.selected .challenge-avatar {
  color: var(--accent-teal);
  background: rgba(70, 168, 168, 0.22);
  border-color: rgba(70, 168, 168, 0.45);
}

.challenge-title {
  font-size: 13px;
  font-weight: 800;            /* ExtraBold — needs to be readable at small sizes */
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.challenge-desc {
  font-size: 11px;
  font-weight: 500;            /* Medium — not too thin */
  color: rgba(156, 163, 175, 0.8);
  line-height: 1.4;
  letter-spacing: 0;
}

.challenge-card.selected .challenge-desc {
  color: var(--text-secondary);
}

/* Other challenge card - spans 2 columns */
.challenge-card.other-challenge {
  grid-column: span 2;
  flex-direction: row;
  min-height: auto;
  max-height: none;
  padding: 14px 18px;
  gap: 14px;
  align-items: center;
}

.challenge-card.other-challenge .challenge-avatar {
  width: 44px;
  height: 44px;
  font-size: 22px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.challenge-card.other-challenge .challenge-title {
  flex: 1;
  text-align: left;
}

.challenge-card.other-challenge .challenge-desc {
  display: none;
}

/* ========================================
   VALIDATION SLIDES
   ======================================== */

.stat-highlight {
  text-align: center;
  margin: var(--spacing-2xl) 0;
}

.big-number {
  font-size: 72px;
  font-weight: 800;              /* ExtraBold — numbers are heroes */
  letter-spacing: -0.04em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1.0;
  margin-bottom: var(--spacing-sm);
}

/* ========================================
   MIRROR/TRANSITION SLIDE (Slide 14)
   ======================================== */

/* Slide 14 specific - ensure content is vertically centered */
.slide[data-slide="14"] .slide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.mirror-container {
  padding: var(--spacing-2xl) var(--spacing-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 340px;
}

.mirror-problem {
  font-size: 20px;
  font-weight: var(--font-weight-regular);
  line-height: 1.7;
  font-style: italic;
  /* Use solid color as fallback, with gradient overlay */
  color: var(--accent-teal);
  /* Gradient text with fallback */
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Ensure visibility */
  opacity: 1;
  visibility: visible;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .mirror-problem {
    color: var(--accent-teal);
    -webkit-text-fill-color: initial;
  }
}

/* ========================================
   PROGRESS DOTS - Now in header (old bottom styles removed)
   ======================================== */

/* Legacy support - hide old progress container if present */
.progress-container {
  display: none;
}

.progress-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-dot.active {
  background: var(--accent-teal);
  width: 28px;
  border-radius: 14px;
  box-shadow: var(--shadow-glow-teal);
}

.progress-dot.completed {
  background: rgba(90, 200, 200, 0.4);
}

/* ========================================
   LOGO & ICONS
   ======================================== */

/* Logo Icon - SVG */
.logo-icon {
  width: 72px;
  height: 72px;
  margin-bottom: var(--spacing-xl);
  animation: gentleFloat 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
}

.logo-icon svg {
  width: 64px;
  height: 64px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========================================
   PERMISSION SLIDE
   ======================================== */

.permission-slide {
  padding: var(--spacing-lg);
}

.permission-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

/* Permission Icon - SVG */
.permission-icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
}

.permission-icon svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  stroke-width: 2.0;
  fill: none;
}

.permission-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--spacing-sm);
}

.permission-desc {
  font-size: 15px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  line-height: 1.5;
}

.permission-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.permission-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.0, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(12px);
}

.slide[data-slide="23"].active .permission-card {
  animation: permissionCardReveal 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.slide[data-slide="23"].active .permission-card:nth-child(1) { animation-delay: 0.15s; }
.slide[data-slide="23"].active .permission-card:nth-child(2) { animation-delay: 0.3s; }

@keyframes permissionCardReveal {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.permission-card:hover {
  border-color: var(--accent-teal);
}

.permission-card.granted {
  border-color: var(--color-success);
  background: rgba(110, 231, 183, 0.1);
}

/* Permission Card Icon - SVG */
.permission-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-elevated);
  border-radius: var(--radius-md);
  color: var(--accent-teal);
}

.permission-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.permission-card-content {
  flex: 1;
}

.permission-card-content h3 {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  margin-bottom: 4px;
}

.permission-card-content p {
  font-size: 13px;
  color: var(--text-muted);
}

.permission-btn {
  background: var(--accent-gradient);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  color: var(--bg-deep);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.3s ease;
}

.permission-btn-check {
  display: none;
}

.permission-card.granted .permission-btn {
  background: var(--color-success);
}

.permission-card.granted .permission-btn-text {
  display: none;
}

.permission-card.granted .permission-btn-check {
  display: inline;
}

.permission-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--spacing-md);
}

/* ========================================
   ENERGY AGE REVEAL
   ======================================== */

.energy-age-slide {
  background: 
    radial-gradient(ellipse at 50% 30%, rgba(139, 127, 212, 0.12) 0%, transparent 60%),
    var(--bg-deep);
}

.energy-age-slide .slide-content {
  justify-content: flex-start;
  padding-top: 0;
  overflow-y: visible;
}

.energy-age-reveal {
  text-align: center;
  padding: var(--spacing-md) 0;
}

/* Energy age label styling */
.energy-age-label {
  font-size: 14px;
  font-weight: var(--font-weight-light);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
}

/* Force energy age number to be visible when slide is active */
.slide[data-slide="26"].active .energy-age-number {
  display: inline-block !important;
  visibility: visible !important;
}

.slide[data-slide="26"].active .energy-age-real {
  display: block !important;
  visibility: visible !important;
}

.energy-age-number-container {
  margin: var(--spacing-md) 0;
}

.energy-age-number {
  font-size: 96px;
  font-weight: var(--font-weight-light);
  line-height: 1;
  background: linear-gradient(135deg, var(--color-danger) 0%, #FBBF24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.energy-age-comparison {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.actual-age {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--text-muted);
}

.energy-gap {
  font-size: 28px;
  font-weight: var(--font-weight-light);
  color: var(--color-danger);
  letter-spacing: var(--tracking-wide);
}

/* Energy Age Explanation (slide 26) */
.energy-age-explanation {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.energy-age-explanation .explanation-text {
  font-size: 14px;
  font-weight: var(--font-weight-light);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.energy-age-explanation .explanation-text strong {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.energy-age-explanation .explanation-punchline {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-md);
}

.energy-age-real {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: var(--spacing-sm);
}

/* ========================================
   EXPLANATION SLIDE
   ======================================== */

.explanation-container {
  text-align: center;
  padding: var(--spacing-xl);
}

.explanation-intro {
  font-size: 18px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.productive-hours {
  margin: var(--spacing-xl) 0;
}

.hours-number {
  font-size: 80px;
  font-weight: var(--font-weight-light);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  letter-spacing: -0.02em;
}

.hours-label {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
}

.explanation-mild {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

.explanation-reality {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
}

.explanation-reality p {
  font-size: 14px;
  color: var(--text-muted);
}

.reality-number {
  font-size: 72px;
  font-weight: var(--font-weight-light);
  color: var(--color-warning);
  display: block;
  margin: var(--spacing-sm) 0;
}

.reality-detail {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--spacing-sm);
}

.explanation-punchline {
  font-size: 18px;
  font-weight: var(--font-weight-regular);
  color: var(--text-primary);
  margin-top: var(--spacing-xl);
}

.highlight-orange {
  color: var(--color-warning);
  font-weight: var(--font-weight-medium);
}

/* ========================================
   HOPE SLIDE
   ======================================== */

.hope-slide {
  background: 
    radial-gradient(ellipse at 50% 60%, rgba(110, 231, 183, 0.08) 0%, transparent 60%),
    var(--bg-deep);
}

.hope-slide .slide-content {
  padding-top: calc(var(--safe-top) + 40px);
  justify-content: flex-start;
}

.hope-container {
  text-align: center;
  padding: var(--spacing-md);
}

/* Child elements inside active hope-slide */
.hope-slide.active .hope-intro,
.hope-slide.active .hope-explanation,
.hope-slide.active .hope-headline-container,
.hope-slide.active .hope-stats,
.hope-slide.active .update-teaser {
  opacity: 1;
  visibility: visible;
}

.hope-icon {
  font-size: 56px;
  margin-bottom: var(--spacing-lg);
  animation: gentleGlow 3s ease-in-out infinite;
}

@keyframes gentleGlow {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.hope-intro {
  font-size: 18px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.hope-explanation {
  font-size: 15px;
  font-weight: var(--font-weight-regular);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.hope-headline {
  font-size: 26px;
  font-weight: var(--font-weight-light);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.hope-headline-container {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-sm) 0;
}

.hope-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin: var(--spacing-lg) 0;
}

.hope-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hope-stat-number {
  font-size: 56px;
  font-weight: var(--font-weight-light);
  background: linear-gradient(135deg, var(--color-success) 0%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hope-stat-label {
  font-size: 13px;
  font-weight: var(--font-weight-regular);
  color: var(--text-muted);
  text-align: center;
  max-width: 120px;
}

.update-teaser {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--accent-teal-dim);
  border: 1px solid rgba(90, 200, 200, 0.3);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-full);
  margin-top: var(--spacing-xl);
}

/* Update Icon - SVG */
.update-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
}

.update-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.update-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.update-text strong {
  color: var(--accent-teal);
}

/* ========================================
   CHART SLIDES
   ======================================== */

.chart-slide {
  padding-top: var(--spacing-md);
}

.chart-slide .slide-content {
  overflow-y: auto;
  padding-bottom: 100px;
}

.chart-title {
  font-size: 19px;
  font-weight: var(--font-weight-thin);
  text-align: center;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.01em;
}

.chart-subtitle {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.energy-curve-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin: 0 auto;
  width: 100%;
  max-width: 320px;
}

.energy-curve-container canvas {
  width: 100%;
  height: 160px;
}

.energy-curve-container.small {
  max-width: 280px;
  padding: var(--spacing-sm);
}

/* Compact chart slide content */
.curve-insight {
  text-align: center;
  margin: var(--spacing-md) 0;
}

.curve-insight p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--spacing-xs);
}

.gap-callout {
  text-align: center;
  margin: var(--spacing-sm) 0;
}

.gap-callout p {
  font-size: 13px;
  margin: var(--spacing-xs) 0;
}

.gap-callout .gap-message {
  font-size: 14px;
  color: var(--text-primary);
}

.peak-info {
  text-align: center;
  padding: var(--spacing-sm);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-sm);
}

.peak-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: var(--spacing-xs) 0;
}

.peak-info .peak-punchline {
  font-size: 13px;
  color: var(--text-primary);
  margin-top: var(--spacing-sm);
}

.curve-legend {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  margin: var(--spacing-lg) 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.current {
  background: var(--accent-purple); /* Muted purple for current */
  box-shadow: 0 0 8px var(--accent-purple-glow);
}

.legend-dot.optimal {
  background: var(--accent-teal); /* Soft teal for optimal */
  box-shadow: 0 0 8px var(--accent-teal-glow);
}

.legend-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.gap-insight {
  background: rgba(249, 168, 168, 0.1);
  border: 1px solid rgba(249, 168, 168, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  text-align: center;
}

.gap-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.gap-highlight {
  font-size: 18px;
  font-weight: var(--font-weight-medium);
  color: var(--accent-teal);
  margin-top: var(--spacing-xs);
}

.gap-years {
  font-size: 36px;
  font-weight: var(--font-weight-light);
  color: var(--color-danger);
  display: block;
  margin: var(--spacing-sm) 0;
}

/* ========================================
   NOW INSIGHT (Slide 28)
   ======================================== */

.now-insight {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.now-time {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.now-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.now-revelation {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.peak-preview {
  text-align: center;
  margin: var(--spacing-xl) 0;
}

.peak-text {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.peak-warning {
  font-size: 14px;
  color: var(--text-muted);
}

.highlight-red {
  color: var(--color-danger);
  font-weight: var(--font-weight-medium);
}

.gap-conclusion {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  text-align: center;
  color: var(--text-primary);
  margin-top: var(--spacing-xl);
}

/* ========================================
   MELATONIN WINDOW (Slide 29)
   ======================================== */

.window-reveal {
  text-align: center;
  padding: var(--spacing-xl);
}

/* Window Icon - SVG */
.window-icon {
  width: 72px;
  height: 72px;
  margin-bottom: var(--spacing-lg);
  animation: gentleFloat 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
}

.window-icon svg {
  width: 64px;
  height: 64px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.window-intro {
  font-size: 18px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.melatonin-time-container {
  margin: var(--spacing-xl) 0;
}

.melatonin-time {
  font-size: 52px;
  font-weight: var(--font-weight-light);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.window-explanation {
  font-size: 15px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.window-fact {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--accent-teal-dim);
  border: 1px solid rgba(90, 200, 200, 0.3);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-lg);
}

/* Fact Icon - SVG */
.fact-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
  flex-shrink: 0;
}

.fact-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.fact-text {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: left;
  line-height: 1.4;
}

/* ========================================
   SCREEN TIME (Slide 30)
   ======================================== */

.screen-time-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.screen-time-stat {
  margin: var(--spacing-lg) 0;
}

.screen-hours {
  font-size: 72px;
  font-weight: var(--font-weight-thin);
  color: var(--color-warning);
  letter-spacing: -0.03em;
}

.screen-label {
  font-size: 16px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  margin-left: var(--spacing-xs);
}

.screen-context {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

.offending-apps {
  margin-top: var(--spacing-xl);
}

.apps-header {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.app-list-enhanced {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.app-item-enhanced {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

/* App Item Icon - SVG */
.app-item-enhanced .app-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.app-item-enhanced .app-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.app-item-enhanced .app-icon.tiktok {
  background: linear-gradient(135deg, #00f2ea, #ff0050);
}

.app-item-enhanced .app-icon.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.app-item-enhanced .app-icon.youtube {
  background: #FF0000;
}

.app-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-details .app-name {
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.app-details .app-time {
  font-size: 13px;
  color: var(--text-muted);
}

.deep-sleep-cost {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.deep-sleep-cost .cost-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.deep-sleep-cost .cost-value {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  color: var(--color-danger);
}

.screen-equation {
  margin: var(--spacing-xl) 0;
  text-align: center;
}

.equation-box {
  background: rgba(249, 168, 168, 0.1);
  border: 1px solid rgba(249, 168, 168, 0.3);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.equation-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.equation-result {
  color: var(--color-danger);
  font-weight: var(--font-weight-medium);
}

.equation-note {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.block-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  background: var(--accent-teal-dim);
  border: 1px solid rgba(90, 200, 200, 0.3);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* Block Icon - SVG */
.block-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
}

.block-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.block-text {
  font-size: 14px;
  color: var(--accent-teal);
  font-weight: var(--font-weight-medium);
}

.skip-link {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
  position: absolute;
  bottom: calc(var(--safe-bottom) + 50px);
  left: 0;
  right: 0;
}

.skip-link:hover {
  color: var(--text-secondary);
}

/* ========================================
   SMART ALARM (Slide 31)
   ======================================== */

.alarm-picker {
  text-align: center;
  padding: var(--spacing-2xl) 0;
}

.alarm-time-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: var(--spacing-xl);
  opacity: 0;
  transform: scale(0.9) translateY(10px);
}

.slide[data-slide="31"].active .alarm-time-display {
  animation: alarmTimeReveal 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) 0.15s forwards;
}

@keyframes alarmTimeReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  60% {
    opacity: 1;
    transform: scale(1.03) translateY(-3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.alarm-hour, .alarm-minute {
  font-size: 80px;
  font-weight: var(--font-weight-thin);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.alarm-colon {
  font-size: 80px;
  font-weight: var(--font-weight-thin);
  color: var(--accent-teal);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.alarm-period {
  font-size: 24px;
  font-weight: var(--font-weight-light);
  color: var(--text-secondary);
  margin-left: var(--spacing-sm);
}

.alarm-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 120px;
  cursor: pointer;
}

.smart-alarm-info {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  opacity: 0;
  transform: translateY(12px);
}

.slide[data-slide="31"].active .smart-alarm-info {
  animation: alarmInfoReveal 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.35s forwards;
}

@keyframes alarmInfoReveal {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
}

.info-item:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

/* Info Icon - SVG */
.info-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
}

.info-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.info-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ========================================
   PROTOCOL TIMELINE (Slide 32)
   ======================================== */

.protocol-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: var(--spacing-lg);
}

.protocol-timeline::before {
  content: '';
  position: absolute;
  left: 58px;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: var(--border-card);
}

.protocol-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  opacity: 0.6;
  transition: opacity 300ms ease-out;
}

.protocol-item.highlight {
  opacity: 1;
}

.protocol-time {
  width: 56px;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-align: right;
}

.protocol-item.highlight .protocol-time {
  color: var(--accent-teal);
}

.protocol-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex: 1;
}

/* Protocol Icon - SVG */
.protocol-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
}

.protocol-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.protocol-item.highlight .protocol-icon {
  background: var(--accent-teal-dim);
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-glow-teal);
}

.protocol-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.protocol-title {
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.protocol-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.protocol-apps {
  margin-top: var(--spacing-xl);
  text-align: center;
}

.protocol-apps-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.locked-apps {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.locked-app {
  background: rgba(249, 168, 168, 0.15);
  border: 1px solid rgba(249, 168, 168, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--color-danger);
}

/* ========================================
   ONBOARDING PROTOCOL RINGS - Slide 32
   Oura-style ghost ring timers
   ======================================== */

.onboarding-protocol-rings {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: var(--spacing-xs);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-lg);
}

.protocol-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  min-width: 68px;
}

/* Ring SVG Container */
.protocol-ring-svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

/* Background Ring - Ghost State */
.protocol-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 2.5;
}

/* Progress Ring - Subtle teal hint */
.protocol-ring-progress {
  fill: none;
  stroke: var(--accent-teal);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 201;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(90, 200, 200, 0.4));
}

/* Icon inside ring */
.protocol-ring-icon {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.protocol-ring-icon svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255, 255, 255, 0.4);
}

/* Label below ring */
.protocol-ring-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Time below label */
.protocol-ring-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-teal);
  margin-top: -2px;
}

/* Protocol Summary - Sleep Window */
.protocol-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  background: rgba(90, 200, 200, 0.08);
  border: 1px solid rgba(90, 200, 200, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.summary-icon {
  font-size: 24px;
}

.summary-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-time {
  font-size: 22px;
  font-weight: 300;
  color: var(--accent-teal);
  letter-spacing: -0.02em;
}

/* Responsive adjustments */
@media (max-width: 340px) {
  .protocol-ring-svg {
    width: 48px;
    height: 48px;
  }
  
  .protocol-ring-icon {
    top: 12px;
  }
  
  .protocol-ring-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .protocol-ring-time {
    font-size: 11px;
  }
}

/* ========================================
   PAYWALL (Slide 33) - Tonight Frame
   The emotional close. Make it about TONIGHT.
   ======================================== */

.paywall-slide {
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(139, 127, 212, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(90, 200, 200, 0.08) 0%, transparent 30%),
    var(--bg-deep);
}

.paywall-slide .slide-content {
  padding-bottom: 140px;
  justify-content: flex-start;
  padding-top: calc(var(--safe-top) + 10px);
  overflow-y: auto;
  max-height: calc(100% - 20px);
}

.paywall-container {
  padding: var(--spacing-xs) var(--spacing-sm);
}

/* Tonight Hero - The Emotional Hook */
.tonight-hero {
  text-align: center;
  margin-bottom: var(--spacing-md);
  padding-top: var(--spacing-xs);
}

.tonight-headline {
  font-size: 22px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.tonight-time-hero {
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* The Three Promises */
.tonight-promises {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.promise-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: var(--spacing-sm);
  animation: promiseFadeIn 0.55s cubic-bezier(0.0, 0, 0.2, 1) forwards;
  opacity: 0;
}

.promise-item:nth-child(1) { animation-delay: 0.15s; }
.promise-item:nth-child(2) { animation-delay: 0.28s; }
.promise-item:nth-child(3) { animation-delay: 0.41s; }

@keyframes promiseFadeIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.promise-number {
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--bg-deep);
  flex-shrink: 0;
  margin-top: 2px;
}

.promise-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promise-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.promise-text strong {
  color: var(--accent-teal);
}

.promise-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* The Closer - Emotional (hidden on paywall, overlaps button) */
.tonight-closer {
  display: none; /* Hidden - overlaps with fixed button area */
  text-align: center;
  margin-bottom: var(--spacing-sm);
  animation: closerReveal 0.6s ease-out 0.5s forwards;
  opacity: 0;
}

@keyframes closerReveal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.closer-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

/* Sleep Profile Card - Oura style rounded */
.sleep-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  animation: profileSlideUp 0.5s ease-out 0.4s forwards;
  opacity: 0;
}

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

.profile-title {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin: 0 0 var(--spacing-sm) 0;
  text-align: center;
}

.profile-grid {
  display: flex;
  flex-direction: column;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-row.sub {
  padding-top: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-label {
  font-size: 11px;
  font-weight: var(--font-weight-light);
  color: var(--text-secondary);
}

.profile-value {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.profile-value.energy-age-value {
  font-size: 18px;
  font-weight: 300;
  background: linear-gradient(135deg, #FF6B6B 0%, #FBBF24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-value.goal {
  color: var(--accent-teal);
}

.profile-value.challenge {
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-note {
  font-size: 11px;
  color: var(--accent-teal);
  margin-left: auto;
}

/* Back Button on Paywall */
.btn-back-paywall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: var(--font-weight-regular);
  margin-bottom: var(--spacing-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  position: absolute;
  bottom: calc(var(--safe-bottom) + 145px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.btn-back-paywall:hover,
.btn-back-paywall:active {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-back-paywall svg {
  stroke: currentColor;
}

/* Trial Button - Make it pop */
.trial-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px var(--spacing-lg);
  height: auto;
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-purple) 100%);
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
  box-shadow: 
    0 4px 20px var(--accent-teal-glow),
    0 0 40px var(--accent-purple-glow);
  z-index: 10;
  bottom: calc(var(--safe-bottom) + 70px);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.trial-text {
  font-size: 16px;
  font-weight: 600;
}

.trial-subtext {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.9;
}

/* Trial Terms */
.trial-terms {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  position: absolute;
  bottom: calc(var(--safe-bottom) + 52px);
  left: 0;
  right: 0;
  z-index: 10;
}

/* Restore Link */
.restore-link {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px;
  position: absolute;
  bottom: calc(var(--safe-bottom) + 32px);
  left: 0;
  right: 0;
  z-index: 10;
}

.restore-link:hover,
.restore-link:active {
  color: var(--text-secondary);
}

/* ========================================
   PAYWALL - TONIGHT FRAME
   ======================================== */

.tonight-hero {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.tonight-headline {
  font-size: 24px;
  font-weight: var(--font-weight-thin);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.tonight-time-hero {
  font-weight: var(--font-weight-medium);
  color: var(--accent-teal);
}

.tonight-promises {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.promise-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
}

.promise-number {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--bg-deep);
  flex-shrink: 0;
}

.promise-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.promise-text {
  font-size: 14px;
  font-weight: var(--font-weight-light);
  color: var(--text-primary);
  line-height: 1.5;
}

.promise-text strong {
  color: var(--accent-teal);
  font-weight: var(--font-weight-regular);
}

.promise-subtext {
  font-size: 12px;
  font-weight: var(--font-weight-thin);
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.tonight-closer {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.closer-text {
  font-size: 18px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.closer-subtext {
  font-size: 14px;
  font-weight: var(--font-weight-light);
  color: var(--accent-teal);
  margin: 0;
}

.sleep-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.profile-title {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--spacing-md);
}

.profile-grid {
  display: flex;
  flex-direction: column;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-row.sub {
  padding-top: 0;
  border-bottom: none;
  justify-content: flex-end;
}

.profile-label {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
}

.profile-value {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.profile-value.energy-age-value {
  font-size: 24px;
  font-weight: var(--font-weight-thin);
  background: linear-gradient(135deg, var(--color-danger) 0%, #FBBF24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-value.goal,
.profile-value.challenge {
  font-size: 14px;
  color: var(--accent-teal);
}

.profile-note {
  font-size: 11px;
  color: var(--accent-teal);
}

.trial-terms {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--spacing-sm);
  position: absolute;
  bottom: calc(var(--safe-bottom) + 54px);
  left: 0;
  right: 0;
}

/* ========================================
   SLIDE 30 - SCREEN TIME ENHANCEMENTS
   ======================================== */

.slide-30-buttons {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 80px);
  left: var(--spacing-lg);
  right: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.slide-30-buttons .btn-continue {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.slide-30-buttons .skip-link {
  position: relative;
  bottom: auto;
}

/* ========================================
   MULTI-SELECT STYLES
   ======================================== */

.multi-select .option-btn-full.selected::after,
.multi-select .option-btn.selected::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235AC8C8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ========================================
   BRANCH SLIDES
   ======================================== */

.branch-slide {
  display: none;
}

.branch-slide.active-branch {
  display: flex;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.slide::-webkit-scrollbar,
.options-list::-webkit-scrollbar {
  width: 3px;
}

.slide::-webkit-scrollbar-track,
.options-list::-webkit-scrollbar-track {
  background: transparent;
}

.slide::-webkit-scrollbar-thumb,
.options-list::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 2px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.hidden {
  display: none !important;
}

.visible {
  display: flex !important;
}

/* ========================================
   STARFIELD BACKGROUND
   ======================================== */

.starfield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Constrain starfield to app container on desktop */
@media (min-height: 813px) {
  .starfield {
    border-radius: 44px;
  }
}

.stars-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 200px 50px, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(1px 1px at 240px 90px, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 280px 140px, rgba(255, 255, 255, 0.18), transparent),
    radial-gradient(1px 1px at 320px 60px, rgba(255, 255, 255, 0.22), transparent);
  background-size: 375px 300px;
  animation: twinkle 10s ease-in-out infinite;
  opacity: 0.6;
}

.stars-layer-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(1px 1px at 80px 160px, rgba(90, 200, 200, 0.3), transparent),
    radial-gradient(1px 1px at 180px 260px, rgba(139, 127, 212, 0.25), transparent),
    radial-gradient(1px 1px at 260px 180px, rgba(90, 200, 200, 0.28), transparent),
    radial-gradient(1px 1px at 340px 280px, rgba(139, 127, 212, 0.2), transparent);
  background-size: 375px 450px;
  animation: twinkle 15s ease-in-out infinite reverse;
  opacity: 0.5;
}

.stars-layer-3 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 120px 100px, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(2px 2px at 280px 320px, rgba(255, 255, 255, 0.08), transparent);
  background-size: 375px 600px;
  animation: drift 25s linear infinite;
  opacity: 0.4;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.3; }
}

@keyframes drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-40px); }
}

.shooting-star {
  position: absolute;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, rgba(90, 200, 200, 0.6), transparent);
  transform: rotate(-45deg);
  animation: shoot 4s ease-out infinite;
  opacity: 0;
}

@keyframes shoot {
  0% { opacity: 0; transform: rotate(-45deg) translateX(0); }
  3% { opacity: 1; }
  15% { opacity: 0; transform: rotate(-45deg) translateX(180px); }
  100% { opacity: 0; }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.fade-in-delay {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.fade-in-delay-2 {
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

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

/* Option cards stagger */
.slide.active .option-btn-full,
.slide.active .option-btn,
.slide.active .challenge-card {
  animation: slideUpFade 0.4s ease-out forwards;
  opacity: 0;
}

.options-list .option-btn-full:nth-child(1) { animation-delay: 0.05s; }
.options-list .option-btn-full:nth-child(2) { animation-delay: 0.1s; }
.options-list .option-btn-full:nth-child(3) { animation-delay: 0.15s; }
.options-list .option-btn-full:nth-child(4) { animation-delay: 0.2s; }
.options-list .option-btn-full:nth-child(5) { animation-delay: 0.25s; }
.options-list .option-btn-full:nth-child(6) { animation-delay: 0.3s; }

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

/* Energy Age Count Animation */
.energy-age-number.scale-glow {
  animation: scaleGlow 0.8s ease-out forwards;
}

@keyframes scaleGlow {
  0% { 
    transform: scale(1);
    filter: brightness(1);
  }
  40% { 
    transform: scale(1.1);
    filter: brightness(1.2);
  }
  100% { 
    transform: scale(1.02);
    filter: brightness(1);
  }
}

.energy-gap.gap-reveal {
  animation: gapReveal 0.5s ease-out 0.3s both;
}

@keyframes gapReveal {
  0% { 
    opacity: 0;
    transform: translateY(8px);
  }
  100% { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button Ripple Effect */
.btn-continue {
  position: relative;
  overflow: hidden;
}

.btn-next {
  /* position: absolute is set earlier - DO NOT add position here */
  overflow: hidden;
}

.btn-continue::after,
.btn-next::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn-continue:active::after,
.btn-next:active::after {
  width: 200%;
  height: 200%;
}

/* Selection Check Animation */
@keyframes checkPop {
  0% { transform: translateY(-50%) scale(0); opacity: 0; }
  60% { transform: translateY(-50%) scale(1.2); }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

.option-btn.selected::after,
.option-btn-full.selected::after {
  animation: checkPop 0.3s ease-out;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   FOCUS STATES - Accessibility
   ======================================== */

/* Base focus style for all interactive elements */
button:focus-visible,
input:focus-visible,
.option-btn:focus-visible,
.option-btn-full:focus-visible,
.challenge-card:focus-visible,
.nav-item:focus-visible,
.permission-card:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(90, 200, 200, 0.2);
}

/* Skip link for keyboard navigation */
.skip-link:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

/* Make sure option buttons are keyboard navigable */
.option-btn,
.option-btn-full,
.challenge-card {
  -webkit-tap-highlight-color: transparent;
}

/* ========================================
   SCALE OPTIONS (Difficulty Levels)
   ======================================== */

.scale-options {
  gap: var(--spacing-md);
}

.scale-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
}

.scale-level {
  font-size: 36px;
  flex-shrink: 0;
}

.scale-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scale-title {
  font-size: 16px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.scale-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.option-btn-full.selected .scale-desc {
  color: var(--text-secondary);
}

/* ========================================
   QUOTE SLIDES - Enhanced Author Section
   ======================================== */

.quote-author-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: var(--spacing-lg);
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-image,
.author-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
}

.author-initials {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-teal);
  background: var(--accent-gradient-soft);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.author-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  animation: verifiedPop 0.4s ease-out 0.8s both;
}

.verified-badge svg {
  filter: drop-shadow(0 0 4px rgba(29, 155, 240, 0.5));
}

@keyframes verifiedPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.author-handle {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================
   FALLING STARS ANIMATION
   ======================================== */

.falling-stars-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.falling-star-particle {
  position: absolute;
  top: -5%;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: fallingStar 5s ease-in-out infinite;
  /* Premium glow with brand colors */
  box-shadow: 
    0 0 4px 1px rgba(255, 255, 255, 0.8),
    0 0 10px 3px rgba(90, 200, 200, 0.5),
    0 0 20px 6px rgba(139, 127, 212, 0.3);
}

/* Ethereal tail with brand gradient */
.falling-star-particle::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  width: 1.5px;
  height: 80px;
  background: linear-gradient(
    to bottom, 
    rgba(255, 255, 255, 0.9),
    rgba(90, 200, 200, 0.6) 30%,
    rgba(139, 127, 212, 0.3) 60%,
    transparent
  );
  border-radius: 1px;
}

/* Size variations for particles */
.falling-star-particle:nth-child(odd) {
  width: 2.5px;
  height: 2.5px;
}

.falling-star-particle:nth-child(3n) {
  width: 1.5px;
  height: 1.5px;
  animation-duration: 6s;
}

@keyframes fallingStar {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  3% {
    opacity: 0.9;
  }
  15% {
    opacity: 0.85;
  }
  40% {
    opacity: 0.7;
  }
  75% {
    opacity: 0;
    transform: translateY(100vh) translateX(30px);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) translateX(30px);
  }
}

/* Quote slide content should be above falling stars */
.quote-slide {
  position: relative;
  z-index: 1;
}

/* ========================================
   QUOTE SLIDE CENTERING FIX
   ======================================== */

.quote-slide .slide-content,
.quote-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.quote-slide .quote-text {
  text-align: center;
  width: 100%;
}

.quote-slide .quote-author-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.quote-slide .author-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ========================================
   SLIDE 30 - Screen Time Fix
   ======================================== */

.slide-30-content {
  padding-bottom: 20px !important;
  max-height: calc(100% - 100px) !important;
  overflow-y: auto !important;
}

.slide-30-buttons {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 10px);
  left: var(--spacing-md);
  right: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

.slide-30-buttons .btn-continue {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.slide-30-buttons .skip-link {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  padding: 8px;
}

.slide-30-buttons .skip-link:hover {
  color: var(--text-secondary);
}

/* Compact app list for slide 30 */
.app-list-enhanced {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-item-enhanced {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 10px 12px;
}

.app-item-enhanced .app-icon {
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.app-item-enhanced .app-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-item-enhanced .app-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.app-item-enhanced .app-time {
  font-size: 12px;
  color: var(--text-muted);
}

.app-item-enhanced .deep-sleep-cost {
  text-align: right;
}

.app-item-enhanced .cost-label {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.app-item-enhanced .cost-value {
  font-size: 13px;
  font-weight: 600;
  color: #FF6B6B;
}

/* Screen time header compact */
.screen-time-header .screen-hours {
  font-size: 56px;
}

/* Block preview update */
.block-preview {
  margin-top: 12px;
  padding: 12px;
}

/* ========================================
   PROGRESS DOTS - Show on ALL slides
   ======================================== */

/* Ensure progress dots are always visible on all slides */
.progress-container {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none;
}

.progress-dots {
  pointer-events: auto;
}

/* Ensure visibility even on quote/intro slides */
body .progress-container,
.app-container .progress-container {
  display: flex !important;
  visibility: visible !important;
}

/* ========================================
   SLIDE 27 - ENERGY AGE EXPLANATION (COPY-DECK v3.1)
   ======================================== */

.hope-stat-intro {
  font-size: 14px;
  font-weight: var(--font-weight-thin);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.01em;
}

.hope-stat-inline {
  text-align: center;
  margin: var(--spacing-lg) 0;
}

.hope-stat-number-inline {
  font-size: 44px;
  font-weight: var(--font-weight-thin);
  background: linear-gradient(135deg, var(--color-success) 0%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hope-stat-unit {
  font-size: 18px;
  font-weight: var(--font-weight-light);
  color: var(--color-success);
  margin-left: 4px;
}

.hope-stat-context {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: var(--spacing-sm);
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(90, 200, 200, 0.12) 0%, rgba(139, 127, 212, 0.08) 100%);
  border: 1px solid rgba(90, 200, 200, 0.25);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 20px rgba(90, 200, 200, 0.1);
}

.update-icon {
  font-size: 16px;
}

.update-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.update-text strong {
  color: var(--accent-teal);
}

/* Fade in animations with delays */
.fade-in-up {
  opacity: 0;
  transform: translateY(15px);
}

.slide.active .fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.slide.active .fade-in-up.delay-1 { animation-delay: 0.15s; }
.slide.active .fade-in-up.delay-2 { animation-delay: 0.3s; }
.slide.active .fade-in-up.delay-3 { animation-delay: 0.45s; }
.slide.active .fade-in-up.delay-4 { animation-delay: 0.6s; }

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

/* ========================================
   SLIDE 30 - SCREEN TIME (COPY-DECK v3.1)
   ======================================== */

.screen-explanation {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: var(--spacing-sm);
  line-height: 1.5;
}

.screen-explanation strong {
  color: #FF6B6B;
}

/* THE KILLER EQUATION */
.screen-time-equation {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  text-align: center;
}

.equation-text {
  font-size: 15px;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  line-height: 1.5;
}

.equation-text strong {
  font-weight: 600;
}

.highlight-red {
  color: #FF6B6B !important;
  -webkit-text-fill-color: #FF6B6B;
}

.equation-note {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* ========================================
   ENHANCED MOBILE ANIMATIONS
   iPhone X optimized interactions
   ======================================== */

/* Button Press Effects - Scale down on tap */
.btn-continue:active,
.btn-next:active,
.option-btn-full:active,
.option-btn:active,
.challenge-card:active,
.permission-card:active,
.trial-button:active {
  transform: scale(0.95) !important;
  transition: transform 0.1s ease-out !important;
}

/* Enhanced button hover/press states */
.btn-continue,
.btn-next {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.btn-continue:active {
  box-shadow: 0 2px 8px rgba(90, 200, 200, 0.3);
}

.btn-next:active {
  box-shadow: 0 2px 12px rgba(90, 200, 200, 0.5);
}

/* Selection Glow Animations */
@keyframes selectionGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(90, 200, 200, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(90, 200, 200, 0.3);
  }
  100% {
    box-shadow: 0 0 12px 2px rgba(90, 200, 200, 0.2);
  }
}

@keyframes selectionPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.option-btn-full.selected,
.option-btn.selected {
  animation: selectionPop 0.25s ease-out, selectionGlow 0.4s ease-out forwards;
  border-color: var(--accent-teal) !important;
  background: var(--accent-teal-dim) !important;
}

.challenge-card.selected {
  animation: selectionPop 0.3s ease-out;
  border-color: var(--accent-teal) !important;
  background: var(--accent-teal-dim) !important;
  box-shadow: 0 0 20px rgba(90, 200, 200, 0.25), inset 0 0 30px rgba(90, 200, 200, 0.05);
}

/* Progress Dot Pulse Animation */
@keyframes dotPulse {
  0%, 100% {
    box-shadow: 0 0 8px 2px rgba(90, 200, 200, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 16px 4px rgba(90, 200, 200, 0.6);
    transform: scale(1.05);
  }
}

.progress-dot.active {
  animation: dotPulse 2s ease-in-out infinite;
}

/* Smooth Slide Transitions */
.slide {
  transform: translateX(30px);
  opacity: 0;
  transition: 
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease-out;
  will-change: transform, opacity;
}

.slide.active {
  transform: translateX(0);
  opacity: 1;
}

.slide.exit {
  transform: translateX(-30px);
  opacity: 0;
  pointer-events: none;
}

/* Staggered entry for option lists */
@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide.active .option-btn-full,
.slide.active .option-btn,
.slide.active .challenge-card {
  animation: slideUpFade 0.35s ease-out forwards;
  opacity: 0;
}

.slide.active .option-btn-full:nth-child(1),
.slide.active .option-btn:nth-child(1),
.slide.active .challenge-card:nth-child(1) { animation-delay: 0.02s; }

.slide.active .option-btn-full:nth-child(2),
.slide.active .option-btn:nth-child(2),
.slide.active .challenge-card:nth-child(2) { animation-delay: 0.06s; }

.slide.active .option-btn-full:nth-child(3),
.slide.active .option-btn:nth-child(3),
.slide.active .challenge-card:nth-child(3) { animation-delay: 0.1s; }

.slide.active .option-btn-full:nth-child(4),
.slide.active .option-btn:nth-child(4),
.slide.active .challenge-card:nth-child(4) { animation-delay: 0.14s; }

.slide.active .option-btn-full:nth-child(5),
.slide.active .option-btn:nth-child(5),
.slide.active .challenge-card:nth-child(5) { animation-delay: 0.18s; }

.slide.active .option-btn-full:nth-child(6) { animation-delay: 0.22s; }
.slide.active .option-btn-full:nth-child(7) { animation-delay: 0.26s; }

/* Ripple effect for buttons */
.btn-continue {
  position: relative;
  overflow: hidden;
}

/* btn-next overflow only - position:absolute is defined earlier, don't override */
.btn-next {
  overflow: hidden;
}

.btn-continue::after,
.btn-next::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease-out, height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.btn-continue:active::after,
.btn-next:active::after {
  width: 200%;
  height: 200%;
  opacity: 1;
}

/* Checkbox appear animation for selections */
@keyframes checkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Checkmark on selected options - use ::after to avoid conflict with ripple ::before */
.option-btn-full.selected::after,
.option-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-teal);
  animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
  text-shadow: 0 0 8px rgba(90, 200, 200, 0.5);
}

.option-btn-full,
.option-btn {
  position: relative;
}

/* Quote text fade in */
@keyframes quoteFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide.active .quote-text {
  animation: quoteFadeIn 0.6s ease-out 0.1s both;
}

.slide.active .quote-author {
  animation: quoteFadeIn 0.6s ease-out 0.3s both;
}

/* Big number count-up feel - subtle bounce */
@keyframes numberReveal {
  0% {
    opacity: 0;
    transform: scale(0.75) translateY(14px);
  }
  55% {
    opacity: 1;
    transform: scale(1.06) translateY(-3px);
  }
  75% {
    transform: scale(0.98) translateY(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.slide.active .big-number,
.slide.active .stat-number {
  animation: numberReveal 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) 0.15s both;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .progress-dot.active {
    animation: none;
  }
}
