/* GENERALES / TODO EL DOCUMENTO */

* {
  font-family: Verdana;
  text-align: center;
  color: whitesmoke;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5em;
  box-sizing: border-box;
}

.oculto {
  display: none;
}

.solo-accesible {
  position: absolute;
  left: -9999px;
}

.burbuja-letras {
  position: absolute;
  bottom: 100px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(195, 231, 238, 0.5);
  font-weight: bold;
  font-size: 20px;
  font-family: 'Verdana';
  animation: subir 8s linear forwards;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(1px);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.03);
}

.version-juego {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 0.8rem;
  color: #ccc;
}

.mi-perfil {
  width: 54px;
  height: 54px;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.mi-perfil:hover {
  transform: scale(1.1);
}

.mi-rango {
  width: 72px;
  height: 72px;
}

/* SECCIONES */

html {
  font-size: clamp(12px, 1.8vw, 18px);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  color: whitesmoke;
  line-height: 1.5em;
  text-align: center;
}

body::before {
  content: '';
  position: fixed;
  background-attachment: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background-image: url("img/backgrounds/fondo_oow_final_centrado_sin_letras.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.8;
  z-index: -1;
}

.contenedor-titulo {
  text-align: center;
  padding: 2rem 1rem;
  color: #ffffff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px 20px 20px;
}


main,
section,
.contenedor-titulo {
  margin: 0 auto;
}

/* CLASES */

.grid-niveles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  max-width: 500px;
  margin-top: 30px;
  margin-bottom: 20px;
  justify-content: center;
  min-height: 300px;
}

.felicidades p {
  color: #a0e4ec;
  font-size: 1.3em;
  font-weight: bold;
  line-height: 1.8em;
  margin-top: 40px;
  margin-bottom: 30px;
  text-align: center;
}

.volver-menu {
  margin-top: 30px;
}

.bloque-inicio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.centro a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 1em 0 0 0;
  padding: 0;
}

.pantalla {
  display: none;
}

.pantalla.activa {
  display: block;
}

.etiqueta-palabra {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 20px;
  display: inline-block;
}

.mensaje-verificacion {
  font-weight: bold;
  font-size: 1.2rem;
  text-shadow: 0px 1px 2px #00000040;
  margin-top: 10px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
}

.mensaje-verificacion.correcta {
  color: #b4e4f0;
}

.mensaje-verificacion.incorrecta {
  color: #b6dbf0;
}

.nivel {
  margin: 0;
  padding: 0;
}

#boton-finalizar-directo {
  margin-top: 40px;
}

.palabra-hueco,
.palabra-lista {
  text-align: center;
  font-size: 1.1em;
}

.popup-80 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #173a44cc;
  border: 2px solid #b4e4f0;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 15px #000;
  z-index: 999;
  width: 80%;
  max-width: 400px;
  color: whitesmoke;
  text-align: center;
}

.popup-80 p {
  font-size: 1.1em;
  margin-bottom: 15px;
}

.aparecer-suave {
  opacity: 0;
  transform: scale(0.9);
  animation: aparecer 0.5s ease forwards;
}

@keyframes aparecer {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes flotar2 {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(5px);
  }
}

.columna-izquierda {
  position: relative;
  overflow-y: auto;
  height: 100%;
  width: 100%;
  max-width: none;
  max-height: 45vh;
}

