/* ============================================
   ReViva - Clinical Warmth Design System
   Typography: Instrument Serif + Outfit
   ============================================ */

:root {
  /* ============================================
     TYPOGRAPHY - Editorial Medical
     ============================================ */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;

  /* ============================================
     PRIMARY BRAND COLORS - Sage & Copper
     ============================================ */
  /* Deep Sage - calming, professional, medical without being cold */
  --brand-primary: #4A5D4C;
  --brand-secondary: #5C7260;
  --brand-dark: #3A4A3C;

  /* Warm Copper - vitality, premium, warmth */
  --accent-copper: #B87333;
  --accent-copper-light: #D4915A;

  /* Legacy teal aliases (for gradual migration) */
  --brand-sage: #4A5D4C;
  --brand-sage-light: #5C7260;
  --brand-sage-dark: #3A4A3C;

  /* ============================================
     LIGHT THEME (Main App Theme) - Warm Neutrals
     ============================================ */
  --bg-light: #F7F5F2;
  --bg-light-secondary: #FDFCFA;
  --bg-light-tertiary: #EBE8E4;
  --bg-light-card: rgba(253, 252, 250, 0.95);
  --bg-light-glass: rgba(253, 252, 250, 0.8);
  --bg-light-glass-hover: rgba(253, 252, 250, 0.95);

  /* Warm backgrounds */
  --bg-cream: #F7F5F2;
  --bg-warm-white: #FDFCFA;
  --bg-soft-gray: #EBE8E4;

  /* Text Colors (Light theme) - Rich, not pure black */
  --text-light-primary: #1A1A18;
  --text-light-secondary: #5A5854;
  --text-light-muted: #8A8680;
  --text-light-inverse: #FDFCFA;

  /* Semantic text aliases */
  --text-primary: #1A1A18;
  --text-secondary: #5A5854;
  --text-muted: #8A8680;

  /* Semantic colors */
  --success: #4A5D4C;
  --warning: #D4915A;
  --error: #C45B4B;

  /* Borders & Effects (Light theme) - Using sage */
  --border-light: rgba(74, 93, 76, 0.12);
  --border-light-hover: rgba(74, 93, 76, 0.4);
  --shadow-light: 0 1px 3px rgba(74, 93, 76, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-light-md: 0 4px 6px rgba(74, 93, 76, 0.06), 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-light-lg: 0 10px 25px rgba(74, 93, 76, 0.08), 0 4px 10px rgba(0, 0, 0, 0.03);
  --shadow-light-xl: 0 20px 40px rgba(74, 93, 76, 0.1);

  /* ============================================
     SIMULATION ROOM THEME (Clinical Warmth)
     ============================================ */
  /* Warm, clinical palette */
  --sim-bg-primary: #F7F5F2;
  --sim-bg-secondary: #FDFCFA;
  --sim-bg-accent: #EBE8E4;
  --sim-bg-panel: #FDFCFA;

  /* Sage green spectrum */
  --sim-accent-primary: #4A5D4C;
  --sim-accent-secondary: #5C7260;
  --sim-accent-muted: rgba(74, 93, 76, 0.15);

  /* Text hierarchy for simulation */
  --sim-text-primary: #1A1A18;
  --sim-text-secondary: #5A5854;
  --sim-text-muted: #8A8680;

  /* Simulation borders & shadows */
  --sim-border: rgba(74, 93, 76, 0.1);
  --sim-border-accent: rgba(74, 93, 76, 0.3);
  --sim-shadow-sm: 0 1px 2px rgba(74, 93, 76, 0.04);
  --sim-shadow-md: 0 4px 12px rgba(74, 93, 76, 0.06);
  --sim-shadow-lg: 0 8px 24px rgba(74, 93, 76, 0.08);
  --sim-shadow-panel: 0 4px 20px rgba(74, 93, 76, 0.06);

  /* ============================================
     LEGACY COMPATIBILITY (gradual migration)
     ============================================ */
  --bg-primary: #F7F5F2;
  --bg-secondary: #FDFCFA;
  --bg-card: rgba(253, 252, 250, 0.95);
  --bg-glass: rgba(253, 252, 250, 0.8);
  --bg-glass-hover: rgba(253, 252, 250, 0.95);

  /* Borders & Effects */
  --border-subtle: rgba(74, 93, 76, 0.1);
  --border-accent: rgba(74, 93, 76, 0.3);
  --shadow-glow: 0 0 30px rgba(74, 93, 76, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(20px);
  --glass-border: 1px solid rgba(13, 148, 136, 0.1);

  /* ============================================
     SEMANTIC COLORS
     ============================================ */
  --color-success: #10B981;
  /* Emerald 500 */
  --color-success-light: rgba(16, 185, 129, 0.1);
  --color-warning: #F59E0B;
  /* Amber 500 */
  --color-warning-light: rgba(245, 158, 11, 0.1);
  --color-danger: #EF4444;
  /* Red 500 */
  --color-danger-light: rgba(239, 68, 68, 0.1);

  /* Difficulty Colors */
  --color-easy: #10B981;
  /* Emerald - approachable */
  --color-easy-light: rgba(16, 185, 129, 0.1);
  --color-moderate: #F59E0B;
  /* Amber - challenging */
  --color-moderate-light: rgba(245, 158, 11, 0.1);
  --color-strict: #EF4444;
  /* Red - intense */
  --color-strict-light: rgba(239, 68, 68, 0.1);

  /* Legacy aliases for backwards compatibility */
  --accent-primary: var(--brand-primary);
  --accent-surgical: var(--brand-primary);
  --accent-secondary: var(--brand-secondary);
  --accent-glow: rgba(13, 148, 136, 0.4);
  --accent-gradient: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
}

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

/* Reset button defaults - removes browser styling */
button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-light);
  min-height: 100vh;
  color: var(--text-light-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LOADING OVERLAY
   Shown during initial auth check to prevent flash
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #00d4aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Page Transition Classes */
.page {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.page.fade-out {
  opacity: 0;
}

.page.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Simulation Room Transition Overlay */
.simulation-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(0, 0, 0);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.simulation-transition.active {
  display: flex;
  opacity: 1;
}

.transition-content {
  text-align: center;
  color: white;
}

.transition-content h2 {
  font-size: 32px;
  margin-bottom: 30px;
  font-weight: 600;
  color: white;
}

.door-animation {
  font-size: 80px;
  margin-bottom: 20px;
  animation: doorOpen 1.5s ease-in-out infinite;
}

@keyframes doorOpen {
  0% {
    transform: scale(1) rotateY(0deg);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.1) rotateY(10deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotateY(0deg);
    opacity: 0.7;
  }
}

.container {
  background: transparent;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 0;
}

h1 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

.menu-container {
  margin-top: 20px;
}

.menu-item {
  margin-bottom: 8px;
}

.menu-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 12px;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.menu-header:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.menu-header.active {
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent-primary);
  border-color: rgba(0, 212, 170, 0.3);
}

.menu-header.level-1 {
  font-size: 18px;
  font-weight: 600;
  margin-left: 0;
}

.menu-header.level-2 {
  font-size: 16px;
  font-weight: 500;
  margin-left: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.menu-header.level-2:hover {
  background: rgba(255, 255, 255, 0.04);
}

.menu-header.level-2.active {
  background: rgba(0, 180, 216, 0.1);
  color: var(--accent-secondary);
  border-color: rgba(0, 180, 216, 0.3);
}

.menu-header.level-3 {
  font-size: 15px;
  font-weight: 500;
  margin-left: 40px;
  background: rgba(255, 255, 255, 0.02);
}

.menu-header.level-3:hover {
  background: rgba(255, 255, 255, 0.04);
}

.menu-header.level-3.active {
  background: rgba(0, 212, 170, 0.08);
  color: var(--accent-primary);
  border-color: rgba(0, 212, 170, 0.2);
}

.scenario-item {
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent-primary);
  padding: 14px 24px;
  margin-left: 60px;
  margin-top: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.scenario-item:hover {
  background: rgba(0, 212, 170, 0.15);
  border-color: rgba(0, 212, 170, 0.4);
  transform: translateX(8px);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.15);
}

.scenario-item:active {
  transform: translateX(8px) scale(0.98);
}

.arrow {
  transition: transform 0.3s ease;
  font-size: 14px;
  color: var(--text-muted);
}

.arrow.open {
  transform: rotate(90deg);
  color: var(--accent-primary);
}

.menu-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.menu-content.open {
  max-height: 2000px;
}

.badge {
  background: rgba(0, 212, 170, 0.15);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 10px;
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.instructions {
  background: rgba(0, 180, 216, 0.08);
  padding: 32px 40px;
  font-size: 16px;
  color: var(--text-secondary);
  border-left: 4px solid var(--accent-secondary);
  border-radius: 12px;
  line-height: 1.8;
}

.instructions strong {
  display: block;
  margin-bottom: 16px;
  color: var(--accent-secondary);
  font-size: 20px;
}

.instructions ol {
  margin: 0;
  padding-left: 20px;
}

.instructions li {
  margin-bottom: 12px;
}

/* Cascading Panel Navigation System */
/* ============================================
   Scenario Selection Page - LIGHT THEME
   ============================================ */
#scenarioSelection {
  position: relative;
  background: var(--bg-light);
}

.scenario-selection-layout {
  display: flex;
  position: fixed;
  left: 0;
  top: 64px;
  /* Match app header height */
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--bg-light);
}

/* Adjust scenario selection layout when header is visible */
body.has-header .scenario-selection-layout {
  top: 64px;
}

/* Panel 1: Headings (15%) - Increased from 12.5% */
.headings-panel {
  width: 15%;
  min-width: 180px;
  background: var(--bg-light-secondary);
  color: var(--text-light-primary);
  overflow-y: auto;
  position: relative;
  border-right: 1px solid var(--border-light);
}

.panel-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(15, 118, 110, 0.04);
}

