/* Episode 6: Why AI Needs High-Speed Networking - Custom Styling */
:root {
  --bg-dark: #07090e;
  --bg-card: rgba(15, 20, 32, 0.75);
  --bg-card-hover: rgba(22, 30, 48, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 245, 255, 0.35);

  --cyan-primary: #00f5ff;
  --cyan-glow: rgba(0, 245, 255, 0.2);
  --ib-violet: #d946ef;
  --ib-glow: rgba(217, 70, 239, 0.25);
  --green-lossless: #10b981;
  --green-glow: rgba(16, 185, 129, 0.2);
  --red-alert: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.25);
  --amber-warn: #f59e0b;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0, 245, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(217, 70, 239, 0.04) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
}

/* TOP NAVIGATION */
.top-nav {
  height: 64px;
  background: rgba(10, 14, 24, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}

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

.back-hub-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.back-hub-btn:hover {
  color: var(--cyan-primary);
  border-color: var(--cyan-primary);
  background: rgba(0, 245, 255, 0.08);
}

.series-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cyan-primary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary);
  animation: pulse 2s infinite;
}

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

.nav-center .current-slide-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.02em;
}

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

.hud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-btn:hover, .hud-btn.active {
  color: #fff;
  border-color: var(--cyan-primary);
  background: rgba(0, 245, 255, 0.1);
}

.slide-counter-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--cyan-primary);
}

/* SLIDE VIEWPORT */
.slide-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 32px 48px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.slide-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* TYPOGRAPHY */
.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cyan-primary);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
}

.slide h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.slide-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 800px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.cyan-gradient {
  background: linear-gradient(135deg, var(--cyan-primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-cyan { color: var(--cyan-primary) !important; }
.text-amber { color: var(--amber-warn) !important; }
.text-red { color: var(--red-alert) !important; }
.text-green { color: var(--green-lossless) !important; }

/* SLIDE 1: HERO */
.hero-header {
  text-align: center;
  margin-bottom: 32px;
}

.hero-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: var(--cyan-primary);
}

.glitch-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 750px;
  margin: 0 auto;
}

.hero-stage {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.analogy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.analogy-header {
  margin-bottom: 16px;
}

.analogy-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber-warn);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.analogy-header h3 {
  font-size: 18px;
  color: #fff;
}

.rowing-visual {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
}

.rowing-lane {
  position: relative;
}

.rower-group {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.rower {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan-primary);
}

.oar {
  width: 6px;
  height: 28px;
  background: var(--cyan-primary);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--cyan-primary);
}

.rower.synced .oar {
  animation: strokeAnim 1.8s infinite ease-in-out;
}

@keyframes strokeAnim {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(20deg); }
}

.rower.stuck {
  color: var(--red-alert);
  position: relative;
}

.rower.stuck .oar {
  background: var(--red-alert);
  box-shadow: 0 0 10px var(--red-alert);
  transform: rotate(45deg);
}

.snag-icon {
  font-size: 9px;
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-alert);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--red-alert);
  white-space: nowrap;
  position: absolute;
  top: -24px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

.boat-hull {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 6px;
  text-align: center;
}

.hull-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stall-banner {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--red-alert);
  letter-spacing: 0.05em;
}

.analogy-caption {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.cost-burn-card {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.burn-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--red-alert);
  font-weight: 700;
}

.live-dot-red {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-alert);
  box-shadow: 0 0 8px var(--red-alert);
  animation: pulse 1.2s infinite;
}

.burn-value {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  color: var(--red-alert);
  margin: 12px 0;
  line-height: 1;
}

.burn-unit {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-muted);
}

.burn-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.b-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.b-item span { color: var(--text-muted); }

.burn-footnote {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

/* SLIDE 2: TRAFFIC SPLIT GRID */
.traffic-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.traffic-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.traffic-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.traffic-icon {
  font-size: 28px;
}

.traffic-header h3 {
  font-size: 18px;
  color: #fff;
}

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

.traffic-diagram {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
}

.traffic-arrow {
  color: var(--text-dim);
  font-size: 10px;
}

.dc-boundary {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px dashed var(--text-dim);
  width: 90%;
}

.gpu-cluster-mesh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 0;
}

.g-node {
  background: rgba(0, 245, 255, 0.15);
  border: 1px solid var(--cyan-primary);
  color: var(--cyan-primary);
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 700;
}

