:root {
  --bg-base: #000000;
  --bg-canvas: #0A0A0D;
  --bg-surface-1: #121216;
  --bg-surface-2: #18181E;
  --bg-surface-3: #202028;
  --bg-code: #08080A;
  --ink-primary: #F5F6F8;
  --ink-secondary: #9CA3AF;
  --border-subtle: rgba(255, 255, 255, 0.16);
  --accent-terracotta: #D97757;
  --accent-terracotta-deep: #C6613F;
  --accent-terracotta-soft: #E89578;
  --accent-emerald: #146C50;
  --accent-emerald-bright: #28A77E;
  --accent-amber: #B45309;
  --accent-violet: #6D28D9;
  --homepage-green-rgb: 18, 104, 76;
  --page-ambient-rgb: 18, 104, 76;
  --card-ambient-rgb: 18, 104, 76;
}

/* FARTHEST BACKGROUND: PURE PITCH BLACK (#000000) IN BOTH HOMEPAGE AND STUDIO */
body {
  background-color: #000000;
  color: var(--ink-primary);
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100dvh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   LIGHT / WHITE THEME: CLAUDE CODE TERRACOTTA (#D97757 / #C6613F),
   PURE TERRACOTTA-TO-WHITE GRADIENTS, FINE CARD OUTLINES, ZERO DARK LEFTOVERS
   ========================================================================== */
body.light-theme {
  --bg-base: #FFFFFF;
  --bg-canvas: #FDF8F6;
  --bg-surface-1: #FFFFFF;
  --bg-surface-2: #FBF2EE;
  --bg-surface-3: #F5E4DC;
  --bg-code: #FAF3F0;
  --ink-primary: #09090B;
  --ink-secondary: #374151;
  --border-subtle: rgba(198, 97, 63, 0.22);
  --accent-terracotta: #D97757;
  --accent-terracotta-deep: #C6613F;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #09090B !important;
}

body.light-theme #mainNav {
  background: #FFFFFF !important;
  border: 1px solid rgba(198, 97, 63, 0.28) !important;
  box-shadow: 0 10px 28px -10px rgba(198, 97, 63, 0.12) !important;
}

/* Pure Claude Code Terracotta-to-White gradient in Light Mode (zero black/dark stops) */
body.light-theme #homeHeroBanner {
  background: linear-gradient(
    180deg,
    #B85332 0%,
    #D97757 44%,
    #F9DED4 82%,
    #FFFFFF 100%
  ) !important;
  border: 1px solid rgba(198, 97, 63, 0.34) !important;
  box-shadow: 0 18px 40px -14px rgba(198, 97, 63, 0.22) !important;
}

body.light-theme .spotify-studio-banner {
  background: linear-gradient(
    180deg,
    #B85332 0%,
    #D97757 46%,
    #FBE3DA 84%,
    #FFFFFF 100%
  ) !important;
  border: 1px solid rgba(198, 97, 63, 0.34) !important;
  box-shadow: 0 18px 40px -14px rgba(198, 97, 63, 0.22) !important;
}

/* Text sitting directly over the rich terracotta top of the hero/studio banner stays crisp white */
body.light-theme .hero-headline,
body.light-theme .studio-banner-title,
body.light-theme #activePostTitle,
body.light-theme .studio-frame-heading {
  color: #FFFFFF !important;
  text-shadow: 0 2px 10px rgba(102, 41, 22, 0.28);
}

body.light-theme .hero-subcopy,
body.light-theme .studio-banner-url,
body.light-theme #postSourceUrl {
  color: #522112 !important;
  font-weight: 500;
}

/* Every card/box in White Mode has crisp white background + fine Claude Code Terracotta outline */
body.light-theme #homeIngestConsole,
body.light-theme .studio-panel,
body.light-theme .prompt-card-initial,
body.light-theme .spotify-reel-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(198, 97, 63, 0.30) !important;
  box-shadow:
    inset 0 0 0 1px rgba(217, 119, 87, 0.08),
    0 14px 32px -10px rgba(198, 97, 63, 0.14) !important;
  color: #09090B !important;
}

