/* ==========================================================================
   SPIDEY ♪ PLAYER — RETRO ARCADE MONITOR & TRACKER STYLES
   ========================================================================== */

:root {
  --frame-blue: #3aa8cf;
  --frame-dark: #1b6d8f;
  --frame-deep: #0c3e54;
  --bezel-bevel: #55c2e8;
  --bg-dark: #121920;
  --bg-darker: #090e13;
  --screen-charcoal: #1c2630;
  --screen-dark: #0f171f;
  --red: #e13a3a;
  --red-glow: #ff4747;
  --red-dark: #8c1a1a;
  --green: #3fae5a;
  --green-glow: #5df07f;
  --cream: #eaf6fb;
  --blue-txt: #8fd6ef;
  --cyan-hud: #60d2f7;
  --gold: #f2c14e;
  --gold-dark: #a67c1c;
  --gold-light: #ffe699;
  --locked-grey: #4f6373;
}

/* Global Reset & Pixel-Art Strict Alignment */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: none;
}

body {
  background: #02060a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  color: var(--cream);
  padding: 16px 8px;
  user-select: none;
  overflow-x: hidden;
  position: relative;
}

/* Animated Cyber Web Grid */
.bg-animated-grid {
  position: fixed;
  inset: -150px;
  background-image: 
    linear-gradient(rgba(58, 168, 207, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 168, 207, 0.09) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(600px) rotateX(48deg);
  animation: grid-drift 22s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes grid-drift {
  0% { background-position: 0 0; }
  100% { background-position: 0 800px; }
}

/* Animated Canvas Background */
.bg-animated-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Phosphor Scanline Overlay */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(
    rgba(18, 48, 73, 0) 50%,
    rgba(0, 0, 0, 0.3) 50%
  );
  background-size: 100% 4px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.crt-overlay.disabled {
  display: none;
}

/* ==========================================================================
   RETRO ARCADE BOOT INTRO SEQUENCE (SPIDEY FACE & BLINKING EYES)
   ========================================================================== */
.retro-intro-overlay {
  position: fixed;
  inset: 0;
  background: #02060a;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.retro-intro-overlay.hidden {
  opacity: 0;
  transform: scaleY(0.005) scaleX(1.1);
  pointer-events: none;
}

.intro-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  max-width: 90vw;
  padding: 24px;
}

.intro-spidey-mask {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 25px rgba(225, 58, 58, 0.6));
  animation: mask-float 2.5s ease-in-out infinite alternate;
}

@keyframes mask-float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.04); }
}

.intro-mask-svg {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* Blinking Eyes Animation */
.intro-eye-group {
  transform-origin: 50% 50%;
  animation: intro-eye-blink 2.8s infinite;
}

@keyframes intro-eye-blink {
  0%, 42%, 46%, 92%, 96%, 100% {
    transform: scaleY(1);
  }
  44%, 94% {
    transform: scaleY(0.08);
  }
}

.intro-title {
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.8), 3px 3px 0 #000;
  animation: text-pulse 1.5s infinite alternate ease-in-out;
}

@keyframes text-pulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.25); text-shadow: 0 0 16px rgba(242, 193, 78, 1), 3px 3px 0 #000; }
}

.intro-status-text {
  font-size: 8px;
  color: var(--cyan-hud);
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #000;
}

.intro-progress-bar {
  width: 200px;
  height: 10px;
  background: #091724;
  border: 2px solid var(--frame-blue);
  box-shadow: 0 2px 0 #000;
  padding: 1px;
  overflow: hidden;
}

.intro-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--frame-dark), var(--cyan-hud), var(--gold));
  transition: width 0.3s ease;
}

.intro-tap-prompt {
  font-size: 8px;
  color: var(--cream);
  letter-spacing: 1px;
  animation: blink 0.8s infinite;
  margin-top: 4px;
}

/* ==========================================================================
   MAIN ARCADE MONITOR CASING & BEZEL
   ========================================================================== */
.monitor-wrapper {
  width: 1060px;
  max-width: 95vw;
  position: relative;
  box-sizing: border-box;
}

