body {

     overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    background-color: #121212;
    font-family: 'Poppins', sans-serif;
  }
*,
*::before,
*::after {
  box-sizing: border-box;
}
  h1 {
    margin-bottom: 30px;
  }

  .board {
    margin-top: 50px;
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
  }

  .row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px; /* antes estaba a 10px de gap solamente */
  }
  
  .cell {
    width: 60px;
    height: 60px;
    border: 2px solid #444;
    background-color: #1f1f1f;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    color: #f0f0f0;
    transition: background-color 0.3s ease, transform 0.3s;
  }

  .correct {
    background-color: #4caf50;
    border-color: #4caf50;
    color: white;
  }
  
  .present {
    background-color: #ffc107;
    border-color: #ffc107;
    color: white;
  }
  
  .absent {
    background-color: #555;
    border-color: #555;
    color: white;
  }

  .logo-container {
    padding: 20px;
    text-align: center;
    background-color: #1e1e1e;
    width: 100%;
  }
  
  .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 50px;
    margin: 0;
  }
  
  .logo-urban {
    color: #ffffff;
  }
  
  .logo-dle {
    color: #2978b5;
  }
  
  .logo-link {
    text-decoration: none;
    display: inline-block;
  }

  .cell {
    transition: background-color 0.3s ease, transform 0.3s;
  }
  
  @keyframes flip {
    0% {
      transform: rotateX(0);
    }
    50% {
      transform: rotateX(90deg);
    }
    100% {
      transform: rotateX(0);
    }
  }
  
  .flip {
    animation: flip 0.6s ease forwards;
  }


  .keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
  }
  
  .keyboard-row {
    display: flex;
    gap: 6px;
  }
  
  .key {
    width: 40px;
    height: 58px;
    border: none;
    border-radius: 8px;
    background-color: #888; /* gris claro inicial */
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: default;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
  }
  
  .key.correct {
    background-color: #4caf50;
  }
  
  .key.present {
    background-color: #ffc107;
    color: black;
  }
  
  .key.absent {
    background-color: #555;
  }
  .cell.space {
    background: transparent;
    border: none;
    pointer-events: none;
  }
  .info-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #0ff;
    color: white;
    font-size: 18px;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    margin-left: 20px;
    transition: background-color 0.3s;
  }
  
  .info-icon:hover {
    background-color: #ff5733; /* Cambio de color al pasar el ratón */
  }
  
  /* Estilos del desplegable de la explicación */
  .info-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #3a3a3a; /* Gris oscuro acorde a la página */
    color: white;
    font-size: 18px;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    margin-left: 40px; /* Lo movemos un poco más a la derecha */
    transition: background-color 0.3s;
  }
  
  .info-icon:hover {
    background-color: #0a74b6; /* Azul oscuro para el hover */
  }
  
  /* Estilos del desplegable de la explicación */
  .game-info {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
    color: white;
    z-index: 9999;
    animation: fadeIn 0.5s ease;
  }
  
  .game-info .info-content {
    position: relative;
  }
  
  .game-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
  }
  
  .game-info p {
    font-size: 18px;
    line-height: 1.5;
  }
  
  /* Botón de cerrar */
  .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    color: white;
    cursor: pointer;
  }
  
  /* Animación de aparición del desplegable */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translate(-50%, -60%);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }

  .final-message {
    margin-top: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2em;
    text-align: center;
    color: #ff4c4c;
  }

  .key {
    touch-action: manipulation;
  }
  
  .wide-key {
    width: 60px;
    height: 58px;
    background-color: #2978b5;
    color: white;
    flex: 1.5;
    max-width: 70px;
    min-width: 50px;
  }

  @media (max-width: 800px) {
  
    .row {
      display: flex;
      gap: 6px;
      justify-content: center;
      margin-bottom: 10px; /* antes estaba a 10px de gap solamente */
    }
    
    .cell {
      width: 40px;
      height: 40px;

      border-radius: 12px;

    }
  
  }
  @media (max-width: 600px) {
    .cell {
      width: 40px;
      height: 40px;
      font-size: 20px;
      border-radius: 8px;
    }
  
    .row {
      gap: 6px;
      margin-bottom: 10px;
    }
  
    .keyboard {
      gap: 6px;
      margin-top: 20px;
    }
  
    .key {
      width: 28px;
      height: 40px;
      font-size: 14px;
      border-radius: 6px;
    }
  
    .logo {
      font-size: 36px;
    }
  
    .info-icon {
      width: 26px;
      height: 26px;
      font-size: 16px;
      line-height: 26px;
      margin-left: 20px;
    }
  
    .game-info {
      max-width: 95%;
      max-height: 90%;
      font-size: 14px;
    }
  }
  

  @media (max-width: 400px) {

  
    .key {
      width: 9vw;
      height: 10vw;
      font-size: 4vw;
    }
  
    .keyboard {
      margin-top: 20px;
    }
  
    .info-icon {
      margin-left: 10px;
    }
    .wide-key {
      width: 16vw;
      font-size: 4vw;
      height: 10vw;
    }
  }
  @media (max-width: 400px) {
    .board {
      gap: 4px;
      margin-top: 30px;
      width: 100%; /* Asegura que el tablero no se salga */
      padding: 0 5px; /* Espacio a los lados para respirar */
      box-sizing: border-box;
    }
  
    .row {
      gap: 4px;
      margin-bottom: 8px;
      justify-content: space-between; /* Distribuye mejor */
    }
  
    .cell {
      width: 5vw;
      height: 5vw;
      max-width: 50px; /* No crece más allá de esto */
      min-width: 30px; /* No baja de esto */
      font-size: 6vw;
      font-weight: bold;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: center;
    }
  }

  @media (max-width: 500px) {
    .board {
      gap: 4px;
      margin-top: 30px;
      width: 100%; /* Asegura que el tablero no se salga */
      padding: 0 5px; /* Espacio a los lados para respirar */
      box-sizing: border-box;
    }
  
    .row {
      gap: 4px;
      margin-bottom: 8px;
      justify-content: space-between; /* Distribuye mejor */
    }
  
    .cell {
      width: 7vw;
      height: 7vw;
      max-width: 50px; /* No crece más allá de esto */
      min-width: 30px; /* No baja de esto */
      font-size: 6vw;
      font-weight: bold;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: center;
    }
  }
