/* public/css/inicio.css — estilos para el minijuego Elfo Runner */
.juego-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.marcador-barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 800px;
  padding: 0.75rem 1.2rem;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  font-weight: 600;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.marcador-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.marcador-icono {
  font-size: 1.2rem;
}

.canvas-contenedor {
  position: relative;
  width: 100%;
  max-width: 800px;
  background: #111827;
  border-radius: var(--radio);
  overflow: hidden;
  border: 2px solid var(--borde);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#canvas-juego {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.controles-touch {
  display: none;
  width: 100%;
  max-width: 800px;
  gap: 1rem;
}

@media (hover: none) and (pointer: coarse) {
  .controles-touch {
    display: flex;
  }
}

.btn-touch {
  flex: 1;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  background: var(--superficie);
  color: var(--texto);
  cursor: pointer;
  user-select: none;
}

.btn-touch:active {
  background: var(--primario);
  color: #fff;
}

.instrucciones {
  font-size: 0.9rem;
  color: var(--suave);
  text-align: center;
}

.modal-gameover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  text-align: center;
}

.modal-gameover.oculto {
  display: none !important;
}

.modal-contenido {
  background: #1f2937;
  padding: 1.8rem;
  border-radius: var(--radio);
  border: 1px solid #374151;
  max-width: 420px;
  width: 100%;
}

.ranking-seccion {
  width: 100%;
  max-width: 800px;
  margin-top: 1.5rem;
}

.medalla-1 { color: #eab308; font-weight: bold; }
.medalla-2 { color: #94a3b8; font-weight: bold; }
.medalla-3 { color: #d97706; font-weight: bold; }
