/* PETRA VISUAL DOCTRINE - NON-NEGOTIABLE */
/* All elements: border-radius: 0 !important */

*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050505;
  color: #00FF41;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
}

/* CRT scanline overlay via repeating-linear-gradient */
#crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* CRT vignette effect */
#crt-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

#tactical-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  background: #050505;
}

/* HUD overlay */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

#hud-top {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

#hud-bottom {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

/* Breach warning */
#breach-warning {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 40px;
  border: 2px solid #FF0000;
  background: rgba(255, 0, 0, 0.1);
  color: #FF0000;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.8);
  z-index: 200;
  text-align: center;
}

#breach-warning .flash {
  animation: breachFlash 0.2s ease-in-out infinite alternate;
}

@keyframes breachFlash {
  0% { opacity: 1; }
  100% { opacity: 0.4; }
}

[class*="hidden"] {
  display: none;
}

/* Thermal bloom effect for intercept hits */
.thermal-bloom {
  animation: thermalBloom 0.3s ease-out;
}

@keyframes thermalBloom {
  0% { text-shadow: 0 0 20px #00FF41, 0 0 40px #00FF41, 0 0 60px #00FF41; }
  100% { text-shadow: 0 0 8px rgba(0, 255, 65, 0.6); }
}

/* Cursor: crosshair for precision targeting */
body, canvas {
  cursor: crosshair;
}

/* Stencil text effect for headers and labels */
.stencil-text {
  text-shadow:
    0 0 1px #00FF41,
    1px 1px 0 rgba(0, 255, 65, 0.3),
    -1px -1px 0 rgba(0, 255, 65, 0.2);
}

/* Grid line styling (applied via canvas) */
.grid-line {
  stroke: #00FF41;
  stroke-width: 1;
  opacity: 0.4;
}

/* Threat level indicators via CSS classes */
.threat-low {
  color: #00FF41;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.8);
}

.threat-medium {
  color: #CCCC00;
  text-shadow: 0 0 6px rgba(204, 204, 0, 0.8);
}

.threat-high {
  color: #FF0000;
  text-shadow: 0 0 6px rgba(255, 0, 0, 0.8);
}

/* Start screen */
#start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  background: #050505;
}

#start-title {
  font-family: 'Courier New', monospace;
  font-size: 28px;
  color: #00FF41;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.8), 0 0 30px rgba(0, 255, 65, 0.4);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

#start-subtitle {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: rgba(0, 255, 65, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 40px;
}

#start-instructions {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: rgba(0, 255, 65, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.8;
  margin-bottom: 30px;
}

#start-prompt {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  color: #00FF41;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
  animation: startBlink 1s ease-in-out infinite alternate;
}

@keyframes startBlink {
  0% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* Game over screen */
#game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  background: rgba(5, 5, 5, 0.92);
}

#game-over-content {
  text-align: center;
  font-family: 'Courier New', monospace;
}

#game-over-content h1 {
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 20px;
  font-weight: bold;
}

#game-over-content p {
  font-size: 14px;
  color: rgba(0, 255, 65, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 2;
  margin: 4px 0;
}

#game-over-content p:last-child {
  opacity: 0.5;
  animation: startBlink 1.2s ease-in-out infinite alternate;
}

/* Screen flash effects */
@keyframes screenFlashRed {
  0% { background: rgba(255, 0, 0, 0.3); }
  100% { background: transparent; }
}

@keyframes screenFlashGreen {
  0% { background: rgba(0, 255, 65, 0.2); }
  100% { background: transparent; }
}

.screen-flash-red {
  animation: screenFlashRed 0.15s ease-out;
}

.screen-flash-green {
  animation: screenFlashGreen 0.15s ease-out;
}
