:root {
  --ui-scale: 1.2;
  --grin-size: 0.64em;
  --grin-letter: -0.02em;
  --grin-line: 1.02;
  --grin-shift-y: 6px;
}

/* ===== ROOT + STACK SETUP ===== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: black;
  font-family: "Courier New", Courier, monospace;
  color: #00FFFF;
  overflow: hidden;
}

/* ===== LAYERS =====
   #voidLayer : background parallax
   #crtShell  : CRT PNG frame
   Parallax transforms are driven by JS (parallax.js)
*/
#voidLayer {
  position: fixed;
  inset: 0;
  z-index: 1; /* behind CRT shell but above black */
  pointer-events: none;
  overflow: hidden;

  /* Base background image */
  background-image: url("Images/Broadcast%20Website%20BG%202.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  /* Will be transformed by parallax JS */
  transition: transform 0.3s ease-out;
}

/* Mid layer - now controlled by JS */
#voidLayer::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 50%, 
    rgba(0,255,255,0.08) 0%, 
    rgba(255,0,255,0.05) 40%,
    transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  transform: translate(var(--mid-x, 0px), var(--mid-y, 0px));
  transition: transform 0.2s ease-out;
}

/* Front layer - now controlled by JS */
#voidLayer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,255,255,0.02) 0px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
  transform: translate(var(--front-x, 0px), var(--front-y, 0px));
  transition: transform 0.1s ease-out;
}

/* ===== GHOST ECHO TRAILS ===== */

.ghost-echo {
  position: absolute;
  width: 200px;
  height: 200px;
  opacity: 0.4;
  animation: echoFade 2s ease-out forwards;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 1;
  filter: blur(1px);
}

.echo-glyph {
  position: absolute;
  color: #00ffff;
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 0 8px #00ffff, 0 0 16px #ff00ff;
  opacity: 0.6;
}

@keyframes echoFade {
  0% { 
    opacity: 0.4; 
    filter: blur(1px); 
    transform: scale(1);
  }
  100% { 
    opacity: 0; 
    filter: blur(8px); 
    transform: scale(0.85);
  }
}

#crtShell {
  position: fixed;
  inset: 0;
  background-image: url("Icons/Crash%20SCREEN%20BASE.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  z-index: 2; /* above ghost layer */
  pointer-events: none;
}

/* ===== GHOST LAYER (ABOVE MAIN UI) ===== */
#ghostLayer {
  position: fixed;
  inset: 0;
  z-index: 15000; /* above UI, below menus if needed */
  pointer-events: none; /* layer doesn't block clicks */
}

/* floating signal motes */
.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(0,255,255,0.9) 0%,
    rgba(0,255,255,0.2) 60%,
    rgba(0,0,0,0) 70%);
  box-shadow: 0 0 8px rgba(0,255,255,0.8);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
}

/* =========================
   TERMINAL WINDOW
========================== */
#term::-webkit-scrollbar { width: 0; height: 0; }
#term {
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;

  position: fixed;
  top: 50%;
  left: 46.5%;
  transform: translate(-50%, -50%) rotate(0.9deg);

  background: transparent;
  padding: 0;

  width: min(72vw, 85vh * 1.33);
  height: min(54vh, 64vw * 0.75);
  max-width: 1100px;
  max-height: 650px;

  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: calc(26px * var(--ui-scale));
  text-align: center;
  text-shadow: 0 0 8px #00FFFF;
  box-sizing: border-box;

  z-index: 5;
}

.term-inner {
  position: relative;
  max-width: 70%;
  margin: 0 auto;
  padding: 1.5rem 1rem 6rem 1rem;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
}

.line {
  margin: .15em 0;
  text-align: left; /* Ensure inputs align left */
}

/* Terminal input styling */
.line input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #00FFFF !important;
  font-family: 'Courier New', monospace !important;
  font-size: inherit !important;
  text-align: left !important;
  caret-color: #00FFFF !important;
  width: 80% !important;
  max-width: 80% !important;
  display: inline-block !important;
  vertical-align: baseline !important;
  pointer-events: auto !important; /* Ensure input is interactive */
  z-index: 10 !important; /* Above other elements */
}

.line input:focus {
  outline: none !important;
  background: transparent !important;
}

.muted {
  opacity: .8;
}

