/* ==========================================================
   AI INFRASTRUCTURE SERIES - EPISODE 2: INSIDE A GPU
   Aesthetics: Deep Obsidian, Electric Purple & NVIDIA Green
   ========================================================== */

:root {
  --bg-base: #07090e;
  --bg-surface: #0e1320;
  --bg-surface-elevated: #151d30;
  --border-subtle: rgba(255, 255, 255, 0.08);
  
  --cuda-blue: #38bdf8;
  --cuda-blue-glow: rgba(56, 189, 248, 0.25);
  --tensor-purple: #a855f7;
  --tensor-purple-glow: rgba(168, 85, 247, 0.35);
  --gpu-green: #10b981;
  --vram-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glow Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}
.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  top: -200px;
  left: -100px;
}
.orb-2 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #10b981, transparent 70%);
  bottom: -250px;
  right: -150px;
}
.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
  top: 40%;
  left: 60%;
  opacity: 0.15;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* ==========================================================
   TOP NAV HUD
   ========================================================== */
.top-nav {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.hub-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.series-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #c084fc;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 10px #a855f7;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.ep-tag {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.nav-topic-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.timeline-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-bar {
  width: 180px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.timeline-fill {
  width: 14%;
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.slide-dots {
  display: flex;
  gap: 8px;
}

.slide-dot-item {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slide-dot-item.active {
  background: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.7);
  width: 32px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-btn.active-btn {
  background: rgba(168, 85, 247, 0.15);
  border-color: var(--tensor-purple);
  color: #c084fc;
}

.shortcut-pill {
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================
   PRESENTATION STAGE & SLIDES
   ========================================================= */
.presentation-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

.slide-view {
  position: absolute;
  inset: 0;
  padding: 36px 64px 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-view.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.slide-view.prev-out {
  transform: translateX(-40px) scale(0.98);
  opacity: 0;
}

/* Badges */
.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.badge-tag.sm-accent { background: rgba(56, 189, 248, 0.12); color: var(--cuda-blue); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-tag.cuda-accent { background: rgba(14, 165, 233, 0.12); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-tag.tensor-accent { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.badge-tag.vram-accent { background: rgba(6, 182, 212, 0.12); color: var(--vram-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-tag.math-accent { background: rgba(16, 185, 129, 0.12); color: var(--gpu-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-tag.finale-accent { background: rgba(244, 63, 94, 0.12); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }

.slide-title {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #c084fc 70%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 900px;
}

/* ==========================================================
   SLIDE 1: HERO PILLARS
   ========================================================== */
.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  gap: 28px;
}

.hook-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.chip-anatomy-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.anatomy-pillar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform var(--transition-smooth);
}

.anatomy-pillar:hover {
  transform: translateY(-4px);
}

.highlight-pillar {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 10px 40px -10px var(--tensor-purple-glow);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08) 0%, rgba(14, 19, 32, 0.95) 100%);
}

.pillar-icon {
  font-size: 32px;
}

.anatomy-pillar h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.anatomy-pillar p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.spec-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cuda-blue);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.spec-tag.tensor-tag {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.spec-tag.vram-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.rhetorical-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-main);
}

/* ==========================================================
   SPLIT LAYOUTS (SLIDE 2, 3, 5)
   ========================================================== */
.split-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.analogy-lead {
  font-size: 18px;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 20px;
  border-left: 3px solid #c084fc;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

.bullet-item strong {
  color: #fff;
}

.bullet-icon {
  font-size: 20px;
}

.visual-chip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.sm-diagram-card {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 40px -10px var(--cuda-blue-glow);
}

.cuda-diagram-card {
  border-color: rgba(14, 165, 233, 0.3);
}

.memory-compare-card {
  border-color: rgba(6, 182, 212, 0.3);
}

.chip-diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.die-label {
  color: var(--text-muted);
  font-weight: 600;
}

.clock-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cuda-blue);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.clock-badge.sm-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.clock-badge.vram-clock {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* SM Die Visual */
.sm-die-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sm-sub-partitions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.partition-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.cuda-cluster-tiny {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cuda-blue);
  padding: 4px;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
}

.tensor-cluster-tiny {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  padding: 4px;
  border-radius: 4px;
  text-align: center;
  font-weight: 700;
}

.sm-shared-memory {
  background: rgba(16, 185, 129, 0.1);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #34d399;
}

.analogy-caption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* CUDA Pipeline Visual */
.cuda-pipeline-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pipeline-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-val {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
}

.input-op {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-muted);
}

.fma-engine-box {
  width: 100%;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fma-core-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cuda-blue);
}

.fma-pulse-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  animation: pulseLaser 1.5s infinite;
}

@keyframes pulseLaser {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.pipeline-output {
  width: 100%;
  text-align: center;
}

.out-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #34d399;
  font-weight: 700;
}

/* ==========================================================
   SLIDE 4: INTERACTIVE TENSOR CRUNCHER
   ========================================================== */
.interactive-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.cruncher-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px 32px;
}

.cruncher-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #060911;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
}

.cycle-count {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
}

.cycle-count.tensor-count {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  font-weight: 700;
}

.matrix-grid-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
}