/* Pure Claude Code Terracotta-to-White card header in Light Mode (no dark blur or black shadow bleed) */
body.light-theme .spotify-card-blur {
  display: none !important;
  opacity: 0 !important;
}

body.light-theme .spotify-color-header {
  background: linear-gradient(
    180deg,
    #B85332 0%,
    #D97757 46%,
    #FCE6DE 82%,
    #FFFFFF 100%
  ) !important;
}

body.light-theme .spotify-card-scrim {
  background: linear-gradient(
    180deg,
    rgba(198, 97, 63, 0.14) 0%,
    rgba(252, 230, 222, 0.45) 52%,
    #FFFFFF 88%
  ) !important;
}

/* Eliminate the dark/black drop shadow under the reel poster frame in Light Mode */
body.light-theme .reel-poster-frame {
  background: #FFFFFF !important;
  border: 1px solid rgba(198, 97, 63, 0.28) !important;
  box-shadow: 0 10px 24px -8px rgba(198, 97, 63, 0.20) !important;
}

/* Convert all dark inner bars, buttons, pills, and boxes to warm terracotta-tinted light surfaces */
body.light-theme .frame-header-bar,
body.light-theme .light-surface-box {
  background: #FCF6F3 !important;
  border: 1px solid rgba(198, 97, 63, 0.24) !important;
  box-shadow: 0 8px 22px -8px rgba(198, 97, 63, 0.12) !important;
  color: #09090B !important;
}

body.light-theme .reel-card-footer {
  background: #FFFFFF !important;
  border-top: 1px solid rgba(198, 97, 63, 0.20) !important;
  color: #09090B !important;
}

body.light-theme .light-surface-btn,
body.light-theme .header-pill-surface {
  background: #FDF5F2 !important;
  border: 1px solid rgba(198, 97, 63, 0.30) !important;
  color: #5C2514 !important;
}

body.light-theme .light-surface-btn:hover {
  background: #F9E5DD !important;
  border-color: #C6613F !important;
  color: #3D170B !important;
}

/* Claude Code Terracotta text selection in Light/White Mode (fixes green select-all highlight) */
body.light-theme::selection,
body.light-theme *::selection {
  background-color: #C6613F !important;
  color: #FFFFFF !important;
}

body.light-theme::-moz-selection,
body.light-theme *::-moz-selection {
  background-color: #C6613F !important;
  color: #FFFFFF !important;
}

/* Claude Code Terracotta primary buttons in Light/White Mode (includes 1 on 1 #routeBBtn) */
body.light-theme #ingestSubmitBtn,
body.light-theme #copyFrameHqBtn,
body.light-theme #agentNotifOpenBtn,
body.light-theme #fixClipForm button[type="submit"],
body.light-theme #charSheetForm button[type="submit"],
body.light-theme #routeBBtn:not(.route-btn-b-inactive),
body.light-theme .copy-prompt-green-btn {
  background: linear-gradient(135deg, #C6613F 0%, #9E482D 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(217, 119, 87, 0.55) !important;
  box-shadow: 0 10px 24px -8px rgba(198, 97, 63, 0.42) !important;
}

body.light-theme #ingestSubmitBtn:hover,
body.light-theme #copyFrameHqBtn:hover,
body.light-theme #agentNotifOpenBtn:hover,
body.light-theme #fixClipForm button[type="submit"]:hover,
body.light-theme #charSheetForm button[type="submit"]:hover,
body.light-theme #routeBBtn:not(.route-btn-b-inactive):hover,
body.light-theme .copy-prompt-green-btn:hover {
  background: linear-gradient(135deg, #D97757 0%, #B05032 100%) !important;
  border-color: #E89578 !important;
}

/* Clean Light Mode Red Pill for Delete Buttons (fixes muddy brown bg-red-950/60) */
body.light-theme .delete-reel-btn,
body.light-theme #confirmDeleteBtn {
  background: #FEE2E2 !important;
  color: #DC2626 !important;
  border: 1px solid #FCA5A5 !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.08) !important;
}

body.light-theme .delete-reel-btn:hover,
body.light-theme #confirmDeleteBtn:hover {
  background: #FECACA !important;
  color: #B91C1C !important;
  border-color: #F87171 !important;
}

