/* 🔹 POP-UP PARA BLOQUEADOR DE ANUNCIOS */
#adblock-popup {
  display: none;
  /* se muestra solo si detecta adblock */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-box {
  background: #090039;
  border: 2px solid #00ffcc;
  border-radius: 12px;
  padding: 20px;
  max-width: 350px;
  color: white;
  text-align: center;
  font-family: "Orbitron", sans-serif;
}

#popup-close {
  margin-top: 15px;
  background: #00ffcc;
  border: none;
  padding: 8px 15px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  color: #000;
}

/*🔹 RESETEO Y BASE */
body {
  margin: 0;
  font-family: "Orbitron", system-ui, sans-serif;
  background-color: #ffffff;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;

  /* 🚨 REGLAS GLOBALES PARA FORZAR EL RESPONSIVE (FUSIONADAS) 🚨 */
  width: 100%;
  overflow-x: hidden;
}

/* 🚨 REGLAS GLOBALES PARA MEDIA (IMAGENES, IFRAMES) 🚨 */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/*🔹 HEADER */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090039;
  padding: 8px 25px;
  border-bottom: 2px solid #f207fe;
  box-shadow: 0 0 10px #f207fe;
  position: relative;
  z-index: 100;
}

header h1 {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 1.5rem;
  color: #00d2d9;
  letter-spacing: 1.5px;
  text-shadow: 0 0 5px #00ffff;
}

header h1 img {
  height: 50px;
  width: auto;
  transform: scaleX(1.5);
  transform-origin: center;
  transition: transform 0.3s ease;
  margin-left: 15px;
}

header h1 img:hover {
  transform: scaleX(1.45) rotate(-2deg);
}

nav ul.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  height: auto;
  min-height: 50px;
  overflow: visible;
}

nav ul.menu>li {
  position: relative;
  display: flex;
  align-items: center;
}

nav a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #5e69fe;
  font-weight: bold;
  padding: 0 6px;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  transition: color 0.3s, transform 0.2s;
  height: 100%;
}

nav a:hover {
  color: #ff00ff;
  transform: scale(1.1);
}

/* Submenú */
nav ul.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #000;
  border: 1px solid #00d2d9;
  border-radius: 5px;
  list-style: none;
  padding: 8px 0;
  min-width: 180px;
  z-index: 100;
  margin-top: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

nav ul.menu li:hover>ul.submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

nav ul.submenu li {
  padding: 6px 15px;
}

nav ul.submenu li a {
  color: #00d2d9;
  font-weight: normal;
  display: block;
  padding: 4px 8px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

nav ul.submenu li a:hover {
  color: #ff00ff;
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* 🔹 BUSCADOR */
nav ul.menu li.buscar {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

nav ul.menu li.buscar button {
  background-color: #5e69fe;
  color: #000;
  border: 2px solid #5e69fe;
  padding: 8px 12px;
  font-family: "Orbitron", sans-serif;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s;
}

nav ul.menu li.buscar button:hover {
  background-color: #f207fe;
  transform: scale(1.1);
}

.campo-busqueda {
  position: absolute;
  top: 110%;
  right: 0;
  display: none;
  background-color: #090039;
  border: 2px solid #00ffcc;
  border-radius: 5px;
  padding: 8px;
  z-index: 200;
  animation: slideDown 0.3s ease forwards;
  min-width: 260px;
  width: 320px;
}

.campo-busqueda.activo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campo-busqueda input {
  padding: 6px 10px;
  border: 2px solid #f207fe;
  border-radius: 3px;
  outline: none;
  width: 90%;
  font-family: "Orbitron", sans-serif;
  color: #f207fe;
  background-color: #090039;
  font-weight: bold;
  font-size: 0.9rem;
}

.campo-busqueda input:focus {
  border-color: #f207fe;
  box-shadow: 0 0 4px #f207fe, 0 0 8px #f207fe inset;
}

/* 🔹 Nuevo botón “Buscar” dentro del campo */
.campo-busqueda button {
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  background: linear-gradient(90deg, #0f207f, #f207fe);
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  transition: transform 0.2s ease;
}

.campo-busqueda button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px #f207fe, 0 0 15px #00ffcc;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🔹 TÍTULO */
#titulo,
#titulo2,
#titulo3,
.titulo-juego {
  text-align: center;
  color: #f207fe;
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: 8px;
  padding: 10px 0;
  -webkit-text-stroke: 0.6px black;
  text-shadow: 0 0 5px #fff, 0 0 10px #00ffcc, 0 0 20px #00ffcc,
    0 0 30px #00ffcc, 0 0 60px #f207fe, 0 0 100px #f207fe, 0 0 140px #00ffcc;
  animation: titulo-glow 2.2s ease-in-out infinite alternate;
}

#titulo {
  margin: 50px auto 20px;
}

#titulo2 {
  margin: 10px auto 5px;
  font-size: 1.6rem;
}

#titulo3 {
  margin: 0 auto 20px;
  font-size: 1.3rem;
}

.contenedor-ancho {
  margin: 0 auto;
  padding: 0 10px;
  width: 100%;
  box-sizing: border-box;
}

/* 🔹 TARJETAS DE JUEGOS */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 250px));
  gap: 20px;
  margin: 20px auto 0;
  justify-content: center;
}

