:root {
  --hud-color: #ef4444; /* Terminator Red */
  --hud-bg: #1a0505;
  --hud-text: #ff8888;
  --font-main: 'Share Tech Mono', monospace;
}

body {
  margin: 0;
  background-color: #000;
  overflow: hidden;
  font-family: var(--font-main);
  color: var(--hud-color);
  user-select: none;
}

/* Boot Sequence */
#boot-sequence {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #000;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  display: none; /* Controlled by JS */
}
.terminal-text {
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--hud-color);
  text-shadow: 0 0 5px var(--hud-color);
}
.blink { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Main Interface */
#main-interface {
  position: relative;
  width: 100vw; height: 100vh;
  display: none; /* Initially hidden */
}

video { display: none; }

.canvas-wrapper {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Red Tint Filter for the video feed */
#feed-canvas {
  filter: sepia(1) hue-rotate(-50deg) saturate(3) contrast(1.2) brightness(0.8);
}

/* HUD Layer */
.hud-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Text Elements */
.hud-label {
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 8px;
  border: 1px solid var(--hud-color);
  font-size: 1rem;
  letter-spacing: 1px;
}

.header-bar, .footer-bar {
  display: flex;
  justify-content: space-between;
  text-shadow: 0 0 5px var(--hud-color);
}

/* Crosshair */
.crosshair {
  position: absolute;
  top: 50%; left: 50%;
  width: 60px; height: 60px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(239, 68, 68, 0.5);
  border-radius: 50%;
}
.crosshair::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: var(--hud-color);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--hud-color);
}

/* Compass */
.compass-strip {
  position: absolute;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--hud-color);
  padding-bottom: 5px;
  opacity: 0.8;
}

/* Side Panels */
.side-panel {
  position: absolute;
  top: 15%; bottom: 15%;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}
.side-panel.left { left: 20px; text-align: left; }
.side-panel.right { right: 20px; text-align: right; }

.scrolling-code {
  font-family: 'VT323', monospace;
  font-size: 14px;
  opacity: 0.7;
  height: 100%;
  overflow: hidden;
  line-height: 1.1;
  color: var(--hud-text);
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.analysis-box {
  border: 1px solid var(--hud-color);
  padding: 10px;
  background: rgba(0,0,0,0.5);
}
.box-title { font-size: 0.8rem; border-bottom: 1px solid var(--hud-color); margin-bottom: 5px; }
#threat-level { font-size: 1.2rem; font-weight: bold; }

/* FX Layers */
.scanlines {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 10;
}

.vignette {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.8) 100%);
  z-index: 11;
}

/* Start Button */
#start-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 40px;
  background: #000;
  border: 2px solid var(--hud-color);
  color: var(--hud-color);
  font-family: var(--font-main);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 0 20px var(--hud-color);
  transition: 0.3s;
}
#start-btn:hover {
  background: var(--hud-color);
  color: #000;
}