﻿body {
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: 'Courier New', monospace;
}

/* HUD */
#ui {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #00ffff;
  font-size: 12px;
  letter-spacing: 2px;
  z-index: 10;
  pointer-events: none;
}

#timer {
  position: fixed;
  top: 20px;
  right: 20px;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 2px;
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
}

#subtitle {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 90vw);
  text-align: center;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 1px;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#subtitle.show {
  opacity: 1;
}

/* Mute button */
#mute-toggle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  background: rgba(0,0,0,0.6);
  color: #00ffff;
  border: 1px solid rgba(0,255,255,0.5);
  padding: 14px 22px;
  font-size: 14px;
  letter-spacing: 2px;
  cursor: pointer;
  display: none;
}

#mute-toggle:hover {
  background: rgba(0,0,0,0.8);
}

/* Crosshair FPS */
.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 20px;
  opacity: 0.6;
  z-index: 5;
  pointer-events: none;
}

/* Instrucciones */
#instructions {
  position: absolute;
  bottom: 12%;
  width: 100%;
  text-align: center;
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 3px;
  background: rgba(0,0,0,0.6);
  padding: 12px 0;
  z-index: 10;
}

#game-over {
  position: fixed;
  inset: 0;
  background: rgba(120, 0, 0, 0.78);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  pointer-events: auto;
}

#game-over.show {
  display: flex;
}

.game-over-panel {
  text-align: center;
  color: #fff;
  border: 1px solid rgba(255, 120, 120, 0.75);
  background: rgba(0, 0, 0, 0.5);
  padding: 24px 28px;
  min-width: 280px;
}

.game-over-panel h1 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: 4px;
}

.game-over-panel p {
  margin: 0 0 18px;
  letter-spacing: 3px;
  font-size: 12px;
}

#retry-btn {
  border: 1px solid #fff;
  color: #fff;
  background: transparent;
  padding: 10px 20px;
  letter-spacing: 3px;
  font-size: 12px;
  cursor: pointer;
}

#retry-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

#screen-fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity 1s ease;
}

#screen-fade.show {
  opacity: 1;
}

/* WASD hint */
.wasd {
  margin-top: 10px;
  display: inline-block;
  letter-spacing: 0;
}

.key-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
}

.key {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.7);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0;
  background: rgba(0,0,0,0.4);
}

.hint {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 2px;
  opacity: 0.8;
}

/* Blink sutil */
.blink {
  animation: blink 1.5s infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