/* =========================
   BUTTONS / CTA STRIP
========================== */
.btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(14px * var(--ui-scale));
  margin-top: calc(.8rem * var(--ui-scale));
}

.btn {
  display: inline-block;
  font-size: calc(1rem * var(--ui-scale));
  padding: calc(12px * var(--ui-scale)) calc(20px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));

  border: 1px solid #00ffff66;
  background: #001a1a80;
  color: #00ffff;
  text-decoration: none;

  font-weight: 700;
  letter-spacing: .3px;
  text-shadow: 0 0 6px #00ffffaa;
  box-shadow: 0 0 18px rgba(0,255,255,0.15);

  transition: transform .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.hot {
  border-color: #ff3bd1aa;
  color: #ffb9ef;
  box-shadow: 0 0 18px #ff3bd155;
}

.btn.small {
  font-size: calc(.85rem * var(--ui-scale));
  padding: calc(8px * var(--ui-scale)) calc(14px * var(--ui-scale));
}

/* ============================================================
   PSYCH PROFILE BUTTONS — VERTICAL STACK
   (matches terminal, never breaks layout)
============================================================ */
.vertical-btns {
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--ui-scale));
  margin-top: calc(1rem * var(--ui-scale));
  align-items: center;
}

.psych-btn {
  display: block;
  width: 100%;
  max-width: 70%;
  text-align: left;
  white-space: normal;
  line-height: 1.35;

  /* inherit base .btn styling */
  border: 1px solid #00ffff66;
  background: #001a1a80;
  color: #00ffff;
  text-shadow: 0 0 6px #00ffffaa;
  padding: calc(12px * var(--ui-scale)) calc(20px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));

  font-size: calc(1rem * var(--ui-scale));
  font-weight: 700;
  cursor: pointer;

  transition: transform .12s ease;
}

.psych-btn:hover {
  transform: translateY(-2px);
}

/* ============================================================
   ALIGNMENT VISUAL STATES
============================================================ */

/* --- Stabilizer: calm cyan, reduced flicker --- */
body[data-alignment="stabilizer"] #backgroundFlicker {
  opacity: 0.10 !important;
}
body[data-alignment="stabilizer"] #crtOverlay {
  opacity: 0.10 !important;
}
body[data-alignment="stabilizer"] #screenWarp {
  opacity: 0.12;
  filter: blur(0.8px) brightness(1.08);
}

/* --- Override: sharper, magenta/red pulse, high contrast --- */
body[data-alignment="override"] {
  filter: contrast(1.15) brightness(1.05);
}
body[data-alignment="override"] #backgroundFlicker {
  opacity: 0.35 !important;
}
body[data-alignment="override"] #crtOverlay {
  opacity: 0.22 !important;
}
body[data-alignment="override"] #screenWarp {
  animation-duration: 3s;
  filter: brightness(1.2) contrast(1.15);
}

/* --- Terminus: warm gold haze, slow motion --- */
body[data-alignment="terminus"] #backgroundFlicker {
  background: radial-gradient(circle at center,
    rgba(255,200,0,0.18) 0%,
    transparent 70%);
}
body[data-alignment="terminus"] #screenWarp {
  filter: blur(1.4px) brightness(1.1);
  opacity: 0.18;
  animation-duration: 6s;
}
body[data-alignment="terminus"] #crtOverlay {
  opacity: 0.08 !important;
}

/* =========================
   BOOT OVERLAY ("PRESS POWER")
========================== */
#startOverlay {
  position: fixed;
  inset: 0;
  background: black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out;
}

#startOverlay.fadeOut {
  opacity: 0;
  pointer-events: none;
}

#photosensitivityWarning {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #00FFFF;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.8;
  max-width: 600px;
  padding: 20px;
  opacity: 0;
  animation: warningFade 3s ease-in-out infinite;
}

#photosensitivityWarning p:first-child {
  color: #FFFF00;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 15px;
  text-shadow: 0 0 10px #FFFF00;
}

@keyframes warningFade {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

#startBtn {
  width: 96px;
  height: 96px;
  cursor: pointer;
  filter: drop-shadow(0 0 6px #00FFFF);
  transition: transform .2s ease;
}

#startBtn:hover {
  transform: scale(1.1);
}

/* =========================
   BACKGROUND FLICKER GLOW
========================== */
#backgroundFlicker {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: radial-gradient(circle at center, #00ffff22 0%, transparent 80%);
  animation: flicker 4s infinite;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(8px);
}

