/* === RED ALERT EFFECT (LCARS style) === */
.red-alert {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none; /* interface stays usable */
  display: none;
}

.red-alert[aria-hidden="false"] {
  display: block;
}

/* Semi-transparent pulsing overlay */
.red-alert__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 0, 0, 0.08);
  mix-blend-mode: screen;
  animation: alertPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

/* Scanline texture for retro LCARS look */
.red-alert__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0,0,0,0.05) 50%, rgba(255,255,255,0.05) 50%);
  background-size: 100% 6px;
  opacity: 0.5;
  pointer-events: none;
}

/* === Edge pulse light === */
.red-alert__edge-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    rgba(255, 0, 0, 0.45) 0%,
    rgba(255, 0, 0, 0.15) 40%,
    rgba(255, 0, 0, 0.03) 70%,
    transparent 100%
  );
  opacity: 0;
  animation: redAlertEdgePulse 2.5s ease-out infinite;
  mix-blend-mode: screen;
  filter: blur(20px);
}

/* === Animations === */
@keyframes alertPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

@keyframes redAlertEdgePulse {
  0% {
    opacity: 0.9;
    transform: scale(0.9);
  }
  40% {
    opacity: 0.4;
    transform: scale(1.3);
  }
  70% {
    opacity: 0.2;
    transform: scale(1.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .red-alert__overlay,
  .red-alert__edge-light{
    animation: none !important;
  }
}