/* ============================================================
   PELAZÓN ETERNAL — Estilos Globales
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a14;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #ffffff;
}

/* ---- Canvas principal ---- */
#gameCanvas {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 10; /* Encima de todo excepto el título */
}

/* ---- Pantalla de Título ---- */
#titleScreen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a0a2e 0%, #060610 100%);
  z-index: 200; /* Por encima del canvas (z-index: 10) */
  transition: opacity 0.35s ease;
}

#titleScreen.hidden {
  opacity: 0;
  pointer-events: none;
}

#titleContent {
  text-align: center;
  max-width: 480px;
  padding: 40px 20px;
}

#titleContent h1 {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  color: #FF4444;
  text-shadow:
    0 0 20px rgba(255, 68, 68, 0.8),
    0 0 60px rgba(255, 68, 68, 0.4),
    4px 4px 0 #880000;
  margin-bottom: 8px;
}

#titleContent h1 span {
  color: #FFD700;
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.8),
    0 0 60px rgba(255, 215, 0, 0.3),
    4px 4px 0 #886600;
}

.subtitle {
  font-size: 15px;
  color: #aaaaaa;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.controls-hint {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
  text-align: left;
}

.controls-hint p {
  font-size: 14px;
  color: #cccccc;
  margin-bottom: 8px;
  line-height: 1.5;
}

.controls-hint p:last-child {
  margin-bottom: 0;
}

.controls-hint strong {
  color: #FFD700;
}

#startBtn {
  display: inline-block;
  padding: 14px 36px;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, #FFD700, #FF9900);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 0 30px rgba(255, 200, 0, 0.5);
  transition: transform 0.1s, box-shadow 0.2s;
}

#startBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(255, 200, 0, 0.8);
}

#startBtn:active {
  transform: scale(0.97);
}

/* ---- Animación de pulso en el título ---- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

#startBtn {
  animation: pulse 2s ease-in-out infinite;
}