.heading-item {
  padding: 18px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light-secondary);
  border-left: 3px solid transparent;
}

.heading-item:hover {
  background: rgba(15, 118, 110, 0.06);
  border-left-color: var(--brand-primary);
  color: var(--text-light-primary);
}

.heading-item.active {
  background: rgba(15, 118, 110, 0.1);
  border-left-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Panel 2: Subheadings (15%) - Increased from 12.5% */
.subheadings-panel {
  width: 15%;
  min-width: 180px;
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text-light-primary);
  overflow-y: auto;
  position: absolute;
  left: 15%;
  top: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out, transform 0.5s ease-in-out;
  border-right: 1px solid var(--border-light);
}

.subheadings-panel.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.subheading-item {
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light-secondary);
  border-left: 3px solid transparent;
}

.subheading-item:hover {
  background: rgba(15, 118, 110, 0.06);
  border-left-color: var(--brand-primary);
  color: var(--text-light-primary);
}

.subheading-item.active {
  background: rgba(15, 118, 110, 0.1);
  border-left-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Panel 3: Topics (22%) - shown on hover */
.topics-panel {
  width: 22%;
  min-width: 220px;
  background: var(--bg-light-glass-hover);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text-light-primary);
  overflow-y: auto;
  position: absolute;
  left: 30%;
  /* Position after first two panels */
  top: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out, transform 0.5s ease-in-out;
  border-right: 1px solid var(--border-light);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
}

.topics-panel.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.topics-panel-title {
  padding: 24px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-light-primary);
  border-bottom: 1px solid var(--border-light);
  background: rgba(15, 118, 110, 0.04);
}

.topic-item {
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  color: var(--text-light-secondary);
  border-left: 3px solid transparent;
}

.topic-item:hover {
  background: rgba(15, 118, 110, 0.06);
  border-left-color: var(--brand-primary);
  color: var(--text-light-primary);
}

.topic-item.locked {
  opacity: 0.6;
  cursor: not-allowed;
  color: var(--text-light-muted);
}

.topic-item.locked:hover {
  background: rgba(128, 128, 128, 0.03);
  border-left-color: transparent;
  color: var(--text-light-muted);
}

.topic-item.active {
  background: rgba(15, 118, 110, 0.1);
  border-left-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Right content area - empty for now */
.content-area {
  flex: 1;
  background: var(--bg-light);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Simulation Room - Side by Side Layout */
/* ============================================
   SIMULATION ROOM - Clinical Elegance Theme
   ============================================ */
.simulation-room {
  display: none;
  min-height: 100vh;
  background: var(--sim-bg-primary);
}

.simulation-room.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  animation: room-fade-in 0.4s ease-out;
}

@keyframes room-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Adjust simulation room when header is visible */
body.has-header .simulation-room.active {
  top: 60px;
}

/* Simulation Header Bar */
.simulation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--sim-bg-secondary);
  border-bottom: 1px solid var(--sim-border);
  flex-shrink: 0;
}

.simulation-header .back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--sim-bg-accent);
  border-radius: 8px;
  color: var(--sim-text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.simulation-header .back-button:hover {
  background: var(--sim-accent-muted);
  color: var(--sim-accent-primary);
}

.simulation-header-title {
  text-align: center;
  flex: 1;
}

.simulation-header-title h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--sim-text-primary);
  margin: 0 0 2px 0;
}

.simulation-header-title p {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--sim-text-muted);
  margin: 0;
}

/* Desktop: 40/60 split layout */
.desktop-simulation-layout {
  display: flex;
  flex: 1;
  gap: 24px;
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 0;
  height: calc(100vh - 80px); /* Account for header */
  box-sizing: border-box;
}

.mobile-simulation-layout {
  display: none;
}

/* ============================================
   PERSONA PANEL (Left - 40%)
   ============================================ */
.persona-panel {
  flex: 1 1 40%;
  min-width: 300px;
  background: var(--sim-bg-secondary);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sim-shadow-panel);
  animation: panel-slide-in 0.5s ease-out 0.1s both;
}

@keyframes panel-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle breathing animation when idle */
.persona-panel.breathing {
  animation: panel-slide-in 0.5s ease-out 0.1s both, persona-breathe 4s ease-in-out infinite 0.6s;
}

@keyframes persona-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.003); }
}

/* Persona responds to AI state */
.persona-panel.ai-speaking {
  box-shadow: var(--sim-shadow-panel), 0 0 60px rgba(13, 148, 136, 0.12);
}

.persona-panel.ai-thinking {
  filter: saturate(0.95);
}

/* Persona Image */
.persona-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Persona Info Overlay (top) */
.persona-info-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
  z-index: 5;
}

.persona-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--sim-text-primary);
  margin: 0 0 2px 0;
}

.persona-title {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--sim-text-muted);
  margin: 0;
}

/* Voice Orb Overlay (centered-lower) */
.persona-orb-overlay {
  position: absolute;
  bottom: 35%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

/* Control Pill (bottom center) */
.persona-controls-overlay {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: controls-rise 0.4s ease-out 0.4s both;
}

@keyframes controls-rise {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.control-pill {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 40px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--sim-bg-accent);
  color: var(--sim-text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.control-btn:hover:not(:disabled) {
  background: var(--sim-accent-muted);
  color: var(--sim-accent-primary);
  transform: translateY(-1px);
}

.control-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Record button - special treatment */
.control-btn-record {
  background: var(--sim-accent-primary);
  color: white;
}

.control-btn-record:hover:not(:disabled) {
  background: var(--brand-dark);
  color: white;
}

.control-btn-record.recording {
  background: #EF4444;
  animation: record-pulse 1s ease-in-out infinite;
}

@keyframes record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Danger button (disconnect) */
.control-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

.control-btn-danger:hover:not(:disabled) {
  background: #EF4444;
  color: white;
}

/* Waveform Overlay (bottom) */
.persona-waveform-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px 24px;
  background: linear-gradient(transparent, rgba(255,255,255,0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.waveform-status {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--sim-text-muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.waveform-status.visible {
  opacity: 1;
}

/* ============================================
   SIDEBAR PANEL (Right - 60%)
   ============================================ */
.sidebar-panel {
  flex: 1.5 1 60%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: panel-slide-in 0.5s ease-out 0.2s both;
  min-height: 0;
}

/* Clinical Image Section */
.clinical-section {
  background: var(--sim-bg-secondary);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--sim-shadow-panel);
  flex: 0 0 auto;
  max-height: 45%;
  display: flex;
  flex-direction: column;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sim-border);
}

.section-header-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--sim-text-primary);
}

.case-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--sim-text-muted);
  background: var(--sim-bg-accent);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.expand-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: var(--sim-bg-accent);
  color: var(--sim-text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expand-btn:hover {
  background: var(--sim-accent-muted);
  color: var(--sim-accent-primary);
}

.clinical-image-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--sim-bg-accent);
  flex: 1;
  min-height: 0;
}

.clinical-image-container:hover .image-overlay {
  opacity: 1;
}

.clinical-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.image-overlay span {
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

.no-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  color: var(--sim-text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  background: var(--sim-bg-accent);
  border-radius: 8px;
}

/* Clinical image visibility transition */
.clinical-section .clinical-image {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.clinical-section.visible .clinical-image {
  opacity: 1;
}

.clinical-section.visible .clinical-image.initially-hidden {
  display: block;
}

.clinical-section.visible .image-overlay {
  display: flex;
}

.clinical-section.visible .no-image-placeholder {
  display: none;
}

/* Transcript Section */
.transcript-section {
  background: var(--sim-bg-secondary);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--sim-shadow-panel);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.transcript-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.transcript-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px;
}

.transcript-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100px;
  color: var(--sim-text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
}

.transcript-message {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 85%;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}

.message-user {
  background: var(--sim-accent-muted);
  color: var(--sim-text-primary);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message-ai {
  background: var(--sim-bg-accent);
  color: var(--sim-text-primary);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
}

.message-role {
  font-weight: 600;
  color: var(--sim-text-secondary);
}

.message-ai .message-role {
  color: var(--sim-accent-primary);
}

.message-time {
  color: var(--sim-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.message-text {
  margin: 0;
}

/* ============================================
   MODEL ANSWER DRAWER
   ============================================ */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--sim-bg-secondary);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

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

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sim-border);
  flex-shrink: 0;
}

.drawer-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--sim-text-primary);
  margin: 0;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--sim-bg-accent);
  color: var(--sim-text-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.drawer-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.drawer-content p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--sim-text-primary);
  margin: 0 0 16px 0;
}

/* Drawer backdrop */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 99;
}

.drawer-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

/* Voice Orb Container */
.voice-orb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
}

/* Audio Waveform Visualizer */
.audio-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 60px;
  padding: 0 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.audio-waveform.active {
  opacity: 1;
}

.waveform-bar {
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border-radius: 2px;
  transform-origin: center;
  animation: none;
}

