/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  padding: 50px 0;
  max-width: 1000px;
  margin: 0 auto;
}

/* ===== GRUPOS ===== */
.grupo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  width: 100%;
}

.h1 {
  color: #000000 !important;
}

/* ===== TÍTULO DE CATEGORÍA ===== */
.categoria {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 25px;
  font-size: 2em;
  color: #000000;
  font-weight: bold;
  text-transform: uppercase;
  position: relative;
}

.categoria::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background-color: #000000;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== TÍTULOS DE CADA TARJETA ===== */
.titulo-tarjeta {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.3em;
  color: #ffffff;
  font-weight: 600;
  text-transform: capitalize;
}

/* ===== 📱 RESPONSIVE ===== */
@media (max-width: 700px) {
  .grupo {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .categoria {
    font-size: 1.6em;
  }

  .titulo-tarjeta {
    font-size: 1.2em;
  }
}



/* 📱 Para pantallas pequeñas (celulares o tablets) */
@media (max-width: 700px) {
  .container {
    grid-template-columns: 1fr; /* solo una columna */
    gap: 25px; /* menos espacio entre tarjetas */
  }
}





.card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; 
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background-color: #06ac1c9f;
  box-shadow: 0 4px 8px rgb(255, 255, 255);
  transition: transform 0.3s;
}


.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
  filter: brightness(0.6);
}


.card:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}


.card .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 15px;
  background: rgba(23, 119, 19, 0.692);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.5s ease;
}


.card:hover .overlay {
  opacity: 1;
}

.card .overlay h2 { 
	margin: 0 0 10px 0; 
	font-size: 20px; 
	font-weight: bold; 
	color: rgba(22, 110, 4, 0.664) !important; }

.card .overlay p {
  font-size: 20px;
  line-height: 1.4em;
}

#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; 
  overflow: hidden;
  pointer-events: none;
}


#videoFondo, #imagenFondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

            
			
			#videoFondo {
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				object-fit: cover;
				z-index: -1; 
			}

			
			#imagenFondo {
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				object-fit: cover;
				opacity: 0;
				transition: opacity 2s ease-in;
				z-index: -1; 
			}

			#imagenFondo.visible {
				opacity: 1;
			}


      .videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 100px 100px;
  justify-items: center;
  margin: 0 auto;
  max-width: 800px;
}

.videos iframe {
  width: 100%;
  max-width: 350px;
  height: 200px;
} 
@media (max-width: 700px) {
  .container {
    grid-template-columns: 1fr; /* solo una columna */
    gap: 25px; /* menos espacio entre tarjetas */
  }
}

#main {
  max-width: 1450px;   /* ancho máximo */
  margin: 0 auto;      /* lo centra */
  background: rgba(255, 255, 255, 0.486); /* opcional: blanco semitransparente */
  padding: 20px;
  border-radius: 10px; /* esquinas suaves */
}

 /* --- SOLO para el menú desplegable --- */
   #submenu-parent {
  position: relative; /* el submenú se posiciona en relación a este li */
}

#submenu-parent .submenu {
  display: none;
  position: absolute;
  top: 100%;   /* justo debajo del padre */
  left: 0;
  background: rgba(255, 255, 255, 0.767); /* con transparencia para que veas el fondo */
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 180px;
  z-index: 999; /* que quede encima */
}

#submenu-parent .submenu li a {
  display: block;
  padding: 10px;
  width: 100%;
  color: #000000d8;
}

#submenu-parent .submenu li a:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border-radius: 8px;
}

/* Mostrar submenu al pasar el mouse */
#submenu-parent:hover .submenu {
  display: block;
}

 .juegos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 100px 100px;
  justify-items: center;
  margin: 0 auto;
  max-width: 800px;
}

