/* ===================== */
/* SCROLL */
/* ===================== */
html {
  scroll-behavior: auto;
}

/* ANCLA INICIO */
#inicio {
  scroll-margin-top: 90px;
}

/* ===================== */
/* BODY */
/* ===================== */
body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Segoe UI", "Poppins", Arial, sans-serif;
  color: white;
  background: linear-gradient(
    135deg,
    #1a0a2e 0%,
    #2d1050 40%,
    #1e0a35 70%,
    #3d1060 100%
  );
  background-attachment: fixed;
}

/* =====================
OVERLAY NETFLIX
===================== */
.card {
  position: relative;
  cursor: pointer;
}

.card-img {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.card-img img {
  width: 100%;
  display: block;
  transition: transform 0.3s;
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  opacity: 0;
  transition: 0.3s;
  overflow-y: auto;
}

@media (hover: hover) {
  .card:hover .overlay {
    opacity: 1;
  }
  .card:hover img {
    transform: scale(1.05);
  }
}

/* MOBILE: mostrar sinopsis al hacer click */
.card.active .overlay {
  opacity: 1;
}

.card.active {
  transform: scale(1.05);
}

.genero {
  font-size: 11px;
  color: #ffcc70;
  margin-top: 4px;
}

.sinopsis {
  font-size: 11px;
  margin-top: 0px;
}

/* ===================== */
/* HEADER */
/* ===================== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(15, 10, 30, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* HAMBURGUESA */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: white;
}

/* LOGO */
.logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 10px #ff4fd8) drop-shadow(0 0 20px #8f5cff);
}

/* ===================== */
/* MENÚ */
/* ===================== */
.nav {
  display: flex;
  gap: 25px;
}

.nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  position: relative;
  opacity: 0.85;
  transition: all 0.3s ease;
}

.nav a:hover {
  color: #ff4fd8;
  opacity: 1;
  text-shadow: 0 0 8px #ff4fd8;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: linear-gradient(
    135deg,
    #2d1040 0%,
    #4a1060 40%,
    #2d1040 70%,
    #5a1570 100%
  );
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* ===================== */
/* BUSCADOR */
/* ===================== */
.search-box {
  display: flex;
  gap: 5px;
}

.search-box input {
  padding: 8px 12px;
  border-radius: 20px;
  border: none;
  background: #1e2233;
  color: white;
  width: 160px;
}

.search-box button {
  border: none;
  background: #ff4fd8;
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

/* ===================== */
/* HERO / REPRODUCTOR */
/* ===================== */
.hero {
  width: 95%;
  max-width: 1080px;
  margin: 15px auto;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 79, 216, 0.25);
  position: relative;
  scroll-margin-top: 90px;
  aspect-ratio: 16 / 9;
  background: url("https://i.postimg.cc/sXPW0mk2/GAP-8.png") no-repeat
    center/cover;
}

#player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===================== */
/* TIKTOK PLAYER         */
/* ===================== */
#tiktok-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
  overflow: hidden;
}

#tiktok-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.hero.tiktok-active {
  aspect-ratio: 9 / 16;
  max-width: 340px;
}

#shorts-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
  overflow: hidden;
}

#shorts-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.hero.short-active {
  aspect-ratio: 9 / 16;
  max-width: 340px;
}

