/*
Theme Name: Kaze Anime
Theme URI: https://example.com/kaze-anime
Author: Tu nombre
Description: Tema oscuro para webs de episodios de anime (SFW). Portada con spotlight, carriles horizontales, top 10 semanal, géneros, series, biblioteca personal (Mi lista / Historial / Favoritos) y buscador ⌘K.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kaze
Tags: dark, video, entertainment, custom-logo, custom-menu, featured-images
*/

/* =========================================================================
   Tokens
   ========================================================================= */
:root {
	--bg: #121118;
	--surface: #1b1a21;
	--surface-2: #232229;
	--line: #312f3a;
	--text: #ecebf2;
	--muted: #9d9aab;
	--dim: #6c6979;
	--txt-3: var(--dim);
	--accent-a: #3a7bfd;
	--accent-b: #6d5ef5;
	--accent: #3f7dfb;
	--ok: #2fbf8f;
	--warn: #f0a23a;
	--radius: 14px;
	--radius-sm: 8px;
	--card-min: 184px;
	--gap: 20px;
	--topbar-h: 64px;
	--sidebar-w: 240px;
	--font: "Manrope", ui-sans-serif, system-ui, sans-serif;
	--font-display: "Space Grotesk", var(--font);
	--grad: linear-gradient(120deg, var(--accent-a), var(--accent-b));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-variant-numeric: tabular-nums; }
.accent-text { color: var(--accent); }
.only-mobile { display: none; }
@media (max-width: 760px) { .only-desktop { display: none !important; } .only-mobile { display: block; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.app { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

/* =========================================================================
   Logo
   ========================================================================= */
.logo { display: inline-flex; align-items: baseline; gap: 1px; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.logo-a { color: var(--text); }
.logo-id { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-sub { margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--muted); align-self: center; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; }
.logo-img { max-height: 34px; width: auto; }

/* =========================================================================
   Topbar
   ========================================================================= */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: rgba(18,17,24,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-l { display: flex; align-items: center; gap: 12px; min-width: calc(var(--sidebar-w) - 20px); }
.topbar-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); transition: background .15s, border-color .15s; }
.icon-btn:hover { background: var(--line); }
.icon-btn--ghost { background: transparent; border-color: transparent; }
.icon-btn--ghost:hover { background: var(--surface-2); }

.hamburger { display: grid; gap: 4px; width: 18px; }
.hamburger span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .hamburger span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.topbar-ai { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.topbar-ai-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; }
.topbar-ai:hover { border-color: var(--accent); }

.topbar-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); text-align: left; }
.topbar-search:hover { border-color: var(--dim); }
.topbar-search-ph { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.kbd { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }

.avatar-wrap { position: relative; }
.bell-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1024px) { .topbar-l { min-width: 0; } .topbar-ai-label { display: none; } .topbar-ai { padding: 0 6px; } }
@media (max-width: 640px) { .topbar { padding: 0 12px; gap: 8px; } .topbar-search { max-width: none; } .topbar-search-ph, .kbd--cmd { display: none; } .topbar-search { flex: 0 0 40px; justify-content: center; padding: 0; } .logo-sub { display: none; } }

/* =========================================================================
   Promo bar
   ========================================================================= */
.promo { border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(58,123,253,.14), rgba(109,94,245,.14)); }
.promo-track { overflow: hidden; }
.promo-in { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; font-size: 13px; white-space: nowrap; }
.promo-ico { color: var(--accent); display: grid; }
.promo-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.promo-msg { overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.promo-cta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--accent); }
.promo-cta:hover { text-decoration: underline; }

/* =========================================================================
   Shell + Sidebar
   ========================================================================= */
.shell { flex: 1; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 14px 12px 28px; border-right: 1px solid var(--line); background: var(--bg); scrollbar-width: thin; }
.sidebar-head { display: none; align-items: center; justify-content: space-between; padding: 4px 6px 14px; }
.sidebar-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.sidebar-close:hover { background: var(--surface-2); }

.nav-group { display: grid; gap: 2px; }
.nav-sect { margin: 18px 12px 6px; font-size: 12px; font-weight: 700; color: var(--dim); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-item--sm { font-size: 13px; padding: 7px 12px; }
.nav-ico { display: grid; place-items: center; width: 20px; }

.sidebar-scrim { position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.55); }