.monitor-frame {
  background: var(--frame-blue);
  border: 8px solid #000;
  border-top-color: var(--bezel-bevel);
  border-left-color: var(--bezel-bevel);
  border-right-color: var(--frame-dark);
  border-bottom-color: var(--frame-dark);
  box-shadow: 
    0 0 0 4px #000,
    0 16px 0 0 rgba(0, 0, 0, 0.7),
    0 0 35px rgba(58, 168, 207, 0.4);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 14px;
  border-radius: 4px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

/* ==========================================================================
   TOP BEZEL BAR
   ========================================================================== */
.bezel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  position: relative;
}

/* Top Left Eye Scanner Badge */
.bezel-badge-btn {
  width: 44px;
  height: 44px;
  background: #000;
  border: 4px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 4px #000, 0 3px 0 #000;
  outline: none;
  transition: transform 0.1s;
}

.bezel-badge-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.pixel-eye-badge {
  display: flex;
  gap: 5px;
}

.bezel-eye {
  width: 11px;
  height: 14px;
  background: var(--cream);
  border-radius: 50% 50% 20% 20%;
  border: 2px solid #000;
  box-shadow: 0 0 6px var(--cream);
}
.bezel-eye.left { transform: rotate(15deg); }
.bezel-eye.right { transform: rotate(-15deg); }

/* Center Top Title Pill */
.top-title-pill {
  background: #091724;
  border: 4px solid var(--frame-deep);
  box-shadow: 
    inset 0 0 8px rgba(58, 168, 207, 0.5),
    0 0 0 3px #000,
    0 3px 0 #000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border-radius: 20px;
}

.title-text {
  font-size: 14px;
  color: var(--blue-txt);
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #000;
}

.mini-spidey-mask {
  width: 22px;
  height: 22px;
  background: var(--red);
  border: 2px solid #000;
  border-radius: 50%;
  position: relative;
  box-shadow: inset -2px -2px 0 0 var(--red-dark);
}

.mini-mask-eye {
  position: absolute;
  top: 5px;
  width: 5px;
  height: 7px;
  background: var(--cream);
  border: 1px solid #000;
  border-radius: 50% 50% 10% 10%;
}
.mini-mask-eye.l { left: 3px; transform: rotate(15deg); }
.mini-mask-eye.r { right: 3px; transform: rotate(-15deg); }

/* Top Right Square Button */
.top-sq-btn {
  width: 42px;
  height: 42px;
  background: var(--cream);
  border: 4px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: inset -2px -2px 0 0 #a9c6d4, 0 3px 0 #000;
  outline: none;
  transition: transform 0.1s;
}

.top-sq-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   LEFT BEZEL SIDE TABS
   ========================================================================== */
.bezel-left-tabs {
  position: absolute;
  left: -24px;
  top: 75px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.side-tab {
  width: 32px;
  height: 36px;
  background: var(--cream);
  border: 3px solid #000;
  border-right: none;
  border-radius: 6px 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: -3px 3px 0 rgba(0, 0, 0, 0.6);
  outline: none;
  transition: transform 0.15s, background 0.15s;
}

.side-tab:hover {
  transform: translateX(-4px);
  background: #ffffff;
}

.side-tab.active {
  background: var(--red);
  border-color: #000;
  box-shadow: -4px 3px 0 rgba(0, 0, 0, 0.8), 0 0 10px rgba(225, 58, 58, 0.7);
}

.side-tab.active .tab-glyph {
  color: var(--cream);
  filter: drop-shadow(0 0 2px #fff);
}

/* ==========================================================================
   MAIN DISPLAY VIEWPORT SCREEN
   ========================================================================== */
.screen-viewport {
  background: var(--screen-dark);
  border: 6px solid #060d13;
  border-radius: 4px;
  min-height: 380px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 0 24px rgba(0, 0, 0, 0.9),
    inset 0 0 60px rgba(9, 23, 36, 0.8);
}

/* Screen Watermark & Background Scanlines */
.screen-watermark-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 50% 50%, #203140 0%, #0d1620 65%, #080d12 100%);
  pointer-events: none;
  z-index: 1;
}

.screen-watermark-bg::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 380px;
  height: 380px;
  transform: translate(-50%, -50%);
  background-image: radial-gradient(circle, transparent 20%, rgba(58, 168, 207, 0.06) 20%, rgba(58, 168, 207, 0.06) 22%, transparent 22%);
  background-size: 40px 40px;
  opacity: 0.6;
  clip-path: polygon(50% 0%, 80% 20%, 100% 50%, 80% 80%, 50% 100%, 20% 80%, 0% 50%, 20% 20%);
}