body.light-theme .light-surface-pill {
  background: #FBF1EC !important;
  border: 1px solid rgba(198, 97, 63, 0.28) !important;
  color: #5C2514 !important;
}

body.light-theme pre,
body.light-theme input[type="text"],
body.light-theme textarea {
  background-color: #FAF4F1 !important;
  color: #09090B !important;
  border: 1px solid rgba(198, 97, 63, 0.26) !important;
}

body.light-theme input[type="text"]::placeholder,
body.light-theme textarea::placeholder {
  color: #6B7280 !important;
}

body.light-theme .prompt-truncated::after {
  background: linear-gradient(180deg, rgba(250, 244, 241, 0) 0%, #FAF4F1 95%) !important;
}

body.light-theme .clip-ribbon-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(198, 97, 63, 0.26) !important;
  color: #09090B !important;
}

body.light-theme .clip-pill-active {
  background: linear-gradient(135deg, #F9DFD4 0%, #FFFFFF 100%) !important;
  border: 1.5px solid #C6613F !important;
  color: #4D1E0F !important;
}

body.light-theme .clip-ribbon-card .scene-meta {
  background-color: rgba(198, 97, 63, 0.14) !important;
  color: #09090B !important;
}

body.light-theme .route-btn-b-inactive {
  background: #FBECE6 !important;
  color: #6E2B17 !important;
  border-color: rgba(198, 97, 63, 0.35) !important;
}

body.light-theme .route-btn-a-inactive {
  background: #F3E8FF !important;
  color: #5B21B6 !important;
  border-color: rgba(109, 40, 217, 0.35) !important;
}

body.light-theme .status-badge-ready {
  background: #FCE8E0 !important;
  color: #8C3F27 !important;
  border-color: rgba(198, 97, 63, 0.40) !important;
}

body.light-theme .status-badge-processing {
  background: #FEF3C7 !important;
  color: #92400E !important;
  border-color: rgba(217, 119, 6, 0.4) !important;
}

/* Fix Scene Prompt Updated banner & UPDATED pill in Light/Terracotta Mode */
body.light-theme #promptVisualStatusBanner {
  background: #FDF6F2 !important;
  border: 1px solid rgba(198, 97, 63, 0.42) !important;
}

body.light-theme #statusBannerTitle {
  color: #B85332 !important;
}

body.light-theme #statusBannerNote {
  color: #2D241E !important;
}

body.light-theme #statusRevisionPill {
  background: linear-gradient(135deg, #C6613F 0%, #9E482D 100%) !important;
  color: #FFFFFF !important;
}

body.light-theme .updated-prompt-glow {
  background: #FFFFFF !important;
  border: 1.5px solid #C6613F !important;
}

body.light-theme h2:not(#visualCardTitle),
body.light-theme h3,
body.light-theme .ingest-console-title,
body.light-theme .frame-header-title,
body.light-theme .modal-label-title,
body.light-theme .reel-card-title,
body.light-theme .scene-title,
body.light-theme .brand-title-text,
body.light-theme #agentNotifTitle,
body.light-theme #deleteModalTitle {
  color: #09090B !important;
}

body.light-theme .ingest-console-tag,
body.light-theme #themeToggleIcon,
body.light-theme #studioProcessingStageLabel {
  color: #B85332 !important;
  font-weight: 600;
}

body.light-theme .reel-card-desc,
body.light-theme #clipCarryOverText,
body.light-theme footer {
  color: #374151 !important;
}

body.light-theme .avatar-sticker-ring {
  background: #FBECE6 !important;
  border-color: #C6613F !important;
  box-shadow: 0 4px 12px rgba(198, 97, 63, 0.22) !important;
}