@media (max-width: 1024px) {
	.shell { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: fixed; z-index: 60; top: 0; left: 0; height: 100vh; width: 280px; transform: translateX(-100%); transition: transform .25s ease; border-right: 1px solid var(--line); background: var(--surface); }
	.sidebar.is-open { transform: none; }
	.sidebar-head { display: flex; }
}

/* =========================================================================
   Content
   ========================================================================= */
.content { min-width: 0; padding: 24px 28px 48px; }
@media (max-width: 640px) { .content { padding: 16px 14px 40px; } }
.page { display: grid; gap: 34px; }

.eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }

/* Hero */
.home-hero { max-width: 70ch; }
.home-hero-title { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -.025em; }
.home-hero-sub { margin: 10px 0 0; color: var(--muted); max-width: 62ch; }

/* =========================================================================
   Poster (placeholder + imagen)
   ========================================================================= */
.poster { position: absolute; inset: 0; overflow: hidden; }
.poster-hatch { position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 1px, transparent 1px 9px); }
.poster-mark { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: rgba(255,255,255,.35); }
.poster-cap { font-size: 10px; letter-spacing: .06em; }
.poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* =========================================================================
   Spotlight
   ========================================================================= */
.spotlight { position: relative; min-height: 420px; border-radius: calc(var(--radius) + 6px); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.spot-slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: 40px 44px; animation: spotIn .5s ease; }
@keyframes spotIn { from { opacity: 0; } to { opacity: 1; } }
.spot-bg { position: absolute; inset: 0; transform: scale(1.06); filter: blur(2px) saturate(1.1); }
.spot-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,17,24,.97) 0%, rgba(18,17,24,.86) 45%, rgba(18,17,24,.45) 100%), linear-gradient(0deg, rgba(18,17,24,.8), transparent 50%); }
.spot-glow { position: absolute; width: 520px; height: 520px; left: -160px; bottom: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(58,123,253,.28), transparent 70%); pointer-events: none; }
.spot-content { position: relative; max-width: 600px; display: grid; gap: 14px; }
.spot-eyebrow, .spot-meta, .spot-genres, .spot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spot-rank { font-weight: 800; font-size: 13px; color: var(--accent); margin-right: 4px; }
.spot-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.spot-title { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 48px); line-height: 1.02; letter-spacing: -.03em; }
.spot-meta { color: var(--muted); font-size: 14px; gap: 14px; }
.vcount { display: inline-flex; align-items: center; gap: 6px; }
.spot-brand { font-weight: 700; }
.spot-desc { margin: 0; color: #c9c7d4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 60ch; }
.spot-chip { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(18,17,24,.6); color: var(--muted); }
.spot-chip:hover { color: var(--text); border-color: var(--dim); }
.spot-actions { margin-top: 6px; gap: 10px; }
.spot-play { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 8px 24px -8px rgba(58,123,253,.7); }
.spot-play:hover { filter: brightness(1.08); }
.spot-add { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-weight: 700; }
.spot-add:hover { background: rgba(255,255,255,.14); }
.spot-add.is-on { border-color: var(--accent); color: var(--accent); }
.spot-poster { position: relative; width: 220px; aspect-ratio: 5 / 7; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 60px -20px rgba(0,0,0,.8); transform: rotate(2deg); transition: transform .25s; }
.spot-poster:hover { transform: rotate(0) scale(1.02); }
.spot-dots { position: absolute; right: 24px; bottom: 18px; display: flex; gap: 6px; z-index: 2; }
.spot-dot { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.3); transition: width .2s, background .2s; }
.spot-dot.is-on { width: 24px; background: var(--accent); }
@media (max-width: 1100px) { .spot-poster { display: none; } .spot-slide { grid-template-columns: 1fr; padding: 32px; } }

/* =========================================================================
   Genre strip / pills
   ========================================================================= */
.genre-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.genre-strip::-webkit-scrollbar { display: none; }
.genre-pill { flex: none; padding: 8px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; transition: color .15s, border-color .15s; }
.genre-pill:hover { color: var(--text); border-color: var(--dim); }
.genre-pill.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; }
.pill-btn:hover { border-color: var(--dim); }

/* =========================================================================
   Rails
   ========================================================================= */
