/* ==========================================================================
   Antigravity AI Engineer Roadmap - Imperial Gold & Royal Blue Luxury Edition
   Theme: Executive Midnight Sapphire & Shimmering Gold Accents
   Built for Shriram Hegde (@modernaicoder)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Cinzel:wght@700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Rich Dark Blue & Midnight Sapphire Backgrounds */
  --bg-main: #020617;
  --bg-card: #080f28;
  --bg-card-subtle: #050a1d;
  --border-card: #162248;
  --border-card-hover: #23366f;
  
  /* Imperial Gold Accents */
  --gold-primary: #e6b800;
  --gold-metallic: #d4af37;
  --gold-light: #fef08a;
  --gold-amber: #f59e0b;
  --gold-glow: rgba(212, 175, 55, 0.5);
  --gold-glow-subtle: rgba(212, 175, 55, 0.15);

  /* Royal & Sapphire Blues */
  --blue-royal: #2563eb;
  --blue-sapphire: #1d4ed8;
  --blue-bright: #3b82f6;
  --blue-ice: #93c5fd;
  --blue-glow: rgba(37, 99, 235, 0.45);

  /* Success & Alert */
  --emerald-accent: #10b981;
  --ruby-accent: #f43f5e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  background: radial-gradient(ellipse at 50% 10%, #0d1e4c 0%, #060c24 50%, #02040d 100%);
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

/* Stardust Gold & Sapphire Floating Canvas */
#cosmic-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* Custom Scrollbars in Gold */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #182855;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}
::-webkit-scrollbar-thumb:hover {
  background: #d4af37;
}

/* Luxury Metallic Gold Gradient Text */
.gold-text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 25%, #d4af37 60%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gold-glow-text {
  color: #fef08a;
  text-shadow: 0 0 16px rgba(212, 175, 55, 0.6), 0 0 32px rgba(212, 175, 55, 0.25);
}

