@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rampart+One&display=swap');

:root {
  --purple-100: #BEA7B9;
  --purple-200: #975F8F;
  --purple-300: #48294E;
  --purple-400: #1F1B3D;
  --purple-500: #161228;
  --text-light: #E8DCE9;
  --text-white: #fff;
  --card-shadow: 0 8px 20px rgba(0,0,0,.35);
  --text-secondary: hsl(0, 0%, 100%);
}

.theme {
  background: linear-gradient(0deg, rgba(48, 5, 48, 1) 0%, rgb(9, 9, 27) 73%) fixed;
  color: var(--text-white);
  font-family: "Noto Sans", sans-serif;
  letter-spacing: 1px;
}

/* --- LOGO FLUIDO --- */
.site-header__brand-logo {
  width: clamp(140px, 40vw, 300px); 
  height: auto;
  max-height: 58px;
  margin-right: 0;
  object-fit: contain;
}

/* --- CARGADOR PDF --- */
#pdfLoader {
  position: absolute;
  inset: 0;
  background: #111;
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 10;
}

.pdf-loader-content {
  text-align: center;
}

.pdf-ad-container {
  width: 300px;
  height: 250px;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-top: 15px;
}

/* --- HEADER Y NAVEGACIÓN --- */
.site-header {
  color: var(--text-white);
  letter-spacing: .5px;
}

.site-header .nav-link {
  color: var(--text-white);
  font-family: "Noto Sans", sans-serif;
  font-size: 20px;
  position: relative;


}

@media (max-width: 990px) {
ul.navbar-nav {
  list-style-type: disc;
}
}


.site-header .navbar-nav {
  display: flex;
  gap: 30px; 
  align-items: center;
}

@media (max-width: 991.98px) {
  .site-header .navbar-nav {
 align-items: flex-start;
 gap: 0px;
  }
}
.site-header .nav-link.active {
  color: var(--text-light);
}

.site-header .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--purple-200);
  transition: width .22s ease;
}

.site-header .nav-link:hover::after,
.site-header .nav-link:focus-visible::after,
.site-header .nav-link.active::after {
  width: 100%;
  background: var(--purple-100);
}




@media (min-width: 991.98px) {
  .discord { display: none; }
   .café { display: none; }
}


 .nav-icon-btn {
      display: inline-flex;
      align-items: center;
      position: relative;
      justify-content: center;
   
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(199, 16, 255, 0.364);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
      font-size: 1rem;
      transition: all var(--transition-fast);
    }

  @media (max-width: 991.98px) {
    .nav-icon-btn {
   display: none;
    }
  }


    .nav-icon-btn:hover {
      background: rgba(135, 2, 224, 0.775);
      border-color: var(--accent-primary);
      color: var(--text-primary);
      transform: translateY(-1px);
    }


/* --- BUSCADOR --- */
.search-wrapper {
  position: relative;
  margin-right: 20px;
}

.site-header__search .form-control {
  background-color: rgba(22,18,40,.6);
  border: 1px solid var(--purple-200);
  color: var(--text-white);
  border-radius: 999px;
  font-size: 16px;
  font-family: "Noto Sans", sans-serif;
}

.search-wrapper .form-control {
  padding-right: 2.5rem; 
}

.site-header__search .form-control::placeholder { color: #cdbbd1; }
.site-header__search .form-control:focus {
  border-color: var(--purple-100);
  box-shadow: 0 0 0 .2rem rgba(151,95,143,.25);
}

.search-wrapper .search-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  color: #65416d; 
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.search-wrapper .search-btn .material-symbols-outlined {
  font-size: 18px;
}

/* --- BOTONES --- */
.btn-theme {
  background: var(--purple-200);
  color: var(--text-light);
  border: none;
  border-radius: 999px;
  color: #2f0a38;
  position: relative;
  z-index: 2;
}

.btn-theme:hover { background: var(--purple-300); }

.btn-theme-outline {
  color: var(--purple-100);
  border-color: var(--purple-200);
}

.btn-theme-outline:hover { 
  color: var(--text-light); 
  background: var(--purple-200); 
}

/* --- CARRUSEL Y HERO --- */
.hero-carousel__title {
  color: var(--text-white);
  font-family: "Noto Sans", sans-serif;
  margin-bottom: 20px;
  font-size: 30px;
  margin-top: 10px;
  letter-spacing: 1px;
}

.hero-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: var(--purple-400);
}