.rail { display: grid; gap: 14px; min-width: 0; }
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.rail-title { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; letter-spacing: -.02em; }
.accent-tick { width: 4px; height: 20px; border-radius: 2px; background: var(--grad); }
.rail-ctrls { display: flex; align-items: center; gap: 8px; }
.rail-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 6px; }
.rail-link:hover { color: var(--text); }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(var(--card-min), 1fr); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 6px; scrollbar-width: none; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
@media (min-width: 1280px) { .rail-track { grid-auto-columns: calc((100% - var(--gap) * 5) / 6); } }
@media (max-width: 640px) { .rail-ctrls .icon-btn { display: none; } .rail-title { font-size: 19px; } }

/* Tarjeta estándar */
.card { display: grid; gap: 10px; width: 100%; text-align: left; }
.card-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; z-index: 1; }
.badge { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: rgba(18,17,24,.82); backdrop-filter: blur(6px); }
.badge--ok { background: var(--ok); color: #06231a; }
.badge--warn { background: var(--warn); color: #2a1a03; }
.card-dur { position: absolute; right: 8px; bottom: 8px; font-size: 11px; padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.72); z-index: 1; }
.card-hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(18,17,24,.35); opacity: 0; transition: opacity .2s; }
.card-play { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--grad); color: #fff; padding-left: 3px; transform: scale(.85); transition: transform .2s; }
.card:hover .card-hover, .card:focus-visible .card-hover { opacity: 1; }
.card:hover .card-play { transform: none; }
.card-meta { display: grid; gap: 2px; }
.card-title { font-weight: 700; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-ep { color: var(--muted); font-weight: 600; }
.card-sub, .re-sub, .t10c-sub { font-size: 12px; color: var(--dim); }

/* Recientes */
.re-track { grid-auto-columns: minmax(230px, 1fr); }
@media (min-width: 1280px) { .re-track { grid-auto-columns: calc((100% - var(--gap) * 4) / 5); } }
.re-card { display: grid; gap: 10px; }
.re-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.re-ep, .re-lang { position: absolute; bottom: 8px; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; z-index: 1; }
.re-ep { left: 8px; background: var(--grad); color: #fff; }
.re-lang { right: 8px; background: rgba(18,17,24,.85); }
.re-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--bg); padding-left: 3px; opacity: 0; transition: opacity .2s; }
.re-card:hover .re-play, .re-card:focus-visible .re-play { opacity: 1; }
.re-info { display: grid; gap: 2px; }
.re-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Top 10 */
.t10c-track { grid-auto-columns: minmax(250px, 1fr); }
@media (min-width: 1280px) { .t10c-track { grid-auto-columns: calc((100% - var(--gap) * 3) / 4); } }
.t10c-card { display: grid; gap: 10px; }
.t10c-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.t10c-rank { position: absolute; left: 10px; bottom: 2px; font-family: var(--font-display); font-size: 58px; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.85); text-shadow: 0 6px 24px rgba(0,0,0,.6); letter-spacing: -.04em; }
.t10c-rank.hot { -webkit-text-stroke: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.t10c-trend { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: rgba(18,17,24,.85); }
.t10c-trend.up { color: var(--ok); }
.t10c-trend.down { color: #f36d6d; }
.t10c-info { display: grid; gap: 2px; }
.t10c-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================================
   Espacios de widgets (feed-ad)
   ========================================================================= */
.feed-ad { display: grid; gap: 6px; }
.ad-bar { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--dim); }
.ad-close { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--dim); }
.ad-close:hover { color: var(--text); }
.feed-ad-body { border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); display: grid; place-items: center; }
.ad-triple-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.ad-triple-box { min-height: 250px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); display: grid; place-items: center; }

/* =========================================================================
   Bloque informativo
   ========================================================================= */
