html, body {
  margin: 0; padding: 0;
  height: 100%; overflow: hidden;
  background: #0d0d2a;
}
body { animation: pulseBg 20s infinite alternate ease-in-out; }
@keyframes pulseBg {
  0%   { background: radial-gradient(circle at top, #1a0033, #0d0d2a 80%); }
  25%  { background: radial-gradient(circle at top, #33004d, #1a0033 80%); }
  50%  { background: radial-gradient(circle at top, #660066, #33004d 80%); }
  75%  { background: radial-gradient(circle at top, #990099, #660066 80%); }
  100% { background: radial-gradient(circle at top, #1a0033, #0d0d2a 80%); }
}
canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; display: block;
}
.crt-lines {
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0px,
    rgba(0, 0, 0, 0.2) 2px,
    transparent 2px,
    transparent 4px
  );
  z-index: 3;
}

/* === FEAR & GREED TURBO GAUGE === */
#fearGauge {
  position: fixed;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 150px;
  z-index: 10;
  text-align: center;
  filter: drop-shadow(0 0 15px #ff00ff) drop-shadow(0 0 25px #ff33cc);
  animation: gaugeGlitch 0.25s infinite;
}
@keyframes gaugeGlitch {
  0%, 100% { transform: translate(-50%, 0); }
  25% { transform: translate(calc(-50% + 1px), 1px); }
  50% { transform: translate(calc(-50% - 1px), -1px); }
  75% { transform: translate(calc(-50% + 1px), -1px); }
}

#gauge-arc {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 150px 150px 0 0;
  border-top: 6px solid #ff33cc;
  border-left: 6px solid #ff00ff;
  border-right: 6px solid #a020f0;
  background: radial-gradient(circle at bottom, transparent 60%, rgba(255,0,255,0.1) 100%);
  overflow: hidden;
}

#needle {
  position: absolute;
  bottom: 0; left: 50%;
  width: 3px; height: 120px;
  background: linear-gradient(to top, #ff00ff, #ffffff);
  transform-origin: bottom center;
  transform: rotate(-90deg);
  box-shadow: 0 0 15px #ff00ff, 0 0 25px #ff33cc;
  transition: transform 0.4s cubic-bezier(.17,.67,.83,.67);
  animation: needleJitter 0.15s infinite;
}
@keyframes needleJitter {
  0%,100% { transform: rotate(var(--needle-angle)); }
  50% { transform: rotate(calc(var(--needle-angle) + 1deg)); }
}

#gauge-text {
  margin-top: -10px;
  font-family: 'Press Start 2P', monospace;
  color: #ff33cc;
  text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff33cc;
}
#gauge-value {
  display: block;
  font-size: 20px;
  animation: glitchRGB 0.4s infinite;
}
#gauge-class {
  display: block;
  font-size: 12px;
  color: #00faff;
  animation: glitchText 1.2s infinite;
}
@keyframes glitchRGB {
  0%,100% { text-shadow: 2px 0 red, -2px 0 cyan; }
  50% { text-shadow: -2px 0 lime, 2px 0 magenta; }
}
@keyframes glitchText {
  0%,100% { opacity: 1; transform: translate(0,0); }
  25% { opacity: 0.8; transform: translate(1px,-1px); }
  50% { opacity: 0.6; transform: translate(-1px,1px); }
  75% { opacity: 1; transform: translate(0,-1px); }
}

/* === SPIRITS === */
#spirit-layer {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}
.spirit {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38vw;
  max-width: 650px;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
  animation: floaty 14s ease-in-out infinite alternate;
}
@keyframes floaty {
  from { transform: translate(-48%, -52%) rotate(-1deg); }
  to   { transform: translate(-52%, -48%) rotate(1deg); }
}
#spirit-doge  { filter: drop-shadow(0 0 14px #FFD700) drop-shadow(0 0 30px #FFCC00); animation-delay: 0s; }
#spirit-pepe  { filter: drop-shadow(0 0 14px #39FF14) drop-shadow(0 0 30px #00FF99); animation-delay: 0.4s; }
#spirit-wojak { filter: drop-shadow(0 0 14px #BB86FC) drop-shadow(0 0 30px #FF33CC); animation-delay: 0.2s; }
#spirit-mcwojak { filter: drop-shadow(0 0 14px #ff4500) drop-shadow(0 0 30px #ff6600); animation-delay: 0.6s; }
.spirit.active { opacity: 0.85; }

.clock {
  position: fixed; bottom: 20px; left: 20px;
  font-family: 'VT323', monospace;
  font-size: 18px; color: #00faff;
  background: rgba(0,0,0,0.7);
  padding: 6px 12px;
  border-radius: 8px;
  border: 2px solid #00faff;
  text-shadow: 0 0 10px #00faff;
  z-index: 4;
}
