/* ==========================================================================
   PlayZone template — self-contained stylesheet (G20 look: near-black canvas,
   amber accent, Montserrat, glass surfaces, rounded 2:3 poster cards).
   --primary is injected by layout.php from $theme['primary_color'].
   ========================================================================== */

:root {
    --primary: #ffb800;
    --on-primary: #0a0a0a;
    --bg: #0a0a0a;
    --bg-footer: #0d0d0f;
    --card: #202125;
    --panel: rgba(255, 255, 255, .03);
    --panel-2: rgba(255, 255, 255, .06);
    --line: rgba(255, 255, 255, .06);
    --line-2: rgba(255, 255, 255, .1);
    --text: #ffffff;
    --text-2: #e5e7eb;
    --muted: #9ca3af;
    --muted-2: #6b7280;
    --muted-3: #4b5563;
    --green: #16a34a;
    --red: #ef4444;
    --radius-lg: 1rem;
    --radius: .75rem;
    --radius-sm: .5rem;
    --nav-h: 5rem;
    --gutter: 1rem;
    --font: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--font); background: var(--bg); color: var(--text); color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
img { height: auto; font-style: italic; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input::placeholder { color: var(--muted-2); }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: rgba(255, 184, 0, .3); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .42); border-radius: 12px; }

.site-main { min-height: 60vh; }
body:not(.page-landing) .site-main { padding-top: var(--nav-h); }
body.page-home .site-main, body.page-detail .site-main { padding-top: 0; }

.page-wrap { width: 100%; max-width: 90rem; margin: 0 auto; padding: 1rem var(--gutter); }
@media (min-width: 640px) { .page-wrap { padding: 1.5rem 3rem; } }

/* ---------- buttons ---------- */
.btn-primary, .btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: 0 1.25rem; height: 2.75rem; border-radius: var(--radius);
    font-size: .875rem; font-weight: 700; white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s, transform .1s;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 85%, transparent); }
.btn-primary:active { transform: scale(.98); }
.btn-outline { border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .02); color: var(--text-2); font-weight: 600; }
.btn-outline:hover { background: var(--panel-2); color: var(--text); }
.btn-pill { border-radius: 9999px; }
.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: .9375rem; }
.btn-primary svg, .btn-outline svg { width: 1.125rem; height: 1.125rem; }

/* ---------- chips / tags ---------- */
.meta-chip {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .2rem .55rem; border-radius: .375rem;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
    font-size: .75rem; font-weight: 600; color: var(--text-2); line-height: 1.4;
}
.meta-rating { color: var(--primary); border-color: rgba(255, 184, 0, .3); background: rgba(255, 184, 0, .08); }
.meta-quality { background: var(--green); border-color: var(--green); color: #fff; }
a.meta-genre:hover { border-color: rgba(255, 184, 0, .4); color: var(--text); }

.genre-tag, .chip {
    display: inline-block; padding: .4rem .8rem; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--panel);
    font-size: .75rem; font-weight: 500; color: #d1d5db;
    transition: border-color .2s, background-color .2s, color .2s;
}
.genre-tag:hover, .chip:hover { border-color: rgba(255, 184, 0, .4); background: rgba(255, 255, 255, .07); color: var(--text); }
.genre-tag.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- navbar ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 99;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent);
    transition: background-color .25s, backdrop-filter .25s;
}
.navbar.scrolled { background: rgba(10, 10, 10, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); padding: 0 1rem; }
@media (min-width: 640px) { .nav-inner { padding-left: 2.3rem; padding-right: 1.25rem; } }
.nav-left { display: flex; align-items: center; gap: 2rem; min-width: 0; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; transition: opacity .2s; }
.logo:hover { opacity: .8; }
.logo-image { height: 1.75rem; width: auto; }
.nav-desktop { display: none; }
.nav-menu { display: flex; align-items: center; gap: .25rem; }
.nav-item { position: relative; }
.nav-link {
    display: inline-flex; align-items: center; gap: .4rem; height: 2.25rem; padding: 0 1rem;
    border-radius: 9999px; font-size: .875rem; font-weight: 500; color: rgba(255, 255, 255, .7);
    transition: background-color .2s, color .2s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: rgba(255, 255, 255, .07); color: var(--text); }