.seo { padding: 32px; border-radius: calc(var(--radius) + 6px); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 16px; }
.seo-head { max-width: 70ch; }
.seo-title { margin: 0; font-family: var(--font-display); font-size: 26px; letter-spacing: -.02em; }
.seo-lead { margin: 8px 0 0; color: var(--muted); }
.seo-prose { color: #c3c1ce; max-width: 75ch; overflow: hidden; transition: max-height .3s ease; }
.seo-prose[data-collapsed="true"] { max-height: 5.2em; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.seo-prose p { margin: 0 0 12px; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.seo-block--collapsed { display: none; }
.seo-h { font-size: 16px; margin: 0 0 6px; }
.seo-p { margin: 0; color: var(--muted); }
.seo-more { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); }
.seo-more-ico { transition: transform .2s; }
.seo-more[aria-expanded="true"] .seo-more-ico { transform: rotate(180deg); }

/* =========================================================================
   Archivos / páginas
   ========================================================================= */
.page-head { display: grid; gap: 4px; max-width: 70ch; }
.page-title { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); letter-spacing: -.025em; line-height: 1.1; }
.page-desc { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px var(--gap); }
.grid .rail-cell { position: relative; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--gap); }
.pager, .nav-links { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.page-numbers { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.page-numbers.current { background: var(--grad); border-color: transparent; color: #fff; }
.empty-state { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: calc(var(--radius) + 6px); }
.empty-state h1, .empty-state h2 { margin: 0; color: var(--text); font-family: var(--font-display); }
.empty-state p { margin: 0; max-width: 46ch; }
.prose { max-width: 72ch; color: #d0cedb; }
.prose a { color: var(--accent); text-decoration: underline; }

.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.term-card { position: relative; display: grid; align-content: end; gap: 2px; min-height: 110px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.term-card:hover { border-color: var(--dim); }
.term-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.term-count { font-size: 12px; color: rgba(255,255,255,.7); }

.upcoming-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.upcoming-item { display: grid; grid-template-columns: 64px 160px minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.upcoming-date { display: grid; justify-items: center; line-height: 1; }
.upcoming-day { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.upcoming-month { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.upcoming-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; }
@media (max-width: 560px) { .upcoming-item { grid-template-columns: 52px minmax(0, 1fr); } .upcoming-thumb { display: none; } }

.lib-remove { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--dim); }
.lib-remove:hover { color: #f36d6d; }

/* =========================================================================
   Episodio (.page--watch)
   ========================================================================= */
.page--watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 1100px) { .page--watch { grid-template-columns: minmax(0, 1fr); } }
.watch-main { display: grid; gap: 18px; min-width: 0; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.player-empty { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 8px 14px; border-radius: 8px; background: rgba(0,0,0,.75); font-size: 13px; z-index: 2; }

/* Anterior / siguiente */
.ep-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ep-nav-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.ep-nav-btn b { color: var(--accent); font-weight: 800; }
.ep-nav-btn:hover:not(:disabled) { border-color: var(--dim); }
.ep-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.ep-nav-now { font-weight: 700; font-size: 14px; text-align: center; }
.ep-nav-now i { font-style: normal; color: var(--dim); font-weight: 600; }
@media (max-width: 520px) { .ep-nav-btn span { display: none; } }

/* Bloque destacado */
.aigen { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(58,123,253,.16), rgba(109,94,245,.16)); border: 1px solid rgba(109,94,245,.35); }
.aigen-glow { position: absolute; width: 260px; height: 260px; right: -60px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(109,94,245,.35), transparent 70%); pointer-events: none; }
.aigen-badge { position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(58,123,253,.8); }
.aigen-copy { position: relative; flex: 1; min-width: 0; display: grid; gap: 1px; }
.aigen-brand { font-size: 12px; font-weight: 700; color: var(--accent); }
.aigen-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.aigen-sub { font-size: 13px; color: var(--muted); }
.aigen-btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 800; font-size: 14px; }
.aigen-btn:hover { filter: brightness(.92); }
@media (max-width: 560px) { .aigen { flex-wrap: wrap; } .aigen-btn { width: 100%; justify-content: center; } }

/* Cabecera */
.watch-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.watch-title { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.025em; line-height: 1.15; }
.watch-ep { color: var(--muted); font-weight: 600; }
.watch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.dot-sep { color: var(--dim); }
.tag-cens { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: rgba(47,191,143,.14); color: var(--ok); border: 1px solid rgba(47,191,143,.35); }
.watch-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.act-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 700; transition: background .15s, border-color .15s, color .15s; }
.act-btn:hover { background: var(--line); }
.act-btn[aria-pressed="true"], .act-btn.is-on { border-color: var(--accent); color: var(--accent); background: rgba(58,123,253,.1); }
.act-btn[data-react="like"][aria-pressed="true"] svg { fill: currentColor; }
.act-btn--muted { background: transparent; color: var(--dim); }
.act-btn--muted:hover { color: var(--text); background: var(--surface-2); }

.watch-desc { color: #cfcdda; max-width: 80ch; white-space: normal; }
.watch-desc p { margin: 0 0 10px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.tag-chip:hover { color: var(--text); border-color: var(--dim); }

/* Información */
.watch-info { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; }
.winfo-h { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 18px; }
.winfo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }
@media (max-width: 700px) { .winfo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.winfo-cell { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); }
.winfo-k { font-size: 12px; color: var(--dim); font-weight: 600; }
.winfo-v { font-size: 14px; font-weight: 700; }

.comments-wrap { display: grid; gap: 12px; }
.comments-h { margin: 0; font-family: var(--font-display); font-size: 20px; }
.watch-more { min-width: 0; }
.card-brand { color: var(--accent); font-weight: 700; }
.card-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Barra lateral */
.watch-side { display: grid; gap: 20px; position: sticky; top: calc(var(--topbar-h) + 20px); }
@media (max-width: 1100px) { .watch-side { position: static; } }
.side-ad { display: grid; }
.side-ad-body { border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); display: grid; place-items: center; margin-top: 6px; }
.ep-side { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.side-h { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 18px; }
.side-h-n { margin-left: auto; font-family: var(--font); font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ep-scroll { max-height: 60vh; overflow-y: auto; margin-right: -6px; padding-right: 6px; scrollbar-width: thin; }
.ep-side-list { display: grid; gap: 6px; }
.upnext { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px; border-radius: 12px; text-align: left; }
.upnext:hover { background: var(--surface-2); }
.upnext.is-current { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent); }
.upnext-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; }
.upnext-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(18,17,24,.4); opacity: 0; transition: opacity .15s; }
.upnext:hover .upnext-play { opacity: 1; }
.upnext-meta { display: grid; gap: 2px; min-width: 0; }
.upnext-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext-sub { font-size: 12px; color: var(--dim); }
.upnext.is-current .upnext-sub { color: var(--accent); font-weight: 700; }

.kaze-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); }