.m-elem {
  width: 100%;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  transition: all 0.2s;
}

.m-elem.active-cuda {
  background: rgba(56, 189, 248, 0.4);
  border-color: #38bdf8;
  color: #fff;
  transform: scale(1.05);
}

.m-elem.done-cuda {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

.m-elem.stamped-tensor {
  background: rgba(168, 85, 247, 0.4);
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.card-footer-note {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.cruncher-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.crunch-cta-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.5);
  transition: all var(--transition-fast);
}

.crunch-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(168, 85, 247, 0.7);
}

.reset-cta-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.speedup-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.interactive-insight {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: #e9d5ff;
}

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

/* ==========================================================
   SLIDE 5: MEMORY BANDWIDTH VISUALIZER
   ========================================================== */
.bandwidth-visualizer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.bw-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bw-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.highlight-green {
  color: #34d399;
  font-weight: 700;
}

.bw-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.bw-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease;
}

.ddr5-bar { background: var(--cuda-blue); }
.gddr-bar { background: var(--accent-amber); }
.hbm-bar { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 10px #10b981; }

/* ==========================================================
   SLIDE 6: PRECISION CARDS
   ========================================================== */
.precision-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.p-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition-smooth);
}

.p-card:hover {
  transform: translateY(-4px);
}

.p-card.highlight-card {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.3);
}

.p-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.p-type {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.p-size {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.highlight-purple { color: #c084fc; }

.bit-strip {
  display: flex;
  gap: 4px;
  background: #060911;
  border-radius: 6px;
  padding: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}

.sign-bit { background: rgba(244, 63, 94, 0.2); color: #fb7185; padding: 4px; border-radius: 3px; }
.exp-bit { background: rgba(245, 158, 11, 0.2); color: #fcd34d; padding: 4px; border-radius: 3px; flex: 1; }
.mantissa-bit { background: rgba(56, 189, 248, 0.2); color: #38bdf8; padding: 4px; border-radius: 3px; flex: 2; }

.p-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.relative-perf {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px;
  border-radius: 6px;
  text-align: center;
}

.purple-perf { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.green-perf { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* ==========================================================
   SLIDE 7: FINALE & EPISODE 3 TEASER
   ========================================================== */
.wrapup-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.summary-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.sum-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.sum-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  font-family: var(--font-mono);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sum-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sum-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.teaser-card {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.1) 0%, rgba(14, 19, 32, 0.95) 100%);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 15px 40px -10px rgba(244, 63, 94, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teaser-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fb7185;
  letter-spacing: 0.08em;
}

.teaser-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.teaser-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.oom-error-mockup {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.oom-error-mockup code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fb7185;
}

.teaser-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.series-countdown {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.next-series-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.next-series-btn:hover {
  background: #fff;
  color: #000;
}

/* ==========================================================
   BOTTOM CONTROLS BAR & SCRIPT DRAWER
   ========================================================== */
.bottom-controls {
  height: 56px;
  background: rgba(10, 15, 26, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.controls-left, .controls-center, .controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.ctrl-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.play-pause-btn {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.play-pause-btn:hover {
  background: rgba(168, 85, 247, 0.25);
}

.slide-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 85px;
  text-align: center;
}

.keyboard-hints {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.key-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-muted);
}

.script-drawer {
  position: absolute;
  bottom: 56px;
  right: 28px;
  width: 480px;
  max-height: 480px;
  background: rgba(14, 19, 32, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.script-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.drawer-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title-box h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.slide-target-time {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  padding: 2px 6px;
  border-radius: 4px;
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-speed-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.voice-speed-selector select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 4px;
}

.drawer-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.script-meta-strip {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.script-voice-text {
  font-size: 15px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-line;
}

.presenter-tips-box {
  font-size: 12px;
  line-height: 1.5;
  background: rgba(168, 85, 247, 0.08);
  border-left: 3px solid var(--tensor-purple);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #e9d5ff;
}

.hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .split-layout, .wrapup-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .visual-chip-card, .teaser-card {
    display: none;
  }
  .script-drawer {
    width: 90vw;
    right: 5vw;
  }
}

/* ==========================================================
   CLEAN RECORDING MODE: Hide presenter tools & dev hints
   ========================================================== */
#btnScriptToggle,
#btnAudioRehearse,
.keyboard-hints,
.controls-center {
  display: none !important;
}