.screen-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
}

/* View Panels */
.screen-view {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  min-height: 330px;
  display: none;
}

.screen-view.active {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   VIEW 1: NOW PLAYING (SEAMLESS WEB RIG & BALANCED SPACING)
   ========================================================================== */
#viewPlayer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px 14px;
  position: relative;
  min-height: 320px;
}

/* Corner Web Accents */
.retro-corner-web {
  position: absolute;
  width: 32px;
  height: 32px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.35;
}

.retro-corner-web.tl {
  top: 0;
  left: 0;
  border-bottom: 1px dashed rgba(234, 246, 251, 0.4);
  border-right: 1px dashed rgba(234, 246, 251, 0.4);
  background: 
    radial-gradient(circle at 0 0, transparent 40%, rgba(234, 246, 251, 0.12) 41%, transparent 44%),
    radial-gradient(circle at 0 0, transparent 70%, rgba(234, 246, 251, 0.12) 71%, transparent 74%);
}

.retro-corner-web.tr {
  top: 0;
  right: 0;
  border-bottom: 1px dashed rgba(234, 246, 251, 0.4);
  border-left: 1px dashed rgba(234, 246, 251, 0.4);
  background: 
    radial-gradient(circle at 100% 0, transparent 40%, rgba(234, 246, 251, 0.12) 41%, transparent 44%),
    radial-gradient(circle at 100% 0, transparent 70%, rgba(234, 246, 251, 0.12) 71%, transparent 74%);
}

/* Hanging Web Rig (Single Unified Pendulum Motion) */
.hanging-web-rig {
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: top center;
  animation: spidey-pendulum 3s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  cursor: pointer;
}

@keyframes spidey-pendulum {
  0% { transform: translateX(-50%) rotate(-6deg); }
  50% { transform: translateX(-50%) rotate(6deg); }
  100% { transform: translateX(-50%) rotate(-6deg); }
}

.web-origin-point {
  width: 14px;
  height: 3px;
  background: var(--cream);
  border: 1px solid #000;
  border-top: none;
  box-shadow: 0 0 6px rgba(234, 246, 251, 0.8);
}

.web-thread {
  width: 2px;
  height: 64px;
  background: var(--cream);
  box-shadow: 0 0 6px rgba(234, 246, 251, 0.9);
}

/* YouTube Video Screen Wrapper (Maintains valid dimensions for YouTube playback) */
.yt-video-wrapper {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 155px;
  background: #000;
  border: 3px solid var(--frame-blue);
  box-shadow: 0 0 15px rgba(58, 168, 207, 0.4), inset 0 0 10px #000;
  z-index: 2;
  overflow: hidden;
  border-radius: 2px;
  display: none;
}

.yt-video-wrapper.active {
  display: block;
}

.yt-video-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

/* Stream Mode Toggle Button */
.stream-control-row {
  margin-top: 4px;
}

.stream-mode-btn {
  background: #091724;
  border: 2px solid var(--frame-blue);
  color: var(--blue-txt);
  font-family: inherit;
  font-size: 7px;
  padding: 5px 12px;
  cursor: pointer;
  box-shadow: 0 2px 0 #000;
  outline: none;
  transition: all 0.1s;
}

.stream-mode-btn:hover {
  background: var(--frame-deep);
  color: var(--cream);
}

.stream-mode-btn span {
  color: var(--gold);
}

/* Upside Down Hanging Pixel Spidey */
.pixel-hanging-spidey {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s ease;
  transform: scale(1.15);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.pixel-hanging-spidey:hover {
  transform: scale(1.35);
}

.pixel-spidey-svg {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  shape-rendering: crispEdges;
}

/* Screen Center HUD */
.screen-center-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  z-index: 4;
  margin-top: 125px;
  margin-bottom: 8px;
}