.nav-caret { font-size: .65em; opacity: .7; transition: transform .2s; }
.nav-item:hover .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
    position: absolute; top: 100%; left: -1rem; z-index: 50; margin-top: .5rem; min-width: 14rem;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; padding: .75rem;
    border-radius: var(--radius-lg); background: rgba(0, 0, 0, .85); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);
    border: 1px solid var(--line-2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s;
}
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { visibility: visible; opacity: 1; }
.nav-dropdown-link { display: block; padding: .5rem .75rem; border-radius: var(--radius-sm); font-size: .875rem; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-dropdown-link:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex: 1; margin-left: .5rem; }
.nav-search { position: relative; display: flex; align-items: center; height: 2.5rem; width: 100%; max-width: 24rem; padding: 0 .75rem; border-radius: 9999px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .2s, box-shadow .2s; }
.nav-search:focus-within { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 184, 0, .4); }
.nav-search-icon { position: absolute; left: .75rem; color: var(--muted-2); pointer-events: none; }
.nav-search-icon svg, .nav-icon-btn svg, .nav-search-mobile svg { width: 1.125rem; height: 1.125rem; }
.nav-search input { width: 100%; background: transparent; border: 0; outline: 0; padding: .5rem .5rem .5rem 1.75rem; font-size: .875rem; color: rgba(255, 255, 255, .9); }
.nav-search input::-webkit-search-decoration, .nav-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.nav-search-desktop { display: none; }
.nav-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; color: rgba(255, 255, 255, .7); transition: background-color .2s, color .2s; }
.nav-icon-btn:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.hamburger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 2.25rem; height: 2.25rem; padding: 0 .55rem; border-radius: 9999px; transition: background-color .2s; }
.hamburger:hover { background: rgba(255, 255, 255, .1); }
.hamburger-line { display: block; height: 2px; width: 100%; background: rgba(255, 255, 255, .8); border-radius: 2px; transition: transform .25s, opacity .25s; }
.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-search-mobile { max-width: none; margin: .5rem 0 0; }
.nav-search-mobile input { padding-left: .5rem; }
.nav-search-mobile button { display: inline-flex; color: var(--muted); padding: .25rem; }