@media (max-width: 768px) {
  .juegos {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .thumb-container {
    width: 90%;
    height: auto;
  }

  .thumb-container img {
    width: 100%;
    height: auto;
  }

  .btn {
    width: 90%;
    font-size: 1rem;
    padding: 12px;
  }
}


.thumb-container {
  position: relative;
  width: 300px;
  height: 250px;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

.thumb-container img,
.thumb-container video {
  width: 300px;
  height: 250px;
  object-fit: cover;
  transition: opacity .3s ease;
  border-radius: 10px;
}


.juegos img {
  width: 100%;
  max-width: 350px;
  height: 200px;
  object-fit: cover; /* llena el espacio sin deformarse */
  border-radius: 10px;
}

@media (max-width: 700px) {
  .container {
    grid-template-columns: 1fr; /* solo una columna */
    gap: 25px; /* menos espacio entre tarjetas */
  }
}

 .btn {
   display: flex;             
  align-items: center;  
  justify-content: center;
    background-color: #ffffff; /* Blanco */
    color: #ffffff !important; /* Letras gris oscuro */
    padding: 12px 28px;
    border: 2px solid #ffffff; /* Borde visible */
    border-radius: 12px; /* Redondeado */
    font-family: 'Arial', sans-serif; /* Cambia la fuente */
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .btn:hover {
    background-color: #ffffff42 !important; /* Fondo gris oscuro al pasar el mouse */
    color: #ffffff; /* Letras blancas */
    transform: scale(1.05); /* Efecto de agrandamiento */
  }

  .btn:active {
    transform: scale(0.98); /* Efecto de presionado */
  }

  .juegos img.thumb {
     object-fit: cover; 
     cursor: pointer; 
     margin: 5px; 
     border-radius:8px;
}

/* Modal */
.modal-backdrop {
    position: fixed; inset:0; display:none;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5); z-index: 999;
}
.modal {
    background:#9ee29b;
     padding: 1rem; 
     border-radius:10px; 
     width:330px; 
     box-shadow:0 10px 25px rgba(255, 255, 255, 0.25);
}

.modal label { 
  display:block; 
  margin-top:.5rem; 
}

.modal input {
   width:100%; 
   padding:.5rem; 
   margin-top:.25rem; 
   border-radius:5px; 
   border:1px solid #ddd; 
  }

.actions { 
  display:flex; 
  justify-content:flex-end; 
  gap:.5rem; 
  margin-top:1rem;
 }

.btn-primary {
   background:#0069ff; 
   color:#fff; 
   border:none; 
   padding:.5rem .75rem;
    border-radius:5px; 
    cursor:pointer; 
  }

.btn-ghost { 
  background:transparent; 
  border:1px solid #ccc; 
  padding:.5rem .75rem;  /* ancho acorde al texto */
  border-radius:3px; 
  cursor:pointer; 
  max-width: 100%;       /* no se saldrá del modal */
  box-sizing: border-box;
}


.error 
{ color:#b00020; 
  font-size:.85rem; 
  margin-top:.5rem; 
  display:none; 
}



#modalResultados {
  display:none;
  position:fixed;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.6);
  justify-content:center;
  align-items:center;
  z-index:1000;
}

#modalResultados .modal {
  background:rgba(50, 175, 25, 0.466);
  padding:25px;
  border-radius:15px;
  box-shadow:0 0 15px rgba(0,0,0,0.3);
  overflow-y:auto;
  max-height:80%;
}
#tablaResultados th, #tablaResultados td {
  padding:8px;
  border:1px solid #ddd;
}
#tablaResultados tr:nth-child(even) {
  background:#db0000;
}


#tablaResultados tbody td {
  color: #ffffff; /* cambia este valor por el color que prefieras */
}


/* ======== MODALES RESPONSIVOS ======== */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  padding: 15px;
  z-index: 9999;
}

.modal {
  width: 100%;
  max-width: 400px;
  background: #9ee29b;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  overflow-y: auto;
  max-height: 90vh; /* Evita que se corte en celulares */
}

.modal h3 {
  text-align: center;
  margin-bottom: 10px;
}

/* ----- Modal de Resultados grande ----- */
#modalResultados .modal {
  width: 95%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
}

#buscarUsuario::placeholder {
  color: #3f0606 !important; /* Cambia el color */
  opacity: 1;
}

/* Tabla responsive */
#tablaResultados {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
#tablaResultados th {
  background: #c5c5c5;
  color: white;
  position: sticky;
  top: 0;
}
#tablaResultados td, #tablaResultados th {
  padding: 8px;
  border: 1px solid #ddd;
}
#tablaResultados tr:nth-child(even) {
  background: #f2f2f2;
}

/* Scroll horizontal si la tabla se pasa del ancho */
#tablaResultados {
  display: block;
  overflow-x: auto;
}

/* ----- Entrada y botón de búsqueda ----- */
#buscarUsuario {
  width: 70%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

#btnBuscarUsuario {
  padding: 8px 15px;
  border-radius: 8px;
}
#buscarUsuario {
    width: 70%;
    padding: 10px;
    font-size: 16px;
    color: #ffffff !important; /* ← ESTE CAMBIA el texto que escribes */
    background: rgba(255,255,255,0.9);
    border: 2px solid #fff;
    border-radius: 12px;
    outline: none;
}

/* ----- Acciones dentro de modales ----- */
.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}



@keyframes modalShow {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal {
  animation: modalShow 0.25s ease;
}



.subir-bajar {
  display: inline-block;
  animation: subirBajar 2s ease-in-out infinite;
}

@keyframes subirBajar {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}



.carousel-3d {
  perspective: 1000px;
  width: 100%;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.carousel-3d-track {
  position: relative;
  width: 250px;
  height: 150px;
  transform-style: preserve-3d;
  animation: spin 18s linear infinite;
}

@keyframes spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(-360deg); }
}

.thumb-container {
  position: absolute;
  width: 250px;
  height: 150px;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s;
}

.thumb-container img,
.thumb-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-container video {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s;
}

.thumb-container:hover video {
  opacity: 1;
}

.thumb-container:hover {
  transform: scale(1.1);
  z-index: 10;
}



#botonFlecha {
  display: none;
  position: fixed;
  top: 5px;      
  left: 1px;      
  font-size: 15px;
  padding: 1px 10px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 30%;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(0,0,0,0.3);
  z-index: 1000;
}

@media (max-width: 735px) {
  #botonFlecha {
    display: block;
  }
}

#botonFlecha:hover {
  background-color: green;
}


strong.yo{
  color: #00ffea !important;
}

.link {
  all: unset;          
  display: inline-block;
  cursor: pointer;
}

.botones {
  display: flex;
  gap: 15px;       
  justify-content: center; 
}