/* Comentarios */
.comments-area { display: grid; gap: 16px; margin-top: 10px; }
.comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.comment-body { padding: 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.comment-form input, .comment-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.comment-form .submit { height: 42px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-left: var(--sidebar-w); }
@media (max-width: 1024px) { .footer { margin-left: 0; } }
.footer-inner { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 40px; padding: 40px 28px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { display: grid; gap: 12px; align-content: start; justify-items: start; }
.brand-full { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.brand-tld { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-tag { margin: 0; color: var(--muted); max-width: 34ch; }
.age-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--ok); color: var(--ok); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer-ch { font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-link { color: var(--muted); font-size: 14px; }
.footer-link:hover { color: var(--text); }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 16px 28px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

/* =========================================================================
   Modal (reportar)
   ========================================================================= */
.modal-overlay { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; background: rgba(8,8,12,.72); backdrop-filter: blur(4px); animation: modalFade .18s ease; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.85); animation: modalIn .2s ease; }
@keyframes modalIn { from { transform: translateY(10px) scale(.98); } to { transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.modal-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.modal-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px 0 0; border-radius: 10px; color: var(--muted); }
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.modal-body { display: grid; gap: 16px; padding: 18px 20px; }
.fld { display: grid; gap: 6px; }
.fld-label { font-size: 13px; font-weight: 700; }
.fld-input, .fld-textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.fld-input { height: 42px; }
.fld-textarea { min-height: 110px; resize: vertical; }
.fld-input:focus, .fld-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,123,253,.2); }
.fld-msg { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: rgba(47,191,143,.12); color: var(--ok); }
.fld-msg.is-error { background: rgba(243,109,109,.12); color: #f36d6d; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.btn-soft, .btn-primary { height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.btn-soft { background: var(--surface-2); border: 1px solid var(--line); }
.btn-soft:hover { background: var(--line); }
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .6; cursor: progress; }

/* =========================================================================
   Buscador / paleta de comandos (.cmd)
   ========================================================================= */
.cmd-overlay { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 10vh 16px 16px; background: rgba(8,8,12,.72); backdrop-filter: blur(4px); animation: modalFade .15s ease; }
.cmd { width: min(640px, 100%); max-height: 76vh; display: flex; flex-direction: column; border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.85); overflow: hidden; animation: modalIn .18s ease; }
.cmd-input-wrap { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmd-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.cmd-input::-webkit-search-cancel-button { display: none; }
.cmd-input::placeholder { color: var(--dim); }
.cmd-esc { flex: none; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.cmd-esc:hover { color: var(--text); }
.cmd-results { flex: 1; overflow-y: auto; padding: 8px; display: grid; gap: 2px; align-content: start; scrollbar-width: thin; }
.cmd-group { padding: 10px 10px 4px; font-size: 12px; font-weight: 700; color: var(--dim); }
.cmd-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; color: var(--text); }
.cmd-row:hover, .cmd-row.is-sel { background: var(--surface-2); }
.cmd-row.is-sel { box-shadow: inset 3px 0 0 var(--accent); }
.cmd-ico { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); overflow: hidden; }
.cmd-row.is-sel .cmd-ico { color: var(--accent); border-color: rgba(58,123,253,.4); }
.cmd-ico--thumb { width: 64px; border-radius: 8px; }
.cmd-ico--thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmd-rmeta { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cmd-rtitle { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-rtitle mark { background: none; color: var(--accent); }
.cmd-rsub { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-tag { flex: none; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.cmd-row.is-sel .cmd-tag { background: var(--grad); border-color: transparent; color: #fff; }
.cmd-empty { padding: 22px 12px; text-align: center; font-size: 14px; color: var(--muted); }
.cmd-foot { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.cmd-foot-r { margin-left: auto; font-weight: 700; color: var(--muted); }
@media (max-width: 560px) { .cmd-overlay { padding-top: 12px; } .cmd { max-height: calc(100vh - 24px); } .cmd-foot span:not(.cmd-foot-r) { display: none; } }

/* =========================================================================
   Taxonomía: género / serie (.page--genre)
   ========================================================================= */
.page--genre { gap: 22px; }
.genre-hero { position: relative; overflow: hidden; border-radius: calc(var(--radius) + 6px); border: 1px solid var(--line); min-height: 210px; display: flex; align-items: flex-end; }
.genre-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18,17,24,.75), rgba(18,17,24,.15) 70%); pointer-events: none; }
.genre-hero-in { position: relative; z-index: 1; display: grid; gap: 10px; padding: 28px 32px; max-width: 760px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7); }
.crumbs a:hover { color: #fff; }
.crumbs svg { opacity: .7; }
.genre-name { margin: 0; font-family: var(--font-display); font-size: clamp(32px, 4.4vw, 54px); line-height: 1; letter-spacing: -.035em; }
.genre-blurb { color: rgba(255,255,255,.85); max-width: 65ch; }
.genre-blurb p { margin: 0; }
.genre-stat { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.75); padding: 5px 10px; border-radius: 8px; background: rgba(18,17,24,.5); justify-self: start; backdrop-filter: blur(6px); }
@media (max-width: 640px) { .genre-hero-in { padding: 22px 18px; } .genre-hero { min-height: 180px; } }

.genre-intro { color: #cfcdda; max-width: 80ch; }
.genre-intro h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 20px; letter-spacing: -.015em; color: var(--text); }
.genre-intro p { margin: 0 0 8px; }

.genre-bar { position: sticky; top: var(--topbar-h); z-index: 5; margin: 0 -4px; padding: 8px 4px; background: linear-gradient(var(--bg) 70%, transparent); }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.genre-pill--all { background: transparent; border-style: dashed; color: var(--text); }

/* Paginador */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.page-btn { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
a.page-btn:hover { border-color: var(--dim); }
.page-btn.is-active { background: var(--grad); border-color: transparent; color: #fff; }
.page-dots { display: grid; place-items: center; min-width: 28px; height: 40px; color: var(--dim); }

/* Texto largo del género */
.seo--genre .seo-prose { max-height: none; -webkit-mask-image: none; mask-image: none; }
.seo-prose h2 { margin: 22px 0 8px; font-family: var(--font-display); font-size: 20px; color: var(--text); letter-spacing: -.015em; }
.seo-prose ul { margin: 0 0 12px; padding-left: 20px; }
.seo-prose li { margin-bottom: 6px; }
.seo-prose a { color: var(--accent); }
