/* ========================
   GLOBAL
   ======================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; background: #0d0d2a; color: #fff; font-family: 'VT323', monospace; }

/* MATRIX BACKGROUND */
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.15) 0px, rgba(0,0,0,0.15) 2px, transparent 2px, transparent 4px);
  z-index: 1;
}

/* ========================
   HEADER
   ======================== */
.terminal-header {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 2rem 1rem 4rem;
  overflow: hidden;
}
.terminal-header h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1rem, 3vw, 2rem);
  text-shadow: 0 0 10px #ff00ff, 0 0 20px #00faff;
  animation: flicker 3s infinite ease-in-out;
  position: relative;
  z-index: 3;
}
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.85;
  }
}

/* Header background sparks */
.header-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(255,0,255,0.15), rgba(0,0,0,0));
  animation: hueRotate 10s linear infinite;
  z-index: 2;
}
@keyframes hueRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Mining hash-rate bars */
.hash-bars {
  position: absolute;
  bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 80%; height: 20px;
  display: flex; gap: 3px; z-index: 1;
}
.hash-bars::before, .hash-bars::after {
  content: "";
  width: 100%; height: 100%;
  background: linear-gradient(90deg, #00faff, #ff00ff, #ffff00);
  animation: hashPulse 1.2s linear infinite alternate;
  filter: blur(2px) brightness(1.4);
}
@keyframes hashPulse {
  0% { transform: scaleX(0.2); opacity: 0.4; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* ========================
   FEEDS
   ======================== */
#feeds {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.feed {
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.6);
  overflow: hidden;
  position: relative;
  padding-top: 1.5rem;
}

.label {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  background: rgba(255,255,255,0.05);
  font-size: 1rem;
  padding: 4px 10px;
  color: #00faff;
  text-shadow: 0 0 5px #00faff;
  letter-spacing: 1px;
}

/* Scrolling ticker text */
.ticker {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  animation: ticker-scroll 90s linear infinite;
  padding: 10px;
  font-size: 1.1rem;
  text-transform: uppercase;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.feed:nth-child(1) .ticker { color: #ff00ff; text-shadow: 0 0 8px #ff00ff; }
.feed:nth-child(2) .ticker { color: #00ff00; text-shadow: 0 0 8px #00ff00; }
.feed:nth-child(3) .ticker { color: #00faff; text-shadow: 0 0 8px #00faff; }
.feed:nth-child(4) .ticker { color: #ffcc00; text-shadow: 0 0 8px #ffcc00; }

/* ========================
   CLOCK
   ======================== */
.clock {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.6);
  border: 1px solid #00faff;
  padding: 6px 12px;
  border-radius: 8px;
  color: #00faff;
  font-size: 18px;
  text-shadow: 0 0 10px #00faff;
  z-index: 10;
}

/* ========================
   AUDIO ICON
   ======================== */
#audioToggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  font-size: 20px;
  color: #00faff;
  cursor: pointer;
  z-index: 10;
}