body.light-theme .avatar-bitmoji-head .bitmoji-skin {
  fill: url(#bitmojiTerracottaGrad) !important;
}

body.light-theme .avatar-bitmoji-head .bitmoji-eye {
  fill: #3D1A0E !important;
}

body.light-theme .avatar-bitmoji-head .bitmoji-smile {
  stroke: #3D1A0E !important;
}

body.light-theme #charNameBadge {
  background: #C6613F !important;
  color: #FFFFFF !important;
}

body.light-theme .spotify-eq-cube {
  background: linear-gradient(145deg, #D97757 0%, #9E482D 100%) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 6px 16px -4px rgba(198, 97, 63, 0.34) !important;
}

body.light-theme .spotify-eq-bar {
  background: linear-gradient(180deg, #FFFFFF 0%, #F9DED4 100%) !important;
}

body.light-theme #charModal,
body.light-theme #deleteConfirmModal,
body.light-theme #safeLockOverlay {
  background-color: rgba(255, 255, 255, 0.85) !important;
}

body.light-theme .safe-tumbler {
  background: #FAF3F0 !important;
  border-color: rgba(198, 97, 63, 0.28) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .safe-tumbler .tumbler-char {
  color: #09090B !important;
}

body.light-theme .spotify-mouse-interactive::after {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}

body.light-theme .border-fill-hover::before {
  background: linear-gradient(
    120deg,
    transparent 15%,
    rgba(198, 97, 63, 0.88) 45%,
    rgba(243, 182, 159, 0.96) 50%,
    rgba(198, 97, 63, 0.88) 55%,
    transparent 85%
  ) !important;
  background-size: 240% 240% !important;
}

/* FACE STICKER AVATAR BUTTON IN HEADER */
.avatar-sticker-btn {
  padding: 2px 4px;
}

.avatar-sticker-ring {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
}

.avatar-sticker-btn:hover .avatar-sticker-ring {
  transform: scale(1.06) rotate(-3deg);
  border-color: #34D399;
}

body.light-theme .avatar-sticker-btn:hover .avatar-sticker-ring {
  border-color: #C6613F !important;
}

/* FINE LINES OUTLINING CARDS IN DARK MODE SO THEY NEVER MERGE WITH #000000 */
.card-fine-outline,
body:not(.light-theme) #homeIngestConsole,
body:not(.light-theme) .studio-panel,
body:not(.light-theme) .prompt-card-initial,
body:not(.light-theme) .spotify-reel-card {
  border: 1px solid rgba(52, 211, 153, 0.26) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 38px -12px rgba(0, 0, 0, 0.92);
}

body:not(.light-theme) .reel-poster-frame,
body:not(.light-theme) .light-surface-box,
body:not(.light-theme) pre {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* PITCH-BLACK HEADER (NO GLASS) + FINE OUTLINE + HIDE WHEN INSIDE STUDIO */
#mainHeader {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  will-change: transform, opacity;
}

#mainNav {
  background-color: #000000;
  border: 1px solid rgba(52, 211, 153, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 34px -10px rgba(0, 0, 0, 0.95);
}

.header-hidden {
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
}

.header-studio-hidden {
  display: none !important;
}

/* SPOTIFY "METRO BOOMIN" BOLD GEOMETRIC DISPLAY TYPOGRAPHY */
.font-display {
  font-family: 'Plus Jakarta Sans', 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.035em;
}

.font-mono-code {
  font-family: 'JetBrains Mono', monospace;
}

.hero-headline {
  font-family: 'Plus Jakarta Sans', 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 4.3vw, 4.35rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

/* SMOOTH SPOTIFY PLAYING-MUSIC EQUALIZER ANIMATION INSIDE CUBIC SHAPE */
.spotify-eq-cube {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  background: linear-gradient(145deg, #134E3A 0%, #0A291E 100%);
  border: 1px solid rgba(52, 211, 153, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 20px -6px rgba(0, 0, 0, 0.85);
}

.spotify-eq-bar {
  width: 3.5px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #34D399 0%, #108A66 100%);
  transform-origin: bottom;
  animation: none !important;
  transform: none !important;
}

.spotify-eq-bar:nth-child(1) { height: 42%; }
.spotify-eq-bar:nth-child(2) { height: 85%; }
.spotify-eq-bar:nth-child(3) { height: 60%; }
.spotify-eq-bar:nth-child(4) { height: 92%; }
.spotify-eq-bar:nth-child(5) { height: 50%; }

/* DARK MODE HERO & STUDIO BANNERS: STATIC SPOTIFY EMERALD GREEN FADING INTO SLEEK BLACK (#111115) */
#homeHeroBanner {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(
    180deg,
    #155D45 0%,
    #0D382A 54%,
    #111115 100%
  );
  border: 1px solid rgba(52, 211, 153, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 52px -16px rgba(0, 0, 0, 0.95);
}

.spotify-studio-banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    #145943 0%,
    #0C3326 58%,
    #111115 100%
  );
  border: 1px solid rgba(52, 211, 153, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 22px 48px -16px rgba(0, 0, 0, 0.95);
}

/* CURSOR LIVE GLOW REMOVED (STATIC FROZEN SURFACES) */
.spotify-mouse-interactive {
  position: relative;
  overflow: hidden;
}

.spotify-mouse-interactive::after,
.spotify-mouse-interactive:hover::after {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
  pointer-events: none;
}

/* GOOGLE-VOICE-STYLE ANIMATED BORDER FILL ON HOVER (NO SCALE/LIFT ON STUDIO FRAME) */
.border-fill-hover {
  position: relative;
}

.border-fill-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    120deg,
    transparent 15%,
    rgba(52, 211, 153, 0.85) 45%,
    rgba(110, 231, 183, 0.95) 50%,
    rgba(52, 211, 153, 0.85) 55%,
    transparent 85%
  );
  background-size: 240% 240%;
  background-position: 100% 100%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.26s ease, background-position 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 20;
}

.border-fill-hover:hover::before {
  opacity: 1;
  background-position: 0% 0%;
}

/* SLEEK BLACK-SHADE STUDIO PANELS & PROMPT CARDS WITH FINE OUTLINES */
.studio-panel {
  background: linear-gradient(180deg, #15151B 0%, #0E0E13 100%);
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 38px -12px rgba(0, 0, 0, 0.9);
}

.prompt-card-initial {
  background: linear-gradient(180deg, #14141A 0%, #0C0C10 100%);
  border: 1px solid rgba(52, 211, 153, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 38px -12px rgba(0, 0, 0, 0.9);
  transition: border-color 0.25s ease;
}

/* HOMEPAGE REEL CARDS VS STUDIO FRAME CARD */
.spotify-reel-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  background: #111116;
  border: 1px solid rgba(52, 211, 153, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 38px -12px rgba(0, 0, 0, 0.92);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

#studioStartFrameCard:hover {
  transform: none !important;
}

.spotify-color-header {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(20, 95, 70, 0.86) 0%,
    rgba(13, 60, 44, 0.48) 56%,
    rgba(17, 17, 22, 0) 100%
  );
}

.spotify-card-blur {
  position: absolute;
  inset: -8% -8% 15% -8%;
  width: 116%;
  height: 85%;
  object-fit: cover;
  filter: blur(26px) saturate(135%);
  opacity: 0.24;
  z-index: -2;
  pointer-events: none;
}

.spotify-card-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(22, 108, 80, 0.12) 0%,
    rgba(15, 15, 20, 0.68) 54%,
    #111116 94%
  );
  pointer-events: none;
}

.spotify-play-orb {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  background: #16805D;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  transform: translateY(6px);
  opacity: 0;
  z-index: 20;
  transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.2s ease;
}

body.light-theme .spotify-play-orb {
  background: #C6613F !important;
}

.spotify-reel-card:hover .spotify-play-orb {
  transform: translateY(0);
  opacity: 1;
}

/* HOMEPAGE & STUDIO REEL PROCESSING PROGRESS BAR */
.reel-progress-track {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.reel-progress-fill {
  background: linear-gradient(90deg, #146C50 0%, #28A77E 50%, #6EE7B7 100%);
  background-size: 200% 100%;
  animation: reelProgressShimmer 1.8s linear infinite;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.55);
  transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .reel-progress-fill {
  background: linear-gradient(90deg, #9E482D 0%, #C6613F 50%, #E89578 100%) !important;
  box-shadow: 0 0 14px rgba(217, 119, 87, 0.45) !important;
}

@keyframes reelProgressShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

body.light-theme .reel-progress-track {
  background: #F5E6DF !important;
  border-color: rgba(198, 97, 63, 0.32) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

/* NETFLIX-STYLE OVERSIZED OUTLINED RANK NUMBER OVERLAPPING POSTER BOTTOM-LEFT */
.netflix-poster-stage {
  position: relative;
  padding-left: 18px;
  padding-bottom: 10px;
}

.netflix-rank-number {
  position: absolute;
  left: -2px;
  bottom: -6px;
  z-index: 25;
  font-family: 'Plus Jakarta Sans', 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 900;
  font-size: 5.5rem;
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: #09090D;
  paint-order: stroke fill;
  -webkit-text-stroke: 6.5px #F5F6F8;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.92));
  user-select: none;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotify-reel-card:hover .netflix-rank-number {
  transform: scale(1.05) translateY(-2px);
}

body.light-theme .netflix-rank-number {
  color: #C6613F !important;
  -webkit-text-stroke: 6px #FFFFFF !important;
  filter: drop-shadow(0 6px 14px rgba(198, 97, 63, 0.28)) !important;
}

/* SLEEK GREEN BUTTONS IN DARK MODE & CLAUDE CODE TERRACOTTA IN LIGHT MODE */
.animate-ui-btn {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.animate-ui-btn:active {
  transform: scale(0.97);
}

.copy-prompt-green-btn {
  background: linear-gradient(135deg, #166E52 0%, #0E4936 100%);
  color: #F5F6F8;
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 0.8rem 1.7rem;
  font-size: 0.925rem;
  line-height: 1.25rem;
  font-weight: 700;
  border-radius: 9999px;
  min-width: 210px;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px -8px rgba(10, 62, 44, 0.75);
}

.copy-prompt-green-btn:hover {
  background: linear-gradient(135deg, #1B8261 0%, #125942 100%);
  border-color: rgba(52, 211, 153, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 28px -6px rgba(16, 102, 74, 0.65);
}

/* FAST CRT TV TURN-OFF + SMOOTH FADE-BACK-ON COPY ANIMATION */
@keyframes tvTurnOffFadeOn {
  0% {
    transform: scale(1, 1);
    opacity: 1;
    filter: brightness(1) contrast(1);
  }
  22% {
    transform: scale(1.04, 0.028);
    opacity: 1;
    filter: brightness(3.2) contrast(1.8);
    box-shadow: 0 0 28px rgba(110, 231, 183, 0.92);
  }
  36% {
    transform: scale(0.02, 0.006);
    opacity: 0;
    filter: brightness(0);
  }
  52% {
    transform: scale(0.97, 0.94);
    opacity: 0.22;
    filter: brightness(1.3);
  }
  100% {
    transform: scale(1, 1);
    opacity: 1;
    filter: brightness(1) contrast(1);
  }
}

.copy-btn-animated {
  transform-origin: center center;
  animation: tvTurnOffFadeOn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  background: linear-gradient(135deg, #1E8E6B 0%, #136349 100%) !important;
  border-color: #6EE7B7 !important;
}

body.light-theme .copy-btn-animated {
  background: linear-gradient(135deg, #D97757 0%, #9E482D 100%) !important;
  border-color: #F3B69F !important;
}

.tv-copy-flash {
  transform-origin: center center;
  animation: tvTurnOffFadeOn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.prompt-truncated {
  max-height: 5.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  position: relative;
}

.prompt-truncated::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.2rem;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0) 0%, #08080A 95%);
  pointer-events: none;
}

.fixing-prompt-pulse {
  background: linear-gradient(165deg, #1F1507 0%, #140E05 100%);
  border: 1.5px solid #B45309;
  animation: pulseFixingDark 1.8s infinite ease-in-out;
}

.updated-prompt-glow {
  background: linear-gradient(165deg, #092119 0%, #081A14 100%);
  border: 1.5px solid #166E52;
}

@keyframes pulseFixingDark {
  0%, 100% { border-color: #B45309; }
  50% { border-color: #D97706; }
}

/* SCENE RIBBON STRIP */
#clipRibbon {
  display: flex;
  width: 100%;
  gap: 8px;
  height: 76px;
  align-items: stretch;
  overflow: hidden;
}

#clipRibbon > button,
.clip-ribbon-card {
  flex: 1 1 0%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.clip-pill-active {
  background: linear-gradient(135deg, rgba(20, 108, 80, 0.52) 0%, #141E1A 100%) !important;
  color: #F5F6F8 !important;
  border-color: #28A77E !important;
}

/* 4-LETTER SAFE COMBINATION VAULT LOCK OVERLAY */
#safeLockOverlay {
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

#safeLockOverlay.vault-opening {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

.safe-tumbler {
  width: 68px;
  height: 84px;
  border-radius: 18px;
  background: linear-gradient(180deg, #09090C 0%, #131319 50%, #09090C 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 6px 14px rgba(0, 0, 0, 0.9),
    0 10px 24px -8px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.28s ease;
}

.safe-tumbler.tumbler-locked {
  border-color: #28A77E;
  box-shadow:
    inset 0 4px 12px rgba(20, 108, 80, 0.32),
    0 0 22px rgba(40, 167, 126, 0.28);
  animation: tumblerClick 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.safe-tumbler.tumbler-error {
  border-color: #DC2626;
  animation: tumblerShake 0.36s ease;
}

@keyframes tumblerClick {
  0% { transform: translateY(-6px) scale(0.95); }
  60% { transform: translateY(2px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes tumblerShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.safe-vault-wheel {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.safe-vault-wheel.wheel-unlocked {
  transform: rotate(120deg) scale(1.05);
}

/* FIRST AGENT FINISHED NOTIFICATION CARD */
#agentFinishNotification {
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* SMALLER MUTED OPTIONAL ROUTE A BUTTON vs PRIMARY 1-ON-1 BUTTON */
.route-btn-optional {
  font-size: 10px !important;
  padding: 0.25rem 0.65rem !important;
  opacity: 0.72;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.route-btn-optional:hover {
  opacity: 1;
}

body.light-theme .route-btn-optional {
  background-color: #F4EAE4 !important;
  color: #7D6B61 !important;
  border-color: rgba(180, 95, 66, 0.28) !important;
}

body.light-theme .route-btn-optional.route-btn-optional-active {
  background-color: #D97757 !important;
  color: #FFFFFF !important;
  border-color: #B85332 !important;
  opacity: 1 !important;
}

/* SPOKEN SCRIPT HIGHLIGHT INSIDE VIDEO PROMPT */
.spoken-script-highlight {
  background: rgba(52, 211, 153, 0.22);
  color: #A7F3D0;
  border: 1px solid rgba(52, 211, 153, 0.48);
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(40, 167, 126, 0.22);
}

body.light-theme .spoken-script-highlight {
  background: rgba(217, 119, 87, 0.22) !important;
  color: #8F3B20 !important;
  border: 1px solid rgba(198, 97, 63, 0.55) !important;
  box-shadow: 0 0 10px rgba(217, 119, 87, 0.18) !important;
}

.video-duration-inline {
  color: #34D399 !important;
}

body.light-theme .video-duration-inline {
  color: #15803D !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #08080A;
}
::-webkit-scrollbar-thumb {
  background: #262630;
  border-radius: 9999px;
}