@keyframes flicker {
  0%,100% { opacity:.2 }
  10%     { opacity:.4 }
  20%     { opacity:.1 }
  30%     { opacity:.5 }
  40%     { opacity:.15 }
  50%     { opacity:.3 }
  60%     { opacity:.05 }
  70%     { opacity:.35 }
  80%     { opacity:.25 }
  90%     { opacity:.45 }
}

/* =========================
   ASCII ART (GENERIC)
========================== */
.ascii-art {
  font-family: monospace;
  font-size: 0.7em;
  white-space: pre;
  margin: 1rem 0;
  color: #00FFFF;
  text-shadow: 0 0 8px #00FFFF;
  animation: scrollUp 1.5s ease-out;
}

@keyframes scrollUp {
  from { transform: translateY(80px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* =========================
   CLOCK + COUNTDOWN + MUSIC VIZ
========================== */

#countdown {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  text-align: center;
  font-size: 2.6em;
  font-weight: 900;
  color: #00FFFF;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 6px #00FFFF,
    0 0 14px #00FFFF,
    0 0 24px #00FFFF;
  z-index: 10;
  pointer-events: none;
}

#clock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #00ffffcc;
  font-size: 1.1rem;
  text-shadow: 0 0 6px #00ffff88;
  font-family: "Courier New", monospace;
  z-index: 10;
}

#viz {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100px;
  z-index: 9;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px #00ffff55);
  pointer-events: none;
}

/* ====== SIGNAL LED ====== */



/* =========================
   CRT OVERLAY SCANLINES
========================== */
#crtOverlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,255,255,0.08) 0,
    rgba(0,255,255,0.08) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: .15;
  animation: flick 0.15s infinite;
  z-index: 8;
}

@keyframes flick {
  0%,100% { opacity:.1 }
  50%     { opacity:.18 }
}

/* =========================
   CRASH GRIN TAKEOVER MODE
========================== */

#grinOverlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  pointer-events: none;
}

#grinStage {
  position: absolute;
  left: 46.5%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(0.9deg);

  width: min(72vw, 85vh * 1.33);
  height: min(54vh, 64vw * 0.75);
  max-width: 1100px;
  max-height: 650px;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding-top: 16vh;
  box-sizing: border-box;

  background: transparent;
  text-align: center;
  color: #00FFFF;
  text-shadow: 0 0 8px #00FFFF;
  font-family: "Courier New", Courier, monospace;
}

#grinBox {
  margin-top: 0;
  margin-bottom: 1.5vh;
  max-width: 70%;
  overflow: hidden;
  white-space: pre;
  position: relative;
  animation: grinSlideUp 1.5s ease-out both;
  filter: drop-shadow(0 0 4px #00FFFF);
}

@keyframes grinSlideUp {
  from { transform: translateY(80px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

#grinAscii {
  font-family: monospace;
  line-height: var(--grin-line);
  letter-spacing: var(--grin-letter);
  color: #00FFFF;
  text-shadow: 0 0 6px #00FFFF;
  margin: 0;
  white-space: pre;
  font-size: calc(13px * var(--ui-scale));
}

#grinMsg {
  margin-top: 1.5vh;
  margin-bottom: 4vh;
  font-size: calc(1rem * var(--ui-scale));
  color: #00ffffcc;
  text-shadow: 0 0 6px #00ffff88;
  font-family: "Courier New", monospace;
  font-weight: 400;
  text-align: center;
}

.grin-wrap {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 82%;
  max-width: 82%;
  margin-top: 2rem;
  margin-bottom: 2rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.ascii-art.grin {
  font-size: calc(var(--grin-size) * 0.7);
  line-height: var(--grin-line);
  letter-spacing: var(--grin-letter);
  display: inline-block;
  white-space: pre;
  text-shadow: 0 0 8px #00FFFF;
}

/* === subtle CRT warp / breathing pulse === */
#screenWarp {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  mix-blend-mode: screen;
  animation: warpPulse 4.5s ease-in-out infinite;
  filter: blur(1px) brightness(1.05);
  opacity: 0.15;
  background: radial-gradient(circle at 50% 45%, rgba(0,255,255,0.15) 0%, rgba(0,0,0,0) 60%);
}

@keyframes warpPulse {
  0%   { transform: scale(1) translateY(0);        opacity:0.12; filter: blur(1px) brightness(1.05); }
  50%  { transform: scale(1.01) translateY(-0.4%); opacity:0.18; filter: blur(1.2px) brightness(1.15); }
  100% { transform: scale(1) translateY(0);        opacity:0.12; filter: blur(1px) brightness(1.05); }
}

/* === momentary signal loss flash === */
#signalLoss {
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,255,255,0.6) 0px,
      rgba(0,255,255,0.0) 1px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0) 3px
    );
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  filter: blur(1px) brightness(1.3) contrast(1.6);
  transition: opacity 60ms linear;
}

