/* ==========================================================================
   DSATracker.in Cinematic Promotional Video Engine (Heavy-Edited Edition)
   Motion Graphics: Jump & Land Physics, RGB Glitch Punch, Elastic Springs, 3D Tilted Cards
   Layout: 3-Zone Zero-Overlap Architecture (Header, Content, Caption)
   ========================================================================== */

:root {
  --bg-deep: #05070c;
  --bg-surface: #0a0e17;
  --bg-card: rgba(14, 20, 34, 0.75);
  --bg-card-hover: rgba(22, 31, 52, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.4);

  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.55);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.55);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.55);
  --amber: #f59e0b;
  --rose: #f43f5e;
  --flame: #ff5722;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  background: #020306;
  color: var(--text-main);
  font-family: var(--font-body);
  overflow: hidden;
  user-select: none;
}

/* ==========================================================================
   DIRECTOR HUD / TOOLBAR (Recorder Helper)
   ========================================================================== */
.director-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.director-hud.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.hud-left, .hud-center, .hud-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
}

.hud-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.hud-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

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

.hud-btn.primary {
  background: linear-gradient(135deg, #00f0ff, #0284c7);
  color: #041019;
  border: none;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.hud-btn.record-btn {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  border: none;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45);
}

.record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-dot 1.2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

.scene-pills {
  display: flex;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.scene-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.scene-pill:hover {
  color: #fff;
}

.scene-pill.active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--cyan);
}

.speed-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
}

.speed-select option {
  background: var(--bg-surface);
  color: var(--text-main);
}


/* ==========================================================================
   VIEWPORT WRAPPER & 3-ZONE ZERO-OVERLAP VIDEO STAGE
   ========================================================================== */
.viewport-wrapper {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020306;
  overflow: hidden;
  transition: top 0.35s ease;
  padding: 12px;
}

body.clean-record-mode .director-hud {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

body.clean-record-mode .viewport-wrapper {
  top: 0;
  padding: 0;
}

/* Video Stage - Strict 3-zone Flex Column */
.video-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 177.78vh; /* 16:9 ratio */
  max-height: 56.25vw;
  aspect-ratio: 16 / 9;
  background: var(--bg-deep);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 100px rgba(0, 240, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  border-radius: 12px;
  transition: transform 0.08s ease-out;
}

/* 9:16 Vertical Preset for Shorts / Reels */
body.mode-vertical .video-stage {
  aspect-ratio: 9 / 16;
  max-width: 56.25vh;
  max-height: 177.78vw;
}

/* Screen Shake Effect for Heavy Impact Landings */
.video-stage.stage-shake {
  animation: stage-shake-impact 0.2s ease-out;
}

@keyframes stage-shake-impact {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 4px) rotate(-0.2deg); }
  50% { transform: translate(4px, -3px) rotate(0.2deg); }
  75% { transform: translate(-2px, 2px); }
  100% { transform: translate(0, 0); }
}

/* Ambient Canvas & Glow Orbs */
#ambient-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.stage-glow-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, black 60%, transparent 95%);
  pointer-events: none;
  z-index: 1;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
}

.orb-cyan {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.6) 0%, transparent 70%);
  top: -100px;
  left: -80px;
}

.orb-purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5) 0%, transparent 70%);
  bottom: -120px;
  right: -80px;
}

.orb-emerald {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
  top: 35%;
  left: 55%;
}

/* Chromatic Glitch Flash Layer */
.screen-glitch-layer {
  position: absolute;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  background: rgba(255, 255, 255, 0.04);
  mix-blend-mode: overlay;
  transition: opacity 0.15s ease-out;
}

.screen-glitch-layer.glitch-flash {
  opacity: 1;
  animation: glitch-burst 0.22s steps(2);
}

@keyframes glitch-burst {
  0% { transform: translate(-2px, 2px); filter: contrast(180%); }
  50% { transform: translate(3px, -2px); filter: hue-rotate(90deg); }
  100% { transform: translate(0, 0); filter: none; }
}

/* ==========================================================================
   ZONE 1: HEADER (Reserved top zone, zero overlap)
   ========================================================================== */
.stage-top-bar {
  flex-shrink: 0;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.8) 0%, transparent 100%);
}

