/* Reset y base */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
  background: #121212;
  color: #eee;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.menu-overlay.active {
  display: block;
}

/* Contenedor principal */
#main-content {
  max-width: 1280px;
  margin: 0 320px; /* espacio para ads laterales */
  padding: 0 1rem 3rem;
  display: none; /* oculto por defecto hasta que se confirme edad */
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 250px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  margin-top: 10px;
  gap: 20px;
  position: relative; /* necesario para posicionamiento absoluto de hijos */
}

/* Contenedor del logo */
#header-logo {
  flex: 0 0 auto; /* ocupa solo lo que necesite */
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Estilo para la imagen del logo */
#header-logo img {
  height: auto;
  width: 180px; /* Aumentamos el tamaño del logo */
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 20px;;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

#header-title img:hover {
  transform: scale(1.1);
}

/* Anuncios */
#ad-top {
  flex: 1 1 auto; /* ocupa espacio restante */
  height: 250px;
  margin: 0;
  display: block;
}

.ad-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Anuncio arriba a la derecha */
.ad-top-right {
  position: absolute;
  top: 50px;
  right: 250px; /* para mover a la derecha */
  width: 125px;
  height: 125px;
}

.ad-desktop {
  display: block;
}

.ad-top-mobile {
  display: none;
}

.ad-bottom {
  display: block;
  position: relative;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 10px auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-bottom:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px 4px #E4B55B; /* cambia #FF6600 por el color deseado */
}

.ad-bottom img {
  width: 100%;
  height: auto;
  display: block;
}

#ad-left {
  position: absolute;
  top: 80px;
  left: 20px;
  width: 160px;
  height: 600px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

#ad-left ins {
  width: 160px;
  height: 600px;
}

#ad-right {
  position: absolute;
  top: 80px;
  right: 20px;
  width: 160px;
  height: 600px;
  background: #111;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

#ad-right ins {
  display: block;
  width: 160px;
  height: 600px;
}

#ad-cam {
  position: fixed;
  top:5px;
  right: 200px;
  width: 530px;        /* más ancho para cam */
  height: 300px;       /* altura adecuada para video */
  background: #111;
  z-index: 1000;
  overflow: hidden;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
}

#ad-cam iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


.nav-link:hover,
.nav-link:focus {
  color: #E4B55B;
  border-color: #E4B55B;
  outline: none;
}

/* Filters section */
#filters-section {
  display: block;
  margin-top: 20px;
  visibility: visible;
  max-height: 300px;
}

.menu-toggle {
  display: none;
}

.main-menu {
  display: flex;
  justify-content: center;
  margin-right: 30px;
}


/* age-gate */
#age-gate {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #121212;
  color: #eee;
  text-align: center;
  gap: 1rem;
  z-index: 1100;
}

#age-gate.hidden, #age-gate[style*="display: none"] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#age-gate button {
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

#btn-over-18 {
  background-color: #28a745;
  color: white;
}
#btn-under-18 {
  background-color: #dc3545;
  color: white;
}

/* filters-wrapper*/
.filters-wrapper {
  display: flex; 
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 0 1rem;
  margin: 0 auto;
  width: 100%;
  max-width: 960px;
  box-sizing: border-box;
}

#filters-form {
  display: flex;
  margin-top: auto;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  background: #181818;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.85);
  max-width: 960px;
  width: 100%;
  max-height: fit-content;
  overflow: visible;
  box-sizing: border-box;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

#filters-form label {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ccc;
  font-size: 0.95rem;
}

#filters-form select {
  background: #222;
  border: none;
  border-radius: 8px;
  color: #eee;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.7);
}

#filters-form select:focus {
  outline: 2px solid #E4B55B;
  background: #333;
}

#filters-form button[type="submit"]:hover,
#filters-form button[type="submit"]:focus {
  background: #E4B55B;
  outline: none;
  box-shadow: 0 5px 15px #E4B55B;
}

/* filters-category */

#top-categories-label {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #E4B55B;
    margin-bottom: 0.5rem;
  }
  
.filters-category {
  padding: 0.75rem 0;
  margin: 1rem auto 2rem auto;
  max-width: 800px;
  max-height: 100%;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  box-sizing: border-box;
}

/* Scrollbar Webkit */
.filters-category::-webkit-scrollbar {
  height: 6px;
}

.filters-category::-webkit-scrollbar-track {
  background: transparent;
}