@media (max-width: 700px) {
  .hero.short-active {
    aspect-ratio: unset;
    max-width: 100%;
    height: 60vh;
    margin: 0;
    border-radius: 0;
    border: none;
  }

  .hero.short-active ~ .player-controls {
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 10px;
  }

  .hero.short-active ~ .player-controls button {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* ===================== */
/* SECCIONES */
/* ===================== */
.section {
  padding: 15px;
  scroll-margin-top: 90px;
}

.subtitulo {
  margin-top: -10px;
  margin-bottom: 10px;
  color: #ccc;
  font-size: 14px;
  opacity: 0.8;
}

/* ===================== */
/* GRID */
/* ===================== */
.row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
  scroll-margin-top: 100px;
}

/* ===================== */
/* CARDS */
/* ===================== */
.card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.card .titulo {
  margin-top: 6px;
  font-size: 13px;
  text-align: center;
  color: #ccc;
}

/* ===================== */
/* PAGINACIÓN */
/* ===================== */
/* ===================== */
/* PAGINACIÓN */
/* ===================== */
.pagination-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.pagination-wrapper::-webkit-scrollbar {
  display: none;
}

.pagination {
  margin-top: 15px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
  padding: 6px 10px;
  min-width: max-content;
}

.pagination button {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  background: #ff4fd8;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
}

.pagination button.active {
  background: #ff77d6;
  outline: 2px solid white;
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */
@media (max-width: 900px) {
  .row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 700px) {
  .header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .menu-toggle {
    display: block;
    justify-self: start;
  }

  .logo-container {
    justify-self: center;
  }

  .search-box {
    justify-self: end;
  }

  .nav {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(15, 10, 30, 0.95);
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    display: none;
  }

  .nav.active {
    display: flex;
  }

  .logo {
    width: 120px;
  }

  .search-box input {
    width: 90px;
  }

  /* REPRODUCTOR FULL EN CELULAR */
  .hero {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 600px) {
  .row {
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
  }

  .section {
    padding: 15px 10px;
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  .sinopsis {
    font-size: 8px;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card.active .sinopsis {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}

/* ===================== */
/* FOOTER */
/* ===================== */
.footer {
  background: rgba(10, 5, 25, 0.95);
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 0 40px;
}

.footer-brand img {
  width: 140px;
  margin-bottom: 10px;
}

.footer-brand p {
  color: #aaa;
  font-size: 13px;
}

.footer-links h4,
.footer-legal h4,
.footer-contact h4 {
  margin-bottom: 10px;
  font-size: 14px;
  color: #fff;
}

.footer-links a {
  display: block;
  color: #aaa;
  text-decoration: none;
  margin-bottom: 6px;
  font-size: 13px;
}

.footer-links a:hover {
  color: #ff4fd8;
}

.footer-legal p {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -10px;
}

.footer-contact h4 {
  margin-top: 0;
  margin-bottom: 0;
}

.footer-contact p {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 10px;
}

.donate-btn {
  display: inline-block;
  padding: 10px 15px;
  background: linear-gradient(135deg, #ff4fd8, #8f5cff);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e2233;
}

.footer-socials img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-bottom {
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 12px;
  color: #777;
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand img {
    margin: auto;
  }

  .footer-socials {
    justify-content: center;
  }
}

/* ===================== */
/* CONTROLES REPRODUCTOR */
/* ===================== */
.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 18px 0 0px;
  font-family: "Poppins", sans-serif;
}

.player-controls button {
  background: #ff4fd8;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-controls button:hover {
  background: #ff4fd8;
  transform: none;
}

.player-controls button:active {
  background: rgba(255, 79, 216, 0.6) !important;
  transform: none;
}

.player-controls button:focus {
  background: #ff4fd8;
  outline: none;
}

#episodio-info {
  color: #fff;
  font-size: 13px;
  opacity: 0.8;
  letter-spacing: 1px;
  text-align: center;
}

/* BOTÓN VER SERIE */
.btn-ver {
  margin-top: 6px;
  padding: 4px 10px;
  background: #ff4fd8;
  color: white;
  border: none;
  border-radius: 18px;
  font-size: 9px;
  cursor: pointer;
  align-self: center;
  transition: background 0.2s ease;
}

.btn-ver:hover {
  background: #ffaaee;
  color: #1a0a2e;
}

/* ===================== */
/* COMUNIDAD - GRID      */
/* ===================== */
#comunidad-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.com-card {
  display: flex;
  flex-direction: column;
  background: rgba(26, 21, 64, 0.7);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 79, 216, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.com-card:hover {
  transform: scale(1.03);
  border-color: rgba(255, 79, 216, 0.45);
}

.com-thumb {
  width: 100%;
  height: 120px;
  position: relative;
  overflow: hidden;
}

.com-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.com-card:hover .com-thumb img {
  transform: scale(1.05);
}

.com-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  background: rgba(255, 79, 216, 0.75);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: white;
  pointer-events: none;
}

.com-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.com-titulo {
  font-size: 12px;
  font-weight: 600;
  color: #e8e0ff;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.com-canal {
  font-size: 11px;
  color: #ff4fd8;
  opacity: 0.9;
}

@media (max-width: 700px) {
  #comunidad-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  #comunidad-container {
    grid-template-columns: 1fr;
  }
}

/* 👇 PEGÁ ACÁ */
#osts-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
#osts-container .com-thumb {
  height: 160px;
}
@media (max-width: 700px) {
  #osts-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
#microficcion-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 700px) {
  #microficcion-container {
    grid-template-columns: repeat(4, 1fr);
  }
}
#microficcion-container .com-thumb {
  height: 90px;
}
/* ===================== */
/* NOTICIAS GL - GRID    */
/* ===================== */
#noticias-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  justify-content: center;
}