.hero-card__image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  opacity: 0.5;
  transition: opacity .35s ease, transform .35s ease;
}

.hero-card__image.img-hover {
  position: absolute;
  inset: 0;              
  opacity: 0;
  z-index: 1;
  transform: scale(1.03)
}

.hero-card__image.img-main {
  position: relative;
  z-index: 0;
}

.hero-card:hover .img-hover { opacity: 0.5; transform: scale(1); }
.hero-card:hover .img-main { opacity: 0; transform: scale(0.98); }

.hero-card__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(180deg, rgba(22,18,40,0.0) 0%, rgba(22,18,40,0.85) 60%, rgba(22,18,40,0.95) 100%);
}

.hero-card__title {
  font-size: 1.25rem;
  margin: 0 0 6px 0;
  position: relative;
  z-index: 2;
}

.hero-card__desc {
  margin: 0 0 12px 0;
  color: #cdbbd1;
  position: relative;
  z-index: 2;
}

.carousel-control-prev, .carousel-control-next { 
  width: 4rem; 
  opacity: .9;
}

.hero-carousel__row { align-items: stretch; }

/* --- ICONOS Y BOTÓN HAMBURGUESA --- */
.navbar-toggler {
  border-color: #521e8e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  margin-right: 0;
}

.arrow-icon, .arrow-icon2, .menu {
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 44;
  border-radius: 999px;  
}

.arrow-icon {  
  font-size: 44px !important;
  color: #d78ec8;   
  background-color: #6e4167;   
}

.arrow-icon2 {  
  font-size: 34px !important;
  color: #e28cd1;   
  background-color:  rgb(9, 9, 27);   
}

.menu {  
  color: #835eac;  
}

.menu:hover {
  color:#975F8F;
  transition: color .25s ease-in;
}

/* --- TARJETAS DE MANGA --- */
.manga-list__title {
  color: var(--text-white);
  margin-bottom: 25px;
}

.manga-card {
  margin-bottom: 40px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(152,95,143,.08), rgba(22,18,40,.55));
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.manga-card__image { width: 100%; height: 180px; object-fit: cover; }

.manga-card__overlay {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  background: linear-gradient(180deg, rgba(65, 28, 60, 0.85), rgba(22, 18, 50, 0.95));
  color: var(--text-light);
  opacity: 0;
  transition: opacity .25s ease;
}

.manga-card:hover .manga-card__image { opacity: 0; transition: opacity .25s ease; }
.manga-card:hover .manga-card__overlay { opacity: 1; }

.manga-card__body { padding: 12px; }
.manga-card__title { font-size: 1rem; margin: 0 0 8px 0; color: var(--text-light); }
.manga-card__meta .rating { color: var(--purple-100); }

/* --- SLIDER DE CATEGORÍAS --- */
.category-slider__wrapper { 
  overflow: hidden; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}

.category-slider__track {
  display: flex; 
  gap: 24px; 
  overflow-x: auto; 
  scroll-behavior: smooth; 
  padding: 8px 48px; 
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.08);
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  flex: 1;
}

.category-slider__track::-webkit-scrollbar { display: none; }

.category-slider__link {
  color: var(--text-white); 
  text-decoration: none; 
  font-weight: 600; 
  letter-spacing: .5px; 
  position: relative; 
  font-size: 24px;
}

.category-slider__link::after { 
  content:""; 
  position:absolute; 
  left:0; 
  bottom:-6px; 
  height:2px; 
  width:0; 
  background: var(--purple-200); 
  transition: width .22s ease; 
}

.category-slider__link:hover::after, 
.category-slider__link.active::after { 
  width:100%; 
  background: var(--purple-100); 
}

.category-slider__arrow { 
  position: static;
  transform: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
}

/* --- PANEL DESTACADO --- */
.featured-panel {
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(31,27,61,.45), rgba(22,18,40,.75));
  border-radius: 14px;
  padding: 16px;
}

.featured-panel__title { margin: 0; color: var(--text-white); }
.featured-panel__period { color: var(--purple-100); }
.featured-panel__list {
  display: flex;
  flex-direction: column; 
  gap: 12px; 
  margin-top: 12px;
}

.featured-item { 
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none; 
  color: var(--text-light); 
}
      
.featured-item__thumb {
  width: 100px; 
  height: 150px; 
  object-fit: cover;
  border-radius: 8px;
}

.featured-item__body { 
  display: flex; 
  flex-direction: column; 
  position: relative;
  bottom: 40px; 
}