#signalLoss.glitching {
  opacity: 1;
  animation: lossJitter 120ms steps(2,end);
}

@keyframes lossJitter {
  0%   { transform: translateY(-2px) skewX(-2deg); }
  50%  { transform: translateY(3px) skewX(2deg); }
  100% { transform: translateY(0) skewX(0deg); }
}

/* === cursor ghost tracer === */
.cursorGhost {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(0,255,255,0.9) 0%,
    rgba(0,255,255,0.1) 70%,
    transparent 80%);
  box-shadow: 0 0 8px rgba(0,255,255,0.8);
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 10000;
  opacity: 0.7;
  transition: opacity .2s ease;
  left: 0;
  top: 0;
}

/* ===== BLEED TEXT SUBLIMINALS ===== */
#bleedText {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: #ff0036;
  text-shadow: 0 0 20px #ff0036, 0 0 40px #ff0036;
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-align: center;
  white-space: nowrap;
  font-family: "Courier New", monospace;
  mix-blend-mode: screen;
}

/* ===== GHOST CSS MODULE v2 ===== */
#glitchGhost {
  position: absolute; /* now lives inside #ghostLayer */
  width: 200px;
  height: 200px;
  transform-origin: center center;
  pointer-events: auto;   /* ghost stays interactive */
  cursor: crosshair;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 12px rgba(255,0,255,0.4))
    drop-shadow(0 0 24px rgba(0,255,255,0.2));
  animation: ghostBreath 4s ease-in-out infinite;
  z-index: 1; /* relative to #ghostLayer */
}

.glyph {
  position: absolute;
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: pre;
  color: #00ffff;
  text-shadow:
    0 0 4px #00ffff,
    0 0 8px #00ffff,
    0 0 14px #ff00ff;
  opacity: 0.8;
  animation:
    glyphSwirlFloat 3s ease-in-out infinite,
    glyphHue 3.5s linear infinite,
    glyphBlink 2.2s ease-in-out infinite;
  will-change: transform, opacity, filter;
  pointer-events: none;
  user-select: none;
}

/* ALERT mode */
#glitchGhost.stare {
  animation: none;
  filter:
    drop-shadow(0 0 16px rgba(255,0,0,0.6))
    drop-shadow(0 0 32px rgba(255,0,0,0.4));
  transition: filter 0.2s ease;
}

#glitchGhost.stare .glyph {
  color: #ff0036 !important;
  text-shadow:
    0 0 4px #ff0036,
    0 0 10px #ff0036,
    0 0 20px #ff00ff;
  animation:
    glyphJitter 0.2s steps(2,end) infinite,
    glyphBlink 0.8s steps(2,end) infinite;
}

/* SPEAK mode */
#glitchGhost.speak {
  animation: none;
  filter:
    drop-shadow(0 0 16px rgba(0,255,255,0.8))
    drop-shadow(0 0 32px rgba(255,0,255,0.5));
  transition: filter 0.4s ease;
}

#glitchGhost.speak .glyph {
  color: #00ffff !important;
  text-shadow:
    0 0 4px #00ffff,
    0 0 10px #00ffff,
    0 0 20px #ff00ff;
  animation: glyphBlink 1.1s ease-in-out infinite;
}

/* PET mode */
#glitchGhost.pet {
  animation: ghostBreath 3s ease-in-out infinite;
  filter:
    drop-shadow(0 0 20px rgba(255, 215, 0, 1))
    drop-shadow(0 0 40px rgba(255, 215, 0, 0.7))
    drop-shadow(0 0 60px rgba(255, 215, 0, 0.4));
  transition: filter 0.3s ease;
}