.noticia-card {
  display: flex;
  flex-direction: column;
  background: rgba(26, 21, 64, 0.7);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 79, 216, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.noticia-card:hover {
  transform: scale(1.03);
  border-color: rgba(255, 79, 216, 0.45);
}

.noticia-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.noticia-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.noticia-card:hover .noticia-img img {
  transform: scale(1.05);
}

.noticia-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.noticia-fecha {
  font-size: 11px;
  color: #ff4fd8;
  font-weight: 600;
}

.noticia-titulo {
  font-size: 13px;
  font-weight: 700;
  color: #e8e0ff;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-texto {
  font-size: 11px;
  color: #bbb;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  #noticias-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #noticias-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

#ships-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  justify-content: center;
}

@media (max-width: 900px) {
  #ships-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #ships-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

#ships-container .noticia-img {
  aspect-ratio: 2/1;
  position: relative;
}

#ships-container .noticia-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 10, 30, 0.6) 0%,
    transparent 65%
  );
  pointer-events: none;
}
/* ===================== */
/* MODAL NOTICIAS        */
/* ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: rgba(20, 15, 50, 0.98);
  border: 1px solid rgba(255, 79, 216, 0.3);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  text-align: left;
}

.modal-cerrar {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #ff4fd8;
  font-size: 22px;
  cursor: pointer;
}

.modal-img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 14px;
  object-fit: cover;
  max-height: 220px;
}

.modal-fecha {
  font-size: 12px;
  color: #ff4fd8;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-titulo {
  font-size: 18px;
  font-weight: 700;
  color: #e8e0ff;
  margin-bottom: 12px;
  line-height: 1.4;
}

.modal-texto {
  font-size: 13px;
  color: #ccc;
  line-height: 1.8;
  white-space: pre-line;
  text-align: justify;
  hyphens: auto;
  word-spacing: -1px;
}
/* ===================== */
/* BANNER TOP            */
/* ===================== */
.banner-top {
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  margin-bottom: 12px;
}

.banner-top img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

@media (max-width: 600px) {
  #series-container.row {
    grid-template-columns: repeat(3, 1fr);
  }
}

#btn-arriba {
  position: fixed;
  bottom: 30px;
  right: 20px;
  background: linear-gradient(135deg, #ff4fd8, #8f5cff);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 18px;
  cursor: pointer;
  z-index: 999;
}

.modal-subir {
  position: sticky;
  bottom: 10px;
  left: 100%;
  background: linear-gradient(135deg, #ff4fd8, #8f5cff);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 12px;
  cursor: pointer;
  display: block;
  margin-left: auto;
  z-index: 999;
}

.footer-links-item {
  display: block;
  color: #aaa;
  text-decoration: none;
  margin-bottom: 6px;
  font-size: 13px;
}

.footer-links-item:hover {
  color: #ff4fd8;
}

/* OCULTAR SHIPS DE PÁGINA PRINCIPAL */
#shipsgl {
  display: none;
  padding: 0;
  margin: 0;
}

.info-contenido {
  max-width: 800px;
  margin: 10px auto 10px;
  padding: 0 20px;
  text-align: center;
  display: none;
}

.info-contenido.active {
  display: block;
}

.info-contenido h3 {
  color: #ff4fd8;
  font-size: 18px;
  margin: 0 0 6px;
}

.info-contenido .info-genero {
  color: #c4aeff;
  font-size: 13px;
  margin: 0 0 10px;
}

.info-contenido .info-sinopsis {
  color: #ccc;
  font-size: 14px;
  line-height: 1.7;
}