/* Rich Reel Card Styling matching screenshot */
.reel-card {
  background: linear-gradient(180deg, rgba(10, 18, 48, 0.9) 0%, rgba(5, 10, 28, 0.96) 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(37, 99, 235, 0.18), inset 0 1px 0 rgba(254, 240, 138, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  backdrop-filter: blur(14px);
}

.reel-card:hover {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(212, 175, 55, 0.25);
}

/* Royal Pill Button */
.btn-reel-pill {
  background: linear-gradient(180deg, #0e193d 0%, #08102a 100%);
  border: 1px solid #1a2c5a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-reel-pill:hover {
  background: linear-gradient(180deg, #162659 0%, #0d183c 100%);
  border-color: #d4af37;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25);
}

.btn-reel-pill.completed {
  border-color: rgba(16, 185, 129, 0.65);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 78, 59, 0.25) 100%);
}

/* Week Navigation Capsule Progress Bar */
.week-progress-capsule {
  height: 4px;
  border-radius: 9999px;
  background-color: #152246;
  transition: all 0.3s ease;
}

.week-progress-capsule.active {
  background: linear-gradient(90deg, #fef08a, #d4af37);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.9);
}

.week-progress-capsule.passed {
  background-color: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

/* Luxury Gold & Sapphire Primary Action Button */
.btn-gold-primary {
  background: linear-gradient(135deg, #fef08a 0%, #d4af37 60%, #b45309 100%);
  color: #050a1d;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.4);
  border: 1px solid #fef08a;
  transition: all 0.2s ease;
}

.btn-gold-primary:hover {
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 40%, #d4af37 100%);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   RICH GOLD & SAPPHIRE DIAGRAM CONTINUOUS ANIMATIONS
   ========================================================================== */

/* Stage 01: Arriving token stream & Drop past Limit */
@keyframes streamTokens {
  0% {
    transform: translate(60px, -20px) scale(0.6);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: translate(30px, -10px) scale(0.85);
  }
  60% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  85% {
    opacity: 0.9;
    transform: translate(-10px, 10px) scale(0.95);
  }
  100% {
    opacity: 0;
    transform: translate(-20px, 20px) scale(0.8);
  }
}

.anim-token-stream {
  animation: streamTokens 2.6s infinite ease-in-out;
}

@keyframes dropPastLimit {
  0%, 45% {
    transform: translateY(0);
    opacity: 1;
  }
  65% {
    transform: translateY(16px);
    opacity: 0.7;
    border-color: #f43f5e;
  }
  85%, 100% {
    transform: translateY(32px);
    opacity: 0;
  }
}

.anim-token-drop {
  animation: dropPastLimit 3s infinite ease-in-out;
}

/* Stage 02: Orchestration Step Cycle in Gold */
@keyframes stepCycle1 { 0%, 25% { border-color: #d4af37; box-shadow: 0 0 16px rgba(212,175,55,0.7); } 30%, 100% { border-color: #1f3268; box-shadow: none; } }
@keyframes stepCycle2 { 0%, 25% { border-color: #1f3268; box-shadow: none; } 30%, 55% { border-color: #d4af37; box-shadow: 0 0 16px rgba(212,175,55,0.7); } 60%, 100% { border-color: #1f3268; box-shadow: none; } }
@keyframes stepCycle3 { 0%, 55% { border-color: #1f3268; box-shadow: none; } 60%, 80% { border-color: #d4af37; box-shadow: 0 0 16px rgba(212,175,55,0.7); } 85%, 100% { border-color: #1f3268; box-shadow: none; } }
@keyframes stepCycle4 { 0%, 75% { border-color: #1f3268; box-shadow: none; } 80%, 100% { border-color: #fef08a; box-shadow: 0 0 20px rgba(254,240,138,0.9); } }

.anim-step-1 { animation: stepCycle1 4s infinite ease-in-out; }
.anim-step-2 { animation: stepCycle2 4s infinite ease-in-out; }
.anim-step-3 { animation: stepCycle3 4s infinite ease-in-out; }
.anim-step-4 { animation: stepCycle4 4s infinite ease-in-out; }

/* Dot pulses matching the steps */
@keyframes dotPulse1 { 0%, 25% { background-color: #fef08a; box-shadow: 0 0 10px #d4af37; transform: scale(1.4); } 30%, 100% { background-color: #d4af37; box-shadow: none; transform: scale(1); } }
@keyframes dotPulse2 { 0%, 25% { background-color: #d4af37; box-shadow: none; transform: scale(1); } 30%, 55% { background-color: #fef08a; box-shadow: 0 0 10px #d4af37; transform: scale(1.4); } 60%, 100% { background-color: #d4af37; box-shadow: none; transform: scale(1); } }
@keyframes dotPulse3 { 0%, 55% { background-color: #d4af37; box-shadow: none; transform: scale(1); } 60%, 80% { background-color: #fef08a; box-shadow: 0 0 10px #d4af37; transform: scale(1.4); } 85%, 100% { background-color: #d4af37; box-shadow: none; transform: scale(1); } }
@keyframes dotPulse4 { 0%, 75% { background-color: #d4af37; box-shadow: none; transform: scale(1); } 80%, 100% { background-color: #fef08a; box-shadow: 0 0 14px #fef08a; transform: scale(1.5); } }

.anim-dot-1 { animation: dotPulse1 4s infinite ease-in-out; }
.anim-dot-2 { animation: dotPulse2 4s infinite ease-in-out; }
.anim-dot-3 { animation: dotPulse3 4s infinite ease-in-out; }
.anim-dot-4 { animation: dotPulse4 4s infinite ease-in-out; }

/* Stage 03: MCP Gold Data Packet Movement */
@keyframes mcpPacketMove {
  0% { cx: 128; cy: 96; opacity: 0; }
  15% { opacity: 1; }
  45% { cx: 45; cy: 28; opacity: 1; }
  60% { cx: 128; cy: 96; opacity: 1; }
  85% { cx: 210; cy: 28; opacity: 1; }
  100% { cx: 128; cy: 96; opacity: 0; }
}

.anim-mcp-packet {
  animation: mcpPacketMove 3.2s infinite ease-in-out;
}

/* Stage 04: Flowing Dash Curve in Gold */
@keyframes dashStream {
  to {
    stroke-dashoffset: -32;
  }
}

.anim-dash-stream {
  stroke-dasharray: 6 6;
  animation: dashStream 0.9s linear infinite;
}

@keyframes pulseReasoning {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px #3b82f6);
  }
  50% {
    transform: scale(1.4);
    filter: drop-shadow(0 0 16px #60a5fa);
  }
}

.anim-pulse-reasoning {
  animation: pulseReasoning 2s infinite ease-in-out;
  transform-origin: center;
}

@keyframes reasoningDotTravel {
  0% { cx: 65; cy: 88; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { cx: 220; cy: 144; opacity: 0; }
}

.anim-reasoning-travel {
  animation: reasoningDotTravel 3s infinite ease-in-out;
}

/* Stage 05: Agentic RAG Gold Rewrite Loop */
@keyframes critiqueLoop {
  0% {
    stroke-dashoffset: 80;
    opacity: 0.3;
  }
  50% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -80;
    opacity: 0.3;
  }
}

.anim-rag-loop {
  stroke-dasharray: 8 6;
  animation: critiqueLoop 2.4s linear infinite;
}

@keyframes ragDotLoop {
  0% { transform: translate(195px, 6px); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translate(110px, 26px); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(35px, 6px); opacity: 0; }
}

.anim-rag-dot-loop {
  animation: ragDotLoop 2.4s infinite ease-in-out;
}

/* Stage 06: Memory Compression Gold Flow */
@keyframes segmentLight1 { 0%, 20% { opacity: 0.3; } 30%, 75% { opacity: 1; } 85%, 100% { opacity: 0.3; } }
@keyframes segmentLight2 { 0%, 35% { opacity: 0.3; } 45%, 75% { opacity: 1; } 85%, 100% { opacity: 0.3; } }
@keyframes segmentLight3 { 0%, 50% { opacity: 0.3; } 60%, 75% { opacity: 1; } 85%, 100% { opacity: 0.3; } }

.anim-seg-1 { animation: segmentLight1 3.5s infinite ease-in-out; }
.anim-seg-2 { animation: segmentLight2 3.5s infinite ease-in-out; }
.anim-seg-3 { animation: segmentLight3 3.5s infinite ease-in-out; }

@keyframes flashEvicted {
  0%, 55% {
    opacity: 0.3;
    transform: scale(0.95);
  }
  65%, 85% {
    opacity: 1;
    transform: scale(1.1);
    color: #f43f5e;
    text-shadow: 0 0 12px rgba(244, 63, 94, 0.9);
  }
  95%, 100% {
    opacity: 0.3;
    transform: scale(0.95);
  }
}

.anim-flash-evicted {
  animation: flashEvicted 3.5s infinite ease-in-out;
}

/* Stage 07: Trajectory Line Drawing in Gold */
@keyframes drawTrajectory {
  0% {
    stroke-dashoffset: 320;
  }
  60% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.anim-draw-line {
  stroke-dasharray: 320;
  animation: drawTrajectory 3.8s infinite ease-in-out;
}

@keyframes flashRedX {
  0%, 58% {
    opacity: 0;
    transform: scale(0.5);
  }
  68%, 92% {
    opacity: 1;
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px #f43f5e);
  }
  100% {
    opacity: 0;
  }
}

.anim-flash-x {
  animation: flashRedX 3.8s infinite ease-in-out;
  transform-origin: center;
}

/* Stage 08: Golden Royal Shield Aura & Packet Transformation */
@keyframes shieldGlow {
  0%, 100% {
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
    border-color: #d4af37;
  }
  50% {
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.9), inset 0 0 16px rgba(254, 240, 138, 0.45);
    border-color: #fef08a;
  }
}

.anim-shield-pulse {
  animation: shieldGlow 2.2s infinite ease-in-out;
}

@keyframes piiPacketFlow {
  0% {
    transform: translateX(-45px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  48% {
    transform: translateX(0px);
    opacity: 0.8;
  }
  52% {
    transform: translateX(0px);
    opacity: 0.8;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(45px);
    opacity: 0;
  }
}

.anim-pii-packet {
  animation: piiPacketFlow 3s infinite ease-in-out;
}

/* Stage 09: Audio Frequency Equalizer Dancing Bars (Gold & Sapphire) */
@keyframes voiceDance1 { 0%, 100% { height: 12px; } 50% { height: 46px; } }
@keyframes voiceDance2 { 0%, 100% { height: 38px; } 50% { height: 16px; } }
@keyframes voiceDance3 { 0%, 100% { height: 20px; } 50% { height: 58px; } }
@keyframes voiceDance4 { 0%, 100% { height: 50px; } 50% { height: 22px; } }
@keyframes voiceDance5 { 0%, 100% { height: 16px; } 50% { height: 42px; } }

.wave-bar-1 { animation: voiceDance1 0.7s infinite alternate ease-in-out; }
.wave-bar-2 { animation: voiceDance2 0.85s infinite alternate ease-in-out 0.1s; }
.wave-bar-3 { animation: voiceDance3 0.65s infinite alternate ease-in-out 0.2s; }
.wave-bar-4 { animation: voiceDance4 0.9s infinite alternate ease-in-out 0.15s; }
.wave-bar-5 { animation: voiceDance5 0.75s infinite alternate ease-in-out 0.25s; }

/* Stage 10: DPO Flywheel Gold Orbit */
@keyframes orbitFlywheel {
  0% {
    transform: rotate(0deg) translate(68px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translate(68px) rotate(-360deg);
  }
}

.anim-orbit-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 14px #d4af37, 0 0 24px #fef08a;
  animation: orbitFlywheel 4s linear infinite;
}

/* Gold Pulse Dot */
@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    filter: drop-shadow(0 0 10px #d4af37);
  }
}

.animate-pulse-dot {
  animation: pulseDot 2s infinite ease-in-out;
}