.filter-btn {
  background: #222;
  border: none;
  border-radius: 30px;
  padding: 0.45rem 1.5rem;
  font-weight: 700;
  color: #aaa;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  user-select: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  text-align: center;
  white-space: nowrap;
  flex: 0 1 auto;
  max-width: 100%;
}

.filter-btn:hover,
.filter-btn:focus {
  background: #E4B55B;
  color: #111;
  outline: none;
}

.filter-btn.active {
  background: #E4B55B;
  color: #111;
  outline: none;
}


#show-more-categories {
  flex: 0 0 auto;
  white-space: nowrap;
  cursor: pointer;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
  border-radius: 24px;
  background: #E4B55B;
  color: #111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* search-wrapper */
.search-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem; /* Reduce margen superior */
}

#search-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  max-width: 400px;
}

#category-name {
  margin-top: 10px; 
  padding: 10px;
  text-align: center;
  font-size: 1rem;
}

#search-input {
  flex-grow: 1;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  background: #222;
  color: #eee;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.7);
}

#search-input::placeholder {
  color: #666;
}

#search-input:focus {
  outline: 2px solid #E4B55B;
  background: #333;
}

#search-form button {
  background: #E4B55B;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#search-form button:hover,
#search-form button:focus {
  background: #E4B55B;
  outline: none;
}

/* filters-section */
.filters-section {
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 1rem;
  margin: 0 auto;
}


/* video-list */
.videos-list {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.videos-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Video item */
.video-item {
  background: #1e1e1e;
  box-shadow: 0 5px 20px rgba(0,0,0,0.85);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  text-decoration: none;
}

.video-item:focus,
.video-item:hover {
  box-shadow: 0 12px 30px #E4B55B;
  transform: translateY(-6px);
  outline: none;
}

/* Thumbnail 16:9 */
.thumbnail-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.thumbnail-wrapper img.thumbnail {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}

/* Duration */
.duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.75);
  color: #eee;
  padding: 3px 8px;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 5px;
  user-select: none;
}

/* Title */
.video-title {
  padding: 1rem 1.25rem 1.25rem;
  font-weight: 400;
  font-size: 15px;
  color: #eee;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  min-height: 56px;
}

.video-item a {
  text-decoration: none !important;
  color: inherit !important;
}

/* Footer */
footer {
  background: #181818;
  color: #666;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  user-select: none;
  border-top: 2px solid #E4B55B;
  margin-top: 3rem;
  letter-spacing: 0.02em;
}

/* Modal close button */
.close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(0,0,0,0.6);
  color: #eee;
  font-size: 2.8rem;
  font-weight: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  line-height: 42px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  z-index: 10001;
}

.close-btn:hover,
.close-btn:focus {
  background: #E4B55B;
  color: #111;
  outline: none;
}

/* Modal */
#player-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10000;
}

#player-modal.active {
  display: flex;
  opacity: 1;
}

#player-modal iframe {
  width: 80vw;
  height: 45vw;
  max-width: 960px;
  max-height: 540px;
  border: none;
  border-radius: 14px;
}

/* Navegación botones */
#pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  flex-wrap: nowrap;

}

.page-btn {
  background: linear-gradient(145deg,#E4B55B, #d87c00);
  border: none;
  color: #111;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
  user-select: none;
  min-width: 48px;
  text-align: center;
}

.page-btn:hover:not(:disabled),
.page-btn:focus:not(:disabled) {
  background: linear-gradient(145deg, #E4B55B, #b26900);
  box-shadow: 0 8px 20px rgba(216,124,0,0.8);
  outline: none;
  transform: scale(1.05);
}

.page-btn:disabled {
  background: #E4B55B;
  cursor: default;
  box-shadow: none;
  color: #444;
}

/* Estado activo visible con estilo 'pulsado' */
.page-btn.active {
  background: linear-gradient(145deg, #E4B55B, #945b00);
  color: #222;
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.6);
  transform: scale(0.95);
  cursor: default;
  pointer-events: none;
  font-weight: 800;
  user-select: none;
}

/* Ajustes globales responsivos */
@media (max-width: 768px) {
  html, body {
    font-size: 14px;
    line-height: 1.4;
  }
  
  #main-content {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 1rem;
}

  .main-menu {
    margin-right: 0;
    justify-content: center;
    padding: 0 10px;
  }

  /*Age-gate*/
  #age-gate {
    padding: 1rem;
    gap: 0.5rem;
  }
  #age-gate h1 {
    font-size: 1.5rem;
  }
  #age-gate p {
    font-size: 1rem;
  }
  #age-gate button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  #main-menu.active {
    display: block;
    position: relative;
    z-index: 1002;
  }

  /* Header*/
   header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
  }

  #header-title img {
  width: 220px;
  height: auto;
  }

   #header-logo {
    width: 100%;
    height: auto;
  }

  #header-logo img {
    width: 120px;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  #menu-overlay {
    display: none;
  }
 
  #menu-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  #filters-section {
    display: none;
  }

  #filters-section.active {
    display: block;
    position: relative;
    z-index: 1002;
  }