.nivel-actual {
  background-color: #5db2c7e1;
  color: white;
  border: 2px solid #397381;
  font-weight: bold;
  box-shadow: 0 0 6px rgba(111, 192, 212, 0.4);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.nivel-actual:hover {
  background-color: #69bdd3;
  transform: scale(1.05);
}

.nivel-completado {
  background-color: #2d4a60;
  color: #e0f1f6;
  border: 2px solid #223746;
  box-shadow: 0 0 4px rgba(60, 110, 160, 0.2);
  font-weight: normal;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.nivel-completado:hover {
  background-color: #3c5e78;
  transform: scale(1.03);
}

.nivel-bloqueado {
  background-color: #3b4a5a;
  color: #cfd8dc;
  border: 2px solid #607d8b;
  font-weight: normal;
  cursor: not-allowed;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nivel-bloqueado:hover {
  opacity: 1;
}

.grid-niveles button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.paginacion-niveles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}

.paginacion-niveles button {
  background-color: #ffffff;
  color: #007b9e;
  border: 2px solid #007b9e;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.paginacion-niveles button:hover {
  background-color: #007b9e;
  color: white;
  transform: scale(1.05);
}

.input-pagina-nivel {
  color: rgb(19, 66, 80);
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
  width: 2.5em;
}

.cronometro.flotante-izquierda {
  position: absolute;
  top: -25px;
  left: -5px;
  font-size: 0.95em;
  font-weight: bold;
  background-color: rgba(2, 35, 58, 0.3);
  color: #b4e4f0;
  padding: 4px 10px;
  border-radius: 8px;
  z-index: 100;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.visible {
  display: flex;
}

.contenido-modal {
  background-image: url("./img/backgrounds/fondo_oow_final_centrado_sin_letras.webp");
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.2);
  background-blend-mode: lighten;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  width: 90%;
  height: 90%;
  max-width: 1200px;
  max-height: 800px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.navegacion-perfil {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  margin-top: 2em;
}

.navegacion-perfil button {
  padding: 0.5rem 1rem;
  font-weight: bold;
  background-color: #e6f0f7;
  border: 2px solid #0077a8;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.navegacion-perfil button:hover {
  background-color: #cce4f5;
}

.seccion-perfil {
  display: none;
}

.seccion-perfil:not(.oculto) {
  display: block;
}

#contenido-secciones-perfil {
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.etiqueta {
  font-weight: bold;
}

.pistas-extra {
  margin-top: 1em;
}

/* SELECTORES DE TIPO */

/* ========== ESTILOS GENERALES ========== */

#aviso-orientacion {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 9999;
}

#aviso-orientacion.oculto {
  display: none;
}

/* ========== TÍTULOS ========== */

.titulo-principal {
  width: clamp(250px, 40vw, 600px);
  margin-top: 50px;
  margin-bottom: 20px;
  display: block;
}

.subtitulo-dinamico {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.5rem, 2.5vw, 1.5rem);
  color: #d0e6f0;
  background: transparent;
  border: none;
  padding: 0.2em 1em;
  max-width: 100%;
  text-align: center;
  margin-top: 50px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  opacity: 1;
  transition: opacity 2.5s ease;
}

.burbujeante {
  animation: flotar 3.2s ease-in-out infinite alternate;
  display: inline-block;
}

h2 {
  font-family: "Trebuchet MS";
  font-weight: bold;
  color: #c4eaee;
  text-align: center;
}

.titulo-lista-palabras {
  font-size: 1em;
  margin-bottom: 5px;
  margin-top: 8px;
}

#fin-nivel .resumen-palabras h4,
#fin-nivel .resumen-estadisticas h4 {
  margin: 15px auto 12px;
}

.resumen-palabras {
  margin-bottom: 40px;
}

.proximamente {
  margin-top: 30px;
}

#descargas h3 {
  margin-top: 40px;
}

/* ========== PÁRRAFOS Y LISTAS ========== */
p {
  text-align: justify;
}

li a[href="#pantalla-juego"] {
  margin-bottom: 40px;
  margin-top: 70px;
  padding: 11px 28px;
  font-size: 1.05em;
  border-radius: 10px;
}

li a[href="#creditos"] {
  margin-top: 60spx;
}


.lista {
  list-style: decimal outside;
  padding-left: 0;
  margin: 0 auto;
  width: fit-content;
}

.lista li {
  padding-left: 1.5em;
  text-indent: -1.5em;
  text-align: left;
}

.preview-bloqueada {
  list-style: none;
  padding-left: 0;
  text-align: center;
}

.preview-bloqueada li {
  justify-content: center;
  align-items: center;
  font-size: 1em;
  opacity: 0.8;
  margin: 0 auto;
  max-width: 600px;
}

.preview-bloqueada li::before {
  content: "🔒";
  font-size: 1em;
  display: inline-block;
}

.bloque-descarga ul {
  list-style: none;
  padding-left: 0;
}

