/* ===== Game Over Screen ===== */
#gameOverScreen {
  position: absolute;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000 80%);
  color: #f44336;
  font-family: "Courier New", monospace;
  text-align: center;
  overflow: hidden;
  animation: fadeIn 1.2s ease forwards;
}

#gameOverScreen .gameover-container {
  padding: 2rem;
  max-width: 500px;
  animation: flicker 3s infinite alternate;
}

#gameOverScreen .gameover-title {
  font-size: 2.5rem;
  letter-spacing: 2px;
  text-shadow: 0 0 12px #ff0000;
  margin-bottom: 1rem;
}

#gameOverScreen .gameover-subtitle {
  font-size: 1rem;
  color: #ffaaaa;
  margin-bottom: 2rem;
  line-height: 1.5;
}

#gameOverScreen .anomaly-status {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  justify-items: center;
  margin-bottom: 2rem;
}

#gameOverScreen .anomaly-slot {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #400;
  box-shadow: 0 0 6px #400;
}

#gameOverScreen .anomaly-slot.resolved {
  background: #1aff1a33;
  border-color: #0f0;
  box-shadow: 0 0 8px #0f0;
}

#gameOverScreen .anomaly-slot.unresolved {
  background: #ff000022;
}

#gameOverScreen .gameover-buttons button {
  background: transparent;
  border: 1px solid #f44336;
  color: #f44336;
  padding: 0.6rem 1.4rem;
  margin: 0 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

#gameOverScreen .gameover-buttons button:hover {
  background: #f44336;
  color: #000;
  box-shadow: 0 0 10px #f44336;
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.4; }
}