.mission-welcome-text {
  font-size: 8.5px;
  line-height: 1.85;
  color: var(--blue-txt);
  letter-spacing: 1.2px;
  text-shadow: 2px 2px 0 #000;
  max-width: 560px;
}

.current-track-badge {
  background: rgba(9, 23, 36, 0.85);
  border: 2px solid var(--frame-blue);
  padding: 7px 16px;
  box-shadow: 0 3px 0 #000;
}

.track-sec-tag {
  font-size: 6.5px;
  color: var(--frame-blue);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.track-title-text {
  font-size: 10.5px;
  color: var(--cream);
  letter-spacing: 1px;
}

.track-num-prefix {
  color: var(--red);
}

/* Spectrum Visualizer (12 Discrete Vertical EQ Bars) */
.spectrum-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 20px;
  padding: 2px 6px;
  background: rgba(6, 13, 19, 0.6);
  border-radius: 2px;
}

.spec-bar {
  width: 5px;
  height: 3px;
  background: var(--blue-txt);
  transition: height 0.08s ease;
  box-shadow: 0 0 4px rgba(96, 210, 247, 0.5);
  animation: spec-pulse 0.7s infinite alternate ease-in-out;
}

.spec-bar:nth-child(1) { animation-delay: 0.1s; }
.spec-bar:nth-child(2) { animation-delay: 0.3s; }
.spec-bar:nth-child(3) { animation-delay: 0.15s; }
.spec-bar:nth-child(4) { animation-delay: 0.5s; }
.spec-bar:nth-child(5) { animation-delay: 0.25s; }
.spec-bar:nth-child(6) { animation-delay: 0.4s; }
.spec-bar:nth-child(7) { animation-delay: 0.2s; }
.spec-bar:nth-child(8) { animation-delay: 0.6s; }
.spec-bar:nth-child(9) { animation-delay: 0.35s; }
.spec-bar:nth-child(10) { animation-delay: 0.45s; }
.spec-bar:nth-child(11) { animation-delay: 0.1s; }
.spec-bar:nth-child(12) { animation-delay: 0.55s; }

@keyframes spec-pulse {
  0% { height: 3px; opacity: 0.35; }
  100% { height: 16px; opacity: 1; }
}

.spectrum-visualizer.paused .spec-bar {
  animation-play-state: paused;
  height: 3px;
  opacity: 0.3;
}

/* ==========================================================================
   VIEW 2: TRACK MAP (WORLD SIGHTINGS RADAR)
   ========================================================================== */
#viewMap {
  position: relative;
  overflow: hidden;
}

.map-world-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(58, 168, 207, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 168, 207, 0.09) 1px, transparent 1px);
  background-size: 32px 32px;
}

.map-top-hud {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  z-index: 5;
}

.map-hud-pill {
  background: rgba(9, 23, 36, 0.9);
  border: 2px solid var(--frame-blue);
  color: var(--blue-txt);
  font-size: 8px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rec-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: blink 1s infinite;
}

.map-hud-counter {
  background: rgba(225, 58, 58, 0.25);
  border: 2px solid var(--red);
  color: var(--cream);
  font-size: 8px;
  padding: 5px 10px;
}

.map-connections-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.map-connections-svg line {
  stroke: var(--frame-blue);
  stroke-width: 2;
  stroke-dasharray: 4 4;
  opacity: 0.5;
}

.map-timeline-axis {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  height: 2px;
  background: var(--frame-dark);
  opacity: 0.4;
  pointer-events: none;
}

.map-pins-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
}

.map-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
  box-shadow: 0 4px 0 #000;
  outline: none;
}

.map-pin:hover {
  transform: translate(-50%, -50%) scale(1.25);
  z-index: 10;
}

.map-pin.active-sighting {
  background: var(--red);
  box-shadow: 
    0 0 0 4px rgba(225, 58, 58, 0.5),
    0 0 20px rgba(225, 58, 58, 0.9);
  animation: ping-ring 1.5s infinite;
}