/* Teclado adaptable */
.keyboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  padding: 0 10px;
  box-sizing: border-box;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Estilo general de teclas */
.key {

  border-radius: 4px;
  padding: 12px 8px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  flex: 1;
  max-width: 40px;
  min-width: 32px;
  box-sizing: border-box;
}



/* Texto que no se desborde */
.key, .wide-key {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 450px) {
  .keyboard {
    padding: 0 5px;
  }
  .key {
    padding: 10px 4px;
    font-size: 14px;
    max-width: 36px;
    min-width: 28px;
  }
  .wide-key {
    max-width: 60px;
    min-width: 45px;
    font-size: 14px;
  }
}


#racha-marcador {
  text-align: center;
  margin-top: 10px;
}

#racha-contador {
  font-weight: bold;
  font-size: 1.2em;
  color: white;
  transition: transform 0.3s ease-in-out;
}

.mensaje-racha {
  font-size: 1.2em;
  color: #ff0;
  font-weight: bold;
  display: inline-block;
  margin-top: 10px;
  animation: mensajeAnimado 1s ease-in-out;
}

@keyframes mensajeAnimado {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  50% {
    opacity: 1;
    transform: translateY(5px);
  }
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

.racha-animada {
  color: #ffcc00;
  transform: scale(1.2);
}

.overlay-juegos {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8); /* Fondo oscuro del overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.ventana-juegos {
  background: #2c2c2c; /* Gris oscuro en lugar del blanco */
  border: 4px solid #003366; /* Borde azul oscuro */
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 0 25px #003366aa;
  animation: zoomIn 0.6s ease;
  max-width: 95%;
  width: 600px;
  max-height: 90%;
  overflow-y: auto;
}

.ventana-juegos h2 {
  font-size: 28px;
  color: #ffffff;
  margin-bottom: 10px;
}

.ventana-juegos p {
  font-size: 18px;
  margin-bottom: 25px;
  color: #dddddd;
}

