/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Orbitron', sans-serif;
}

/* FONDO CYBERPUNK */
body {
  min-height: 100vh;
  background: url("img/Fondo.jpg") no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /*  CLAVE */
  color: #00f7ff;
  overflow: visible;
  position: relative;
  padding-top: 20px; /*  opcional para que no quede pegado arriba */
}

/* EFECTO GRID FUTURISTA */
body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(#00f7ff22 1px, transparent 1px),
              linear-gradient(90deg, #00f7ff22 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

/* CONTENIDO ENCIMA */
body * {
  position: relative;
  z-index: 1;
}

/* TÍTULO */
h1 {
  font-size: 3rem;
  margin-bottom: 5px;
  letter-spacing: 2px;
  text-shadow:
    0 0 10px #00f7ff,
    0 0 20px #00f7ff,
    0 0 40px #00f7ff;
}

/* SUBTEXTO */
p {
  margin-bottom: 10px;
  opacity: 0.7;
}

/* CANVAS COMO PANTALLA DE JUEGO */
#areaJuego {
  border-radius: 15px;
  border: 2px solid #00f7ff;
  background: #db54d29d;
  padding: 5px;
  
  /* EFECTO PANTALLA */
  box-shadow:
    0 0 10px #00f7ff,
    0 0 30px #00f7ff,
    inset 0 0 20px #00f7ff44,
    inset 0 0 60px #00f7ff22;

  margin: 20px 0;
}

/* CONTROLES */
/* CONTROLES COMO TECLADO */
.controles {
  display: grid;
  grid-template-areas:
    ". arriba ."
    "izquierda abajo derecha";
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
}

/* ASIGNAR POSICIONES */
#btnArriba {
  grid-area: arriba;
}

#btnIzquierda {
  grid-area: izquierda;
}

#btnAbajo {
  grid-area: abajo;
}

#btnDerecha {
  grid-area: derecha;
}

/* FILA DE BOTONES */
.controles button {
  margin: 5px;
}

/* BOTONES FUTURISTAS */
button {
  background: rgba(0, 247, 255, 0.05);
  border: 2px solid #00f7ff;
  color: #00f7ff;
  padding: 12px 18px;
  font-size: 18px;
  border-radius: 12px;
  cursor: pointer;

  /* EFECTOS */
  box-shadow:
    0 0 5px #00f7ff,
    inset 0 0 10px #00f7ff33;

  transition: all 0.2s ease;
}

/* HOVER */
button:hover {
  transform: scale(1.15);
  background: #00f7ff;
  color: #000;

  box-shadow:
    0 0 15px #00f7ff,
    0 0 40px #00f7ff,
    inset 0 0 10px #ffffff;
}

/* CLICK */
button:active {
  transform: scale(0.95);
}

/* PANEL HUD */
.panel {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
  font-size: 18px;

  text-shadow:
    0 0 5px #00f7ff,
    0 0 10px #00f7ff;
}

/* TEXTO DE PUNTOS Y TIEMPO */
#txtPuntos,
#txtTiempo {
  font-weight: bold;
  color: #00f7ff;
}

/* MENSAJE FINAL */
#mensaje {
  margin-top: 15px;
  font-size: 20px;
  text-shadow:
    0 0 10px #ff00ff,
    0 0 20px #ff00ff;
}

/* BOTÓN REINICIAR DESTACADO */
.panel button {
  border-color: #ff00ff;
  color: #ff00ff;
  box-shadow: 0 0 10px #ff00ff;
}

.panel button:hover {
  background: #ff00ff;
  color: #000;
  box-shadow:
    0 0 20px #ff00ff,
    0 0 40px #ff00ff;
}

html {
  overflow-x: hidden;
  overflow-y: auto; /* ✅ solo aquí vive el scroll */
}

body {
  overflow: visible; /* ✅ NO hidden */
}