.bloque-descarga li {
  margin: 0.5em 0;
}

.grupo {
  margin-bottom: 2rem;
}

.grupo h2 {
  padding-bottom: 0.3rem;
}

#seccion-estadisticas h3 {
  text-align: center;
  margin-bottom: 1rem;
}

#seccion-estadisticas .grupo {
  max-width: 790px;
  width: 100%;
  margin: 0 auto 2rem auto;
}

.lista-perfil {
  list-style: disc;
  padding-left: 0;
  margin: 0;
}

.lista-perfil li {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.5em;
}

.lista-perfil .etiqueta {
  width: 90%;
  text-align: left;
  font-weight: bold;
}

.lista-perfil .valor {
  width: 10%;
  text-align: right;
  font-weight: normal;
}

#letrasUsadas_top5 {
  white-space: nowrap;
  overflow: hidden;
  width: 30%;

}



/* =============== TABLAS ================ */

.tabla-aportes {
  width: 80%;
  border-collapse: collapse;
  background-color: #f9fbfd;
  border: 2px solid #244c5f;
  border-radius: 12px;
  overflow: hidden;
  font-size: 16px;
  margin: 1em auto 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
  align-self: center;
}

.tabla-aportes thead {
  background-color: #91c9d1;
}

.tabla-aportes thead th {
  color: #2a474b
}

.tabla-aportes th,
.tabla-aportes td {
  padding: 1em;
  border-bottom: 1px solid #d6e0ea;
  vertical-align: top;
}

.tabla-aportes tbody tr:last-child td {
  border-bottom: none;
}

.tabla-aportes th {
  font-weight: 600;
  font-size: 16px;
}

.tabla-aportes td {
  color: #333;
  line-height: 1.4;
  font-size: 0.95em;
}

.tabla-aportes td:nth-child(1) {
  font-weight: bold;
  color: #0c5d75;
  white-space: nowrap;
}

/* ========== ENLACES GENERALES ========== */

a {
  text-decoration: none;
  color: #1b7a86;
}

a[href="./aboutthegame.html"] {
  color: #f2f9fa;
  display: inline-block;
  text-align: center;
  margin: 10px;
  font-size: 1.25em;
  max-width: 80%;
  margin-top: 100px;
}

a[href="./aboutthegame.html"]:hover {
  color: #112529;
}

.centro {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 1em;
}

#about-the-game .volver-inicio {
  color: whitesmoke;
  margin: 40px auto 40px;
  padding-bottom: 40px;
}

#about-the-game a.volver-inicio:hover {
  color: #2b5558;
  text-decoration: underline;
}

#palabra-formada {
  font-size: 1.3rem;
  font-weight: bold;
  color: whitesmoke;
  text-align: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  max-width: 100%;
}


/* ========== BOTONES (botón real y enlaces tipo botón) ========== */

button,
a[href^="#"],
.boton-reportar,
.btn-descarga,
.boton-rango {
  background-color: whitesmoke;
  color: #1b7a86;
  font-weight: bold;
  font-size: 1em;
  padding: 0.5em 1em;
  margin: 5px;
  border: 2px solid #1b7a86;
  border-radius: 0.4em;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s ease;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.2);
}

button:hover,
a[href^="#"]:hover,
.boton-reportar:hover,
.btn-descarga:hover,
.boton-rango:hover {
  background-color: #1b7a86;
  color: whitesmoke;
  border-color: #155e66;
  transform: scale(1.02);
}

.grid-niveles button {
  max-width: 80px;
  margin: 6px;
  height: fit-content;
}

.botones-fin-pantalla-juego {
  display: flex;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 0;
  max-width: 700px;
}

.botones-fin-pantalla-juego button {
  margin: 0;
}

.botones-fin-nivel {
  display: flex;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 20px;
  max-width: 400px;
}

.botones-fin-pantalla-juego button,
.botones-fin-pantalla-juego a {
  margin: 0;
}

.nav ul {
  list-style: none;
  padding-left: 0;
}