.audio-waveform.active .waveform-bar {
  animation: waveform-dance 0.5s ease-in-out infinite;
}

.waveform-bar:nth-child(1) {
  animation-delay: 0s;
}

.waveform-bar:nth-child(2) {
  animation-delay: 0.05s;
}

.waveform-bar:nth-child(3) {
  animation-delay: 0.1s;
}

.waveform-bar:nth-child(4) {
  animation-delay: 0.15s;
}

.waveform-bar:nth-child(5) {
  animation-delay: 0.2s;
}

.waveform-bar:nth-child(6) {
  animation-delay: 0.25s;
}

.waveform-bar:nth-child(7) {
  animation-delay: 0.3s;
}

.waveform-bar:nth-child(8) {
  animation-delay: 0.35s;
}

.waveform-bar:nth-child(9) {
  animation-delay: 0.4s;
}

.waveform-bar:nth-child(10) {
  animation-delay: 0.45s;
}

.waveform-bar:nth-child(11) {
  animation-delay: 0.4s;
}

.waveform-bar:nth-child(12) {
  animation-delay: 0.35s;
}

.waveform-bar:nth-child(13) {
  animation-delay: 0.3s;
}

.waveform-bar:nth-child(14) {
  animation-delay: 0.25s;
}

.waveform-bar:nth-child(15) {
  animation-delay: 0.2s;
}

@keyframes waveform-dance {

  0%,
  100% {
    transform: scaleY(0.3);
    opacity: 0.5;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Alternative: More organic waveform with varying heights */
.waveform-bar:nth-child(1) {
  --max-scale: 0.6;
}

.waveform-bar:nth-child(2) {
  --max-scale: 0.8;
}

.waveform-bar:nth-child(3) {
  --max-scale: 1;
}

.waveform-bar:nth-child(4) {
  --max-scale: 0.7;
}

.waveform-bar:nth-child(5) {
  --max-scale: 1.2;
}

.waveform-bar:nth-child(6) {
  --max-scale: 0.9;
}

.waveform-bar:nth-child(7) {
  --max-scale: 1.4;
}

.waveform-bar:nth-child(8) {
  --max-scale: 1.6;
}

.waveform-bar:nth-child(9) {
  --max-scale: 1.4;
}

.waveform-bar:nth-child(10) {
  --max-scale: 0.9;
}

.waveform-bar:nth-child(11) {
  --max-scale: 1.2;
}

.waveform-bar:nth-child(12) {
  --max-scale: 0.7;
}

.waveform-bar:nth-child(13) {
  --max-scale: 1;
}

.waveform-bar:nth-child(14) {
  --max-scale: 0.8;
}

.waveform-bar:nth-child(15) {
  --max-scale: 0.6;
}

.audio-waveform.active .waveform-bar {
  animation: waveform-organic 0.6s ease-in-out infinite;
}

@keyframes waveform-organic {

  0%,
  100% {
    transform: scaleY(0.2);
    opacity: 0.4;
  }

  50% {
    transform: scaleY(var(--max-scale, 1));
    opacity: 1;
  }
}

/* AI Status Bubble - VUI Dark Theme */
.ai-status-bubble {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 140px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  display: none;
}

.ai-status-bubble.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.ai-status-bubble span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

/* Status bubble bounce when thinking */
.ai-status-bubble.processing {
  animation: bubble-bounce 2.0s ease-in-out infinite;
  border-color: rgba(0, 212, 170, 0.3);
}

.ai-status-bubble.processing span {
  color: var(--accent-primary);
}

@keyframes bubble-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* Voice Orb - VUI Dark Theme with Teal/Cyan Glow */
.voice-orb {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  /* Glass morphism with teal tint for light theme */
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.9),
    rgba(13, 148, 136, 0.15)
  );
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  box-shadow:
    inset 0 0 30px rgba(13, 148, 136, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  overflow: hidden;
}

/* Outer glow ring for pulse states */
.voice-orb::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.3) 0%, transparent 70%);
  opacity: 0;
  animation: none;
}

/* Inner pattern for thinking state */
.voice-orb::after {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: conic-gradient(from 0deg,
      transparent 0%,
      rgba(13, 148, 136, 0.1) 15%,
      rgba(13, 148, 136, 0.2) 25%,
      rgba(13, 148, 136, 0.1) 35%,
      transparent 50%,
      rgba(13, 148, 136, 0.1) 65%,
      rgba(13, 148, 136, 0.2) 75%,
      rgba(13, 148, 136, 0.1) 85%,
      transparent 100%);
  border-radius: 50%;
  opacity: 0;
  animation: none;
  filter: blur(8px);
}

/* STATE: Idle - Soft breathing pulse */
.voice-orb.idle {
  animation: orb-breathe 4s ease-in-out infinite;
}

@keyframes orb-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      inset 0 0 30px rgba(13, 148, 136, 0.1),
      0 8px 32px rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  }
  50% {
    transform: scale(1.03);
    box-shadow:
      inset 0 0 40px rgba(13, 148, 136, 0.15),
      0 12px 40px rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  }
}

/* STATE: Listening - Active expanding pulse */
.voice-orb.listening {
  box-shadow:
    inset 0 0 40px rgba(13, 148, 136, 0.15),
    0 8px 32px rgba(13, 148, 136, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.voice-orb.listening::before {
  animation: listening-pulse 1.5s ease-out infinite;
}

@keyframes listening-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* STATE: Thinking - Smooth rotating swirl pattern with bounce */
.voice-orb.thinking::after {
  opacity: 1;
  animation: thinking-spin 3s linear infinite;
}

.voice-orb.thinking {
  animation: thinking-bounce 2.0s ease-in-out infinite;
  box-shadow:
    inset 0 0 35px rgba(13, 148, 136, 0.12),
    0 8px 32px rgba(13, 148, 136, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

@keyframes thinking-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* STATE: Speaking - Rhythmic wave pulses */
.voice-orb.speaking {
  animation: speaking-scale 0.8s ease-in-out infinite;
  box-shadow:
    inset 0 0 50px rgba(13, 148, 136, 0.2),
    0 8px 40px rgba(13, 148, 136, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.voice-orb.speaking::before {
  animation: speaking-pulse 1.2s ease-out infinite;
}

@keyframes speaking-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes speaking-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Accessibility: Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  .voice-orb,
  .voice-orb::before,
  .voice-orb::after {
    animation: none !important;
  }

  .voice-orb.idle,
  .voice-orb.listening,
  .voice-orb.thinking,
  .voice-orb.speaking {
    box-shadow: 0 0 60px rgba(0, 212, 170, 0.4);
  }
}

/* Left Panel - Controls Section - VUI Dark Theme */
.controls-container {
  background: var(--bg-secondary);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
}

/* Back button for simulation room (dark theme) */
.back-button,
button.back-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 12px 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.25s ease;
  align-self: flex-start;
  border-radius: 12px !important;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.back-button:hover,
button.back-button:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--brand-primary) !important;
  transform: translateX(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.back-button:active,
button.back-button:active {
  transform: translateX(-4px) scale(0.98);
}

/* Back button for page navigation (light theme - matches other buttons) */
.top-back-button,
button.top-back-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 12px 24px !important;
  border: 1px solid #D1D5DB !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.25s ease;
  border-radius: 12px !important;
  width: auto;
  height: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.top-back-button:hover,
button.top-back-button:hover {
  transform: translateY(-2px);
  background: #FFFFFF !important;
  border-color: #0F766E !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.top-back-button:active,
button.top-back-button:active {
  transform: scale(0.98);
}

.scenario-title {
  text-align: left;
  padding: 0;
  margin-bottom: 0;
}

.scenario-title h2 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* Status Section - VUI Dark Theme */
.status-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.status-row {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.status-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.status-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-value {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.status-disconnected {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.status-connected {
  color: var(--accent-primary);
  background: rgba(0, 212, 170, 0.1);
}

.status-active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.status-processing {
  color: var(--accent-secondary);
  background: rgba(0, 180, 216, 0.1);
}

.status-speaking {
  color: var(--accent-primary);
  background: rgba(0, 212, 170, 0.15);
}

/* Round Icon Buttons - VUI Dark Theme (Simulation Room Only) */
.button-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-bottom: 32px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 50px;
  border: 1px solid var(--border-subtle);
}

/* Round control buttons ONLY in simulation room button-group */
.button-group button {
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: transparent !important;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  line-height: 1;
  padding: 0 !important;
  box-shadow: none !important;
}

.button-group button:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

#connectBtn {
  color: var(--accent-primary);
  border-color: rgba(0, 212, 170, 0.3);
}

#connectBtn:hover:not(:disabled) {
  background: rgba(0, 212, 170, 0.15);
  box-shadow: 0 0 25px rgba(0, 212, 170, 0.3);
  transform: scale(1.05);
}

#interruptBtn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 2px;
}

#interruptBtn:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.15);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.3);
  transform: scale(1.05);
}

#disconnectBtn {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

#disconnectBtn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.15);
  box-shadow: 0 0 25px rgba(248, 113, 113, 0.3);
  transform: scale(1.05);
}

.log-section {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #fff;
}

.log-entry {
  padding: 4px 0;
  border-bottom: 1px solid #333;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-timestamp {
  color: #888;
  margin-right: 8px;
}

.log-info {
  color: #4fc3f7;
}

.log-success {
  color: #81c784;
}

.log-error {
  color: #e57373;
}

.log-warning {
  color: #ffb74d;
}

/* Clinical Image Display - Side Panel */
/* Center Panel - Clinical Image - VUI Dark Theme */
.center-panel {
  background: var(--bg-primary);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.image-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  width: 100%;
  max-width: 600px;
}

.image-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.model-answer-section {
  width: 100%;
  max-width: 600px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.model-answer-section h3 {
  margin: 0 0 16px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.model-answer-content {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* Right Panel - VUI Dark Theme with Orb */
.right-panel {
  background: var(--bg-secondary);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border-subtle);
  gap: 30px;
}

.right-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 212, 170, 0.08) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.right-panel .voice-orb-container {
  position: relative;
  z-index: 2;
}

.image-section h3 {
  margin: 0 0 20px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.clinical-image-container {
  width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border-radius: 16px;
}

.clinical-image {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  display: block;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

.clinical-image:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5);
}

.no-image-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 80px 20px;
  font-style: normal;
  font-size: 14px;
}

/* Image Modal for Full Screen View */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.image-modal img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 95%;
  max-height: 95%;
  border: 3px solid white;
  border-radius: 8px;
}

.image-modal .close-modal {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.image-modal .close-modal:hover {
  color: #ccc;
}


/* Specialty Selection Page - Light Theme */
/* ============================================
   Specialty Selection Page - LIGHT THEME
   ============================================ */
#specialtySelection {
  background: var(--bg-light);
  min-height: 100vh;
  padding-top: 80px;
}

#specialtySelection h1 {
  color: var(--text-light-primary);
}

#specialtySelection .subtitle {
  color: var(--text-light-secondary);
}