#glitchGhost.pet .glyph {
  color: #ffd700 !important;
  text-shadow:
    0 0 8px #ffd700,
    0 0 16px #ffd700,
    0 0 24px #ffea00,
    0 0 32px #ffea00;
}

/* soft animations */
@keyframes ghostBreath {
  0%   { filter:
          drop-shadow(0 0 8px rgba(255,0,255,0.25))
          drop-shadow(0 0 20px rgba(0,255,255,0.2)); }
  50%  { filter:
          drop-shadow(0 0 14px rgba(255,0,255,0.55))
          drop-shadow(0 0 28px rgba(0,255,255,0.4)); }
  100% { filter:
          drop-shadow(0 0 8px rgba(255,0,255,0.25))
          drop-shadow(0 0 20px rgba(0,255,255,0.2)); }
}

@keyframes glyphSwirlFloat {
  0%   { transform: translate(0px, 0px)   rotate(0deg)   scale(1);   filter: blur(0px);    }
  25%  { transform: translate(-2px,1px)   rotate(2deg)   scale(1.05);filter: blur(0.4px); }
  50%  { transform: translate(2px,-2px)   rotate(-2deg)  scale(0.98);filter: blur(0.2px); }
  75%  { transform: translate(-1px,2px)   rotate(1deg)   scale(1.03);filter: blur(0.5px); }
  100% { transform: translate(0px,0px)    rotate(0deg)   scale(1);   filter: blur(0px);    }
}

@keyframes glyphJitter {
  0%   { transform: translate(0px,0px); }
  25%  { transform: translate(-1px,1px); }
  50%  { transform: translate(2px,-1px); }
  75%  { transform: translate(-2px,-2px); }
  100% { transform: translate(0px,0px); }
}

@keyframes glyphBlink {
  0%,100% { opacity: 0.8; }
  40%     { opacity: 0.4; }
  42%     { opacity: 1;   }
  60%     { opacity: 0.6; }
}

@keyframes glyphHue {
  0% {
    color: #00ffff;
    text-shadow:
      0 0 4px #00ffff,
      0 0 8px #00ffff,
      0 0 14px #ff00ff;
  }
  50% {
    color: #ff00ff;
    text-shadow:
      0 0 4px #ff00ff,
      0 0 8px #ff00ff,
      0 0 14px #00ffff;
  }
  100% {
    color: #00ffff;
    text-shadow:
      0 0 4px #00ffff,
      0 0 8px #00ffff,
      0 0 14px #ff00ff;
  }
}

/* contemplation mode */
#glitchGhost.contemplating {
  animation: contemplationPulse 4s ease-in-out infinite;
}

@keyframes contemplationPulse {
  0%, 100% { 
    filter: 
      drop-shadow(0 0 12px rgba(0, 255, 255, 0.6))
      drop-shadow(0 0 24px rgba(255, 0, 255, 0.4));
  }
  50% { 
    filter: 
      drop-shadow(0 0 20px rgba(0, 255, 255, 0.8))
      drop-shadow(0 0 40px rgba(255, 0, 255, 0.6));
  }
}

#glitchGhost.contemplating .glyph {
  animation: glyphFloat 6s ease-in-out infinite;
}

@keyframes glyphFloat {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ============================================================
   PSYCH PROFILE CHOICE BUTTONS
============================================================ */
.psych-choices {
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--ui-scale));
  margin-top: calc(1rem * var(--ui-scale));
  align-items: center;
}

.psych-choice {
  display: block;
  width: 100%;
  max-width: 70%;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
  border: 1px solid #00ffff66;
  background: #001a1a80;
  color: #00ffff;
  text-shadow: 0 0 6px #00ffffaa;
  padding: calc(12px * var(--ui-scale)) calc(20px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
  font-size: calc(1rem * var(--ui-scale));
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}

.psych-choice:hover {
  transform: translateY(-2px);
  border-color: #00ffffaa;
  box-shadow: 0 0 20px rgba(0,255,255,0.2);
}

/* ===== END ===== */
/* =========================


/* Reposition volumeWrap to be inside controlCluster */



#musicButtons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

#musicButtons button {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 3px;
  color: #00ffff;
  font-size: 1rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-shadow: 0 0 6px #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
}

#musicButtons button:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
  transform: translateY(-1px);
}

#musicButtons button:active {
  transform: translateY(0px);
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.3);
}