@keyframes ping-ring {
  0%, 100% { box-shadow: 0 0 0 4px rgba(225, 58, 58, 0.5), 0 0 16px rgba(225, 58, 58, 0.8); }
  50% { box-shadow: 0 0 0 8px rgba(225, 58, 58, 0.7), 0 0 24px rgba(225, 58, 58, 1); }
}

.map-pin.unplayed {
  background: var(--green);
}

.map-pin.locked-node {
  background: var(--locked-grey);
  border-color: #8c9ea8;
  color: #cad8e0;
}

.pin-tooltip {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: #091724;
  border: 2px solid var(--frame-blue);
  color: var(--cream);
  font-size: 7px;
  padding: 3px 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s;
  pointer-events: none;
  box-shadow: 0 2px 0 #000;
}

.map-pin:hover .pin-tooltip,
.map-pin:focus .pin-tooltip {
  opacity: 1;
  visibility: visible;
}

.map-radar-widget {
  position: absolute;
  bottom: 10px;
  right: 12px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--frame-blue);
  background: rgba(9, 23, 36, 0.9);
  overflow: hidden;
  z-index: 5;
}

.radar-beam {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, rgba(58, 168, 207, 0.6) 0deg, transparent 70deg);
  border-radius: 50%;
  animation: radar-sweep 2.8s linear infinite;
}

@keyframes radar-sweep {
  to { transform: rotate(360deg); }
}

.radar-concentric {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(58, 168, 207, 0.4);
  border-radius: 50%;
}

.radar-ping {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
}
.radar-ping.p1 { top: 12px; left: 16px; animation: blink 1.2s infinite; }
.radar-ping.p2 { bottom: 14px; right: 14px; background: var(--green); animation: blink 0.8s infinite; }

.radar-tag {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5px;
  color: var(--cyan-hud);
}

.map-footer-legend {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  gap: 8px;
  background: rgba(9, 23, 36, 0.9);
  border: 1px solid var(--frame-dark);
  padding: 4px 8px;
  font-size: 6px;
  z-index: 5;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--blue-txt);
}

.leg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.leg-dot.red { background: var(--red); }
.leg-dot.green { background: var(--green); }
.leg-dot.locked { background: var(--locked-grey); }

/* ==========================================================================
   AUTHENTIC RETRO CONTROL BAR (MATCHING USER SCREENSHOT EXACTLY)
   ========================================================================== */
.retro-control-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-top: 8px;
  background: #091724;
  border: 3px solid var(--frame-dark);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Red Circular Mascot Badge */
.mascot-circle-badge {
  width: 36px;
  height: 36px;
  background: var(--red);
  border: 3px solid var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 
    inset -2px -2px 0 0 var(--red-dark),
    0 2px 5px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.1s;
}

.mascot-circle-badge:hover {
  transform: scale(1.15) rotate(15deg);
}

/* Play/Pause Button */
.retro-play-btn {
  background: #08131d;
  border: 2px solid var(--frame-blue);
  color: var(--blue-txt);
  font-family: inherit;
  font-size: 9px;
  padding: 8px 12px;
  cursor: pointer;
  letter-spacing: 1px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset -2px -2px 0 #04080d;
  flex-shrink: 0;
  outline: none;
  transition: all 0.1s;
}

.retro-play-btn:hover {
  background: #0f2538;
  color: var(--cream);
  border-color: var(--cyan-hud);
}

.retro-play-btn.active {
  background: var(--frame-blue);
  color: #08131d;
  border-color: var(--cream);
}

/* Time Readouts */
.time-readout {
  font-size: 9px;
  color: var(--blue-txt);
  min-width: 44px;
  text-align: center;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.time-readout.total {
  color: var(--blue-txt);
}

/* Seek Bar Track & Golden Thumb */
.seek-track-wrapper {
  flex: 1;
  min-width: 0;
  height: 24px;
  background: #04080d;
  border: 2px solid var(--frame-blue);
  position: relative;
  cursor: pointer;
  padding: 2px;
  outline: none;
  box-sizing: border-box;
}

.seek-track-bg {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
}

.seek-fill-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--frame-dark), var(--frame-blue));
}