#specialtySelection .header {
  padding-top: 40px;
}

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.specialty-card {
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text-light-primary);
  padding: 60px 40px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: var(--shadow-light);
}

.specialty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(27, 77, 137, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.specialty-card:hover::before {
  opacity: 1;
}

.specialty-card:hover {
  transform: translateY(-8px);
  background: var(--bg-light-glass-hover);
  border-color: var(--border-light-hover);
  box-shadow: var(--shadow-light-hover), var(--shadow-light-glow);
}

.specialty-card:active {
  transform: scale(0.98);
}

.specialty-card.coming-soon {
  background: rgba(248, 250, 252, 0.5);
  cursor: not-allowed;
  opacity: 0.5;
  border-color: var(--border-light);
}

.specialty-card.coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow-light);
  border-color: var(--border-light);
  background: rgba(248, 250, 252, 0.5);
}

.specialty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(27, 77, 137, 0.2));
}

.specialty-card h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-light-primary);
}

.specialty-card p {
  font-size: 16px;
  color: var(--text-light-secondary);
  max-width: 500px;
  line-height: 1.6;
}

/* ============================================
   Difficulty Selection Page - LIGHT THEME
   ============================================ */
#difficultySelection {
  background: var(--bg-light);
  min-height: 100vh;
  padding-top: 80px;
}

#difficultySelection .header,
#modeSelection .header,
#mockTypeSelection .header,
#stationTypeSelection .header {
  padding-top: 20px;
}

#difficultySelection .header h1,
#modeSelection .header h1,
#mockTypeSelection .header h1,
#stationTypeSelection .header h1 {
  color: var(--text-light-primary);
}

#difficultySelection .header .subtitle,
#modeSelection .header .subtitle,
#mockTypeSelection .header .subtitle,
#stationTypeSelection .header .subtitle {
  color: var(--text-light-secondary);
}

#difficultySelection .top-back-button,
#modeSelection .top-back-button,
#mockTypeSelection .top-back-button,
#stationTypeSelection .top-back-button {
  background: #FFFFFF !important;
  color: #1F2937 !important;
  border: 1px solid #D1D5DB !important;
}

#difficultySelection .top-back-button:hover,
#modeSelection .top-back-button:hover,
#mockTypeSelection .top-back-button:hover,
#stationTypeSelection .top-back-button:hover {
  background: #FFFFFF !important;
  color: #1F2937 !important;
  border-color: #0F766E !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.difficulty-card {
  padding: 60px 40px;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light-primary);
  border-radius: 20px;
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
}

.difficulty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.difficulty-card:hover::before {
  opacity: 1;
}

.difficulty-card:hover {
  transform: translateY(-8px);
  background: var(--bg-light-glass-hover);
  box-shadow: var(--shadow-light-hover);
}

.difficulty-card:active {
  transform: scale(0.98);
}

/* Difficulty colors as accents - Light Theme */
.difficulty-easy {
  border-color: rgba(5, 150, 105, 0.25);
}

.difficulty-easy::before {
  background: radial-gradient(circle at 50% 0%, rgba(5, 150, 105, 0.12) 0%, transparent 60%);
}

.difficulty-easy:hover {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(5, 150, 105, 0.12);
}

.difficulty-easy .difficulty-icon {
  color: var(--color-easy);
}

.difficulty-easy ul li::before {
  color: var(--color-easy);
}

.difficulty-moderate {
  border-color: rgba(217, 119, 6, 0.25);
}

.difficulty-moderate::before {
  background: radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.12) 0%, transparent 60%);
}

.difficulty-moderate:hover {
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(217, 119, 6, 0.12);
}

.difficulty-moderate .difficulty-icon {
  color: var(--color-moderate);
}

.difficulty-moderate ul li::before {
  color: var(--color-moderate);
}

.difficulty-strict {
  border-color: rgba(220, 38, 38, 0.25);
}

.difficulty-strict::before {
  background: radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.12) 0%, transparent 60%);
}

.difficulty-strict:hover {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(220, 38, 38, 0.12);
}

.difficulty-strict .difficulty-icon {
  color: var(--color-strict);
}

.difficulty-strict ul li::before {
  color: var(--color-strict);
}

.difficulty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px currentColor);
}

.difficulty-card h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-light-primary);
}

.difficulty-card p {
  font-size: 16px;
  color: var(--text-light-secondary);
  margin-bottom: 24px;
  max-width: 600px;
  line-height: 1.6;
}

.difficulty-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  max-width: 400px;
}

.difficulty-card ul li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-light-secondary);
  position: relative;
  padding-left: 28px;
}

.difficulty-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 18px;
}

/* ========================================
   MODE SELECTION PAGE
   ======================================== */

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
  margin-bottom: 40px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.mode-card {
  padding: 60px 40px;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light-primary);
  border-radius: 20px;
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
}

.mode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.mode-card:hover::before {
  opacity: 1;
}

.mode-card:hover {
  transform: translateY(-8px);
  background: var(--bg-light-glass-hover);
  box-shadow: var(--shadow-light-hover);
}

.mode-card:active {
  transform: scale(0.98);
}

.mode-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  color: var(--brand-sage, #4A5D4C);
}

.mode-icon svg {
  width: 100%;
  height: 100%;
}

.mode-card h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-light-primary);
}

.mode-card p {
  font-size: 15px;
  color: var(--text-light-secondary);
  margin-bottom: 20px;
  max-width: 320px;
  line-height: 1.6;
}

.mode-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  max-width: 320px;
}

.mode-card ul li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-light-secondary);
  position: relative;
  padding-left: 24px;
}

.mode-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 16px;
  color: var(--accent-primary);
}

/* Practice Mode Card */
.mode-practice {
  border-color: rgba(37, 99, 235, 0.25);
}

.mode-practice::before {
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.12) 0%, transparent 60%);
}

.mode-practice:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(37, 99, 235, 0.12);
}

.mode-practice .mode-icon {
  color: #2563eb;
}

.mode-practice ul li::before {
  color: #2563eb;
}

/* Mock Exam Mode Card */
.mode-mock-exam {
  border-color: rgba(168, 85, 247, 0.25);
}

.mode-mock-exam::before {
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.12) 0%, transparent 60%);
}

.mode-mock-exam:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(168, 85, 247, 0.12);
}

.mode-mock-exam .mode-icon {
  color: #a855f7;
}

.mode-mock-exam ul li::before {
  color: #a855f7;
}

/* ========================================
   MOCK TYPE SELECTION PAGE
   ======================================== */

.mock-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
  margin-bottom: 40px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.mock-type-card {
  padding: 60px 40px;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light-primary);
  border-radius: 20px;
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
}

.mock-type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.mock-type-card:hover::before {
  opacity: 1;
}

.mock-type-card:hover {
  transform: translateY(-8px);
  background: var(--bg-light-glass-hover);
  box-shadow: var(--shadow-light-hover);
}

.mock-type-card:active {
  transform: scale(0.98);
}

.mock-type-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  color: var(--brand-sage, #4A5D4C);
}

.mock-type-icon svg {
  width: 100%;
  height: 100%;
}

.mock-type-card h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-light-primary);
}

.mock-type-card p {
  font-size: 15px;
  color: var(--text-light-secondary);
  margin-bottom: 20px;
  max-width: 320px;
  line-height: 1.6;
}

.mock-type-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  max-width: 320px;
}

.mock-type-card ul li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-light-secondary);
  position: relative;
  padding-left: 24px;
}

.mock-type-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 16px;
}

/* Mock by Station Card */
.mock-by-station {
  border-color: rgba(14, 165, 233, 0.25);
}

.mock-by-station::before {
  background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.12) 0%, transparent 60%);
}

.mock-by-station:hover {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(14, 165, 233, 0.12);
}

.mock-by-station .mock-type-icon {
  color: #0ea5e9;
}

