/* =========================================================
   CONFIGURACIÓN GENERAL
========================================================= */

* {

  box-sizing: border-box;

  margin: 0;

  padding: 0;

}


body {

  min-height: 100vh;

  background:
    radial-gradient(
      circle at top,
      #10285a 0%,
      #07122f 45%,
      #020817 100%
    );

  color: white;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  display: flex;

  justify-content: center;

  align-items: center;

  overflow: hidden;

}


/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.juego {

  width: min(1000px, 96vw);

  height: min(700px, 94vh);

  position: relative;

  background:
    rgba(3, 26, 61, 0.94);

  border:
    1px solid
    rgba(70, 140, 255, 0.35);

  border-radius: 18px;

  box-shadow:
    0 0 50px
    rgba(0, 80, 255, 0.18),

    inset 0 0 40px
    rgba(0, 100, 255, 0.05);

  overflow: hidden;

}


/* =========================================================
   CABECERA
========================================================= */

.cabecera-juego {

  height: 80px;

  padding:
    15px 25px;

  display: flex;

  justify-content: space-between;

  align-items: center;

  border-bottom:
    1px solid
    rgba(100, 160, 255, 0.18);

  background:
    rgba(2, 15, 38, 0.8);

  position: relative;

  z-index: 10;

}


.mini-logo {

  font-size: 11px;

  letter-spacing: 4px;

  color: #7db5ff;

}


.cabecera-juego h1 {

  font-size: 22px;

  letter-spacing: 5px;

  margin-top: 2px;

}


/* =========================================================
   MARCADORES
========================================================= */

.marcadores {

  display: flex;

  gap: 30px;

  text-align: right;

}


.marcadores div {

  display: flex;

  flex-direction: column;

}


.marcadores span {

  font-size: 9px;

  letter-spacing: 2px;

  color: #7c91b8;

}


.marcadores strong {

  font-size: 20px;

  color: white;

}


/* =========================================================
   PANTALLAS
========================================================= */

.pantalla {

  position: absolute;

  inset:
    80px 0 0;

  z-index: 20;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  text-align: center;

  background:
    radial-gradient(
      circle,
      rgba(17, 58, 125, 0.45),
      rgba(2, 10, 25, 0.96)
    );

}


.pantalla h2 {

  font-size: 34px;

  letter-spacing: 5px;

  margin:
    15px 0;

}


.pantalla p {

  color: #9eafd0;

  line-height: 1.6;

  margin-bottom: 25px;

}


/* =========================================================
   ICONOS
========================================================= */

.icono-rocket {

  font-size: 70px;

  filter:
    drop-shadow(
      0 0 20px
      rgba(80, 150, 255, 0.5)
    );

  animation:
    flotar 2s ease-in-out infinite;

}


.icono-final {

  font-size: 60px;

  margin-bottom: 10px;

}


#puntuacionFinal {

  font-size: 45px;

  margin:
    5px 0 20px;

  color: #72adff;

}


#mensajeRecord {

  color: #75d8ff;

  font-weight: bold;

  min-height: 20px;

}


/* =========================================================
   BOTONES
========================================================= */

button {

  border: none;

  cursor: pointer;

  font-weight: bold;

  letter-spacing: 2px;

  transition:
    0.2s;

}


.pantalla button {

  padding:
    15px 45px;

  border-radius: 8px;

  color: white;

  background:
    #1268d8;

  box-shadow:
    0 0 20px
    rgba(18, 104, 216, 0.4);

}


.pantalla button:hover {

  transform:
    translateY(-2px);

  background:
    #2080f5;

  box-shadow:
    0 0 30px
    rgba(18, 104, 216, 0.65);

}


.pantalla small {

  margin-top: 25px;

  color: #657da8;

  font-size: 10px;

  letter-spacing: 1px;

}


/* =========================================================
   ZONA DEL JUEGO
========================================================= */

.zona-juego {

  position: absolute;

  top: 80px;

  left: 0;

  right: 0;

  bottom: 0;

  background:
    #030b1d;

  overflow: hidden;

}


#canvas {

  width: 100%;

  height: 100%;

  display: block;

}


/* =========================================================
   BOTÓN DE SONIDO
========================================================= */

.boton-sonido {

  position: absolute;

  top: 15px;

  right: 15px;

  width: 42px;

  height: 42px;

  z-index: 30;

  border-radius: 50%;

  background:
    rgba(5, 25, 60, 0.85);

  border:
    1px solid
    rgba(100, 170, 255, 0.45);

  color: white;

  font-size: 19px;

  display: flex;

  align-items: center;

  justify-content: center;

}


.boton-sonido:hover {

  transform:
    scale(1.08);

  background:
    rgba(15, 75, 145, 0.9);

}


.boton-sonido:active {

  transform:
    scale(0.94);

}


/* =========================================================
   BOTÓN DE SALTO
========================================================= */

.boton-salto {

  display: none;

  position: absolute;

  right: 20px;

  bottom: 20px;

  width: 70px;

  height: 70px;

  border-radius: 50%;

  background:
    rgba(20, 100, 210, 0.75);

  color: white;

  font-size: 28px;

  border:
    1px solid
    rgba(130, 190, 255, 0.5);

  z-index: 30;

}


.boton-salto:active {

  transform:
    scale(0.92);

}


/* =========================================================
   UTILIDADES
========================================================= */

.oculto {

  display: none !important;

}

.aviso-nivel {
  position: fixed;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  background: rgba(3, 26, 61, 0.95);
  border: 2px solid #00eaff;
  border-radius: 15px;
  padding: 20px 30px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  z-index: 1000;
  opacity: 0;
  transition: all 0.5s ease;
  box-shadow: 0 0 25px rgba(0, 234, 255, 0.5);
}

.aviso-nivel.mostrar {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 600px) {
  .aviso-nivel {
    width: 80%;
    font-size: 22px;
    padding: 18px;
  }
}


/* =========================================================
   ANIMACIÓN
========================================================= */

@keyframes flotar {

  0%,
  100% {

    transform:
      translateY(0);

  }

  50% {

    transform:
      translateY(-12px);

  }

}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 600px) {

  .juego {

    width: 100vw;

    height: 100vh;

    border-radius: 0;

    border: none;

  }


  .cabecera-juego {

    height: 70px;

    padding:
      12px 15px;

  }


  .cabecera-juego h1 {

    font-size: 18px;

    letter-spacing: 3px;

  }


  .marcadores {

    gap: 15px;

  }


  .marcadores strong {

    font-size: 16px;

  }


  .pantalla {

    inset:
      70px 0 0;

  }


  .pantalla h2 {

    font-size: 27px;

  }


  .zona-juego {

    top: 70px;

  }


  .boton-salto {

    display: block;

  }

}