@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Grotesk:wght@400;600;700&display=swap');

body {
  background-color: #020617;
  color: #60a5fa;
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

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

.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 4px, 3px 100%;
  pointer-events: none;
  z-index: 50;
  box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

.crt-flicker {
  animation: flicker 0.2s infinite;
}

@keyframes flicker {
  0% { opacity: 0.99; }
  50% { opacity: 0.97; }
  100% { opacity: 0.99; }
}

.b5-panel {
  border: 1px solid #1e3a8a;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: inset 0 0 20px rgba(30, 58, 138, 0.2), 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  position: relative;
}

.b5-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.3), transparent);
  pointer-events: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-left: 1px solid rgba(30, 58, 138, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 138, 0.8);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.b5-border-amber {
  border-color: #d97706;
  box-shadow: inset 0 0 20px rgba(217, 119, 6, 0.2);
}

.b5-border-red {
  border-color: #ef4444;
  box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.2);
}

.b5-text-glow {
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}

.b5-text-glow-amber {
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.b5-text-glow-red {
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.b5-text-glow-green {
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.bg-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.15;
  mix-blend-mode: overlay;
}

.scanline {
  width: 100%;
  height: 100px;
  background: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(96,165,250,0.2) 50%, rgba(0,0,0,0) 100%);
  opacity: 0.1;
  position: absolute;
  bottom: 100%;
  animation: scanline 8s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  0% { bottom: 100%; }
  100% { bottom: -100px; }
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ticker {
  display: inline-block;
  white-space: nowrap;
  padding-right: 100%;
  animation: ticker 20s linear infinite;
}

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

.glitch-effect {
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 1px) }
  40% { transform: translate(-1px, -1px) }
  60% { transform: translate(2px, 1px) }
  80% { transform: translate(1px, -1px) }
  100% { transform: translate(0) }
}

.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Radar sweep animation */
@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-sweep {
  animation: radar-sweep 4s linear infinite;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(245, 158, 11, 0.05) 320deg, rgba(245, 158, 11, 0.4) 360deg);
}

/* Live clock update */
.live-clock {
  font-variant-numeric: tabular-nums;
}