.mock-by-station ul li::before {
  color: #0ea5e9;
}

/* Full Mock Exam Card */
.full-mock-exam {
  border-color: rgba(236, 72, 153, 0.25);
}

.full-mock-exam::before {
  background: radial-gradient(circle at 50% 0%, rgba(236, 72, 153, 0.12) 0%, transparent 60%);
}

.full-mock-exam:hover {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(236, 72, 153, 0.12);
}

.full-mock-exam .mock-type-icon {
  color: #ec4899;
}

.full-mock-exam ul li::before {
  color: #ec4899;
}

/* ========================================
   STATION TYPE SELECTION PAGE
   ======================================== */

.station-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
  margin-bottom: 40px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.station-type-card {
  padding: 50px 32px;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light-primary);
  border-radius: 20px;
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
}

.station-type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.station-type-card:hover::before {
  opacity: 1;
}

.station-type-card:hover {
  transform: translateY(-8px);
  background: var(--bg-light-glass-hover);
  box-shadow: var(--shadow-light-hover);
}

.station-type-card:active {
  transform: scale(0.98);
}

.station-type-icon {
  font-size: 64px;
  margin-bottom: 20px;
  display: block;
}

.station-type-card h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-light-primary);
}

.station-type-card p {
  font-size: 14px;
  color: var(--text-light-secondary);
  max-width: 280px;
  line-height: 1.5;
}

/* Station Type Colors */
.station-clinical {
  border-color: rgba(239, 68, 68, 0.25);
}

.station-clinical::before {
  background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.12) 0%, transparent 60%);
}

.station-clinical:hover {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(239, 68, 68, 0.12);
}

.station-clinical .station-type-icon {
  color: #ef4444;
}

.station-call-the-boss {
  border-color: rgba(249, 115, 22, 0.25);
}

.station-call-the-boss::before {
  background: radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.12) 0%, transparent 60%);
}

.station-call-the-boss:hover {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(249, 115, 22, 0.12);
}

.station-call-the-boss .station-type-icon {
  color: #f97316;
}

.station-consent {
  border-color: rgba(34, 197, 94, 0.25);
}

.station-consent::before {
  background: radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.12) 0%, transparent 60%);
}

.station-consent:hover {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(34, 197, 94, 0.12);
}

.station-consent .station-type-icon {
  color: #22c55e;
}

.station-structured {
  border-color: rgba(99, 102, 241, 0.25);
}

.station-structured::before {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%);
}

.station-structured:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: var(--shadow-light-hover), 0 0 40px rgba(99, 102, 241, 0.12);
}

.station-structured .station-type-icon {
  color: #6366f1;
}

/* Difficulty Indicator on Mock Pages */
.mock-difficulty-indicator {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  display: inline-block;
}

/* ========================================
   MOCK EXAM TIMER
   ======================================== */

.mock-exam-timer {
  position: fixed;
  top: 80px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
  z-index: 100;
  transition: all 0.3s ease;
}

.mock-exam-timer.warning {
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(239, 68, 68, 0.4);
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.timer-display {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 36px;
  font-weight: 600;
  color: var(--text-light-primary);
  letter-spacing: 2px;
}

.mock-exam-timer.warning .timer-display {
  color: #dc2626;
}

.timer-warning {
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========================================
   MOCK EXAM PROGRESS BAR
   ======================================== */

.mock-exam-progress {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
  z-index: 100;
}

.mock-exam-progress span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light-primary);
}

.mock-exam-progress .progress-bar {
  width: 200px;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.mock-exam-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ========================================
   MOCK EXAM TRANSITION OVERLAY
   ======================================== */

.mock-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.mock-transition-overlay.active {
  opacity: 1;
}

.mock-transition-content {
  text-align: center;
  color: white;
}

.mock-transition-icon {
  font-size: 80px;
  margin-bottom: 24px;
  animation: mockIconBounce 1s ease-in-out infinite;
}

@keyframes mockIconBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.mock-transition-content h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 12px;
  color: white;
}

.mock-transition-content p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   RESPONSIVE MOBILE OPTIMIZATION
   Mobile-first approach: desktop unchanged
   ======================================== */

/* Mobile-specific adjustments (< 1024px) */
@media (max-width: 1023px) {

  /* Body and container mobile padding */
  body {
    padding: 12px;
  }

  /* Specialty, difficulty, mode, and mock type grids: single column on mobile */
  .specialty-grid,
  .difficulty-grid,
  .mode-grid,
  .mock-type-grid,
  .station-type-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Card padding and height adjustments for mobile */
  .specialty-card,
  .difficulty-card,
  .mode-card,
  .mock-type-card,
  .station-type-card {
    padding: 40px 24px !important;
    min-height: 35vh !important;
  }

  /* Specialty, difficulty, mode and station icons smaller on mobile */
  .specialty-icon,
  .difficulty-icon,
  .mode-icon,
  .mock-type-icon,
  .station-type-icon {
    font-size: 60px !important;
    margin-bottom: 16px !important;
  }

  /* Mock Exam Timer - Mobile positioning */
  .mock-exam-timer {
    top: 16px !important;
    right: 16px !important;
    padding: 12px 16px !important;
  }

  .timer-display {
    font-size: 28px !important;
  }

  /* Mock Exam Progress - Mobile positioning */
  .mock-exam-progress {
    top: 16px !important;
    left: 16px !important;
    transform: none !important;
    padding: 8px 16px !important;
  }

  .mock-exam-progress .progress-bar {
    width: 120px !important;
  }

  /* SIMULATION ROOM: Separate desktop and mobile layouts */

  /* Hide desktop layout, show mobile layout */
  .desktop-simulation-layout {
    display: none !important;
  }

  .mobile-simulation-layout {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    overflow-y: auto;
  }

  /* MOBILE BACK BUTTON - Top left - VUI Style */
  .mobile-back-button {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-back-button:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.2);
  }

  /* MOBILE VOICE ORB SECTION - Top center */
  .mobile-voice-section {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .mobile-voice-section .voice-orb {
    width: 80px;
    height: 80px;
  }

  .mobile-voice-section .ai-status-bubble {
    font-size: 12px;
    padding: 6px 12px;
    min-width: 120px;
  }

  /* MOBILE IMAGE SECTION - Middle */
  .mobile-image-section {
    position: fixed;
    top: 160px;
    left: 8px;
    right: 8px;
    bottom: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    pointer-events: none;
  }

  .mobile-image-section.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-clinical-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-clinical-image-container .clinical-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
  }

  .mobile-clinical-image-container .no-image-placeholder {
    font-size: 14px;
    color: #9ca3af;
    text-align: center;
    padding: 20px;
  }

  /* MOBILE ACTION BUTTONS - Bottom center - VUI Style */
  .mobile-button-group {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-control-button {
    width: 52px;
    height: 52px;
    font-size: 18px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .mobile-control-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.25s ease;
    z-index: -1;
  }

  /* Start/Play button - Teal glow */
  #mobileConnectBtn {
    color: var(--accent-primary);
    border-color: rgba(0, 212, 170, 0.3);
    font-size: 20px;
  }

  #mobileConnectBtn:active:not(:disabled) {
    transform: scale(0.92);
    background: rgba(0, 212, 170, 0.15);
    box-shadow: 0 0 25px rgba(0, 212, 170, 0.4);
  }

  /* Pause button - Amber */
  #mobileInterruptBtn {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
    letter-spacing: 2px;
  }

  #mobileInterruptBtn:active:not(:disabled) {
    transform: scale(0.92);
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.4);
  }

  /* Stop button - Coral/Red */
  #mobileDisconnectBtn {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
  }

  #mobileDisconnectBtn:active:not(:disabled) {
    transform: scale(0.92);
    background: rgba(248, 113, 113, 0.15);
    box-shadow: 0 0 25px rgba(248, 113, 113, 0.4);
  }

  /* Disabled state */
  .mobile-control-button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    color: var(--text-muted) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
  }

  /* MOBILE STATUS BAR - Bottom fixed - VUI Style */
  .mobile-status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 24px;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    gap: 16px;
  }

  .mobile-status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .mobile-status-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .mobile-status-item .status-value {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
  }

  .mobile-status-item .status-connected {
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.1);
  }

  .mobile-status-item .status-active {
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.15);
  }

  /* AI status bubble compact */
  .ai-status-bubble {
    padding: 6px 12px !important;
    font-size: 12px !important;
    min-width: 120px !important;
  }

  /* Clinical image mobile optimization */
  .clinical-image {
    max-width: 100% !important;
    max-height: 100% !important;
    height: auto !important;
  }

  /* Compact controls section */
  .controls-section {
    gap: 8px !important;
  }

  .controls-section h3 {
    font-size: 14px !important;
    margin-bottom: 6px !important;
  }

  .status-section {
    gap: 8px !important;
  }

  .status-item {
    font-size: 12px !important;
    padding: 4px 0 !important;
  }

  .log-container {
    max-height: 100px !important;
  }

  .log-entry {
    font-size: 11px !important;
    padding: 4px 6px !important;
  }

  /* Compact round buttons */
  .round-button {
    width: 56px !important;
    height: 56px !important;
    font-size: 20px !important;
  }

  .button-row {
    gap: 12px !important;
  }

  /* Touch targets: minimum 48px for accessibility */
  .back-button,
  .top-back-button {
    padding: 16px 28px !important;
    font-size: 16px !important;
    min-height: 48px;
    min-width: 120px;
    background: #FFFFFF !important;
    color: #1F2937 !important;
    border: 1px solid #D1D5DB !important;
    border-radius: 12px !important;
  }

  /* Menu items touch-friendly */
  .menu-item {
    padding: 16px 20px !important;
    min-height: 48px;
  }

  /* Touch feedback */
  .menu-item:active {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  button:active,
  .clickable:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  .specialty-card:active,
  .difficulty-card:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  }

  /* Typography for mobile readability */
  h1 {
    font-size: 28px !important;
  }

  h2 {
    font-size: 24px !important;
  }

  .log-entry {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .badge {
    font-size: 12px !important;
    padding: 4px 8px !important;
  }

  .menu-header {
    font-size: 16px !important;
  }

  /* Pages scrollable on mobile (except auth modal which must stay fixed) */
  .page:not(#authPage) {
    position: relative !important;
    overflow-y: auto;
    min-height: 100vh;
  }

  /* Scenario selection mobile: GRID LAYOUT */
  .scenario-selection-layout {
    display: block !important;
    position: relative !important;
    padding: 16px !important;
    overflow-y: auto !important;
  }

  /* Hide desktop panels on mobile */
  .headings-panel,
  .subheadings-panel,
  .topics-panel,
  .content-area {
    display: none !important;
  }

  /* Show mobile grid container */
  #mobileScenarioGrid {
    display: block !important;
    background: var(--bg-light);
    min-height: 100vh;
  }

  /* Mobile back button in scenario grid - explicit styling */
  #mobileScenarioGrid .top-back-button,
  #mobileScenarioGrid button.top-back-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #FFFFFF !important;
    color: #1F2937 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 12px 20px !important;
    border: 1px solid #D1D5DB !important;
    border-radius: 10px !important;
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    min-height: unset !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    position: relative !important;
    z-index: 10 !important;
    margin-bottom: 8px !important;
  }

  /* Mobile scenario grid - Light Theme */
  /* NOTE: Do NOT use display: grid !important here - it breaks JS show/hide */
  .mobile-scenario-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
    position: relative;
    z-index: 1;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    height: auto;
  }

  .mobile-scenario-card {
    background: #FFFFFF;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: #1F2937;
    padding: 20px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #D1D5DB;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .mobile-scenario-card:active {
    transform: scale(0.98);
    background: rgba(15, 118, 110, 0.08);
    border-color: #0F766E;
  }

  .mobile-scenario-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .mobile-scenario-card.locked:active {
    transform: none;
    background: #FFFFFF;
    border-color: #D1D5DB;
  }

  .mobile-scenario-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1F2937;
  }

  .mobile-scenario-card p {
    font-size: 13px;
    color: #475569;
  }

  .mobile-category-header {
    font-size: 20px;
    font-weight: 700;
    color: #0F766E;
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #E5E7EB;
  }

  .mobile-category-header:first-child {
    margin-top: 0;
  }
}