.ghost-menu {
  position: fixed;
  background: rgba(0, 20, 30, 0.95);
  border: 2px solid rgba(0, 255, 255, 0.6);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 15001; /* Above ghost */
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.5),
    inset 0 0 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s ease;
  pointer-events: auto;
}

.ghost-menu.show {
  opacity: 1;
  transform: scale(1);
}

.ghost-menu-btn {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 4px;
  color: #00ffff;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 0 6px #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
  white-space: nowrap;
}

.ghost-menu-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
  transform: translateX(2px);
}

.ghost-menu-btn:active {
  transform: translateX(0px);
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.3);
}

/* =========================
   UNIFIED CONTROL PANEL
========================== */
#controlPanel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(0, 20, 30, 0.92);
  border: 1px solid rgba(0, 255, 255, 0.5);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: "Courier New", monospace;
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  z-index: 12;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Track Name Display */
#trackScroll {
  font-size: 0.72rem;
  color: #00ffff;
  text-shadow: 0 0 8px #00ffff;
  overflow: hidden;
  white-space: nowrap;
  padding: 3px 0;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  line-height: 1.2;
}

#trackScroll::before {
  content: '';
  display: inline-block;
  animation: scrollTrack 20s linear infinite;
}

/* Seamless scrolling animation */
@keyframes scrollTrack {
  0% { 
    transform: translateX(0);
  }
  100% { 
    transform: translateX(-50%);
  }
}

/* Main Controls Row - Buttons + Volume inline */
#controlsRow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#controlsRow button {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 4px;
  color: #00ffff;
  font-size: 1rem;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 0 6px #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
  flex-shrink: 0;
}

#controlsRow button:hover {
  background: rgba(0, 255, 255, 0.25);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.5);
  transform: translateY(-1px);
}

#controlsRow button:active {
  transform: translateY(0px);
}

/* Volume slider in controls row */

.control-label {
  font-size: 0.65rem;
  color: #00ffffaa;
  text-shadow: 0 0 6px #00ffff88;
  min-width: 30px;
  flex-shrink: 0;
}

#volumeValue, #trustValue {
  font-size: 0.65rem;
  color: #00ffffaa;
  text-shadow: 0 0 6px #00ffff88;
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

#volumeSlider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  width: 100%;
  height: 12px;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 0 6px #00ffff55);
  writing-mode: horizontal-tb;
  direction: ltr;
  min-width: 60px;
}

#volumeSlider::-webkit-slider-runnable-track {
  width: 100%;
  height: 12px;
  background: linear-gradient(to right, rgba(0,255,255,0.2), rgba(0,255,255,0.7));
  border-radius: 6px;
  box-shadow: 
    inset 0 0 8px rgba(0,0,0,0.6),
    0 0 10px rgba(0,255,255,0.4);
  border: 1px solid rgba(0,255,255,0.3);
}

#volumeSlider::-moz-range-track {
  width: 100%;
  height: 12px;
  background: linear-gradient(to right, rgba(0,255,255,0.2), rgba(0,255,255,0.7));
  border-radius: 6px;
  box-shadow: 
    inset 0 0 8px rgba(0,0,0,0.6),
    0 0 10px rgba(0,255,255,0.4);
  border: 1px solid rgba(0,255,255,0.3);
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(0,255,255,1) 0%, rgba(0,255,255,0.4) 60%, transparent 75%);
  border-radius: 50%;
  border: 2px solid rgba(0,255,255,0.9);
  box-shadow: 
    0 0 8px #00ffff, 
    0 0 16px rgba(0,255,255,0.6);
  cursor: grab;
  margin-top: -5px;
}

#volumeSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(0,255,255,1) 0%, rgba(0,255,255,0.4) 60%, transparent 75%);
  border-radius: 50%;
  border: 2px solid rgba(0,255,255,0.9);
  box-shadow: 
    0 0 8px #00ffff, 
    0 0 16px rgba(0,255,255,0.6);
  cursor: grab;
}

/* Trust Meter Row */
#trustMeter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 255, 255, 0.2);
}



/* Mobile Responsive */
@media (max-width: 768px) {
  #controlPanel {
    right: 10px;
    bottom: 10px;
    min-width: 240px;
    padding: 10px 12px;
  }
  
  #controlsRow button {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
}