.card {
  background: #090039;
  border: 2px solid #0f207f;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  color: #00ffcc;
  font-family: "Orbitron", sans-serif;
  box-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffcc inset;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0 15px #ff00ff, 0 0 25px #ff00ff inset;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.card h3 {
  font-size: 1rem;
  margin: 5px 0;
  text-shadow: 0 0 5px #00ffcc;
}

.card p {
  font-size: 0.8rem;
  color: #7dd504;
  text-shadow: 0 0 3px #7dd504;
}

#letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin: 15px auto 30px;
  padding: 5px;
}

/*🔹 botones a-z */

.letter-btn {
  background: none;
  border: 1px solid #f207fe;
  box-shadow: 0 0 4px #00ffcc, inset 0 0 3px #f207fe;
  color: #5e69fe;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  /* antes 1.1rem */
  padding: 4px 8px;
  /* más chico */
  border-radius: 4px;
  cursor: pointer;
  text-shadow: 0 0 4px #00ffcc, 0 0 8px #00ffcc;
  transition: all 0.2s ease-in-out;
}

.letter-btn:hover {
  background-color: #00ffcc;
  color: #0a0a0a;
  box-shadow: 0 0 6px #00ffcc, 0 0 15px #00ffcc, 0 0 30px #ff00ff;
  transform: scale(1.05);
}

.letter-btn.activa {
  background-color: #ff00ff;
  color: #fff;
}

/*🔹 SECCIÓN PRINCIPAL (detalle) */
.games-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  margin-top: 20px;
  padding: 10px;
}

/* ⭐ Cuando estás en juego.html forzamos 1 sola card (el iframe) */
.games-section-detalle .cards-container {
  display: block !important;
}

/* Contenedor del juego */
.cards-container-detalle {
  width: 100%;
}

/* Contenedor de publicidad lateral */
.ads-column {
  border-radius: 8px;
  padding: 10px;
  font-family: "Orbitron", sans-serif;
  text-align: center;
  box-sizing: border-box;
  min-width: 250px;

}

/* Cuadro donde va el banner lateral */
.ad-space {
  position: relative;
  min-height: 200px;
  /* mínimo para evitar colapso */
  width: 100%;
  overflow: hidden;
}

/* 🔹 Hacer que el banner inferior tenga el MISMO estilo que .ads-column */
.ad-space-bottom {
  display: flex;
  flex-direction: row;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  border-radius: 8px;
  padding: 10px;
  color: #00ffcc;
  font-family: "Orbitron", sans-serif;
  text-align: center;
  box-sizing: border-box;
}

/* 🔹 FOOTER */
footer {
  padding: 15px 40px;
  background: #090039;
  border: 1px solid #f207fe;
  box-shadow: 0 0 4px #00ffcc, inset 0 0 3px #f207fe;
  color: #f207fe;
  font-family: "Orbitron", sans-serif;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/*🔹 BOTONES (Paginación + Letras)*/
.paginacion,
#pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
  max-width: 100%;
}

.btn-pagina,
.btn-letra {
  background: none;
  border: 1.5px solid #ff00ff;
  color: #5e69fe;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  /* antes 1.1rem */
  padding: 4px 8px;
  /* más chico */
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.btn-pagina:hover,
.btn-letra:hover {
  background-color: #00ffcc;
  color: #090039;
  transform: scale(1.1);
}

.btn-pagina.activa {
  background-color: #ff00ff;
  color: #fff;
  border-color: #00ffcc;
  transform: scale(1.12);
}

/* 🔹 CARD DETALLE  */
.card-juego {
  margin-bottom: 20px;
}

.card-juego h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
  color: #00ffcc;
  text-shadow: 0 0 5px #00ffcc;
}