.seek-gold-thumb {
  position: absolute;
  top: -2px;
  left: 0%;
  width: 10px;
  height: calc(100% + 4px);
  background: var(--gold);
  border: 2px solid #5c3c06;
  box-shadow: 0 0 6px rgba(242, 193, 78, 0.85);
  transform: translateX(-50%);
  pointer-events: none;
}

/* Compact Volume Control Wrapper & Vertical Popup Panel */
.vol-control-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.retro-vol-btn {
  width: 28px;
  height: 26px;
  background: #08131d;
  border: 2px solid var(--frame-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-txt);
  font-size: 11px;
  cursor: pointer;
  outline: none;
  transition: all 0.1s;
  box-shadow: inset -1px -1px 0 #04080d;
}

.retro-vol-btn:hover {
  background: #0f2538;
  color: var(--cream);
  border-color: var(--gold);
}

/* Compact Vertical Popup Panel */
.vol-popup-panel {
  display: none;
  position: absolute;
  bottom: 34px;
  right: -2px;
  background: #091724;
  border: 2px solid var(--frame-blue);
  padding: 6px 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.95), inset 0 0 6px #000;
  z-index: 60;
  border-radius: 2px;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 32px;
}

.vol-control-wrap:hover .vol-popup-panel,
.vol-control-wrap:focus-within .vol-popup-panel,
.vol-popup-panel.open {
  display: flex;
}

.vol-step-btn {
  width: 20px;
  height: 18px;
  background: var(--frame-dark);
  border: 2px solid var(--frame-blue);
  color: var(--cream);
  font-family: inherit;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 0 #000;
  outline: none;
}

.vol-step-btn:hover {
  background: var(--frame-blue);
  color: #000;
}

.vol-step-btn:active {
  transform: translateY(1px);
}

/* Vertical Range Slider */
.vol-slider-track-wrap {
  height: 56px;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pixel-vol-range.vertical {
  appearance: none;
  -webkit-appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 6px;
  height: 52px;
  background: #04080d;
  border: 1px solid var(--frame-blue);
  outline: none;
  cursor: pointer;
}

.pixel-vol-range.vertical::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 8px;
  background: var(--gold);
  border: 1px solid #000;
  border-radius: 1px;
  cursor: pointer;
}

.pixel-vol-range.vertical::-moz-range-thumb {
  width: 12px;
  height: 8px;
  background: var(--gold);
  border: 1px solid #000;
  border-radius: 1px;
  cursor: pointer;
}

.vol-pct-text {
  font-size: 6px;
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   FOOTER ROW (GOLD BUTTONS & SYNTH BADGE)
   ========================================================================== */
.retro-foot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 2px;
}

.gold-foot-btn {
  background: linear-gradient(180deg, var(--gold) 0%, #c98a1e 100%);
  border: 3px solid #7a5310;
  color: #3a2500;
  font-family: inherit;
  font-size: 9px;
  padding: 10px 18px;
  cursor: pointer;
  letter-spacing: 1px;
  border-radius: 2px;
  box-shadow: 
    inset -2px -2px 0 0 #5c3c06,
    inset 2px 2px 0 0 #ffe17d,
    0 4px 0 #000;
  outline: none;
  transition: transform 0.05s;
}

.gold-foot-btn:hover {
  filter: brightness(1.12);
}

.gold-foot-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #000;
}

.synth-mode-badge {
  font-family: inherit;
  font-size: 8px;
  color: var(--blue-txt);
  background: #091724;
  border: 2px solid var(--frame-blue);
  padding: 8px 12px;
  letter-spacing: 1px;
  box-shadow: 0 3px 0 #000;
  cursor: pointer;
  outline: none;
  border-radius: 2px;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.synth-mode-badge:hover {
  background: #123049;
  border-color: var(--gold);
  color: var(--cream);
  transform: translateY(-1px);
}

.synth-mode-badge:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #000;
}

.synth-mode-badge span {
  color: var(--gold);
  font-weight: bold;
}

/* ==========================================================================
   BEZEL BASE STRIP (HARDWARE VENTS & SPEC)
   ========================================================================== */
.bezel-base-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 2px solid var(--frame-dark);
}