.featured-item__body small { color: var(--purple-100); }

/* --- RANKING CARDS --- */
.rank-card {
  position: relative;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(152,95,143,.08), rgba(22,18,40,.55));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.rank-card__image { width: 100%; height: 220px; object-fit: cover; display: block; }
.rank-card__badge { display: none; }

.rank-card__number {
  position: absolute; 
  top: 8px; 
  left: 8px;
  width: 42px; 
  height: 42px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  border-radius: 999px; 
  background: linear-gradient(180deg, rgba(174, 102, 158, 0.9), rgba(151,95,143,.95));
  color: var(--text-white); 
  font-weight: 900; 
  font-size: 1.25rem;
  border: 2px solid rgba(176, 91, 172, 0.9);
  box-shadow: 0 6px 12px rgba(0,0,0,.35), inset 0 0 0 1px rgba(22,18,40,.35);
  z-index: 2;
  font-family: "Rampart One", sans-serif;
}

.rank-card__body { padding: 12px; }
.rank-card__title { font-size: 1rem; margin: 0 0 6px 0; color: var(--text-light); }
.rank-card__meta { display: none; }

.rank-card__overlay {
  position: absolute;
  inset: 0;
  height: 220px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  text-align: center; 
  padding: 12px;
  background: linear-gradient(180deg, rgba(65,28,60,.85), rgba(22,18,50,.95));
  color: var(--text-light);
  opacity: 0; 
  transition: opacity .25s ease;
}

.rank-card:hover .rank-card__image { opacity: 0; transition: opacity .25s ease; }
.rank-card:hover .rank-card__overlay { opacity: 1; }
.rank-card__cta { margin-top: 8px; }

/* --- PÁGINA DEL LECTOR (HERO Y CAPÍTULOS) --- */
.reader-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.reader-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
}

.reader-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 18, 40, 0.2) 0%, rgba(22, 18, 40, 0.7) 40%, rgba(22, 18, 40, 0.96) 100%);
}

.reader-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding: 24px;
}

.reader-hero__poster {
  width: 160px;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.reader-hero__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 800px;
}

.reader-hero__title { margin: 0; color: var(--text-white); font-size: 1.75rem; }
.reader-hero__desc { margin: 0; color: var(--text-light); }
.reader-hero__tags { display: flex; gap: 8px; flex-wrap: wrap; }

.chapter-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-decoration: none;
  color: var(--text-light);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(31, 27, 61, 0.45), rgba(22, 18, 40, 0.85));
  box-shadow: var(--card-shadow);
}

.chapter-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(31, 27, 61, 0.5), rgba(22, 18, 40, 0.9));
}

.chapter-card__thumb { width: 90px; height: 120px; object-fit: cover; border-radius: 8px; }
.chapter-card__body { display: flex; flex-direction: column; }
.chapter-card__body small { color: var(--purple-100); }

/* --- VISOR PDF (UNIFICADO Y A PANTALLA COMPLETA) --- */
.pdf-reader {
  position: fixed;
  inset: 0;
  background: #080808; /* Fondo general oscuro para todo el modal */
  z-index: 1080;
  overflow: hidden;
  display: none;
}

.pdf-reader.is-open { display: block; }

.pdf-reader__dialog {
  position: absolute;
  inset: 0; /* Sin marcos en ninguna pantalla */
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
}

/* HEADER AUTO-OCULTABLE MODO LECTURA */
.pdf-reader__header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
  transition: transform 0.3s ease-in-out;
  background: linear-gradient(90deg, rgba(151, 95, 143, 0.95), rgba(31, 27, 61, 0.98));
  color: var(--text-white);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pdf-reader__header.is-hidden {
  transform: translateY(-100%);
}

.pdf-reader__controls .btn { padding: 6px 10px; }
.pdf-reader__page { color: var(--text-light); font-weight: 700; font-size: 1.05rem; }
.pdf-reader__center { flex: 1 1 auto; text-align: center; }

/* CONTENEDOR DE LECTURA SCROLL */
.pdf-reader__frame {
  position: absolute !important;
  inset: 0 !important;
  padding: 0 !important;
  padding-top: 60px !important; /* Espacio inicial para la barra */
  background: #080808;
  flex: 1 1 auto;
  overflow: auto;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overflow-anchor: none;
}

/* LISTA DE IMÁGENES */
.pdf-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px; /* Separación pequeña tipo móvil para todas las pantallas */
  padding: 0;
  width: 100%;
}