.card-juego p {
  margin-bottom: 10px;
  font-weight: bold;
  color: #7dd504;
  text-shadow: 0 0 3px #7dd504;
}

.card-juego iframe {
  display: block;
  width: 100%;
  height: 800px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffcc inset;
}

/* =========================================
   ESTILOS DE NAVEGACIÓN RESPONSIVE
   ========================================= */

/* 1. Ocultar botón hamburguesa en escritorio */
.hamburger {
  display: none;
  font-size: 32px;
  background: none;
  border: none;
  color: #5e69fe;
  cursor: pointer;
  padding: 0 10px;
}

/* 2. Estilos base del Nav (Escritorio por defecto) */
#nav-menu {
  display: flex !important;
  /* Forzamos que se vea en PC */
  flex-direction: row;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  position: static;
  width: auto;
}

#menu-principal {
  display: flex;
  /* Asegura que la lista se vea */
  gap: 25px;
}

/* 3. MEDIA QUERY PARA MÓVIL (Max 900px) */
@media (max-width: 900px) {

  /* Mostrar botón hamburguesa */
  .hamburger {
    display: block;
  }

  /* 🟢 LAYOUT PRINCIPAL: Pasar de Grid de 2 columnas a 1 columna */
  .games-section {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  /* 🟢 ANULACIÓN DEL ANCHO FIJO DE PUBLICIDAD */
  .ads-column {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
  }

  /* 🟢 DETALLE DEL JUEGO: Asegurar que el iframe no se desborde */
  .card-juego iframe {
    height: 350px;
    /* Reducir la altura para móvil */
  }

  /* Ocultar el menú de navegación por defecto */
  #nav-menu {
    display: none !important;
    /* Oculto hasta que se active */
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    /* Que ocupe todo el ancho o ajusta según prefieras */
    background: #090039;
    border-bottom: 2px solid #5e69fe;
    border-top: 2px solid #5e69fe;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
    width: 100%;
    box-sizing: border-box;
  }

  /* CLASE QUE AGREGA JQUERY PARA MOSTRARLO */
  #nav-menu.show {
    display: flex !important;
  }

  /* Ajustar la lista interna */
  #menu-principal {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }

  nav ul.menu li {
    width: 100%;
    display: block;
    text-align: center;
  }

  nav ul.menu li a {
    display: block;
    padding: 15px;
    border-bottom: 1px solid rgba(94, 105, 254, 0.3);
  }

  /* 🟢 REGLAS NUEVAS PARA EL SUBMENÚ MÓVIL (¡Esto ya lo teníamos y está bien!) */
  nav ul.submenu {
    position: static;
    /* CAMBIO CLAVE: Se posiciona en el flujo normal (no flota) */
    opacity: 1;
    /* Necesario para anular el opacity: 0 del desktop */
    visibility: visible;
    transform: none;
    /* Anula el transform: translateY(-10px) */

    /* Estilos de apariencia para móvil */
    background: #090039;
    border: none;
    border-radius: 0;
    margin: 5px 0 5px 20px;
    /* Indentación para que se vea anidado */
    padding: 0;
    min-width: auto;
    max-height: none;

    /* Ocultamos por defecto. Se mostrará con la función slideToggle de JavaScript */
    display: none;
  }

  nav ul.submenu li a {
    /* Estilos de los enlaces hijos en el submenú */
    color: #00d2d9;
    /* Cambiar a un color diferente al principal si quieres */
    font-weight: normal;
    border-bottom: none;
    padding: 10px 20px;
    text-align: left;
  }

  /* Ajustes del buscador en móvil */
  .buscar {
    justify-content: center;
    margin-top: 10px;
  }

  .campo-busqueda {
    right: 50%;
    transform: translateX(50%);
    top: 50px;
    width: 90%;
  }
}

/* ⭐ Mantener menú siempre visible en desktop (ANULA las reglas mobile en pantalla grande) */
@media (min-width: 901px) {
  #nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    width: auto;
  }

  /* Asegura que la lista interna sea display:flex en desktop */
  #menu-principal {
    display: flex !important;
    flex-direction: row !important;
  }
}

/* 🔹 CARDS CONTAINER (detalle del juego)*/
.cards-container-detalle {
  grid-template-columns: 1fr !important;
  max-width: 100% !important;
  margin: 0 !important;
}