a.boton-comenzar[href^="#"] {
  font-size: clamp(1em, 1.6vw, 1.25em);
  padding: clamp(0.5em, 1vw, 0.75em) clamp(1em, 2vw, 1.5em);
  margin: 20px auto 40px;
  background-color: rgba(255, 255, 255, 0.4);
  color: #10616b;
  border: 3px solid #1b7a86;
  border-radius: 12px;
  transition: transform 0.2s ease;
  display: inline-block;
  width: auto;
}

a.boton-comenzar[href^="#"]:hover {
  background-color: #1b7086;
  color: #ffffff;
  transform: scale(1.05);
}

.boton-letra {
  display: inline-block;
  margin: 0.4em;
  padding: 0.4em 0.65em;
  font-size: 1.3rem;
  font-weight: 600;
  color: #0e3d4a;
  background: radial-gradient(circle at 30% 30%,
      rgba(255, 255, 255, 0.88),
      rgba(27, 122, 134, 0.7));
  border: 1.3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow:
    0 3px 6px rgba(0, 70, 90, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  backdrop-filter: blur(2px);
  user-select: none;
  animation: flotar-suave 3.5s ease-in-out infinite alternate;
  min-width: 2.7em;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.boton-letra::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(25deg);
  animation: reflejo-agua 3.8s linear infinite;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}

.boton-letra:hover {
  transform: scale(1.1);
  box-shadow:
    0 5px 10px rgba(27, 122, 134, 0.4),
    inset 0 1px 4px rgba(255, 255, 255, 0.5);
  border-color: #ffffff;
}

.boton-letra.oculta {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

.aparicion-suave {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#pantalla-juego .contenido-juego {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 2vw;
  width: 100%;
  margin: 0 auto;
  padding: 0 2vw;
  box-sizing: border-box;
  transition: max-width 0.5s ease-in-out;
  max-width: 100%;
  gap: 20px;
  height: auto;
  align-items: stretch;
  min-height: 365px;
  position: relative;
}

.columna-izquierda {
  width: 40%;
  text-align: center;
  overflow-y: auto;
  max-height: 45vh;
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0;
}

.columna-izquierda::-webkit-scrollbar {
  display: none;
}

.columna-derecha {
  width: 60%;
  text-align: center;
}

.panel-letras {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0px;
  margin-bottom: 20px;
}

.botones-popup button {
  margin: 5px;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
}

.reiniciar-progreso {
  margin-top: 40px;
}


.opciones-sonido {
  display: flex;
  justify-content: center;
  gap: 2em;
  margin-top: 2em;
  max-width: 200px;
}

.bloque-sonido {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: white;
  font-size: 0.95em;
}

#icono-sonido,
#icono-musica {
  width: 55px;
  height: 55px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#icono-sonido:hover {
  transform: scale(1.1);
}

.menu-pistas {
  position: relative;
  display: inline-block;
}

.submenu {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  z-index: 1000;
  display: none;
  flex-direction: column;
  background-color: #ffffff;
  border: 2px solid #1b7a86;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  min-width: 210px;
  padding: 6px 0;
  font-size: 0.95em;
}

.submenu.visible {
  display: flex;
}

.submenu button {
  background: none;
  border: none;
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  font-weight: bold;
  color: #1b7a86;
  transition: background-color 0.2s ease;
  width: 100%;
}

.submenu button:hover {
  background-color: #e6f7f9;
}

.modal-pistas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-pistas.oculto {
  display: none;
}

.modal-contenido {
  background: rgba(255, 255, 255, 0.97);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 100%;
  margin: 0 auto;
  justify-items: center;
  align-items: center;
}

.modal-contenido button {
  padding: 10px;
  font-size: 1em;
  width: 100%;
}

#modal-elegir-palabra .modal-contenido {
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.lista-palabras-elegibles button {
  padding: 10px;
  font-size: 1.1em;
  border: none;
  background: #ddeeff;
  border-radius: 5px;
  cursor: pointer;
}

.lista-palabras-elegibles button:hover {
  background: #bbddff;
}

.opcion-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5em 0;
  font-size: 1rem;
  gap: 0;
  margin: 15px 0;
  text-align: center;
  max-width: 250px;
  margin: 15px auto;
}

.switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: whitesmoke;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #316977;
}

input:checked+.slider:before {
  transform: translateX(21px);
}

/* IDs  */

#niveles p {
  text-align: center;
}

#creditos h4 {
  margin-bottom: 0.3em;
  color: #7cd9e6;
  font-weight: bold;
}

#creditos p {
  margin-top: 0;
  margin-bottom: 0.8em;
  line-height: 1.6;
  color: whitesmoke;
  text-align: center;
}

#about-the-game,
#instrucciones,
#descargas {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

#about-the-game h2,
#instrucciones h2,
#descargas {
  margin-top: 1.5em;
}

#about-the-game li,
#instrucciones li {
  text-align: justify;
  margin-left: 30px;
  margin-right: 30px;
}

#about-the-game p,
#instrucciones p {
  margin-left: 30px;
  margin-right: 30px;
}

#descargas p {
  text-align: center;
}

#enviar {
  color: #114d55;
  margin-top: 15px;
}

#inicio-juego,
#pantalla-juego,
#niveles,
#modos-configuracion-avanzada,
#creditos {
  scroll-margin-top: 80px;
  padding-top: 5px;
}

#pantalla-juego {
  margin: 0;
}

a[href="#creditos"] {
  margin-top: 50px;
}

#palabras-encontrar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 0.5rem;
  justify-content: flex-start;
}

#palabras-encontrar .grupo-palabras {
  width: calc(33.333% - 2rem);
  box-sizing: border-box;
}

#mensaje-flotante {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(50, 50, 50, 0.9);
  color: white;
  padding: 1em 2em;
  border-radius: 10px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#mensaje-flotante.visible {
  opacity: 1;
}

#texto-pagina {
  display: inline;
  white-space: nowrap;
  padding: 0 8px;
  color: white;
  font-size: 1rem;
  margin: 0;
}

#pantalla-juego {
  position: relative;
}

#boton-editar-nick,
#boton-editar-email {
  font-size: 0.85em;
  margin-left: 0.5em;
  margin-bottom: 1em;
}

#input-nick,
#input-email {
  color: black;
}



#perfil-resumen {
  margin-top: 3em;
}

/* MEDIA  */

/* ---IMAGENES---  */

.imagen-titulo-inicio {
  width: 35%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

footer .imagen-titulo-inicio {
  width: 40%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 30px auto 20px auto;
}

.img-burbujas {
  height: 200px;
  width: auto;
}

.logro {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 120px;
  margin: 0;
}

.logro img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.logro .contador {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #b2e6f0;
  color: #333;
  font-weight: bold;
  font-size: 0.8em;
  padding: 3px 6px;
  border-radius: 12px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.logro.bloqueado img {
  filter: grayscale(100%) brightness(60%);
}

.logro.desbloqueado img {
  filter: none;
}



/* APARATOS  */

@media (hover: hover) and (pointer: fine),
(orientation: portrait) and (hover: none) and (pointer: coarse) {

  #boton-pistas-movil {
    display: none;
  }

  .boton-pistas-movil {
    display: none;
  }
}


/*NAVEGADOR ESTRECHO */

@media (max-width: 800px) {
  .titulo-principal {
    width: 90%;
  }

  .boton-comenzar {
    font-size: 1em;
    padding: 10px 18px;
  }

  a[href="./aboutthegame.html"] {
    display: inline-block;
    margin: 0.5em auto;
    text-align: center;
  }

}


/* ---MOVIL---- */

@media screen and (max-width: 768px) {

  .titulo-principal {
    width: 70%;
    max-width: 600px;
    height: auto;
    margin-top: 50px;
    margin-bottom: 10px;
  }

  a.boton-comenzar[href^="#"] {
    font-size: clamp(1em, 2.5vw, 1.25em);
    padding: clamp(0.5em, 1.5vw, 0.75em) clamp(1em, 3vw, 1.5em);
    margin-top: 30px;
    margin-bottom: 40px;
    background-color: #ffffff;
    color: #1b7a86;
    border: 3px solid #1b7a86;
    border-radius: 0.6em;
    transition: transform 0.2s ease;
    display: inline-block;

  }

  header {
    flex-direction: column;
    padding: 10px;
    height: auto;
  }

  .contenedor-titulo {
    padding: 1em 0.5em;
  }

  .centro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    text-align: center;
  }

  .centro a {
    display: block;
    font-size: 1.1em;
    margin: 0 auto;
  }

  body::before {
    background-position: top center;
  }

  .grid-niveles button {
    max-width: 100%;
    font-size: 0.9em;
    padding: 0.6em 1.2em;
  }

  .botones-fin-pantalla-juego,
  .botones-fin-nivel {
    flex-direction: row;
    align-items: center;
    max-width: max-content;
    gap: 6px;
  }

  .botones-fin-nivel {
    flex-direction: row;
    align-items: center;
    max-width: max-content;
    gap: 6px;
  }

  img {
    max-width: 90%;
  }


}