.base-screw {
  width: 10px;
  height: 10px;
  background: #244b60;
  border: 1px solid #0e2430;
  position: relative;
}
.base-screw::after {
  content: "+";
  position: absolute;
  font-size: 9px;
  color: #0c1e2e;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
}

.speaker-grille-vents {
  display: flex;
  gap: 3px;
}

.speaker-grille-vents span {
  width: 3px;
  height: 12px;
  background: #0e2430;
  border-left: 1px solid #2a5369;
}

.model-spec-text {
  font-size: 7px;
  color: var(--gold);
  letter-spacing: 1px;
  background: rgba(9, 23, 36, 0.85);
  border: 1px solid var(--frame-dark);
  padding: 3px 8px;
  box-shadow: 0 1px 0 #000;
  text-shadow: 1px 1px 0 #000;
}

.creator-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: all 0.1s;
}

.creator-link:hover {
  color: var(--cream);
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.8);
}

/* ==========================================================================
   SLIDE-OUT MENU DRAWER
   ========================================================================== */
.menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: #091724;
  border-right: 6px solid var(--frame-blue);
  box-shadow: 12px 0 35px rgba(0, 0, 0, 0.95);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.25s ease-out;
  display: flex;
  flex-direction: column;
}

.menu-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  background: #0c1e2e;
  border-bottom: 4px solid var(--frame-blue);
}

.drawer-title {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 1px;
}

.close-drawer-btn {
  background: var(--red);
  color: var(--cream);
  border: 2px solid #000;
  font-family: inherit;
  font-size: 10px;
  padding: 4px 8px;
  cursor: pointer;
}

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

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

.tracklist-item {
  padding: 8px;
  background: #0c1e2e;
  border: 2px solid var(--frame-dark);
  font-size: 8px;
  color: var(--blue-txt);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.1s;
}

.tracklist-item:hover {
  background: #123049;
  border-color: var(--frame-blue);
  color: var(--cream);
}

.tracklist-item.active {
  background: var(--frame-dark);
  border-color: var(--gold);
  color: var(--gold);
}

.drawer-section {
  background: #0c1e2e;
  border: 2px solid var(--frame-dark);
  padding: 10px;
}