.pdf-page-placeholder {
  width: 100%;
  /*  NO usar height: auto !important aquí — el JS necesita poder
     asignar una altura estimada para que el scroll funcione antes
     de que carguen las imágenes. Una vez renderizado, el JS mismo
     la pone en "auto". */
  min-height: 100px;
  margin: 0;
  padding: 0;
  position: relative;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-page-placeholder canvas,
.pdf-page-placeholder img {
  width: 100%;
  max-width: 1000px;
  height: auto !important;
  display: block;
  border-radius: 0;
  box-shadow: none;
  margin: 0 auto;
}

/* ── Fade-in suave de páginas renderizadas ──────────────────────────
   El JS inserta el canvas con .pdf-canvas y luego añade .is-loaded
   para disparar la transición. Así el usuario nunca ve fondos negros. */
.pdf-canvas {
  display: block;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pdf-canvas.is-loaded {
  opacity: 1;
}

/* --- FOOTER --- */
.site-footer {
  background: linear-gradient(180deg, rgba(31,27,61,.75), rgba(22,18,40,.95));
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--text-light);
}

.site-footer__chibi { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.site-footer__icon-image { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; position: relative; top: 6px; }
.site-footer__discord { color: var(--purple-100); border-color: var(--purple-200); }
.site-footer__discord:hover { color: var(--text-light); background: var(--purple-200); }
.site-footer__icon { display: inline-flex; align-items: center; margin-right: 8px; }
.site-footer__copy { color: #cdbbd1; }


/* =========================================================================
   MEDIA QUERIES GLOBALES (OPTIMIZADAS Y LIMPIAS)
   ========================================================================= */

/* --- TABLETS EN ADELANTE (md) --- */
@media (min-width: 768px) { 
  .hero-carousel .carousel-indicators { display: none }
  .hero-card__image { height: 280px; } 
  .rank-card__number { width: 46px; height: 46px; font-size: 1.35rem; } 
  .rank-card__image, .rank-card__overlay { height: 240px; } 
  .reader-hero__poster { width: 200px; height: 280px; }
  .reader-hero__title { font-size: 2rem; }
}

/* --- PANTALLAS MENORES A ESCRITORIO (< 992px) --- */
@media (max-width: 991.98px) {
  .pdf-reader__header .container { flex-direction: column; gap: 8px; }
  .pdf-reader__controls { flex-wrap: wrap; justify-content: center; }
  .pdf-reader__controls .btn { min-width: 100px; }
  .pdf-reader__center { order: 2; }
  
  /* Ajuste para mantener el botón hamburguesa firme arriba a la derecha */
  .site-header .navbar {
    position: relative; /* Esto asegura que el botón se ancle aquí */
    padding-top: 10px;
  }

  .navbar-toggler {
    /* CAMBIA 'fixed' POR 'absolute' AQUÍ */
    position: absolute; 
    top: 15px;
    right: 15px;
    z-index: 1080;
  }

  .site-header__nav {
    margin-top: 15px; 
  }
  .menu { font-size: 38px !important; }
  .nav-item { margin-left: 28px; }
}

/* --- DISPOSITIVOS MÓVILES (< 768px) --- */
@media (max-width: 767.98px) {
  .site-header .nav-link { font-size: 16px; }
  .nav-item { margin-left: 28px; }
  
  .hero-carousel .carousel-indicators { bottom: -22px; }
  .hero-carousel { padding-bottom: 2.75rem; }
  .hero-carousel__title, .manga-list__title { font-size: 22px; margin-left: 10px; }
  
  .search-wrapper { margin-left: 15px; margin-right: 15px; }
  .search-wrapper .search-btn { font-size: 16px; }
  
  .category-slider__arrow { display: none; }
  .category-slider__track { padding: 8px 16px; }
  
  .manga-card__overlay { font-size: 12px; }
  .manga-card__overlay h4 { font-size: 16px; margin-bottom: 5px; }
  
  .reader-hero__content { flex-direction: column; align-items: center; text-align: center; padding: 16px; }
  .reader-hero__poster { width: 70%; max-width: 320px; height: auto; aspect-ratio: 2 / 3; }
  .reader-hero__info { align-items: center; }
  .reader-hero__title { font-size: 1.5rem; }
  
  .pdf-reader__controls .btn { min-width: 90px; }
  
   .navbar-toggler {
    /* CAMBIA 'fixed' POR 'absolute' AQUÍ */
    position: absolute; 
    top: 15px;
    right: 15px;
    z-index: 1080;
  }
  
  .site-header__nav {
    margin-top: 15px; 
  }
  
  
}

/* --- MÓVILES PEQUEÑOS (< 400px) --- */
@media (max-width: 400px) {
  .navbar-toggler { padding: 2px 6px; }
  .menu { font-size: 30px !important; }
}



.michi-toast {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    border-left: 5px solid #975F8F;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 1000000 !important; 
    min-width: 280px;
    pointer-events: none; 
    animation: slideIn 0.5s ease forwards;
}

.michi-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.michi-toast-icon { font-size: 20px; }


.michi-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #975F8F;
    animation: progressLine 4s linear forwards;
}

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

@keyframes progressLine {
    from { width: 100%; }
    to { width: 0%; }
}
.anime-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(151, 95, 143, 0.95);
  color: var(--text-white);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.manga-card:hover .anime-card-badge {
  opacity: 0;
}

.anime-card-badge .material-symbols-outlined {
  font-size: 16px;
}

.content-tabs {
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.btn-tab {
  background: transparent;
  color: var(--purple-100);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 14px 40px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 8px 8px 0 0;
  outline: none;
}

.btn-tab:hover {
  color: var(--text-light);
  background: rgba(151, 95, 143, 0.1);
}

.btn-tab:focus, .btn-tab:active {
  outline: none;
  box-shadow: none;
}

.btn-tab.active {
  color: var(--text-white);
  border-bottom: 3px solid var(--purple-200);
  background: linear-gradient(180deg, rgba(151, 95, 143, 0) 0%, rgba(151, 95, 143, 0.15) 100%);
}

#animeReader {
  background-color: #000;
}

#animeHeader {
  background: rgba(22, 18, 40, 0.98);
  border-bottom: 1px solid var(--purple-300);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  padding: 12px 0;
}

#animeTitle {
  font-size: 1.2rem;
  color: var(--text-white);
  font-weight: 700;
  letter-spacing: 0.5px;
}