/* Tablet adjustments (600px - 1023px) */
@media (min-width: 600px) and (max-width: 1023px) {
  body {
    padding: 16px;
  }

  /* Tablet: 2 columns for grids */
  .specialty-grid,
  .difficulty-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  .specialty-card,
  .difficulty-card {
    padding: 50px 32px !important;
    min-height: 45vh !important;
  }

  .voice-orb {
    width: 160px !important;
    height: 160px !important;
    font-size: 50px !important;
  }

  .clinical-image {
    max-height: 60vh !important;
    max-width: 500px !important;
  }

  h1 {
    font-size: 32px !important;
  }

  h2 {
    font-size: 28px !important;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none) {

  .menu-item:hover,
  .specialty-card:hover,
  .difficulty-card:hover,
  .mode-card:hover,
  .mock-type-card:hover,
  .station-type-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .specialty-card:hover::before,
  .mode-card:hover::before,
  .mock-type-card:hover::before,
  .station-type-card:hover::before {
    opacity: 0 !important;
  }
}

/* ==================== AUTH PAGES STYLES ==================== */

/* ============================================
   APP HEADER - Light Theme for Protected Pages
   ============================================ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  z-index: 1000;
}

.header-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-logo-link:hover {
  opacity: 0.8;
}

.header-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--brand-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
}

.header-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.3px;
}

.header-right {
  position: relative;
}

.user-menu-btn {
  background: var(--bg-light-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  color: var(--text-light-secondary);
}

.user-menu-btn:hover {
  background: var(--bg-light-secondary);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-light-md);
}

.user-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: var(--bg-light-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  display: none;
  box-shadow: var(--shadow-light-lg);
}

.user-dropdown.active {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--text-light-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.user-dropdown a:hover {
  background: var(--bg-light-tertiary);
  color: var(--text-light-primary);
}

/* ============================================================
   LANDING PAGE - Modern SaaS Style (voicenotes-inspired)
   ============================================================ */

#landingPage {
  display: block;
  min-height: 100vh;
  background: var(--bg-light);
  position: relative;
  overflow-x: hidden;
}

#landingPage.hidden {
  display: none;
}

/* Animated Background Gradient */
.landing-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(15, 118, 110, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(20, 184, 166, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(15, 118, 110, 0.04) 0%, transparent 50%),
    var(--bg-light);
  z-index: 0;
  animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {

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

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

/* Top Navigation Bar */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(250, 251, 252, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
  z-index: 1000;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.nav-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-light-primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Nav Buttons - Card-like style with visible border */
.nav-link,
button.nav-link,
a.nav-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-link:hover,
button.nav-link:hover,
a.nav-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0F766E !important;
}

/* Landing Content */
.landing-content {
  position: relative;
  z-index: 1;
  padding-top: 72px;
}

/* Hero Section */
.landing-hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 32px 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-success-light);
  color: var(--color-success);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  color: var(--text-light-primary);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin: 0 0 24px 0;
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-title .highlight {
  color: var(--brand-primary);
}

.hero-description {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-light-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

/* Allow text wrapping for longer button text */
.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  white-space: normal;
  text-align: center;
  max-width: 320px;
}

/* ============================================
   INTERACTIVE HERO ELEMENTS
   Parallax, scroll-reveal, animated gradient
   ============================================ */

/* Hero badge hover micro-interaction */
.hero-badge {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.hero-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(74, 93, 76, 0.15);
}

/* Animated gradient highlight for "Surgical" */
.highlight-animated {
  background: linear-gradient(135deg, var(--brand-sage, #4A5D4C) 0%, var(--accent-copper, #B87333) 50%, var(--brand-sage, #4A5D4C) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  transition: filter 0.3s ease;
}

.highlight-animated:hover {
  filter: drop-shadow(0 0 20px rgba(184, 115, 51, 0.4));
}

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

/* Parallax floating decorative elements */
.parallax-element {
  position: absolute;
  will-change: transform;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.6;
}

.parallax-shape-1 {
  top: 10%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(74, 93, 76, 0.08) 0%, transparent 70%);
}

.parallax-shape-2 {
  top: 60%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(184, 115, 51, 0.06) 0%, transparent 70%);
}

.parallax-shape-3 {
  top: 30%;
  right: 20%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(74, 93, 76, 0.05) 0%, transparent 70%);
}

/* Scroll-triggered reveal animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered delay classes */
.scroll-reveal--delay-1 {
  transition-delay: 0.1s;
}

.scroll-reveal--delay-2 {
  transition-delay: 0.2s;
}

.scroll-reveal--delay-3 {
  transition-delay: 0.3s;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .highlight-animated {
    animation: none;
  }

  .parallax-element {
    display: none;
  }
}

/* Landing CTA Section (buttons moved below features) */
.landing-cta {
  padding: 40px 20px 60px;
  text-align: center;
}

/* ============================================
   UNIFIED BUTTON SYSTEM
   Card-like style with visible border for ALL buttons
   ============================================ */

/* Primary Button - Main CTA */
.btn-primary,
button.btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 16px 32px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover,
button.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #0F766E !important;
}

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

/* Secondary Button - Same card-like style */
.btn-secondary,
button.btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 16px 32px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover,
button.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #0F766E !important;
}

.btn-secondary:active,
button.btn-secondary:active {
  transform: translateY(0);
}

/* Features Section */
.landing-features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 100px;
}

.section-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-light-primary);
  margin-bottom: 60px;
  letter-spacing: -0.5px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-light-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-light-primary);
  margin: 0 0 12px 0;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light-secondary);
  margin: 0;
}

/* ============================================
   ACTION CARDS SECTION (Editorial Style)
   ============================================ */