#iframe-preview {
  position: relative;
  background: #fdfdfd;
  margin: 10px 0 10px 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 5px;
  border: 1px solid #f207fe;
  box-shadow:
    0 0 4px #00ffcc,
    inset 0 0 3px #f207fe;

}

#iframe-preview h3 {
  margin: 0;
  padding-left: 10px;
  text-align: left;
  color: #00ffcc;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  -webkit-text-stroke: 0.6px black;
  text-shadow: 0 0 5px #fff, 0 0 10px #f207fe, 0 0 20px #f207fe,
    0 0 30px #f207fe, 0 0 60px #f207fe, 0 0 100px #f207fe, 0 0 140px #f207fe;
  animation: titulo-glow 2.2s ease-in-out infinite alternate;
  white-space: nowrap;
  /* 🔥 evita que salte de línea */
}

#iframe-preview span {
  flex: 1;
  height: 40px;
  color: #210d94;
  border-radius: 6px;
  font-size: 13px;
  resize: none;
  font-family: monospace;
  outline: none;
  align-content: center;
}

#source {
  text-align: center;
}

/* Margen izquierdo para el detalle del juego */
.games-section-detalle .cards-column {
  padding-left: 25px;
  /* Ajustá el valor que quieras */
  box-sizing: border-box;
}

/*🔹 ESTILO DEL TEXTO SEO */
#seo-text {
  background: whitesmoke;
  border-radius: 10px;
  font-size: 1rem;
  color: #551a8b;
  border: 1px solid #f207fe;
  box-shadow: 0 0 4px #00ffcc, inset 0 0 3px #f207fe;
  padding: inherit;
  text-align: justify;
  font-family: monospace;
  max-width: 1400px;
  margin: 40px auto;
  line-height: 1.7;
}

#seo-text h2 {
  color: #f207fe;
  -webkit-text-stroke: 0.6px black;
  text-shadow: 0 0 5px #fff, 0 0 10px #00ffcc, 0 0 20px #00ffcc,
    0 0 30px #00ffcc, 0 0 60px #f207fe, 0 0 100px #f207fe, 0 0 140px #00ffcc;
  animation: titulo-glow 2.2s ease-in-out infinite alternate;
  font-size: 1.5rem;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px;
  word-spacing: 10px;
}

#seo-text p {
  margin-bottom: 12px;
}

/* ESTO VA EN TU estilos.css */

.oculto-al-inicio {
  position: absolute !important;
  opacity: 0 !important;
  visibility: hidden !important;
  width: 100% !important;
  height: 100% !important;
  top: -9999px !important;
  left: 0 !important;
  z-index: -1 !important;
}

/* NUEVO MEDIA QUERY PARA TABLETS (1200px a 901px) */
@media (max-width: 1200px) and (min-width: 901px) {
  header {
    flex-direction: column;
    align-items: center;
    /* Centrar todo el contenido (logo y menú) */
    padding: 8px 15px;
    /* Reducir padding horizontal del header */
  }

  header h1 {
    width: 100%;
    justify-content: center;
    /* Centrar el contenido del h1 (incluyendo el img) */
    margin-bottom: 5px;
    /* Pequeño espacio entre el logo y el menú */
  }

  #nav-menu {
    width: 100%;
  }

  #menu-principal {
    width: 100%;
    display: flex;
    justify-content: center;
    /* Centrar los enlaces del menú horizontalmente */
    gap: 10px;
  }
}

/* CONTENEDOR LEGAL */
.legal {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
  line-height: 1.8;
  color: #eaeaea;
  border-radius: 10px;
  border: 1px solid #f207fe;
  box-shadow: 0 0 4px #00ffcc, inset 0 0 3px #f207fe;
}

/* TÍTULO PRINCIPAL */
.legal h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #f207fe;
  text-align: center;
}

/* SUBTÍTULOS */
.legal h3 {
  font-size: 1.2rem;
  margin-top: 35px;
  margin-bottom: 10px;
  color: #5e69fe;
}

/* PÁRRAFOS */
.legal p {
  margin-bottom: 15px;
  font-size: 1rem;
  color: #551a8b;
}

/* LISTAS */
.legal ul {
  margin: 10px 0 20px 20px;
  color: #551a8b;
}

.legal li {
  margin-bottom: 8px;
  color: #551a8b;
}

.footer-link,
.footer-link:visited {
  color: #f207fe;
}

.footer-link:hover {
  text-decoration: underline;
}

/* LINKS */
.legal a,
.legal a:visited {
  color: #f207fe;
  text-decoration: none;
}

.legal a:hover {
  text-decoration: underline;
}