#animeReader .pdf-reader__frame {
  background: radial-gradient(circle at center, #161228 0%, #000 80%);
  padding: 90px 20px 20px 20px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

#michiVideoPlayer {
  width: 100%;
  max-width: 1280px;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
  background-color: #000;
  outline: none;
}

#michiVideoPlayer::-webkit-media-controls-panel {
  background: linear-gradient(to top, rgba(31, 27, 61, 0.95), rgba(31, 27, 61, 0));
}

.bg-black {
  background-color: #000 !important;
}

@media (max-width: 767.98px) {
  .btn-tab {
    padding: 12px 24px;
    font-size: 1.05rem;
    flex-grow: 1;
  }

  #animeHeader .container {
    flex-direction: column;
    gap: 12px;
  }

  #animeReader .pdf-reader__frame {
    padding: 140px 10px 10px 10px !important;
  }
  
  #michiVideoPlayer {
    max-height: calc(100vh - 160px);
    border-radius: 8px;
  }
}

/* --- CORRECCIÓN DE PANTALLAS DE ESTADO (CARGA Y ERROR) --- */
.anime-status-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #161228 0%, #000 80%);
  z-index: 10;
  padding: 20px;
}

.anime-status-screen .pdf-loader-content {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ajustamos el contenedor del gif para que sea flexible */
.anime-status-screen .pdf-ad-container {
  width: 100%;
  max-width: 280px; /* Tamaño máximo del GIF */
  height: auto;
  aspect-ratio: 1 / 1; /* Mantiene la proporción cuadrada si es necesario */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

/* Forzamos que el GIF sea responsivo */
.anime-status-screen .pdf-ad-container img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
}

.anime-status-screen p {
  margin: 0;
  font-weight: 600;
  color: var(--purple-100);
}

/* Ajuste para pantallas muy pequeñas */
@media (max-width: 480px) {
  .anime-status-screen .pdf-ad-container {
    max-width: 180px;
  }
  .anime-status-screen p {
    font-size: 0.9rem;
  }
}

#animeReader .pdf-reader__frame {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  background: rgba(22, 18, 40, 0.6);
  border: 1px solid rgba(151, 95, 143, 0.3);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  color: var(--purple-100);
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.lang-btn:hover {
  color: var(--text-light);
}

.lang-btn.active {
  background: var(--purple-200);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(151, 95, 143, 0.4);
}