.action-cards-section {
  padding: 80px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* Three-column layout for unlogged users */
.action-cards-grid.three-cards {
  grid-template-columns: repeat(3, 1fr);
}

/* Single card centered layout for premium users */
.action-cards-grid.single-card {
  grid-template-columns: 1fr;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.action-card--full {
  text-align: center;
}

.action-card--full .card-cta {
  justify-content: center;
}

.action-card {
  background: var(--bg-warm-white, #FDFCFA);
  border: 1px solid rgba(74, 93, 76, 0.12);
  border-radius: 2px;
  padding: 40px 36px;
  cursor: pointer;
  transition: all 0.25s ease-out;
  position: relative;
  overflow: hidden;
}

/* Paper texture on cards */
.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

.action-card:hover {
  border-color: var(--brand-sage, #4A5D4C);
  box-shadow: 0 12px 40px rgba(74, 93, 76, 0.12);
  transform: translateY(-2px);
}

.action-card:focus {
  outline: 2px solid var(--brand-sage, #4A5D4C);
  outline-offset: 2px;
}

.card-number {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-copper, #B87333);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.action-card .card-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary, #1A1A18);
}

.action-card .card-title em {
  font-style: italic;
  color: var(--brand-sage, #4A5D4C);
}

.action-card .card-description {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-secondary, #5A5854);
  line-height: 1.65;
  margin-bottom: 32px;
}

.card-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-sage, #4A5D4C);
  transition: gap 0.2s ease-out;
}

.action-card:hover .card-cta {
  gap: 12px;
}

.cta-arrow {
  transition: transform 0.2s ease-out;
}

.action-card:hover .cta-arrow {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .action-cards-grid.three-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .action-cards-grid {
    grid-template-columns: 1fr;
  }

  .action-card {
    padding: 32px 28px;
  }
}

/* ============================================
   FEATURES SCROLL SECTION (Paraform Style)
   ============================================ */
.features-scroll-section {
  width: 100%;
}

.feature-block {
  padding: 120px 0;
  position: relative;
}

.feature-block:nth-child(odd) {
  background: var(--bg-cream, #F7F5F2);
}

.feature-block:nth-child(even) {
  background: var(--bg-warm-white, #FDFCFA);
}

/* Subtle top border accent */
.feature-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--brand-sage, #4A5D4C);
  opacity: 0.3;
}

.feature-block__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.feature-block__inner--reversed {
  direction: rtl;
}

.feature-block__inner--reversed > * {
  direction: ltr;
}

.feature-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-copper, #B87333);
  margin-bottom: 20px;
}

.feature-block .feature-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary, #1A1A18);
  margin-bottom: 24px;
}

.feature-block .feature-title em {
  font-style: italic;
  color: var(--brand-sage, #4A5D4C);
}

.feature-description {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-secondary, #5A5854);
  margin-bottom: 32px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-secondary, #5A5854);
  padding: 10px 0;
  padding-left: 24px;
  position: relative;
  border-bottom: 1px solid rgba(74, 93, 76, 0.08);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--brand-sage, #4A5D4C);
  border-radius: 50%;
}

/* Visual frame styling */
.visual-frame {
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
  background: var(--bg-soft-gray, #EBE8E4);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Paper texture on visual frames */
.visual-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
}

.visual-frame--accent {
  background: rgba(74, 93, 76, 0.08);
}

.visual-icon {
  color: var(--brand-sage, #4A5D4C);
  opacity: 0.7;
}

/* Scroll reveal animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within revealed sections */
.scroll-reveal.revealed .feature-content {
  animation: fadeSlideUp 0.6s ease-out 0.2s both;
}

.scroll-reveal.revealed .feature-visual {
  animation: fadeSlideUp 0.6s ease-out 0.4s both;
}

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

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-reveal.revealed .feature-content,
  .scroll-reveal.revealed .feature-visual {
    animation: none;
  }
}

@media (max-width: 900px) {
  .feature-block {
    padding: 80px 0;
  }

  .feature-block__inner,
  .feature-block__inner--reversed {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 0 24px;
    direction: ltr;
  }

  .feature-visual {
    order: -1;
  }

  .visual-frame {
    max-width: 200px;
  }

  .feature-block .feature-title {
    font-size: 2rem;
  }
}

/* ============================================
   SCENARIO SELECTION - CARD SYSTEM
   ============================================ */

/* Breadcrumb Navigation */
.scenario-breadcrumb {
  background: var(--bg-warm-white, #FDFCFA);
  border-bottom: 1px solid rgba(74, 93, 76, 0.1);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.breadcrumb-item {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted, #8A8680);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.breadcrumb-item:hover:not(.disabled) {
  color: var(--brand-sage, #4A5D4C);
}

.breadcrumb-item.active {
  color: var(--text-primary, #1A1A18);
  font-weight: 500;
}

.breadcrumb-item.disabled {
  cursor: default;
  opacity: 0.4;
}

.breadcrumb-separator {
  color: var(--text-muted, #8A8680);
  opacity: 0.4;
  font-weight: 300;
}

/* Level Container */
.scenario-level {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 48px 80px;
}

.scenario-level.hidden {
  display: none !important;
}

.level-header {
  margin-bottom: 48px;
}

.level-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-copper, #B87333);
  margin-bottom: 12px;
}

.level-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--text-primary, #1A1A18);
  line-height: 1.2;
}

.level-title em {
  font-style: italic;
  color: var(--brand-sage, #4A5D4C);
}

/* Scenario Card Grid */
.scenario-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.scenario-cards-grid--compact {
  grid-template-columns: repeat(3, 1fr);
}

.scenario-cards-grid--topics {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Individual Scenario Cards */
.scenario-card {
  background: var(--bg-warm-white, #FDFCFA);
  border: 1px solid rgba(74, 93, 76, 0.1);
  border-radius: 2px;
  padding: 32px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  position: relative;
}

.scenario-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
}

.scenario-card:hover {
  border-color: var(--brand-sage, #4A5D4C);
  box-shadow: 0 8px 32px rgba(74, 93, 76, 0.1);
}

.scenario-card:focus {
  outline: 2px solid var(--brand-sage, #4A5D4C);
  outline-offset: 2px;
}

.scenario-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.card-icon-frame {
  width: 48px;
  height: 48px;
  background: rgba(74, 93, 76, 0.06);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-sage, #4A5D4C);
}

.scenario-card .card-count {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted, #8A8680);
  padding: 4px 10px;
  background: rgba(74, 93, 76, 0.05);
  border-radius: 2px;
}

.scenario-card .card-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--text-primary, #1A1A18);
  margin-bottom: 10px;
  line-height: 1.25;
}

.scenario-card .card-description {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-secondary, #5A5854);
  line-height: 1.6;
}

/* Compact cards for subcategories */
.scenario-cards-grid--compact .scenario-card {
  padding: 24px;
}

.scenario-cards-grid--compact .card-icon-frame {
  width: 40px;
  height: 40px;
}

.scenario-cards-grid--compact .scenario-card .card-title {
  font-size: 1.125rem;
}

/* Topic cards with difficulty indicator */
.topic-card {
  position: relative;
}

.difficulty-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
}

.difficulty-badge--easy {
  background: rgba(74, 93, 76, 0.1);
  color: var(--brand-sage, #4A5D4C);
}

.difficulty-badge--medium {
  background: rgba(184, 115, 51, 0.12);
  color: var(--accent-copper, #B87333);
}

.difficulty-badge--hard {
  background: rgba(196, 91, 75, 0.1);
  color: var(--error, #C45B4B);
}

/* ===== LOCKED SCENARIO CARDS ===== */
.scenario-card.locked,
.topic-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
  position: relative;
}

.scenario-card.locked::after,
.topic-card.locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(138, 134, 128, 0.05) 0%, rgba(138, 134, 128, 0.1) 100%);
  pointer-events: none;
  border-radius: 2px;
}

.scenario-card.locked:hover,
.topic-card.locked:hover {
  border-color: rgba(74, 93, 76, 0.1);
  box-shadow: none;
  transform: none;
}

.scenario-card.locked .card-title,
.topic-card.locked .card-title {
  color: var(--text-muted, #8A8680);
}

/* Lock badge icon */
.lock-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(138, 134, 128, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #8A8680);
  z-index: 1;
}

.lock-badge svg {
  width: 16px;
  height: 16px;
}

/* When difficulty badge exists, move lock badge below it */
.topic-card.locked .lock-badge {
  top: auto;
  bottom: 16px;
}

/* Subcategory lock indicator */
.subcategory-lock {
  font-size: 1rem;
  margin-left: auto;
}

/* Responsive Scenario Cards */
@media (max-width: 900px) {
  .scenario-cards-grid,
  .scenario-cards-grid--compact {
    grid-template-columns: 1fr;
  }

  .scenario-level {
    padding: 40px 24px 60px;
  }

  .breadcrumb-inner {
    padding: 16px 24px;
    flex-wrap: wrap;
  }

  .breadcrumb-trail {
    order: 2;
    width: 100%;
    margin-top: 12px;
  }

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

/* Pricing Section */
.landing-pricing {
  background: var(--bg-light-tertiary);
  padding: 100px 32px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-light-secondary);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  transition: all 0.3s ease;
}

.pricing-card.featured {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px var(--brand-primary), var(--shadow-light-lg);
  transform: scale(1.02);
}

.pricing-badge {
  display: inline-block;
  background: var(--brand-primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-light-primary);
  margin: 0 0 8px 0;
}

.pricing-price {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-light-primary);
  margin: 16px 0 8px;
}

.pricing-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-light-muted);
}

.pricing-note {
  font-size: 14px;
  color: var(--text-light-muted);
  margin-bottom: 24px;
}

.pricing-card .btn-primary,
.pricing-card .btn-secondary {
  width: 100%;
}

/* Footer */
.landing-footer {
  background: var(--bg-light-secondary);
  border-top: 1px solid var(--border-light);
  padding: 60px 32px 40px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  color: var(--text-light-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
  max-width: 280px;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light-primary);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column a {
  display: block;
  color: var(--text-light-secondary);
  font-size: 14px;
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  max-width: 1100px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-light-muted);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--text-light-muted);
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: var(--brand-primary);
}

/* Landing Page Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out backwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* Mobile Responsive - Landing */
@media (max-width: 900px) {
  .landing-nav {
    padding: 0 24px;
  }

  .nav-links .nav-link:not(.nav-btn-primary) {
    display: none;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .landing-hero {
    padding: 80px 20px 60px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
  }

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

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

/* Auth Page */
/* Auth Page - Modal Overlay (Light Theme) */
#authPage {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 2000;
  overflow-y: auto;
  padding: 60px 20px;
}

#authPage.hidden {
  display: none;
}

#authPage.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-light-secondary);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 48px;
  position: relative;
  box-shadow: var(--shadow-light-xl);
}

.auth-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-light-tertiary);
  border: none;
  color: var(--text-light-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s;
}

.auth-close-btn:hover {
  background: var(--border-light);
  color: var(--text-light-primary);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-light-primary);
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-light-muted);
  font-size: 15px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light-secondary);
}

.form-group input {
  background: var(--bg-light-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-light-primary);
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
  background: var(--bg-light-secondary);
}

.form-group input::placeholder {
  color: var(--text-light-muted);
}

.auth-error {
  background: var(--color-danger-light);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--color-danger);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* Auth Form Submit Button - Full width, card-like style */
.auth-form .btn-primary,
.auth-form button.btn-primary {
  width: 100% !important;
  margin-top: 8px;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 16px 24px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-form .btn-primary:hover,
.auth-form button.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #0F766E !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.auth-divider span {
  color: var(--text-light-muted);
  font-size: 14px;
}

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

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-social,
button.btn-social {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 12px !important;
  padding: 14px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #1F2937 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-social:hover,
button.btn-social:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0F766E !important;
}

.btn-social img {
  width: 20px;
  height: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-light-muted);
}

.auth-footer a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.forgot-password {
  text-align: right;
  margin-top: -12px;
}

.forgot-password a {
  color: var(--text-light-muted);
  font-size: 13px;
  text-decoration: none;
}

.forgot-password a:hover {
  color: var(--brand-primary);
}

/* Profile Page */
/* ============================================
   Profile Page - LIGHT THEME, SPLIT PANEL
   ============================================ */
#profilePage {
  display: none;
  min-height: 100vh;
  padding: 60px 40px 40px;
  background: var(--bg-light);
}

#profilePage.hidden {
  display: none;
}