@media (orientation: landscape) and (hover: none) and (pointer: coarse) {

  .pantalla.oculto {
    display: none !important;
  }

  .oculto {
    display: none !important;
    opacity: 0;
  }

  .burbuja-letras {
    width: 20px;
    height: 20px;
    font-size: 8px;
  }

  header {
    padding: 0 10px 10px;
  }

  h2,
  h3,
  h4 {
    margin: 0.2em 0;
  }

  .contenido-juego {
    gap: 1rem 1.5rem;
  }

  .pantalla.activa:not(#instrucciones):not(#creditos):not(#niveles):not(#fin-nivel):not(#descargas) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100dvh;
  }

  section:not(#pantalla_principal) .imagen-titulo-inicio {
    display: none !important;
  }

  .bloque-inicio {
    margin-bottom: 0;
  }

  #pantalla_principal .contenedor-titulo {
    padding: 0.5rem 0.5rem;
    margin: 0;
    padding: 0;
  }

  #pantalla_principal .titulo-principal {
    max-height: 45vh;
    width: auto;
    margin: 20px auto 25px;
  }

  #pantalla_principal .subtitulo-dinamico {
    font-size: 1rem;
    margin: 10px 0;
  }

  #pantalla_principal .boton-comenzar {
    font-size: 1rem;
    padding: 6px 12px;
    margin: 20px auto 20px;
  }

  #pantalla_principal .centro {
    margin-top: 0;
    padding: 0;
    gap: 20px;
  }

  #pantalla_principal .centro a {
    font-size: 0.9rem;
    margin: 10px auto;
  }

  #pantalla_principal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    box-sizing: border-box;
    gap: 0;
  }

  li a[href="#pantalla-juego"] {
    margin: 10px auto 20px;
  }

  li a[href="#creditos"] {
    margin: 5px auto;
  }

  #instrucciones h2 {
    margin-top: 1.5em;
  }

  #instrucciones p,
  #instrucciones li {
    font-size: 1.1em;
  }

  .volver-menu a[href="#inicio-juego"] {
    margin-bottom: 2.5em;
  }

  #niveles .contenido-juego>p {
    display: none;
  }

  #niveles .contenido-juego>h2 {
    margin: 0;
  }

  .flex-movil {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    text-align: center;
  }

  .columna-izq-movil,
  .columna-der-movil {
    margin: 0;
  }

  .grid-niveles {
    margin-top: 5px;
    min-height: auto;
  }

  .paginacion-niveles button {
    font-size: 1rem;
  }

  #niveles .volver-menu {
    margin-top: 10px;
  }

  #pantalla-juego .contenido-juego {
    min-height: auto;
  }

  .nivel {
    margin: 0;
  }

  #titulo-nivel {
    margin: 5px;
  }

  .cronometro.flotante-izquierda {
    top: -20px;
    left: 20px;
  }

  .botones-fin-pantalla-juego {
    max-width: 800px;
  }

  .botones-fin-pantalla-juego button,
  .botones-fin-pantalla-juego a,
  .boton-reportar {
    width: 100%;
    font-size: 0.9em;
  }

  #boton-pistas {
    display: none;
  }

  .submenu {
    min-width: 160px;
  }

  .submenu button {
    padding: 0;
  }

  #boton-finalizar-directo {
    margin-top: 0;
  }

  .etiqueta-palabra {
    margin-top: 0;
  }

  .grupo-palabras {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto !important;
  }

  .contenedor-palabras {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto !important;
    overflow: visible !important;
  }

  .grupo-palabras .contenedor-palabras {
    min-height: 3em;
  }

  .titulo-a-encontrar,
  .titulo-disponibles {
    margin: 10px;
  }

  .titulo-letras {
    margin: 5px;
  }

  .palabra-hueco,
  .palabra-lista {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
  }

  #pantalla-juego .volver-menu {
    margin: 0;
  }

  .columna-izquierda,
  .columna-derecha {
    height: auto;
    min-height: auto;
    width: 50%;
    min-height: 200px;
  }

  #pantalla-juego>div.botones-fin-pantalla-juego {
    margin-top: 5px;
  }

  .pista-aleatoria {
    display: none;
  }

  .botones-movil {
    margin-top: 15px;
    display: flex;
    gap: 7px;
    justify-content: center;
    flex-wrap: wrap;
  }

  #btn-deshacer-letra {
    display: inline;
  }

  .boton-pistas-movil {
    font-size: 0.9rem;
  }

  .menu-pistas .submenu {
    touch-action: manipulation;
    pointer-events: auto;
    user-select: none;
  }

  .botones-fin-pantalla-juego {
    max-width: max-content;
  }

  #palabra-formada {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 100%;
  }

  #palabra-formada::-webkit-scrollbar {
    height: 6px;
  }

  #palabra-formada::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
  }

  .botones-flex-movil {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

  .panel-letras {
    gap: 0.4rem;
    padding: 0.2rem;
  }

  .boton-letra {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }

  #mensaje-validacion {
    padding: 0;
    margin: 0;
  }

  #pantalla-juego>section>div:nth-child(1)>div.volver-menu>a {
    margin-bottom: 0;
    font-size: 0.9rem;
  }

  .resumen-estadisticas,
  .resumen-palabras {
    font-size: 1.1em;
  }

  #modos-configuracion-avanzada {
    margin: 0;
    padding: 0;
  }

  #modos-configuracion-avanzada>div {
    margin: 0;
    padding: 0;
  }

  .modos-configuracion-avanzada {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    height: 200px;
    align-items: center;

  }

  .modos-configuracion-avanzada>* {
    flex-shrink: 0;
    max-width: 95vw;
  }

  .logro {
    width: 100px;
    height: 100px;
  }

  .tabla-aportes th {
    font-size: 15px;
  }

  .tabla-aportes td {
    font-size: 0.77em;
  }

  .preview-bloqueada {
    max-height: 120px;
    overflow-y: auto;
    margin: 0 auto;
    padding: 0;
    width: 200px;
  }

  .opciones-sonido {
    width: 150px;
  }

  body,
  html {
    overflow-x: hidden;
  }

  .opciones-sonido {
    min-width: 135px;
    margin-left: 20px;
  }

  .preview-bloqueada {
    max-height: 140px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 10px;
    min-width: 220px;
    max-width: 220px;
  }



}


@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-width: 620px) {
  .boton-letra {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  * {
    font-size: 0.95rem;
  }

  li a[href="#pantalla-juego"] {
    padding: 10px 15px;
  }

  .columna-izq-movil,
  .columna-der-movil {
    margin: 0;
  }

  .grid-niveles {
    grid-template-columns: repeat(4, 1fr);
  }

  .modos-configuracion-avanzada {
    gap: 20px;
  }

  #icono-sonido,
  #icono-musica {
    width: 32px;
    height: 32px;
  }
}



/* KEY FRAMES */


@keyframes flotar {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-12px);
  }
}

@keyframes flotar-suave {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-3px);
  }
}

@keyframes reflejo-agua {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

@keyframes subir {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 0.5;
  }

  50% {
    transform: translateY(-300px) scale(1.1);
  }

  100% {
    transform: translateY(-700px) scale(0.8);
    opacity: 0;
  }
}

/* OTROS */

.subtitulo,
.titulo-principal,
a.boton-comenzar {
  transition: all 0.3s ease;
}