@media (max-width: 1023px) {
    .nav-desktop { display: block; }
    .nav-menu {
        position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 98;
        flex-direction: column; align-items: stretch; gap: .25rem; padding: 1rem;
        background: rgba(10, 10, 10, .97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--line); overflow-y: auto;
        transform: translateX(100%); opacity: 0; visibility: hidden; transition: transform .25s, opacity .25s, visibility .25s;
    }
    .nav-menu.active { transform: none; opacity: 1; visibility: visible; }
    .nav-link { height: 2.75rem; border-radius: var(--radius); font-size: 1rem; }
    .nav-dropdown { position: static; visibility: visible; opacity: 1; margin: 0 0 .5rem; padding: .25rem .5rem .5rem 1.5rem; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-item:hover .nav-caret { transform: none; }
}
@media (min-width: 1024px) {
    .nav-desktop { display: block; }
    .nav-search-desktop { display: flex; margin-right: .5rem; }
    .nav-search-link, .hamburger, .nav-item-mobile { display: none; }
}

/* ---------- home hero (discover) ---------- */
.home-hero, .detail-hero { position: relative; z-index: 0; overflow: hidden; background: var(--bg); }
.detail-hero { z-index: 2; overflow: visible; } /* let the episode dropdown extend past the hero and paint above .detail-extra */
.detail-hero .hero-bg { overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: .55; }
.hero-bg-blur { filter: blur(28px); transform: scale(1.15); opacity: .35; }
.hero-gradient { position: absolute; inset: 0; background:
    linear-gradient(to top, var(--bg) 0%, rgba(10, 10, 10, .2) 45%, rgba(10, 10, 10, .3) 100%),
    linear-gradient(to right, var(--bg) 0%, rgba(10, 10, 10, .6) 40%, transparent 75%),
    linear-gradient(to left, rgba(10, 10, 10, .85) 0%, transparent 35%); }
.home-hero { min-height: 32rem; display: flex; align-items: flex-end; padding: calc(var(--nav-h) + 1rem) 0 3rem; }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; width: 100%; max-width: 90rem; margin: 0 auto; padding: 0 var(--gutter); }
.hero-text { display: flex; flex-direction: column; gap: .85rem; width: 100%; max-width: 40rem; }
.hero-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.hero-title { font-size: clamp(1.75rem, 4.5vw, 3.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.hero-title a:hover { color: var(--primary); }
.hero-meta, .detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.hero-overview { font-size: .9rem; line-height: 1.7; color: #d1d5db; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .25rem; }
.hero-actions .btn-primary { height: 3rem; padding: 0 1.75rem; }
.hero-actions .btn-outline { height: 3rem; padding: 0 1.5rem; }
.hero-search { display: flex; align-items: center; gap: .5rem; max-width: 30rem; margin-top: .5rem; padding: .35rem; border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, .08); background: rgba(10, 10, 10, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .2s; }
.hero-search:focus-within { border-color: rgba(255, 184, 0, .5); }
.hero-search input { flex: 1; min-width: 0; height: 2.5rem; padding: 0 .75rem; background: transparent; border: 0; outline: 0; font-size: .875rem; }
.hero-search .btn-primary { height: 2.5rem; padding: 0 1.1rem; }
.hero-poster { display: none; flex-shrink: 0; width: 210px; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .8); transition: transform .3s; }
.hero-poster:hover { transform: translateY(-4px); }
.hero-poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
@media (min-width: 640px) { .hero-inner { padding: 0 3rem; } .home-hero { min-height: 36rem; padding-bottom: 4rem; } }
@media (min-width: 1024px) { .hero-poster { display: block; } .hero-text { max-width: 45%; } }

/* ---------- sections + card grid ---------- */
.content-section { padding: 1.5rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-title { display: flex; align-items: center; gap: .6rem; font-size: 1.5rem; font-weight: 600; line-height: 1.4; letter-spacing: .01em; }
.section-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: .25rem; background: var(--primary); color: var(--on-primary); flex-shrink: 0; }
.section-icon svg { width: 1rem; height: 1rem; }
.page-subtitle { width: 100%; font-size: .875rem; color: var(--muted); }
.view-more { display: inline-flex; align-items: center; gap: .25rem; padding: .4rem 1rem; border-radius: 9999px; background: rgba(255, 255, 255, .1); font-size: .875rem; font-weight: 500; color: var(--text); transition: background-color .2s, color .2s; }
.view-more:hover { background: rgba(255, 255, 255, .2); color: var(--primary); }

.movies-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 640px) { .movies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .movies-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .movies-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1536px) { .movies-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

.movie-card { display: block; position: relative; width: 100%; min-width: 0; outline: none; }
.card-poster { position: relative; aspect-ratio: 2 / 3; width: 100%; overflow: hidden; border-radius: var(--radius); background: var(--card); }
.movie-poster { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.movie-card:hover .movie-poster, .movie-card:focus .movie-poster { transform: scale(1.05); }
.quality-badge { position: absolute; top: .5rem; left: .5rem; padding: .125rem .4rem; border-radius: .25rem; background: var(--green); color: #fff; font-size: 10px; font-weight: 700; box-shadow: 0 0 8px rgba(22, 163, 74, .6); pointer-events: none; }
.quality-badge.is-cam { background: #d97706; box-shadow: 0 0 8px rgba(217, 119, 6, .6); }
.rating-badge { position: absolute; bottom: .5rem; right: .5rem; padding: .125rem .4rem; border-radius: .25rem; background: rgba(0, 0, 0, .6); color: var(--primary); font-size: 10px; font-weight: 700; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); pointer-events: none; }
.rank-badge { position: absolute; top: .5rem; right: .5rem; min-width: 1.75rem; padding: .2rem .4rem; border-radius: 9999px; background: var(--primary); color: var(--on-primary); font-size: .7rem; font-weight: 800; text-align: center; }
.card-play { position: absolute; left: 50%; top: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; display: flex; align-items: center; justify-content: center; border-radius: 9999px; background: var(--primary); color: var(--on-primary); opacity: 0; transform: scale(.7); transition: opacity .25s, transform .25s; box-shadow: 0 10px 25px rgba(0, 0, 0, .5); }
.card-play svg { width: 1.5rem; height: 1.5rem; margin-left: 2px; }
.movie-card:hover .card-play, .movie-card:focus .card-play { opacity: 1; transform: scale(1); }
.movie-info { margin-top: .75rem; }
.movie-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; font-size: .75rem; font-weight: 500; color: var(--muted); }
.movie-meta .dot { color: var(--muted-3); }
.movie-title { font-size: .875rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.movie-card:hover .movie-title { color: var(--primary); }

.empty-state { padding: 4rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }

/* ---------- explore / list filter bar ---------- */
.explore-bar { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .05); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin-bottom: .5rem; }
.explore-search { display: flex; align-items: center; gap: .5rem; }
.explore-search-icon { color: var(--muted-2); flex-shrink: 0; }
.explore-search-icon svg { width: 1.5rem; height: 1.5rem; }
.explore-search input { flex: 1; min-width: 0; height: 2.5rem; background: transparent; border: 0; outline: 0; font-size: 1.125rem; letter-spacing: .02em; color: rgba(255, 255, 255, .9); }
.explore-search input::-webkit-search-decoration, .explore-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.explore-search .btn-primary { height: 2.5rem; padding: 0 1.1rem; }
.filter-buttons, .genre-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.filter-btn { display: inline-flex; align-items: center; justify-content: space-between; min-width: 6rem; height: 2.5rem; padding: 0 1rem; border-radius: .375rem; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); font-size: .875rem; font-weight: 500; color: var(--text-2); transition: background-color .2s, color .2s, border-color .2s; }
.filter-btn:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.page-explore .section-header { margin-top: .75rem; }

/* ---------- pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 2rem; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem; border-radius: .375rem; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); font-size: .875rem; font-weight: 500; color: var(--text); transition: background-color .2s; }
a.page-btn:hover { background: rgba(255, 255, 255, .1); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.page-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.page-dots { padding: 0 .5rem; color: var(--muted-2); }
.page-info { width: 100%; text-align: center; font-size: .75rem; color: var(--muted-2); margin-top: .25rem; }

/* ---------- SEO article ---------- */
.seo-wrap { max-width: 56rem; margin: 0 auto; padding: 1rem var(--gutter) 4rem; }
.seo-card, .landing-card { border-radius: var(--radius-lg); border: 1px solid var(--line); background: rgba(255, 255, 255, .02); padding: 1.25rem; }
@media (min-width: 640px) { .seo-card, .landing-card { padding: 2rem; } }
.seo-article { line-height: 1.75; }
.seo-article h1, .seo-article h2 { margin: 2rem 0 .75rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.seo-article h1:first-child, .seo-article h2:first-child { margin-top: 0; }
.seo-article h3 { margin: 1.5rem 0 .5rem; font-size: 1rem; font-weight: 600; color: #f3f4f6; }
.seo-article p { margin-bottom: 1rem; font-size: .925rem; color: var(--muted); }
.seo-article ul, .seo-article ol { display: grid; gap: .5rem; margin-bottom: 1.25rem; padding-left: 0; list-style: none; }
@media (min-width: 640px) { .seo-article ul { grid-template-columns: 1fr 1fr; } }
.seo-article li { position: relative; padding-left: 1.1rem; font-size: .875rem; color: var(--muted); }
.seo-article li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 9999px; background: var(--primary); }
.seo-article strong { font-weight: 600; color: var(--text-2); }
.seo-article a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.seo-article a:hover { color: color-mix(in srgb, var(--primary) 80%, #fff); }
.seo-article img { border-radius: var(--radius); }

/* ---------- landing page ---------- */
.landing-header { position: sticky; top: 0; z-index: 99; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--nav-h); padding: 0 1rem; background: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent); }
@media (min-width: 640px) { .landing-header { padding: 0 2.3rem; } }
.landing-nav { display: none; align-items: center; gap: .25rem; }
@media (min-width: 768px) { .landing-nav { display: flex; } .menu-toggle { display: none; } }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; font-size: 1.25rem; color: rgba(255, 255, 255, .8); }
.menu-toggle:hover { background: rgba(255, 255, 255, .1); }
.mobile-nav { display: none; position: fixed; top: var(--nav-h); left: 1rem; right: 1rem; z-index: 98; flex-direction: column; padding: .5rem; border-radius: var(--radius-lg); background: rgba(0, 0, 0, .9); border: 1px solid var(--line-2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.mobile-nav.active { display: flex; }
.mobile-nav a { padding: .7rem 1rem; border-radius: var(--radius-sm); font-size: .95rem; color: rgba(255, 255, 255, .75); }
.mobile-nav a:hover { background: rgba(255, 255, 255, .07); color: var(--text); }

.landing-hero { position: relative; overflow: hidden; margin-top: calc(-1 * var(--nav-h)); }
.landing-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(60% 45% at 50% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
        radial-gradient(35% 35% at 12% 70%, rgba(255, 255, 255, .05), transparent 70%),
        radial-gradient(35% 35% at 88% 75%, rgba(34, 158, 217, .07), transparent 70%); }
.landing-hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); }
.landing-hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68vh; width: 100%; max-width: 48rem; margin: 0 auto; padding: calc(var(--nav-h) + 2rem) 1.25rem 2rem; text-align: center; }
@media (min-width: 640px) { .landing-hero-inner { padding-top: calc(var(--nav-h) + 3.5rem); padding-bottom: 2.5rem; } }
.center-logo img { height: 2.5rem; width: auto; margin: 0 auto; transition: opacity .2s; }
.center-logo:hover img { opacity: .8; }
@media (min-width: 640px) { .center-logo img { height: 3rem; } }
.landing-h1 { margin-top: 1.75rem; font-size: clamp(1.875rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.landing-intro { margin-top: 1rem; max-width: 36rem; font-size: .875rem; line-height: 1.7; color: var(--muted); }
@media (min-width: 640px) { .landing-intro { font-size: 1rem; } }
.landing-search { width: 100%; max-width: none; margin-top: 2rem; }
.landing-search-box { display: flex; align-items: center; gap: .5rem; padding: .375rem; border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, .08); background: var(--panel); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .2s; }
.landing-search-box:focus-within { border-color: rgba(255, 184, 0, .5); }
.landing-search-icon { margin-left: .6rem; color: var(--muted-2); flex-shrink: 0; }
.landing-search-icon svg { width: 1.25rem; height: 1.25rem; }
.landing-search-box input { flex: 1; min-width: 0; height: 2.75rem; background: transparent; border: 0; outline: 0; font-size: .875rem; color: var(--text); }
.view-site-btn { margin-top: 1.25rem; height: 2.6rem; }
.social-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.25rem; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; padding: .55rem .9rem; border-radius: .375rem; font-size: .8rem; font-weight: 600; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: opacity .2s, transform .1s; }
.social-btn:hover { opacity: .85; }
.social-btn:active { transform: scale(.95); }
.btn-twitter { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.btn-facebook { background: #1877f2; }
.btn-whatsapp { background: #25d366; }
.btn-telegram { background: #229ed9; }
.landing-chips { width: 100%; margin-top: 2rem; }
.landing-chips-title { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-3); }
.chip-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: .75rem; }

.landing-article-wrap { width: 100%; max-width: 56rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
.landing-genres { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.landing-faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: .25rem 1rem; margin-bottom: .6rem; }
.landing-faq summary { cursor: pointer; list-style: none; padding: .6rem 0; }
.landing-faq summary::-webkit-details-marker { display: none; }
.landing-faq summary h3 { display: inline; margin: 0; font-size: .95rem; }
.landing-faq summary::before { content: "+"; display: inline-block; width: 1.25rem; color: var(--primary); font-weight: 800; }
.landing-faq details[open] summary::before { content: "\2212"; }
.landing-faq p { padding: 0 0 .85rem 1.25rem; margin: 0; }
.landing-links a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.landing-cta { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); text-align: center; }
.landing-network { margin-top: 2.5rem; }
.landing-network h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; text-align: center; }
.landing-network-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
.landing-network-card { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); transition: border-color .2s, background-color .2s, transform .2s; }
.landing-network-card:hover { border-color: rgba(255, 184, 0, .4); background: rgba(255, 255, 255, .06); transform: translateY(-2px); }
.landing-network-card h3 { font-size: .95rem; font-weight: 700; }
.landing-network-card span { font-size: .75rem; color: var(--muted-2); }
.landing-copy { margin-top: 1.5rem; text-align: center; font-size: .75rem; color: var(--muted-3); }

/* ---------- detail page ---------- */
.detail-hero { padding: calc(var(--nav-h) + 1rem) 0 2rem; }
.detail-hero .hero-bg-img { opacity: .5; }
.detail-content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1.5rem; width: 100%; max-width: 90rem; margin: 0 auto; padding: 0 var(--gutter); }
.detail-poster-container { width: 12rem; max-width: 60%; margin: 0 auto; flex-shrink: 0; }
.detail-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); background: var(--card); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .8); }
.detail-info { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.detail-genres { display: flex; flex-wrap: wrap; gap: .4rem; }
.detail-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.detail-year { font-weight: 500; color: var(--muted); font-size: .6em; }
.detail-tagline { font-style: italic; color: var(--muted); }
.overview-text { max-width: 48rem; font-size: .925rem; line-height: 1.75; color: #d1d5db; }
.section-heading { font-size: 1.125rem; font-weight: 700; margin-bottom: .75rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.watch-dropdown, .watch-btn-wrapper { position: relative; display: inline-block; }
.watch-dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 30; min-width: 12rem; padding: .5rem; border-radius: var(--radius); background: rgba(0, 0, 0, .9); border: 1px solid var(--line-2); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s, visibility .2s; }
.watch-dropdown-menu.show { visibility: visible; opacity: 1; transform: none; }
.watch-dropdown-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .75rem; border-radius: var(--radius-sm); font-size: .875rem; color: rgba(255, 255, 255, .75); }
.watch-dropdown-item small { color: var(--muted-2); font-size: .7rem; }
.watch-dropdown-item:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.episode-selector { display: flex; flex-wrap: wrap; gap: 1rem; }
.selector-group { position: relative; display: flex; flex-direction: column; gap: .35rem; }
.selector-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.selector-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: .75rem; min-width: 11rem; height: 2.5rem; padding: 0 1rem; border-radius: .375rem; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); font-size: .875rem; font-weight: 500; color: var(--text); transition: background-color .2s, border-color .2s; }
.selector-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 184, 0, .4); }
.dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 40; min-width: 100%; max-height: 18rem; overflow-y: auto; margin-top: .35rem; padding: .4rem; border-radius: var(--radius); background: rgba(10, 10, 10, .96); border: 1px solid var(--line-2); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6); display: none; }
.dropdown-menu.show { display: block; }
.dropdown-item { display: block; padding: .5rem .75rem; border-radius: var(--radius-sm); font-size: .85rem; color: rgba(255, 255, 255, .75); white-space: nowrap; }
.dropdown-item:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.dropdown-item.selected { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.cast-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; max-width: 40rem; }
@media (min-width: 640px) { .cast-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cast-card { text-align: center; }
.cast-photo { width: 4.5rem; height: 4.5rem; margin: 0 auto .4rem; border-radius: 9999px; object-fit: cover; background: var(--card); border: 2px solid var(--line-2); transition: border-color .2s; }
.cast-card:hover .cast-photo { border-color: var(--primary); }
.cast-name { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-character { font-size: .7rem; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) {
    .detail-content { flex-direction: row; align-items: flex-start; gap: 2.5rem; }
    .detail-poster-container { width: 14rem; margin: 0; }
}
@media (min-width: 640px) { .detail-content { padding: 0 3rem; } }
@media (min-width: 1024px) { .detail-poster-container { width: 16rem; } }
.extra-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .extra-info { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.info-item { padding: .9rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.info-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: .25rem; }
.info-value { font-size: .9rem; font-weight: 600; }

/* ---------- player page ---------- */
.player-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.back-button { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 9999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--text-2); transition: background-color .2s, color .2s; }
.back-button:hover { background: rgba(255, 255, 255, .12); color: var(--text); }
.player-info { display: flex; flex-wrap: wrap; gap: .4rem; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 1280px) { .watch-layout { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; } }
.player-wrapper { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .8); }
.player-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; transition: opacity .3s; }
.loading-player { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; background: rgba(10, 10, 10, .85); font-size: .85rem; color: var(--muted); }