.stage-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(0, 240, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

.brand-icon-box img {
  width: 20px;
  height: 20px;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-domain {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.brand-domain span {
  color: var(--cyan);
}

.brand-subline {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.top-pill-free {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: 0.04em;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.green-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

/* ==========================================================================
   ZONE 2: MAIN CONTENT AREA (Flex: 1, Zero Overflow, Centered)
   ========================================================================== */
.stage-content-area {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 10;
  padding: 0 24px;
}

.scene-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.scene-container.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================================
   MOTION GRAPHICS: EXIT RIGHT & COME FROM RIGHT JUMP IN MIDDLE
   ========================================================================== */

/* Outgoing Scene: All elements move right and disappear */
.scene-container.exiting-right {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  animation: sceneContainerExit 0.4s ease forwards;
}

@keyframes sceneContainerExit {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.scene-container.exiting-right > *,
.scene-container.exiting-right .hero-pill-warn,
.scene-container.exiting-right .hero-pill-info,
.scene-container.exiting-right .kinetic-title,
.scene-container.exiting-right .kinetic-desc,
.scene-container.exiting-right .anim-jump-hero,
.scene-container.exiting-right .anim-pop-1,
.scene-container.exiting-right .anim-pop-2,
.scene-container.exiting-right .anim-pop-3,
.scene-container.exiting-right .anim-pop-4 {
  animation: moveRightAndDisappear 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes moveRightAndDisappear {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    transform: translateX(clamp(160px, 35cqw, 320px)) scale(0.92);
    filter: blur(8px);
  }
}

/* Incoming Scene: Come from right, then elastic jump & land in middle */
@keyframes comeFromRightAndJumpInMiddle {
  0% {
    opacity: 0;
    transform: translateX(clamp(200px, 40cqw, 380px)) scale(0.7) rotate(3deg);
    filter: blur(8px);
  }
  48% {
    opacity: 1;
    transform: translateX(-24px) scale(1.12, 0.92) rotate(-1.5deg);
    filter: blur(0px);
  }
  68% {
    transform: translateX(12px) scale(0.95, 1.04) rotate(0.8deg);
  }
  84% {
    transform: translateX(-5px) scale(1.02, 0.98) rotate(-0.3deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(0deg);
  }
}

@keyframes popBadgeFromRight {
  0% {
    opacity: 0;
    transform: translateX(clamp(120px, 25cqw, 220px)) scale(0.6);
    filter: blur(5px);
  }
  55% {
    opacity: 1;
    transform: translateX(-12px) scale(1.14);
    filter: blur(0px);
  }
  75% {
    transform: translateX(5px) scale(0.96);
  }
  90% {
    transform: translateX(-2px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes popTitleFromRight {
  0% {
    opacity: 0;
    transform: translateX(clamp(160px, 30cqw, 280px)) scale(0.75);
    filter: blur(6px);
  }
  52% {
    opacity: 1;
    transform: translateX(-18px) scale(1.09);
    filter: blur(0px);
  }
  72% {
    transform: translateX(8px) scale(0.97);
  }
  88% {
    transform: translateX(-3px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes popDescFromRight {
  0% {
    opacity: 0;
    transform: translateX(clamp(140px, 28cqw, 240px)) scale(0.85);
    filter: blur(5px);
  }
  55% {
    opacity: 1;
    transform: translateX(-12px) scale(1.04);
    filter: blur(0px);
  }
  75% {
    transform: translateX(5px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.scene-container.active .anim-pop-1 {
  animation: popBadgeFromRight 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
}

.scene-container.active .anim-pop-2 {
  animation: popTitleFromRight 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s both;
}

.scene-container.active .anim-pop-3 {
  animation: popDescFromRight 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.19s both;
}

.scene-container.active .anim-jump-hero {
  animation: comeFromRightAndJumpInMiddle 0.78s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s both;
}

.scene-container.active .anim-pop-4 {
  animation: popDescFromRight 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
}

/* Kinetic Titles & Pill Badges */
.hero-pill-warn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.hero-pill-info {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.kinetic-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2cqw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: #fff;
  max-width: 820px;
}

.kinetic-title .highlight-red {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(244, 63, 94, 0.4);
}

.kinetic-title .highlight-cyan {
  background: linear-gradient(135deg, #00f0ff, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.45);
}

.kinetic-desc {
  font-size: clamp(0.78rem, 1.4cqw, 1.05rem);
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* ==========================================================================
   SCENE 1: THE STRUGGLE (Chaotic Spreadsheet)
   ========================================================================== */
.chaotic-sheet-card {
  width: 100%;
  max-width: 720px;
  background: rgba(14, 19, 32, 0.85);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(244, 63, 94, 0.15);
}

.sheet-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: rgba(8, 12, 20, 0.95);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.window-dots span:nth-child(1) { background: #ef4444; }
.window-dots span:nth-child(2) { background: #f59e0b; }
.window-dots span:nth-child(3) { background: #10b981; }

.window-title {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  font-family: var(--font-mono);
}

.sheet-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.45rem 0.65rem;
  text-align: left;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

.sheet-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.sheet-table tr.highlight-lost {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
}

.badge-lost {
  background: rgba(244, 63, 94, 0.25);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.45);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
}

.sheet-stats-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.6rem 0.8rem;
  background: rgba(244, 63, 94, 0.08);
  border-top: 1px solid rgba(244, 63, 94, 0.2);
  font-size: 0.74rem;
  font-weight: 800;
  color: #fda4af;
}

/* ==========================================================================
   SCENE 2: THE REVEAL (3D Command Dashboard)
   ========================================================================== */
.dashboard-hero-mockup {
  width: 100%;
  max-width: 780px;
  background: linear-gradient(180deg, rgba(18, 25, 42, 0.9) 0%, rgba(9, 13, 24, 0.98) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 45px rgba(0, 240, 255, 0.2);
  transform: perspective(1000px) rotateX(4deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color, var(--cyan)), transparent);
}

.metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.metric-sub {
  font-size: 0.64rem;
  color: var(--emerald);
  margin-top: 0.15rem;
  font-weight: 700;
}

.dash-progress-showcase {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sheet-progress-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sheet-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  width: 0%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* ==========================================================================
   SCENE 3: ROADMAPS & SMART DEDUPLICATION
   ========================================================================== */
.curricula-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 820px;
  margin-bottom: 0.9rem;
}

.curricula-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.9rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.curricula-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 25px var(--cyan-glow);
  transform: translateY(-2px);
}

.curricula-icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.curricula-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 0.15rem;
}

.curricula-count {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--cyan);
  font-weight: 700;
}

/* Deduplication Box (Centered, Compact) */
.dedup-demo-box {
  width: 100%;
  max-width: 780px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dedup-problem-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.problem-tag-badge {
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  color: var(--amber);
}

.problem-name-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
}

.sync-chips-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sync-chip.solved {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--emerald);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  transform: scale(1.05);
}

/* ==========================================================================
   SCENE 4: LEETGITSYNC EXTENSION AUTO-SYNC
   ========================================================================== */
.autosync-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 820px;
}

.pipeline-node {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  transition: all 0.3s ease;
}

.pipeline-node.active-glow {
  border-color: var(--cyan);
  box-shadow: 0 0 30px var(--cyan-glow);
}

.node-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: #fff;
}

.code-mock-box {
  width: 100%;
  background: #04060b;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.6rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  line-height: 1.4;
  color: #93c5fd;
  margin-bottom: 0.65rem;
}

.btn-submit-simulate {
  width: 100%;
  padding: 0.38rem;
  background: #22c55e;
  color: #031a0a;
  font-weight: 800;
  font-size: 0.74rem;
  border-radius: 6px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4);
}

.pipeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: var(--cyan);
  font-size: 1.1rem;
  animation: pulse-arrow 1s infinite alternate;
}

.ext-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.5);
  margin-bottom: 0.5rem;
}

.ext-badge-icon img {
  width: 26px;
  height: 26px;
}

.commit-preview-card {
  width: 100%;
  background: #04060b;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  padding: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-align: left;
  color: var(--emerald);
}

/* Chrome Web Store Promo Badge */
.chrome-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.6rem;
}

/* ==========================================================================
   SCENE 5: RETENTION ENGINE & 365-DAY HEATMAP
   ========================================================================== */
.retention-showcase-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.9rem;
  width: 100%;
  max-width: 820px;
}

.heatmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.heatmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.heatmap-title-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 87, 34, 0.15);
  border: 1px solid rgba(255, 87, 34, 0.35);
  color: #ff7043;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.heatmap-grid-canvas {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  max-height: 110px;
  overflow-x: auto;
  padding: 0.2rem 0;
}

.heat-cell {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
}

.heat-cell.lvl-1 { background: #0e4429; }
.heat-cell.lvl-2 { background: #006d32; }
.heat-cell.lvl-3 { background: #26a641; }
.heat-cell.lvl-4 { background: #39d353; box-shadow: 0 0 5px #39d353; }

.spaced-rep-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.revision-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.revision-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.revision-title {
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
}

.revision-due {
  font-size: 0.65rem;
  color: var(--amber);
  font-weight: 700;
}

.revision-notes {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SCENE 6: GRAND FINALE / CALL TO ACTION
   ========================================================================== */
.grand-cta-box {
  background: linear-gradient(180deg, rgba(18, 25, 42, 0.92) 0%, rgba(9, 13, 24, 0.98) 100%);
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 18px;
  padding: 1.5rem 1.25rem;
  width: 100%;
  max-width: 780px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 60px rgba(0, 240, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.big-brand-glow-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(139, 92, 246, 0.3));
  border: 1px solid rgba(0, 240, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.5);
  margin-bottom: 0.75rem;
}

.big-brand-glow-logo img {
  width: 36px;
  height: 36px;
}

.giant-domain {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.2cqw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 40px rgba(0, 240, 255, 0.6);
  margin-bottom: 0.35rem;
  line-height: 1.1;
  white-space: nowrap;
}

.giant-domain span {
  color: var(--cyan);
}

.finale-tagline {
  font-size: clamp(0.82rem, 1.6cqw, 1.1rem);
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.45;
  margin-bottom: 1.1rem;
}

.value-bullets-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.value-bullet {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #fff;
}

.value-bullet svg {
  color: var(--emerald);
}

.cta-glow-btn {
  background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 50%, #8b5cf6 100%);
  color: #030d17;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  border: none;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.65);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
}

.cta-glow-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 45px rgba(0, 240, 255, 0.9);
}

/* ==========================================================================
   ZONE 3: SUBTITLE / CAPTION ZONE (Dedicated reserved row, ZERO OVERLAP)
   ========================================================================== */
.stage-caption-zone {
  flex-shrink: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 24px 12px 24px;
  z-index: 20;
  pointer-events: none;
}

.caption-pill {
  background: rgba(6, 9, 16, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  font-size: clamp(0.78rem, 1.4cqw, 0.95rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85);
  max-width: 90%;
  text-align: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.caption-pill .caption-highlight {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
}

/* Timeline scrubber track */
.stage-timeline-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  cursor: pointer;
}

.stage-timeline-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f0ff, #8b5cf6);
  width: 0%;
  box-shadow: 0 0 8px #00f0ff;
  transition: width 0.1s linear;
}

/* ==========================================================================
   3-2-1 COUNTDOWN OVERLAY
   ========================================================================== */
.countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 9, 0.94);
  backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.countdown-overlay.active {
  opacity: 1;
  visibility: visible;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 60px rgba(0, 240, 255, 0.9);
  animation: countdown-zoom 1s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes countdown-zoom {
  0% { transform: scale(1.4); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  80% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0; }
}

.countdown-hint {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   STRICT 9:16 VERTICAL MODE PRESET (SHORTS / REELS / TIKTOK)
   ========================================================================== */
body.mode-vertical .stage-top-bar {
  padding: 10px 14px;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.mode-vertical .brand-domain {
  font-size: 0.88rem;
}

body.mode-vertical .brand-subline {
  display: none;
}

body.mode-vertical .top-pill-free {
  font-size: 0.64rem;
  padding: 0.25rem 0.55rem;
}

body.mode-vertical .kinetic-title {
  font-size: clamp(1.25rem, 5.5cqw, 2rem);
  line-height: 1.2;
}

body.mode-vertical .dash-metrics-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

body.mode-vertical .metric-val {
  font-size: 1.25rem;
}

body.mode-vertical .curricula-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

body.mode-vertical .dedup-demo-box {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
}

body.mode-vertical .sync-chips-group {
  flex-wrap: wrap;
  width: 100%;
}

body.mode-vertical .autosync-pipeline {
  flex-direction: column;
  gap: 0.5rem;
}

body.mode-vertical .pipeline-node {
  width: 100%;
  padding: 0.65rem;
}

body.mode-vertical .retention-showcase-grid {
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

body.mode-vertical .giant-domain {
  font-size: clamp(1.6rem, 8cqw, 2.4rem);
  white-space: normal;
}

body.mode-vertical .value-bullets-row {
  flex-direction: column;
  gap: 0.4rem;
}

body.mode-vertical .caption-pill {
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
}