.drawer-subtitle {
  font-size: 8px;
  color: var(--frame-blue);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.custom-file-label {
  display: block;
  text-align: center;
  background: #123049;
  border: 2px dashed var(--frame-blue);
  color: var(--cream);
  font-size: 7px;
  padding: 8px 4px;
  cursor: pointer;
}

.shortcut-list {
  list-style: none;
  font-size: 7px;
  color: var(--blue-txt);
  line-height: 2;
}

.shortcut-list span {
  color: var(--gold);
}

/* ==========================================================================
   RESPONSIVE DESIGN (GENEROUS MOBILE VIEWPORT & LARGE TOUCH TARGETS)
   ========================================================================== */
@media (max-width: 640px) {
  body {
    padding: 10px 6px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .monitor-wrapper {
    margin: auto;
  }

  .monitor-frame {
    padding: 10px 8px 12px;
    border-width: 5px;
  }

  .bezel-left-tabs {
    position: static;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .side-tab {
    width: 46px;
    height: 32px;
    border-radius: 4px;
    border-right: 3px solid #000;
    font-size: 13px;
  }

  .top-title-pill {
    padding: 6px 12px;
  }

  .title-text {
    font-size: 10px;
  }

  .bezel-badge-btn, .top-sq-btn {
    width: 38px;
    height: 38px;
  }

  .screen-viewport {
    min-height: 290px;
  }

  .retro-control-panel {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }

  .seek-track-wrapper {
    order: 4;
    width: 100%;
    flex-basis: 100%;
    height: 22px;
    margin-top: 4px;
  }

  .gold-foot-btn {
    font-size: 8px;
    padding: 10px 12px;
  }

  .synth-mode-badge {
    font-size: 7px;
    padding: 8px 10px;
  }

  .model-spec-text {
    font-size: 6px;
  }
}

/* Specific 360px - 480px Mobile Screen (Generous Handheld Console Height & Large Touch Targets) */
@media (max-width: 480px) {
  body {
    padding: 8px 4px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .monitor-wrapper {
    width: 100%;
    max-width: 100vw;
    margin: auto;
  }

  .monitor-frame {
    padding: 8px 6px 12px;
    border-width: 4px;
    box-shadow: 0 0 0 2px #000, 0 8px 0 rgba(0,0,0,0.7);
  }

  .bezel-header {
    padding: 2px 2px 8px;
    gap: 6px;
  }

  .bezel-badge-btn {
    width: 36px;
    height: 36px;
    border-width: 2px;
  }

  .bezel-eye {
    width: 8px;
    height: 11px;
  }

  .top-title-pill {
    padding: 6px 10px;
    gap: 5px;
    border-width: 2px;
  }

  .title-text {
    font-size: 8.5px;
    letter-spacing: 0.5px;
  }

  .mini-spidey-mask {
    width: 16px;
    height: 16px;
  }

  .top-sq-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
    border-width: 2px;
  }

  .bezel-left-tabs {
    position: static;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 8px;
  }

  .side-tab {
    width: 46px;
    height: 32px;
    font-size: 13px;
    border-radius: 3px;
    border: 2px solid #000;
  }

  .screen-viewport {
    min-height: 280px;
    height: auto;
    padding: 8px 6px;
    border-width: 3px;
  }

  #viewPlayer {
    min-height: 280px;
    padding: 0 6px 12px;
  }

  .hanging-web-rig .web-thread {
    height: 38px;
  }

  .pixel-hanging-spidey {
    transform: scale(0.92);
    transform-origin: top center;
  }

  .screen-center-hud {
    margin-top: 85px;
    gap: 8px;
    margin-bottom: 4px;
  }

  .mission-welcome-text {
    font-size: 6.5px;
    line-height: 1.6;
    letter-spacing: 0.5px;
    max-width: 310px;
  }

  .current-track-badge {
    padding: 5px 10px;
  }

  .track-sec-tag {
    font-size: 5.5px;
    margin-bottom: 3px;
  }

  .track-title-text {
    font-size: 8.5px;
    word-break: break-word;
  }

  .spectrum-visualizer {
    height: 14px;
    gap: 2.5px;
    padding: 2px 4px;
  }

  .spec-bar {
    width: 3.5px;
  }

  /* Control Panel with Touch-Friendly Hitboxes */
  .retro-control-panel {
    padding: 8px 6px;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
  }

  .mascot-circle-badge {
    width: 32px;
    height: 32px;
    font-size: 13px;
    border-width: 2.5px;
  }

  .retro-play-btn {
    font-size: 8px;
    padding: 8px 12px;
    gap: 5px;
    min-height: 34px;
  }

  .time-readout {
    font-size: 7.5px;
    min-width: 34px;
  }

  .seek-track-wrapper {
    order: 4;
    width: 100%;
    flex-basis: 100%;
    height: 22px;
    margin-top: 4px;
    padding: 2px;
  }

  .seek-gold-thumb {
    width: 10px;
  }

  .retro-vol-btn {
    width: 32px;
    height: 30px;
    font-size: 12px;
  }

  .vol-popup-panel {
    bottom: 36px;
    right: -2px;
    padding: 6px 4px;
    gap: 5px;
    width: 32px;
  }

  .vol-step-btn {
    width: 22px;
    height: 20px;
    font-size: 10px;
  }

  .vol-slider-track-wrap {
    height: 52px;
    width: 12px;
  }

  .pixel-vol-range.vertical {
    height: 48px;
    width: 6px;
  }

  .vol-pct-text {
    font-size: 6px;
  }

  /* Footer Buttons with Chunky Touch Areas */
  .retro-foot-bar {
    margin-top: 6px;
    gap: 5px;
  }

  .gold-foot-btn {
    font-size: 7.5px;
    padding: 10px 8px;
    flex: 1;
    text-align: center;
    border-width: 2.5px;
    letter-spacing: 0.5px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .synth-mode-badge {
    font-size: 6.5px;
    padding: 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
  }

  .bezel-base-strip {
    margin-top: 6px;
    padding-top: 6px;
  }

  .model-spec-text {
    font-size: 6px;
    padding: 3px 6px;
  }

  .speaker-grille-vents span {
    width: 3px;
    height: 8px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