.botones-juegos {
  display: flex;
  flex-direction: column; /* Uno debajo de otro */
  align-items: center;
  gap: 20px;
  margin-top: 15px;
}

.juego-btn {
  background-color: #003366;
  color: white;
  padding: 20px 30px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
  width: 100%; /* Ocupa el ancho del contenedor */
  max-width: 500px;
  box-shadow: 0 0 10px #00336677;
  transition: transform 0.3s, background-color 0.3s;
  box-sizing: border-box;
}
.juego-btn:hover {
  background-color: #005599;
  transform: scale(1.03);
}

.cerrar-juegos {
  margin-top: 30px;
  padding: 12px 20px;
  background-color: #777;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.3s;
}
.cerrar-juegos:hover {
  background-color: #555;
}

@keyframes zoomIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .ventana-juegos {
    width: 90%;
    padding: 25px 20px;
  }

  .juego-btn {
    font-size: 18px;
    padding: 16px 24px;
  }

  .ventana-juegos h2 {
    font-size: 22px;
  }

  .ventana-juegos p {
    font-size: 16px;
  }
}
@media (max-width: 600px) {
  .ventana-juegos {
    width: 80%;
    padding: 20px 15px;
  }

  .juego-btn {
    font-size: 16px;
    padding: 14px 20px;
    width: 100%; /* Ocupa el ancho del contenedor */
    max-width: 400px;
  }

  .ventana-juegos h2 {
    font-size: 20px;
  }

  .ventana-juegos p {
    font-size: 15px;
  }
}
@media (max-width: 530px) {
  .ventana-juegos {
    width: 80%;
    padding: 20px 15px;
  }

  .juego-btn {
    font-size: 14px;
    padding: 14px 20px;
    width: 100%; /* Ocupa el ancho del contenedor */
    max-width: 300px;
  }

  .ventana-juegos h2 {
    font-size: 20px;
  }

  .ventana-juegos p {
    font-size: 15px;
  }
}

@media (max-width: 400px) {
  .ventana-juegos {
    width: 80%;
    padding: 20px 15px;
  }

  .juego-btn {
    font-size: 13px;
    padding: 14px 20px;
    width: 100%; /* Ocupa el ancho del contenedor */
    max-width: 250px;
  }

  .ventana-juegos h2 {
    font-size: 20px;
  }

  .ventana-juegos p {
    font-size: 15px;
  }
}

.anuncio-inferior {
    max-width: 900px;
    margin: 40px auto;
    padding: 10px 0;
    background-color: #333;

    text-align: center;
    border-radius: 10px;
    font-size: 16px;
}
/* Anuncios laterales fijos */
.anuncios-laterales-contenedor {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  height: 1000px; /* o lo que necesites para que haya scroll */
  display: flex;
  justify-content: space-between; /* para separar anuncios a ambos lados */
  gap: 20px; /* margen entre anuncios y contenido */
}

.anuncio-lateral {
  position: fixed;
  top: 150px; /* Ajusta según el header */
  width: 200px;  /* Más ancho */
  height: 600px; /* Ajusta según contenido */
  background-color: #222;
   height: calc(100vh - 400px);
  border-radius: 10px;
  box-shadow: 0 0 10px #000;
  z-index: 100;
  padding: 10px;
  color: white;
  font-size: 0.9em;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Anuncios pegados al borde exterior */
.anuncio-izquierdo {
  left: 20px;  /* Pequeño margen desde el borde izquierdo */
}

.anuncio-derecho {
  right: 20px; /* Pequeño margen desde el borde derecho */
}
@media (max-width: 1270px) {
  .anuncio-lateral {
    display: none;
  }
}
@media (max-width: 1100px) {
 .anuncios-laterales-contenedor {
     max-width: 900px;
 }

}
@media (max-width: 900px) {
 .anuncios-laterales-contenedor {
     max-width: 500px;
 }

}
@media (max-width: 600px) {
 .anuncios-laterales-contenedor {
     max-width: 400px;
 }

}
@media (max-width: 400px) {
 .anuncios-laterales-contenedor {
     max-width: 320px;
 }

}