.mesh-link {
  color: var(--cyan-primary);
  font-size: 10px;
  animation: pulse 1.5s infinite;
}

.mesh-status {
  margin-top: 6px;
  font-size: 10px;
  color: var(--amber-warn);
  font-weight: 600;
}

.traffic-attributes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attr-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.attr-k { color: var(--text-muted); }
.attr-v { font-weight: 600; text-align: right; }

/* SLIDE 3: TCP PIPELINE */
.tcp-pipeline-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.pipeline-stages {
  display: grid;
  grid-template-columns: 1fr 0.4fr 1fr;
  gap: 16px;
  align-items: center;
}

.node-stage-card {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node-stage-card h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.mem-level {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.gpu-mem { border-color: var(--cyan-primary); background: rgba(0, 245, 255, 0.05); }
.kernel-mem { border-color: var(--amber-warn); background: rgba(245, 158, 11, 0.05); }

.mem-title { font-size: 12px; font-weight: 600; color: #fff; }
.mem-desc { font-size: 10px; color: var(--text-muted); }

.copy-arrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  padding: 0 4px;
}

.copy-tag {
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--red-alert);
  padding: 1px 6px;
  border-radius: 4px;
}

.wire-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

.wire-line {
  width: 100%;
  height: 4px;
  background: var(--amber-warn);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--amber-warn);
}

.wire-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.packet-glitch {
  font-size: 10px;
  color: var(--red-alert);
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--red-alert);
  margin-top: 4px;
}

.tcp-summary-banner {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.banner-stat {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid var(--red-alert);
}

.banner-stat strong {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}

/* SLIDE 4: SIMULATOR */
.sim-container {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.05);
  border-radius: 12px;
  padding: 24px;
}

.sim-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 24px;
}

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

.sim-control-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.toggle-btn {
  flex: 1;
  min-width: 80px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.toggle-btn:hover {
  border-color: rgba(0, 245, 255, 0.4);
  color: #fff;
}

.toggle-btn.active {
  background: rgba(0, 245, 255, 0.15);
  border-color: var(--cyan-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

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

.slider-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--red-alert);
  background: rgba(239, 68, 68, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--red-alert);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan-primary);
  cursor: pointer;
}

.control-hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

.sim-action-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.run-sim-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cyan-primary) 0%, #0077ff 100%);
  color: #000;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.3);
  transition: all 0.2s ease;
}

.run-sim-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.5);
}

.reset-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
}

.sim-display-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-ring-viz {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ring-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.ring-canvas-box {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

#ringCanvas {
  max-width: 100%;
  height: auto;
}

.sim-status-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 245, 255, 0.15);
  color: var(--cyan-primary);
  border: 1px solid var(--cyan-primary);
}

.sim-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gauge-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
}

.gauge-card.highlight-card {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.05);
}

.g-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.g-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.sub-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
}

.g-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 6px 0;
  overflow: hidden;
}

.g-fill {
  height: 100%;
  background: var(--cyan-primary);
  box-shadow: 0 0 8px var(--cyan-primary);
  transition: width 0.3s ease;
}

.g-sub {
  font-size: 10px;
  color: var(--text-dim);
}

/* SLIDE 5: RDMA */
.rdma-architecture-view {
  display: grid;
  grid-template-columns: 1fr 0.5fr 1fr;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.rdma-node-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
}

.rdma-node-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan-primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.rdma-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rdma-layer {
  padding: 10px 14px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gpu-hbm-box {
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid var(--cyan-primary);
  color: #fff;
}

.nic-cx-box {
  background: rgba(217, 70, 239, 0.1);
  border: 1px solid var(--ib-violet);
  color: #fff;
}

.r-name { font-size: 12px; font-weight: 600; }
.r-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.rdma-bypass-zone {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.bypassed-item {
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: line-through;
}

.bypassed-item span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--green-lossless);
  margin-left: 6px;
}

.bypass-arrow-beam {
  margin-top: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--green-lossless);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--green-lossless);
  text-align: center;
}

.rdma-middle-wire {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.optic-cable {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pulse-laser {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan-primary), var(--ib-violet));
  border-radius: 2px;
  box-shadow: 0 0 12px var(--cyan-primary);
  animation: pulseLaser 1s infinite alternate;
}

@keyframes pulseLaser {
  from { opacity: 0.6; box-shadow: 0 0 8px var(--cyan-primary); }
  to { opacity: 1; box-shadow: 0 0 16px var(--ib-violet); }
}

