/* ===== Reseteo y tipografía ===== */
:root{
  --pri:#0066cc;
  --pri-dark:#004a99;
  --bg:#ffffff;
  --sidebar-w:300px;
}
.anime-layout{
  display:flex;
  gap:20px;
  align-items:flex-start;
}
.anime-main-wrap{
  flex:1;
  min-width:0;
}
.anime-sidebar{
  width:var(--sidebar-w);
  position:sticky;
  top:20px;
  align-self:flex-start;
  background:#fff;
  padding:12px;
  border-radius:10px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
  max-height:calc(100vh - 40px);
  overflow:auto;
}
.anime-sidebar h3{ margin:6px 0 12px; }

/* ===== Slider En Emisión ===== */
.slider-emision-container{
  background:#fff;
  border-radius:10px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
  padding:12px;
  margin-bottom:16px;
}
.slider-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}
.slider-controls button{
  border:none; background:#eee; padding:6px 10px; border-radius:6px; cursor:pointer;
}
.slider{
  display:flex;
  gap:12px;
  overflow:hidden;
  scroll-behavior:smooth;
}
.slider .card{
  flex:0 0 auto;
  width:160px;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease;
}
.slider .card:hover{ transform:translateY(-3px); box-shadow:0 6px 16px rgba(0,0,0,.18); }
.slider .card img{ width:100%; height:200px; object-fit:cover; display:block; }
.slider .card p{ margin:6px; font-size:13px; line-height:1.2; height:2.4em; overflow:hidden; }

/* ===== Géneros ===== */
.categorias-wrap{ background:#fff; border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.08); padding:12px; margin-bottom:16px; }
.categorias{ display:flex; flex-wrap:wrap; gap:8px; }
.btn-cat{
  padding:6px 12px; border-radius:20px; border:1px solid var(--pri); background:#fff; color:var(--pri);
  cursor:pointer; transition:.2s;
}
.btn-cat:hover{ background:var(--pri); color:#fff; }
.btn-cat.activo{ background:var(--pri-dark); color:#fff; border-color:var(--pri-dark); }

/* ===== Catálogo ===== */
.catalogo-wrap{ background:#fff; border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.08); padding:12px; }
.lista-animes{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(180px,1fr)); gap:14px;
}
.carta{
  background:#fff; border-radius:10px; overflow:hidden;
  box-shadow:0 2px 8px rgba(0,0,0,.08); cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease;
}
.carta:hover{ transform:translateY(-4px); box-shadow:0 8px 18px rgba(0,0,0,.16); }
.carta img{ width:100%; height:240px; object-fit:cover; display:block; }
.carta .info{ padding:8px; }
.carta .titulo{ font-size:15px; margin:0 0 4px; }
.carta .meta{ font-size:12px; color:#666; }

/* ===== Paginación ===== */
.paginacion{ text-align:center; margin-top:14px; display:flex; gap:8px; justify-content:center; }
.paginacion button{
  padding:8px 14px; border:none; border-radius:20px; background:var(--pri); color:#fff; cursor:pointer;
}
.paginacion button[disabled]{ opacity:.5; cursor:not-allowed; }
.paginacion button:hover:not([disabled]){ background:var(--pri-dark); }

/* ===== Noticias sidebar ===== */
.news-list .news-card{
  display:flex; gap:8px; margin-bottom:10px; border:1px solid #eee; border-radius:8px; overflow:hidden; background:#fff; cursor:pointer;
  transition:transform .15s ease;
}
.news-list .news-card:hover{ transform:translateY(-2px); }
.news-list img{ width:90px; height:70px; object-fit:cover; }
.news-list .news-info{ padding:6px; }
.news-list .news-title{ font-size:13px; margin:0 0 4px; line-height:1.25; }
.news-list .news-date{ font-size:11px; color:#777; }
.spinner{
  border:4px solid #eee; border-top:4px solid var(--pri); border-radius:50%;
  width:36px; height:36px; animation:spin 1s linear infinite; margin:16px auto;
}
@keyframes spin{ 100%{ transform:rotate(360deg); } }

/* ===== Modal ===== */
.modal{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.6); justify-content:center; align-items:center; z-index:99999; padding:16px; }
.modal-contenido{ background:#fff; border-radius:10px; max-width:900px; width:100%; max-height:90vh; overflow:auto; padding:16px; position:relative; }
.cerrar{ position:absolute; top:10px; right:12px; border:none; background:#eee; border-radius:50%; width:32px; height:32px; cursor:pointer; }
.modal .head{ display:flex; gap:12px; }
.modal .head img{ width:180px; height:260px; object-fit:cover; border-radius:8px; }
.modal .sinopsis{ color:#444; font-size:14px; }
.lista-episodios{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.btn-epi{ background:var(--pri); color:#fff; padding:6px 10px; text-decoration:none; border-radius:6px; font-size:13px; }
.btn-epi:hover{ background:var(--pri-dark); }

/* ===== Responsive ===== */
@media (max-width: 1024px){
  .anime-layout{ flex-direction:column; }
  .anime-sidebar{ width:100%; position:static; max-height:none; }
}
