

/* --- Base & CRT Effect --- */
.cyber-root {
  font-family: 'Orbitron', sans-serif;
  background-color: #030712;
  overflow: hidden;
}

/* CRT Scanline Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.1) 50%,
      rgba(0, 0, 0, 0.1));
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 100;
  animation: scroll 10s linear infinite;
}

@keyframes scroll {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 100%;
  }
}

/* Screen Shake Animation */
@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }

  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }

  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }

  30% {
    transform: translate(3px, 2px) rotate(0deg);
  }

  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }

  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }

  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }

  70% {
    transform: translate(3px, 1px) rotate(-1deg);
  }

  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }

  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }

  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}

.shake-active {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* --- Enemy Label Styling (3D HTML Overlay) --- */
.enemy-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  text-align: center;
  transform: translate(-50%, -50%);
  transition: all 0.1s ease;
}

.enemy-label .typed {
  color: #00f3ff;
  /* Cyber Cyan */
  text-shadow: 0 0 10px #00f3ff, 0 0 20px #00f3ff;
}

.enemy-label .untyped {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.enemy-label.target {
  transform: translate(-50%, -50%) scale(1.2);
}

.enemy-label.target .untyped {
  color: #ff0055;
  /* Cyber Pink */
  text-shadow: 0 0 10px #ff0055;
}

/* --- UI Components --- */
.hud-panel {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 243, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
  clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
}

.hud-text-glow {
  text-shadow: 0 0 5px currentColor;
}

/* Start Screen Synthwave Sun */
.synth-sun {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff0055 0%, #ff9900 60%, transparent 60%);
  box-shadow: 0 0 60px #ff0055, 0 0 100px #ff9900;
  position: relative;
  overflow: hidden;
}

.synth-sun::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 10px,
      #030712 10px,
      #030712 20px);
}

/* Glitch Text Effect */
.glitch {
  position: relative;
  color: white;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  left: 2px;
  text-shadow: -1px 0 #ff0055;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -1px 0 #00f3ff;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% {
    clip: rect(20px, 9999px, 10px, 0);
  }

  100% {
    clip: rect(80px, 9999px, 100px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(60px, 9999px, 70px, 0);
  }

  100% {
    clip: rect(10px, 9999px, 50px, 0);
  }
}