.menu-toggle {
    position: static; /* elimina el absolute */
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 5px;
    background: transparent;
    border: none;
    color: #E4B55B;
    z-index: 1001;
  }

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #E4B55B;
  border-radius: 2px;
  transition: all 0.3s ease;
}

  /* Desplegable */
  /* Evita que affiliate-dropdown empuje el botón */
  .affiliate-dropdown-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 70%;
  height: 100vh;
  background: #181818;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 1002;
}

  .affiliate-dropdown-nav.active {
    display: flex;
  }


  #filters-form select {
    text-align: center;
  }

  .dropdown {
    width: auto;
    text-align: center;
  }

  .dropdown-btn {
    width: auto;
    text-align: center;
    padding-left: 0;
  }

  .dropdown-content {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: none;
    border-radius: 0 0 8px 8px;
    min-width: auto;
    background: white;
    z-index: 1200;
  }
  .dropdown-content.show {
  display: flex;
}

  .dropdown-content a {
    padding: 0.8rem 1rem;
    text-align: center;
    display: block;
  }

  /* Filter-Wrapper */
  .filters-wrapper {
    flex-direction: column;
    overflow: visible;
    padding: 0 0.5rem;
    max-width: 100%;
  }

  #filters-form {
    flex-wrap: wrap;
    overflow: visible;
    max-width: 100%;
  }

  .filter-group {
    min-width: 100%;
  }

  #filters-form button[type="submit"] {
    margin-top: 30px;
    margin-bottom: 30px;;

  }

  #search-form {
    flex-direction: column;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
  }

  #search-input {
    height: 2.2rem;     /* más alto para comodidad */
    font-size: 1.1rem;  /* texto legible */
  }

  #search-form button {
  height: 2.2rem;
  padding: 0 1.2rem;  /* ancho cómodo sin exagerar */
  font-size: 1.1rem;
  }

  #top-categories-label {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #E4B55B;
    margin-bottom: 0.5rem;
  }

  /* Filters Category */
  .filters-category {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* o center, según diseño */
  gap: 0.5rem;
  max-width: 100%; /* o 100vw si hace falta */
  overflow: visible !important; /* para evitar recortes */
  padding: 0.5rem 1rem;
}

.filter-btn {
  flex: 1 1 auto; /* crecer y reducir */
  min-width: 100px; /* valor menor para que se ajusten en pantalla pequeña */
  max-width: 100%;
  white-space: normal; /* que el texto pueda partirse */
  padding: 0.5rem 1rem;
  box-sizing: border-box;
}

  #show-more-categories {
    flex: 1 0 auto;
    min-width: 120px;
  }

  /* Videos-list*/
    #video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .video-item {
    width: 100%;
    max-width: 350px;
  }

  /* Botones pagination */
  #pagination {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
  }

  /* Estilo para los botones, flex-basis para que ocupen mínimo espacio */
  .page-btn {
    flex: 0 0 auto;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    min-width: 28px;
    border-radius: 4px;
  }

  .page-btn:disabled {
    background-color: #bbb;
    cursor: default;
  }

  .page-btn[aria-current='page'] {
    background-color: #E4B55B;
    color: #fff;
    cursor: default;
  }

  /* Ocultar scrollbar en Chrome, Edge, Safari */
  #pagination::-webkit-scrollbar {
    height: 6px;
  }

  #pagination::-webkit-scrollbar-track {
    background: transparent;
  }

  #pagination::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 3px;
  }

  footer {
    text-align: center;
    padding: 1rem;
  }

  /* Anuncios */
.ad-top-mobile {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
  }

  .ad-top-mobile ins {
    display: inline-block !important;
    width: 300px !important;
    height: 100px !important;
    margin: 0 auto !important;
  }

  #ad-cam{
    display: none;
  }
  
  .ad-top{
    display: none;
  }

  #ad-left,
  #ad-right{
    display: none;
  }
}