.spinner { width: 2.5rem; height: 2.5rem; border-radius: 9999px; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.server-selector { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; padding: .75rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.server-label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-right: .25rem; }
.server-btn { display: inline-flex; align-items: center; height: 2.25rem; padding: 0 1rem; border-radius: 9999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); font-size: .8rem; font-weight: 600; color: var(--text-2); transition: background-color .2s, color .2s, border-color .2s; }
.server-btn:hover { background: rgba(255, 255, 255, .12); color: var(--text); }
.server-btn.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.episode-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1rem; }
.watch-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.watch-card { display: flex; gap: 1rem; padding: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--panel); }
.watch-card-poster { width: 6.5rem; flex-shrink: 0; }
.watch-card-poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--card); }
.watch-card-body { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.player-title { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.watch-overview { font-size: .8rem; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.watch-card-body .btn-outline { align-self: flex-start; height: 2.25rem; padding: 0 1rem; font-size: .8rem; }
.player-notice { padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid rgba(255, 184, 0, .25); background: rgba(255, 184, 0, .06); }
.player-notice h3 { font-size: .85rem; font-weight: 700; color: var(--primary); margin-bottom: .35rem; }
.player-notice p { font-size: .8rem; line-height: 1.6; color: var(--muted); }
@media (min-width: 1280px) { .watch-card { flex-direction: column; } .watch-card-poster { width: 100%; max-width: 12rem; } }

/* ---------- static + 404 ---------- */
.page-static { max-width: 56rem; }
.page-static .section-header { margin-bottom: 1rem; }
.page-notfound { display: flex; justify-content: center; padding-top: 3rem; padding-bottom: 4rem; }
.notfound-card { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; max-width: 36rem; padding: 2.5rem 1.5rem; text-align: center; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--panel); }
.notfound-code { font-size: 5rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--primary); }
.notfound-title { font-size: 1.5rem; font-weight: 700; }
.notfound-card .landing-search { margin-top: .5rem; }

/* ---------- footer ---------- */
.footer { position: relative; overflow: hidden; margin-top: 3rem; border-top: 1px solid var(--line); background: var(--bg-footer); color: var(--text); }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(to right, transparent, rgba(255, 255, 255, .15), transparent); }
.footer-glow { position: absolute; border-radius: 9999px; filter: blur(64px); pointer-events: none; }
.footer-glow-a { left: -6rem; top: 0; width: 18rem; height: 18rem; background: color-mix(in srgb, var(--primary) 10%, transparent); }
.footer-glow-b { right: -5rem; bottom: 0; width: 20rem; height: 20rem; background: rgba(34, 158, 217, .07); }
.footer-top-btn { position: relative; display: flex; justify-content: center; padding-top: 2rem; }
.back-to-top { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.25rem; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, .08); background: var(--panel); font-size: .75rem; font-weight: 600; color: #d1d5db; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); transition: background-color .2s, color .2s; }
.back-to-top:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.footer-container { position: relative; max-width: 80rem; margin: 0 auto; padding: 3rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2.5rem; } }
.footer-brand { grid-column: span 2; }
.footer-logo img { height: 1.75rem; width: auto; }
.footer-description { max-width: 24rem; margin-top: 1rem; font-size: .875rem; line-height: 1.7; color: var(--muted); }
.footer-social { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.social-link { display: inline-flex; align-items: center; padding: .6rem 1rem; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .08); background: var(--panel); font-size: .75rem; font-weight: 600; color: #d1d5db; transition: border-color .2s, background-color .2s, color .2s; }
.social-link:hover { border-color: rgba(255, 184, 0, .4); background: rgba(255, 184, 0, .1); color: var(--text); }
.footer-title { margin-bottom: 1rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.footer-list { display: flex; flex-direction: column; gap: .625rem; }
.footer-link { display: inline-block; font-size: .875rem; color: var(--muted); transition: transform .2s, color .2s; }
.footer-link:hover { transform: translateX(4px); color: var(--primary); }
.footer-disclaimer { margin-top: 2.5rem; padding: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.footer-disclaimer p { font-size: .75rem; line-height: 1.7; color: var(--muted-2); }
.footer-network { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: 1.5rem; }
.footer-network-title { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.footer-network-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.footer-network-links a { padding: .3rem .7rem; border-radius: 9999px; border: 1px solid var(--line); background: var(--panel); font-size: .75rem; color: #d1d5db; transition: border-color .2s, color .2s; }
.footer-network-links a:hover { border-color: rgba(255, 184, 0, .4); color: var(--text); }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted-2); text-align: center; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-extra { display: inline-flex; align-items: center; gap: .5rem; }
.footer-extra-link:hover { color: var(--primary); }
.footer-tagline { color: var(--muted-3); }

/* ---------- misc ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- episode picker (player page): season chips + episode chips ---------- */
.pz-eps { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.pz-eps-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-eps-list { max-height: 236px; overflow-y: auto; padding-right: 2px; }
.pz-eps-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.pz-eps-chip:hover { border-color: var(--primary); color: #fff; }
.pz-eps-chip.is-active { background: var(--primary); border-color: transparent; color: var(--mcms-on-primary, var(--on-primary)); }
@media (max-width: 480px) { .pz-eps-chip { min-height: 40px; min-width: 60px; } }