#profilePage.active {
  display: block;
}

/* Split Panel Layout */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
}

.profile-header {
  margin-bottom: 40px;
  text-align: center;
}

.profile-header h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-light-primary);
}

.profile-header .profile-subtitle {
  font-size: 16px;
  color: var(--text-light-secondary);
}

/* Two-column grid layout */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Left Panel - Profile Info */
.profile-info-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Right Panel - Progress Tracking */
.profile-progress-panel {
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  box-shadow: var(--shadow-light);
}

.profile-section {
  background: var(--bg-light-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-light);
}

.profile-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light-secondary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.profile-field:last-child {
  margin-bottom: 0;
}

.profile-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light-muted);
}

.profile-field input,
.profile-field select {
  background: var(--bg-light-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-light-primary);
  transition: all 0.2s ease;
}

.profile-field input:focus,
.profile-field select:focus {
  outline: none;
  border-color: var(--accent-surgical);
  box-shadow: 0 0 0 3px rgba(27, 77, 137, 0.1);
}

.profile-field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg-light);
}

.profile-field select {
  cursor: pointer;
}

/* Subscription Card - Light Theme */
.subscription-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-light-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px;
}

.subscription-info h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-light-primary);
}

.subscription-info p {
  font-size: 14px;
  color: var(--text-light-muted);
}

.subscription-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.subscription-badge.free {
  background: rgba(27, 77, 137, 0.1);
  color: var(--accent-surgical);
}

.subscription-badge.premium {
  background: var(--accent-gradient);
  color: white;
}

/* Progress Placeholder */
.coming-soon-placeholder {
  text-align: center;
  padding: 20px;
}

.progress-illustration {
  width: 180px;
  height: 140px;
  margin-bottom: 28px;
  opacity: 0.6;
}

.progress-illustration svg {
  width: 100%;
  height: 100%;
}

.coming-soon-placeholder h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-light-primary);
  margin-bottom: 12px;
}

.coming-soon-placeholder p {
  font-size: 15px;
  color: var(--text-light-muted);
  max-width: 280px;
  line-height: 1.6;
}

/* Subtle pulse animation for coming soon */
@keyframes gentlePulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.4;
  }
}

.progress-illustration {
  animation: gentlePulse 3s ease-in-out infinite;
}

/* Profile Actions - Redesigned */
.profile-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

/* Profile Save Button - Card-like style */
.btn-save,
button.btn-save {
  flex: 1;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  border: 1px solid #D1D5DB !important;
  padding: 16px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-save:hover,
button.btn-save:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #0F766E !important;
}

.btn-save:active,
button.btn-save:active {
  transform: translateY(0);
}

/* Profile Back Button - Card-like style */
.btn-back,
button.btn-back {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  border: 1px solid #D1D5DB !important;
  padding: 16px 24px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-back:hover,
button.btn-back:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #0F766E !important;
}

.btn-back:active,
button.btn-back:active {
  transform: translateY(0);
}

/* Mobile: Stack panels vertically */
@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-progress-panel {
    min-height: 350px;
  }

  #profilePage {
    padding: 40px 20px;
  }
}

/* Upgrade Modal - Light Theme */
.upgrade-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.upgrade-modal.active {
  display: flex;
}

.upgrade-content {
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 20px;
  padding: 40px;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.upgrade-content h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #0F766E;
}

.upgrade-content p {
  color: #475569;
  margin-bottom: 24px;
  line-height: 1.6;
}

.upgrade-benefits {
  text-align: left;
  margin-bottom: 32px;
}

.upgrade-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: #1F2937;
  border-bottom: 1px solid #E5E7EB;
}

.upgrade-benefits li:last-child {
  border-bottom: none;
}

.upgrade-benefits .check {
  color: #0F766E;
  font-size: 18px;
}

.upgrade-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-upgrade,
button.btn-upgrade {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  border: 1px solid #D1D5DB !important;
  padding: 16px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-upgrade:hover,
button.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #0F766E !important;
}

.btn-cancel,
button.btn-cancel {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  border: 1px solid #D1D5DB !important;
  padding: 12px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-cancel:hover,
button.btn-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0F766E !important;
}

/* Lock icon for premium scenarios */
.scenario-locked {
  position: relative;
  opacity: 0.6;
}

.scenario-locked::after {
  content: '🔒';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

/* Adjust body padding when header is shown */
body.has-header {
  padding-top: 80px;
}

/* Loading spinner */
.auth-loading {
  display: none;
  justify-content: center;
  padding: 20px;
}

.auth-loading.visible {
  display: flex;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Mobile responsive for auth pages */
@media (max-width: 600px) {
  .landing-hero h1 {
    font-size: 32px;
  }

  .landing-hero .tagline {
    font-size: 16px;
  }

  .landing-features {
    flex-direction: column;
    align-items: center;
  }

  .landing-feature {
    max-width: 100%;
  }

  .landing-buttons {
    flex-direction: column;
  }

  .auth-container {
    margin: 40px auto;
    padding: 24px;
  }

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

  .profile-actions {
    flex-direction: column;
  }
}

/* ============================================
   UTILITY CLASSES
   Used to replace inline styles for consistency
   ============================================ */

/* Display utilities */
.initially-hidden {
  display: none;
}

/* Button modifiers */
.btn-full-width {
  width: 100%;
}

.btn-upgrade-spacing {
  width: 100%;
  margin-top: 16px;
}

.btn-manage-subscription {
  width: 100%;
  margin-top: 12px;
}

/* Difficulty indicator styles */
.difficulty-indicator {
  margin-top: 15px;
  font-size: 13px;
  color: #00d4aa;
  font-weight: 600;
}

.difficulty-indicator-mobile {
  margin: 15px 0;
  font-size: 14px;
  color: #00d4aa;
  font-weight: 600;
}

/* Mobile scenario padding */
.mobile-scenario-content {
  padding: 16px;
  padding-top: 80px;
}

/* ============================================
   PUSH-TO-TALK BUTTON STYLES
   ============================================ */

/* Record button - default state */
#recordBtn,
#mobileRecordBtn {
  transition: all 0.3s ease;
}

/* Record button - recording state */
#recordBtn.recording,
#mobileRecordBtn.recording {
  background: linear-gradient(135deg, #DC2626, #EF4444) !important;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5), 0 0 40px rgba(220, 38, 38, 0.3);
  animation: recording-pulse 1.5s ease-in-out infinite;
}

@keyframes recording-pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5), 0 0 40px rgba(220, 38, 38, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.7), 0 0 60px rgba(220, 38, 38, 0.4);
  }
}

/* Record button - hover when not recording */
#recordBtn:not(.recording):not(:disabled):hover,
#mobileRecordBtn:not(.recording):not(:disabled):hover {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  box-shadow: 0 0 15px rgba(15, 118, 110, 0.4);
}

/* ============================================
   INTERRUPT BUTTON STYLES
   ============================================ */

/* Interrupt button - default state (red) */
#interruptBtn,
#mobileInterruptBtn {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  transition: all 0.3s ease;
}

/* Interrupt button - hover state */
#interruptBtn:not(:disabled):hover,
#mobileInterruptBtn:not(:disabled):hover {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
}