.cable-text {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.lossless-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--green-lossless);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--green-lossless);
  padding: 2px 6px;
  border-radius: 4px;
}

.rdma-benefits-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.benefit-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.benefit-chip strong { color: #fff; }
.b-icon { font-size: 20px; }

/* SLIDE 6: TOPOLOGY */
.topology-blueprint {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.topo-layer {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 14px;
}

.layer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.switch-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.switch-box {
  flex: 1;
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.switch-box.spine {
  background: rgba(217, 70, 239, 0.15);
  border: 1px solid var(--ib-violet);
  color: #fff;
}

.switch-box.leaf {
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid var(--cyan-primary);
  color: #fff;
}

.bisection-wire-zone {
  text-align: center;
  padding: 6px 0;
  border-top: 1px dashed rgba(16, 185, 129, 0.4);
  border-bottom: 1px dashed rgba(16, 185, 129, 0.4);
}

.bisection-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--green-lossless);
  letter-spacing: 0.08em;
}

.server-node-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.server-shelf {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.shelf-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.gpu-rails {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
}

.r-dot {
  font-family: var(--font-mono);
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(0, 245, 255, 0.2);
  color: var(--cyan-primary);
  border: 1px solid var(--cyan-primary);
}

.shelf-nics {
  font-size: 9px;
  color: var(--text-dim);
}

.rail-concept-explainer {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  background: rgba(0, 245, 255, 0.04);
  border: 1px solid rgba(0, 245, 255, 0.2);
  padding: 12px 16px;
  border-radius: 8px;
}

.rail-concept-explainer strong { color: var(--cyan-primary); }

/* SLIDE 7: WRAP-UP */
.wrap-up-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rule-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  margin-bottom: 8px;
}

.rule-card h3 {
  font-size: 17px;
  color: #fff;
  margin-bottom: 8px;
}

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

.rule-stat {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.next-episode-teaser {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.12) 0%, rgba(0, 245, 255, 0.08) 100%);
  border: 1px solid var(--ib-violet);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.teaser-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ib-violet);
  margin-bottom: 4px;
  font-weight: 700;
}

.teaser-content h3 {
  font-size: 17px;
  color: #fff;
  margin-bottom: 4px;
}

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

.teaser-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ib-violet);
  color: #fff;
  box-shadow: 0 0 14px var(--ib-glow);
  white-space: nowrap;
}

/* BOTTOM BAR */
.bottom-bar {
  height: 64px;
  background: rgba(10, 14, 24, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}

.nav-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-control-btn:hover {
  color: #fff;
  border-color: var(--cyan-primary);
  background: rgba(0, 245, 255, 0.08);
}

.nav-control-btn.next-primary {
  background: linear-gradient(135deg, var(--cyan-primary) 0%, #0077ff 100%);
  color: #000;
  border: none;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.25);
}

.nav-control-btn.next-primary:hover {
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.45);
}

.timeline-indicator .dot-track {
  display: flex;
  gap: 10px;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.step-dot:hover {
  background: rgba(0, 245, 255, 0.5);
  transform: scale(1.2);
}

.step-dot.active {
  background: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary);
  transform: scale(1.3);
}

/* PRESENTER HUD DRAWER */
.teleprompter-drawer {
  position: absolute;
  bottom: 64px;
  left: 24px;
  right: 24px;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(8, 12, 20, 0.96);
  border: 1px solid var(--border-glow);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  border-radius: 12px 12px 0 0;
  z-index: 60;
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 260px;
}

.teleprompter-drawer.open {
  transform: translateY(0);
}

.drawer-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan-primary);
  font-weight: 700;
}

.pulse-mic {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-alert);
  box-shadow: 0 0 6px var(--red-alert);
}

.slide-cue-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-right: 10px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.close-btn:hover { color: #fff; }

.drawer-body {
  padding: 14px 18px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #e5e7eb;
}

.drawer-body p {
  margin-bottom: 8px;
}

.drawer-body strong {
  color: var(--cyan-primary);
}

.drawer-footer {
  padding: 6px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.keys-legend {
  display: flex;
  gap: 14px;
}

kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: #fff;
}

/* ==========================================================
   CLEAN RECORDING MODE: Hide presenter tools & dev hints
   ========================================================== */
#toggle-voice-btn,
#toggle-teleprompter-btn,
.keys-legend {
  display: none !important;
}
