#capitulosOcultos {
  display: none;         /* inicialmente no se ve */
  opacity: 0;            /* transparencia total */
  transition: opacity 0.5s ease; /* medio segundo de transición */
}

body {
    margin: 0;
    padding: 0;
    /*background-color: #1e1e1e;*/
    user-select: none;
  }

  /* Navbar */
  .navbar {
    position: fixed;
    top: -82px;
    width: 100%;
    transition: top 0.3s ease;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .navbar.visible {
    top: 0;
  }

  .navbar-brand img {
    height: 40px;
    object-fit: contain;
  }

  .navbar-nav .nav-link {
    color: #dc3545 !important;
    font-weight: 500;
    transition: color 0.3s ease;
  }

  .navbar-nav .nav-link:hover {
    color: #c82333 !important;
  }

  .members-label {
    color: #6c757d;
    margin-right: 5px;
  }

  .members-count {
    color: #dc3545;
    font-weight: bold;
  }

  /* Contenedor principal del visualizador */
  .manga-viewer {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #000;
    position: relative;
    padding-bottom: 43px;
    overflow: hidden;
  }

  /* Contenedor de las páginas con efecto de fade */
  .manga-pages {
    display: flex;
    gap: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    transform-origin: center center;
    transition: transform 0.2s ease, opacity 0.3s ease;
  }

  .manga-pages img {
    /*width: 50%;*/
    height: auto;
    max-height: 92vh;
    object-fit: contain;
    /*user-drag: none;*/
    -webkit-user-drag: none;
    pointer-events: none;
  }

  .manga-pages img:first-child {
    /*margin-right: -4px;*/
    object-position: right;
  }

  .manga-pages img:last-child {
    /*margin-left: 4px;*/
    object-position: left;
  }

  /* Controles de zoom (parte superior) */
  .zoom-options {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0px;
    border-radius: 10px;
    z-index: 300;
  }

  .zoom-options button {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .zoom-options button:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  /* Flechas de navegación laterales */
  .page-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 300;
  }

  .page-arrows .arrow {
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.5rem;
  }

  .page-arrows .arrow:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  /* Controles inferiores (opcional) */
  .controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px;
    z-index: 100;
  }

  .controls button {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .controls button:hover {
    background-color: #666;
  }

  /* Secciones adicionales */
  .content-section {
    padding: 50px 20px;
    background-color: #2e2e2e;
    margin: 20px;
    border-radius: 10px;
  }

  /* FOOTER */
  footer.bg-dark {
    color: #fff;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  }

  footer a.text-white {
    transition: color 0.3s ease;
  }

  footer a.text-white:hover {
    color: #dc3545 !important;
  }

  /* Responsive: en móvil mostramos 1 página */
  @media (max-width: 768px) {
    .manga-pages img {
      width: 100%;
    }

    @media (max-width: 768px) {
      .zoom-options button {
        padding: 15px;
        font-size: 1.2rem;
      }
    }

    /* Opcional: ocultar el segundo elemento si se usa CSS */
    /* .manga-pages img:last-child {
      display: none;
    } */
  }


  
  .vr {
    background-color: rgb(0, 0, 0) !important;
  }

  /* Estilos para el visor Webtoon (vertical) */
  .webtoon-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .webtoon-page {
    width: 100%;
    display: block;
    margin-bottom: 10px;
  }

  /* Estilos para el bloque del anunciante */
  .advertiser-block {
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
  }

  /* Estilos para el visor tradicional */
  .manga-viewer {
    position: relative;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
  }

  .manga-pages {
    /* Se definen contenedores vacíos para ser actualizados dinámicamente */
    overflow: hidden;
  }
  /* Los contenedores para cada página ocuparán el 50% del ancho */
  .manga-pages > div {
    /*width: 50%;*/
    display: inline-block;
    vertical-align: top;
  }

  .manga-pages img {
    max-width: 100%;
    height: auto;
  }

  .zoom-options {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
  }

  .zoom-options button {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .zoom-options button:hover {
    background-color: rgba(0, 0, 0, 0.7);
  }

  .page-arrows {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
  }

  .page-arrows .arrow {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .page-arrows .arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
  }

  .stat-item {
    font-size: 1.1rem;
    color: #555;
  }

  .content-section {
    transition: all 0.3s ease;
  }

  .content-section:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  }

  .btn-lg {
    padding: 0.5rem 1.5rem;
  }



  @media (max-width: 768px) {
    .chapter-card img {
      height: auto !important;
      max-height: none;
    }
  }
  .chapter-card img {
    aspect-ratio: 5 / 3;
    object-fit: cover;
  }
  .page-arrows {
    position: fixed;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1000;
  }
  .page-arrows button.arrow {
    pointer-events: all;
    position: absolute;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    font-size: 1.5rem;
  }
  .page-arrows button.arrow.left {
    left: 10px;
  }
  .page-arrows button.arrow.right {
    right: 10px;
  }
  .page-arrows.hidden { display: none; }
  

  /* Contenedor del lector con fondo oscuro */
.manga-viewer {
  background-color: #000; /* Fondo oscuro en el lector */
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Flechas siempre visibles, fijadas en los extremos, centradas verticalmente */
.page-arrows {
  position: fixed;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;  /* Permite click en otros elementos debajo */
  z-index: 1000;
}
.page-arrows button.arrow {
  pointer-events: all;   /* Los botones son clickeables */
  position: absolute;
  background: rgba(0, 0, 0, 0.7);  /* Fondo oscuro semi-transparente para los botones */
  border: none;
  color: #fff;
  padding: 10px;
  border-radius: 50%;
  font-size: 1.5rem;
}
.page-arrows button.arrow.left {
  left: 10px;
}
.page-arrows button.arrow.right {
  right: 10px;
}
