:root {
  --black: #0a0a0a;
  --navy: #0c0c26;
  --panel: #0d0d0d;
  --box: #202020;
  --line: #303046;
  --line-dark: rgba(255, 255, 255, .06);
  --text: #fff;
  --muted: rgba(255, 255, 255, .55);
  --muted-2: rgba(255, 255, 255, .7);
  --pink: #f70367;
  --purple: #7a0fff;
  --pad: 4vw;
  --header: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--black); }
body {
  margin: 0; min-height: 100vh; background: var(--black); color: var(--text);
  font: 16px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.navy { background: var(--navy); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
svg { flex: none; }
.wrap { padding-left: var(--pad); padding-right: var(--pad); }
main { min-height: calc(100vh - var(--header)); padding-top: var(--header); }

/* Header */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad);
  background: #0a0a0b; transition: background .3s;
}
body.home .header:not(.scrolled) { background: linear-gradient(rgba(0, 0, 0, .8), transparent); }
.header-left { display: flex; align-items: center; gap: 40px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.logo .brand-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .8); white-space: nowrap; transition: color .15s; }
.nav a:hover { color: #fff; }
.nav a.active { color: var(--pink); }
.header-right { display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: background .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn svg, .menu-btn svg, .drawer-close svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.avatar { width: 32px; height: 32px; margin: 0 6px 0 2px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--pink), var(--purple)); }
.avatar svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; place-items: center; }
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); }
.drawer[hidden] { display: none; }
.drawer-panel { position: absolute; inset: 0 0 0 auto; width: min(300px, 85vw); background: #121212; padding: 64px 24px 24px; display: flex; flex-direction: column; gap: 4px; }
.drawer-panel a { padding: 10px 0; font-weight: 500; }
.drawer-label { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.drawer-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; }

.loading { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero */
.hero { position: relative; margin-top: calc(-1 * var(--header)); min-height: 580px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) saturate(1.2) brightness(.55); opacity: 0; transform: scale(1.05); transition: opacity 1s ease, transform 7s ease; }
.hero-bg img.on { opacity: 1; transform: scale(1); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 10, 10, .95) 0%, rgba(10, 10, 10, .6) 45%, rgba(10, 10, 10, .2) 100%), linear-gradient(0deg, var(--black) 0%, transparent 35%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; width: 100%; padding-top: calc(var(--header) + 60px); padding-bottom: 56px; }
.hero-copy { max-width: 600px; }
.hero-copy.in > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy.in > :nth-child(2) { animation-delay: .05s; } .hero-copy.in > :nth-child(3) { animation-delay: .1s; }
.hero-copy.in > :nth-child(4) { animation-delay: .15s; } .hero-copy.in > :nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero-kicker { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-kicker span { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); font-size: 12px; font-weight: 500; }
.hero-kicker .rank { background: linear-gradient(90deg, var(--pink), var(--purple)); font-weight: 700; }
.hero-title { margin: 16px 0 12px; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--muted-2); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 15px; height: 15px; fill: currentColor; }
.hero-meta .free { color: #3ddc97; font-weight: 600; }
.hero-desc { margin: 16px 0 0; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; }
.hero-cta .btn { height: 52px; padding: 0 28px; border-radius: 999px; gap: 10px; }
.hero-play svg { width: 16px; height: 16px; fill: #fff; }
.btn-pink { box-shadow: 0 10px 30px -10px rgba(247, 3, 103, .8); }
.btn-glass { background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); font-weight: 600; }
.btn-glass:hover { background: rgba(255, 255, 255, .22); }
.hero-posters { display: flex; align-items: flex-end; gap: 12px; }
.hero-thumb { position: relative; width: 92px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; opacity: .55; transition: width .45s cubic-bezier(.2, .7, .2, 1), opacity .3s; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb:hover { opacity: .85; }
.hero-thumb.on { width: 240px; opacity: 1; outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -2px; }
.hero-thumb i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--pink); }
.hero-thumb.on i { animation: fill 6.5s linear forwards; }
@keyframes fill { to { width: 100%; } }

/* Genre chips */
.chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .85); transition: background .15s; white-space: nowrap; }
.chip:hover { background: rgba(255, 255, 255, .15); }
.chip.active { background: #fff; color: #111; }

/* Rows & cards */
.shelf { margin: 48px 0 0; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.shelf-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.shelf-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.shelf-tools { display: flex; align-items: center; gap: 6px; }
.see-all { display: inline-flex; align-items: center; gap: 2px; margin-right: 8px; font-size: 14px; font-weight: 500; color: var(--muted-2); white-space: nowrap; }
.see-all:hover { color: var(--pink); }
.see-all svg, .row-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.row-arrow { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); transition: background .15s; }
.row-arrow:hover { background: rgba(255, 255, 255, .18); }
.row { display: flex; gap: 14px; overflow-x: auto; padding: 0 var(--pad) 6px; scroll-padding: 0 var(--pad); scroll-snap-type: x proximity; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row .card { flex: 0 0 180px; scroll-snap-align: start; }
.card { display: block; min-width: 0; }
.poster { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #1a1a1a; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.card:hover .poster img, .rank-card:hover .poster img { transform: scale(1.06); }
.ep-badge { position: absolute; top: 8px; left: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); font-size: 11px; font-weight: 600; }
.poster-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s; }
.poster-play svg { width: 44px; height: 44px; padding: 13px 12px 13px 15px; border-radius: 50%; background: var(--pink); fill: #fff; box-shadow: 0 8px 24px rgba(247, 3, 103, .6); }
.card:hover .poster-play { opacity: 1; }
.card-title { margin: 10px 2px 0; font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .card-title { color: var(--pink); }
.row .card-title { min-height: 39px; }
.views { display: flex; align-items: center; gap: 4px; margin: 2px 2px 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.views svg { width: 12px; height: 12px; fill: currentColor; }
.dot-sep { margin: 0 2px; }
.meta { margin: 2px 2px 0; color: var(--muted); font-size: 12px; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .25); }
.progress i { display: block; height: 100%; background: var(--pink); }

.rank-row { gap: 4px; }
.rank-card { flex: 0 0 auto; display: flex; align-items: flex-end; scroll-snap-align: start; }
.rank-num { margin-right: -18px; font-size: 150px; line-height: .78; font-weight: 700; letter-spacing: -.06em; color: var(--black); -webkit-text-stroke: 2px rgba(255, 255, 255, .55); }
.rank-card .poster { width: 170px; position: relative; z-index: 1; box-shadow: -10px 0 20px rgba(0, 0, 0, .5); }

.promo { margin-top: 56px; }
.promo-card {
  position: relative; display: flex; align-items: center; gap: 32px; padding: 40px 48px; border-radius: 22px; overflow: hidden;
  background: radial-gradient(90% 160% at 0% 0%, rgba(247, 3, 103, .55), transparent 60%), radial-gradient(80% 140% at 80% 100%, rgba(122, 15, 255, .7), transparent 60%), #17143a;
}
.promo-copy { position: relative; z-index: 1; max-width: 520px; }
.promo-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffd66b; }
.promo-kicker svg { width: 18px; height: 18px; }
.promo-card h2 { margin: 8px 0; font-size: 30px; line-height: 1.15; }
.promo-card p { margin: 0; color: var(--muted-2); }
.btn-gold { position: relative; z-index: 1; flex: none; height: 52px; padding: 0 28px; border-radius: 999px; background: linear-gradient(135deg, #ffd66b, #ff9f1a); color: #1a1000; font-weight: 700; box-shadow: 0 10px 30px -10px rgba(255, 180, 40, .8); }
.btn-gold:hover { filter: brightness(1.05); }
.promo-art { position: absolute; right: 40px; top: 50%; display: flex; transform: translateY(-50%) rotate(-8deg); opacity: .9; pointer-events: none; }
.promo-art img { width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; margin-left: -34px; box-shadow: 0 20px 40px rgba(0, 0, 0, .6); }
.promo-art img:nth-child(2) { transform: translateY(-16px); }
.promo-card .btn-gold { margin-left: auto; margin-right: 300px; }

.genre-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.genre-tile { position: relative; height: 120px; padding: 16px; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; transition: transform .2s; }
.genre-tile:hover { transform: translateY(-3px); }
.genre-tile.g0 { background: linear-gradient(135deg, #f70367, #7a0fff); }
.genre-tile.g1 { background: linear-gradient(135deg, #ff8a00, #e52e71); }
.genre-tile.g2 { background: linear-gradient(135deg, #0ea5e9, #6d28d9); }
.genre-tile.g3 { background: linear-gradient(135deg, #10b981, #0e7490); }
.genre-tile.g4 { background: linear-gradient(135deg, #eab308, #c2410c); }
.gt-name { font-size: 17px; font-weight: 700; line-height: 1.2; max-width: 60%; }
.gt-count { font-size: 12px; opacity: .8; }
.gt-art { position: absolute; right: -8px; top: 12px; z-index: -1; display: flex; transform: rotate(12deg); }
.gt-art img { width: 64px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; margin-left: -26px; box-shadow: -6px 6px 16px rgba(0, 0, 0, .35); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 24px 14px; }
.grid.lg { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 16px; }
.grid.lg .card-title { font-size: 15px; }
.more-wrap { display: flex; justify-content: center; margin: 36px 0 0; }
.btn-outline-pill { height: 46px; padding: 0 32px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); font-size: 14px; font-weight: 500; transition: background .15s; }
.btn-outline-pill:hover { background: rgba(255, 255, 255, .08); }
main:has(> .hero) { padding-bottom: 72px; }

/* Inner pages */
.page { padding-top: 40px; padding-bottom: 72px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: #fff; }
.crumbs span.sep { opacity: .7; }
.crumbs .here { color: #fff; }
.page-head h1 { margin: 0; font-size: 36px; line-height: 1.25; font-weight: 700; }
.page-head p { margin: 12px 0 0; max-width: 650px; color: var(--muted); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: rgba(255, 255, 255, .85); white-space: nowrap; transition: border-color .15s; }
.tag:hover { border-color: rgba(255, 255, 255, .45); }
.tag.active { border-color: var(--pink); color: #fff; background: rgba(247, 3, 103, .15); }
.browse-tags { margin: 28px 0 40px; }
.search-box { display: flex; align-items: center; gap: 10px; max-width: 520px; height: 46px; margin-top: 24px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .03); }
.search-box svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 15px; }
.search-box:focus-within { border-color: var(--pink); }
.empty { padding: 48px 0; color: var(--muted); }

/* Genres */
.genre-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.genre-box { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s; }
.genre-box:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .02); }
.stack { display: flex; height: 78px; flex: none; }
.stack img { width: 54px; height: 78px; object-fit: cover; margin-left: -14px; border-radius: 4px; box-shadow: -4px 0 10px rgba(0, 0, 0, .4); }
.stack img:first-child { margin-left: 0; }
.genre-box h3 { margin: 0; font-size: 16px; font-weight: 600; }
.genre-box span { color: var(--muted); font-size: 13px; }

/* Drama detail */
.detail { display: flex; gap: 40px; align-items: flex-start; }
.detail-poster { flex: none; width: 280px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: #1a1a1a; }
.detail-poster.tall { width: 240px; aspect-ratio: 9 / 16; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { min-width: 0; max-width: 660px; }
.detail-body.wide { max-width: none; }
.detail-body h1 { margin: 0 0 16px; font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -.01em; }
.detail-body .eyebrow { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.detail-body .eyebrow + h1 { font-size: 36px; line-height: 1.2; }
.detail-body .desc { margin: 24px 0 0; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, .9); }
.detail-body .seo { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; margin: 28px 0 0; }
.facts.inline { display: flex; gap: 32px; }
.facts dt { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: 8px; font-size: 16px; font-weight: 600; transition: background .15s, border-color .15s; }
.btn-pink { background: var(--pink); }
.btn-pink:hover { background: #ff1f7a; }
.btn-line { border: 1px solid rgba(255, 255, 255, .25); font-weight: 400; font-size: 15px; }
.btn-line:hover { border-color: rgba(255, 255, 255, .5); }
.note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.section-title { margin: 64px 0 16px; font-size: 20px; font-weight: 600; }
.eps { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 14px 12px; }
.ep-thumb { display: block; text-align: center; font-size: 12px; color: var(--muted-2); }
.ep-thumb .img { aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: #1a1a1a; margin-bottom: 4px; position: relative; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ep-thumb:hover img { transform: scale(1.05); }
.ep-thumb.seen .img::after { content: "Watched"; position: absolute; left: 6px; bottom: 6px; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .65); color: #fff; }
.pager { display: flex; justify-content: space-between; margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 15px; color: var(--muted-2); }
.pager a:hover { color: #fff; }

/* Player */
body.player-page { overflow: hidden; }
body.player-page main { padding-top: 0; }
body.player-page .footer { display: none; }
.player-layout { position: fixed; inset: var(--header) 0 0; display: flex; background: var(--panel); border-top: 1px solid var(--line-dark); }
.stage { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.screen { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #000; overflow: hidden; user-select: none; }
.screen > img, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.screen > img { object-fit: cover; }
.overlay { position: absolute; inset: 0; z-index: 3; opacity: 0; transition: opacity .3s; }
.screen.show-ui .overlay, .screen.paused .overlay { opacity: 1; }
.ov-top { position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 14px 14px 36px; background: linear-gradient(rgba(0, 0, 0, .6), transparent); }
.ov-top h1 { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 rgba(0, 0, 0, .8); }
.ov-top .count { font-weight: 500; padding: 0 6px; white-space: nowrap; }
.ov-back { width: 36px; height: 36px; display: grid; place-items: center; }
.ov-back svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.2; }
.ov-center { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: none; place-items: center; background: rgba(0, 0, 0, .45); pointer-events: none; }
.screen.paused .ov-center { display: grid; }
.ov-center svg { width: 28px; height: 28px; fill: #fff; margin-left: 4px; }
.ov-bottom { position: absolute; inset: auto 0 0; padding: 40px 14px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.ov-bottom .bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.seek { position: relative; flex: 1; height: 16px; cursor: pointer; display: flex; align-items: center; touch-action: none; }
.seek::before { content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.seek i { position: relative; height: 3px; border-radius: 3px; background: #fff; }
.seek i::after { content: ""; position: absolute; right: -6px; top: -4.5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.mute { width: 28px; height: 28px; display: grid; place-items: center; }
.mute svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
.side-actions { position: absolute; right: 10px; bottom: 90px; z-index: 4; display: none; flex-direction: column; gap: 18px; align-items: center; }
.side-actions button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.side-actions svg { width: 30px; height: 30px; fill: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.side-actions .star.on svg { fill: var(--pink); }
.side-actions .share svg { fill: none; stroke: #fff; stroke-width: 1.8; }
.end-card { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; text-align: center; padding: 24px; background: rgba(0, 0, 0, .75); }
.end-card p { margin: 0 0 16px; }
.next-toast { position: absolute; left: 12px; right: 12px; bottom: 64px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(20, 20, 20, .92); font-size: 14px; }
.next-toast button { font-size: 13px; color: var(--muted-2); }
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 80; transform: translateX(-50%); padding: 10px 18px; border-radius: 8px; background: #fff; color: #000; font-size: 14px; font-weight: 500; }

.sidebar { width: 460px; flex: none; overflow-y: auto; padding: 24px 40px 40px; border-left: 1px solid var(--line-dark); scrollbar-width: thin; scrollbar-color: #333 transparent; }
.sidebar .crumbs { flex-wrap: nowrap; font-size: 16px; }
.sidebar .crumbs > * { flex: none; }
.sidebar .crumbs a.series { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar h2 { margin: 20px 0 14px; text-align: center; font-size: 21px; line-height: 1.33; font-weight: 700; }
.sidebar .synopsis { margin: 0; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.73; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar .synopsis.open { display: block; }
.show-more { display: block; margin: 6px auto 0; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.social { display: flex; justify-content: center; gap: 40px; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.social button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted-2); }
.social svg { width: 32px; height: 32px; }
.social .star svg { fill: #fff; }
.social .star.on svg { fill: var(--pink); }
.social .share svg { fill: none; stroke: #fff; stroke-width: 1.6; width: 28px; height: 28px; margin: 2px 0; }
.ranges { display: flex; gap: 24px; margin: 20px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); overflow-x: auto; scrollbar-width: none; }
.ranges button { position: relative; padding: 6px 0 10px; font-size: 15px; color: var(--muted); white-space: nowrap; }
.ranges button.active { color: #fff; }
.ranges button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--pink); }
.ep-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 8px; }
.ep-btn { height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--box); font-size: 15px; font-weight: 500; border: 1.5px solid transparent; transition: background .15s; }
.ep-btn:hover { background: #2c2c2c; }
.ep-btn.seen { color: var(--muted-2); }
.ep-btn.current { background: #391f61; border-color: #b315d8; color: #fff; }
.autoplay { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); cursor: pointer; }
.autoplay input { accent-color: var(--pink); }

.sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .5); }
.sheet[hidden] { display: none; }
.sheet-panel { width: 100%; max-height: 70vh; overflow-y: auto; background: #161616; border-radius: 16px 16px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-head h3 { margin: 0; font-size: 16px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head button svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }

/* Footer */
.footer { background: #0b0b0f; border-top: 1px solid rgba(255, 255, 255, .05); color: var(--muted); font-size: 15px; }
body.home .footer { margin-top: 72px; }
.footer-top { padding: 56px 0 40px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-top .logo { color: #fff; }
.footer-top p { margin: 14px 0 0; max-width: 520px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 40px 0; }
.footer-cols h4 { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .25em; color: #fff; }
.footer-cols a { display: block; margin-bottom: 14px; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { padding-top: 20px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .05); font-size: 12px; }


/* Account, wallet & paywall */
.account-slot { display: flex; align-items: center; gap: 8px; }
.coin-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 14px; font-weight: 600; }
.coin-pill svg, .lock-card b svg, .pay-ok svg { width: 18px; height: 18px; vertical-align: -3px; }
.vip-badge { padding: 2px 8px; border-radius: 6px; background: linear-gradient(135deg, #ffc83d, #ff8a00); color: #1a1000; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.drawer-account { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.pink { color: var(--pink); }
.link { color: var(--pink); font-weight: 500; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.auth-card, .pay-card { max-width: 440px; margin: 24px auto 0; }
.pay-card { max-width: 640px; }
.auth-card h1, .pay-card h1 { margin: 0; font-size: 30px; line-height: 1.2; }
.auth-sub { margin: 8px 0 24px; color: var(--muted); }
.btn-google { width: 100%; gap: 10px; background: #fff; color: #1f1f1f; font-weight: 500; font-size: 15px; }
.btn-google svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .12); }
#auth-form label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted-2); }
#auth-form input {
  display: block; width: 100%; height: 46px; margin-top: 6px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: #fff; font: inherit; font-size: 15px; outline: none;
}
#auth-form input:focus, .crypto-pick select:focus { border-color: var(--pink); }
.form-error { min-height: 22px; margin: 4px 0 10px; color: #ff6b8f; font-size: 14px; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.account-head { display: flex; align-items: center; gap: 14px; }
.acct-avatar { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--purple)); font-size: 22px; font-weight: 700; }
.who { flex: 1; min-width: 0; }
.who h1 { margin: 0; font-size: 24px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who p { margin: 2px 0 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

.balance {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding: 22px 26px; border-radius: 18px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(247, 3, 103, .55), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(122, 15, 255, .6), transparent 60%), #17143a;
  border: 1px solid rgba(255, 255, 255, .08);
}
.balance-main { display: flex; flex-direction: column; }
.balance-label { font-size: 13px; color: var(--muted-2); }
.balance-coins { display: flex; align-items: center; gap: 10px; font-size: 38px; font-weight: 700; line-height: 1.2; }
.balance-coins svg { width: 34px; height: 34px; }
.balance-vip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .3); font-size: 14px; color: var(--muted-2); }
.balance-vip svg { width: 18px; height: 18px; opacity: .45; }
.balance-vip.on { color: #ffd66b; background: rgba(255, 200, 61, .14); }
.balance-vip.on svg { opacity: 1; }
.back-note { margin: 16px 0 0; color: var(--muted-2); }

.shop-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; margin-top: 32px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.seg button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--muted-2); }
.seg button svg { width: 18px; height: 18px; }
.seg button[aria-selected="true"] { background: #fff; color: #111; }
.seg-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.seg-note[hidden], .pkgs[hidden] { display: none; }

.pkgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.pkg {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 20px; text-align: left;
  border: 1.5px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .03); transition: border-color .15s, background .15s, transform .15s;
}
.pkg:hover { border-color: rgba(255, 255, 255, .3); transform: translateY(-2px); }
.pkg.active { border-color: var(--pink); background: linear-gradient(160deg, rgba(247, 3, 103, .16), rgba(122, 15, 255, .1)); box-shadow: 0 10px 30px -12px rgba(247, 3, 103, .55); }
.pkg-tag { position: absolute; top: -11px; left: 18px; padding: 2px 10px; border-radius: 999px; background: linear-gradient(90deg, var(--pink), var(--purple)); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.pkg-check { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); color: transparent; }
.pkg-check svg { width: 14px; height: 14px; }
.pkg.active .pkg-check { border-color: var(--pink); background: var(--pink); color: #fff; }
.coin-stack { display: flex; height: 34px; margin-bottom: 10px; }
.coin-stack svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.coin-stack svg + svg { margin-left: -18px; }
.pkg-coins { display: flex; align-items: baseline; gap: 6px; font-size: 28px; font-weight: 700; line-height: 1.15; }
.pkg-coins small { font-size: 14px; font-weight: 500; color: var(--muted); }
.pkg-bonus { margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 200, 61, .14); color: #ffc83d; font-size: 12px; font-weight: 600; }
.pkg-bonus.none { background: none; padding-left: 0; color: var(--muted); font-weight: 400; }
.pkg-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .12); }
.pkg-price { font-size: 20px; font-weight: 700; }
.pkg-unit { font-size: 12px; color: var(--muted); }
.pkg.vip { background: linear-gradient(160deg, rgba(255, 200, 61, .1), rgba(122, 15, 255, .1)); }
.pkg.vip.active { border-color: #ffc83d; box-shadow: 0 10px 30px -12px rgba(255, 200, 61, .5); }
.pkg.vip.active .pkg-check { border-color: #ffc83d; background: #ffc83d; color: #1a1000; }
.pkg-head { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.pkg-head svg { width: 30px; height: 30px; }
.pkg-perks { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted-2); }
.pkg-perks li { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pkg-perks svg { width: 14px; height: 14px; color: #3ddc97; }

.order { position: sticky; top: calc(var(--header) + 20px); padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: #121233; }
.order h2 { margin: 0 0 16px; font-size: 18px; }
.order h3 { margin: 22px 0 10px; font-size: 14px; font-weight: 600; color: var(--muted-2); }
.order-line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.order-line.muted { margin-top: 4px; font-size: 13px; color: var(--muted); }
.order-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.order-total b { font-size: 24px; }
.methods { display: grid; gap: 10px; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; text-align: left; transition: border-color .15s; }
.method > svg { width: 26px; height: 26px; }
.method .m-text { display: flex; flex-direction: column; line-height: 1.3; }
.method small { font-size: 12px; color: var(--muted); }
.method .radio { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line); }
.method.active { border-color: var(--pink); background: rgba(247, 3, 103, .07); }
.method.active .radio { border: 5px solid var(--pink); }
.method:disabled { opacity: .45; cursor: not-allowed; }
.crypto-pick { display: block; margin-top: 12px; font-size: 13px; color: var(--muted-2); }
.crypto-pick[hidden] { display: none; }
.crypto-pick select {
  display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: #fff; font: inherit; font-size: 14px; outline: none;
}
.order .form-error { margin: 10px 0 6px; min-height: 0; }
.pay-btn { height: 50px; gap: 6px; font-size: 16px; font-weight: 600; border-radius: 999px; }
.pay-btn svg { width: 20px; height: 20px; }
.pay-btn.paypal { background: #ffc439; color: #111; }
.pay-btn.paypal:hover { background: #f2b51f; }
.pay-btn.paypal b { color: #003087; font-style: italic; font-weight: 800; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.secure svg { width: 14px; height: 14px; color: #3ddc97; }

.settings { margin-top: 36px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.setting span { display: flex; flex-direction: column; }
.setting small { color: var(--muted); font-size: 13px; }
.switch { appearance: none; position: relative; width: 44px; height: 26px; flex: none; margin: 0; border-radius: 999px; background: rgba(255, 255, 255, .18); cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--pink); }
.switch:checked::after { transform: translateX(18px); }
.history-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hrow { display: grid; grid-template-columns: 1.4fr 1.2fr .7fr .6fr .7fr; gap: 12px; padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--line); }
.hrow:first-child { border-top: 0; }
.hrow:hover { background: rgba(255, 255, 255, .03); }
.st.completed { color: #3ddc97; }
.st.pending { color: #ffc83d; }
.st.failed, .st.cancelled { color: var(--muted); }
.pay-ok { font-size: 17px; }
.crypto-box { display: flex; gap: 24px; align-items: flex-start; margin-top: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.crypto-box img { flex: none; border-radius: 8px; background: #fff; padding: 6px; }
.crypto-box .note { margin: 0; }
.crypto-amount { margin: 2px 0 12px; font-size: 22px; font-weight: 700; }
.crypto-addr { margin: 2px 0 12px; word-break: break-all; }
.crypto-addr code { font-size: 13px; background: rgba(255, 255, 255, .06); padding: 4px 8px; border-radius: 6px; }
.ep-thumb .lock { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(0, 0, 0, .55); }
.ep-thumb .lock svg, .ep-lock svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.2; }
.ep-btn { position: relative; }
.ep-lock { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; background: linear-gradient(135deg, var(--pink), var(--purple)); }
.ep-lock svg { width: 10px; height: 10px; }
.lock-card { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 24px; text-align: center; background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); }
.lock-card h3 { margin: 10px 0 8px; font-size: 20px; }
.lock-card p { margin: 0 0 18px; color: var(--muted-2); font-size: 14px; }
.lock-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--pink), var(--purple)); }
.lock-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; }
.lock-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 260px; margin: 0 auto; }
.lock-card .autoplay { justify-content: center; }

@media (max-width: 1200px) {
  .grid.lg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .eps { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .genre-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { width: 400px; padding: 24px 28px 40px; }
}
@media (max-width: 1023px) {
  /* Mobile/tablet player: full-screen video with side actions and episode sheet. */
  body.player-page .header { display: none; }
  .player-layout { inset: 0; border: 0; }
  .sidebar { display: none; }
  .screen { width: 100%; aspect-ratio: auto; }
  .screen video { object-fit: cover; }
  .side-actions { display: flex; }
  .ov-bottom { padding-right: 70px; }
}
@media (max-width: 767px) {
  :root { --header: 56px; --pad: 16px; }
  .nav, .header-right { display: none; }
  .menu-btn { display: grid; }
  .header .logo span { display: none; }
  .header .logo .brand-icon { width: 28px; height: 28px; }
  .grid, .grid.lg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .grid.lg .card-title { font-size: 14px; }
  .page { padding-top: 24px; }
  .page-head h1 { font-size: 28px; }
  .genre-list { grid-template-columns: 1fr; }
  .detail { flex-direction: column; gap: 24px; }
  .detail-poster { width: 180px; }
  .detail-poster.tall { width: 160px; }
  .detail-body h1, .detail-body .eyebrow + h1 { font-size: 30px; line-height: 1.15; }
  .detail-body .desc { font-size: 15px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts.inline { gap: 20px; flex-wrap: wrap; }
  .eps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
  .pkgs { gap: 10px; }
  .pkg { padding: 16px 14px; }
  .pkg-coins { font-size: 22px; }
  .pkg-foot { flex-direction: column; gap: 0; }
  .vip-pkgs { grid-template-columns: 1fr; }
  .balance { padding: 18px 20px; }
  .balance-coins { font-size: 30px; }
  .seg { display: flex; }
  .seg button { flex: 1; justify-content: center; padding: 0 10px; }
  .hrow { grid-template-columns: 1fr 1fr; }
  .crypto-box { flex-direction: column; align-items: center; text-align: center; }
  .footer-top { padding: 40px 0 28px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) { .shop-grid { grid-template-columns: 1fr; } .order { position: static; } }

@media (max-width: 1100px) {
  .hero-thumb { width: 64px; }
  .hero-thumb.on { width: 180px; }
  .promo-art { display: none; }
  .promo-card .btn-gold { margin-right: 0; }
  .genre-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .hero { min-height: 0; }
  .hero-bg img { filter: blur(0) brightness(.75); inset: 0; width: 100%; height: 100%; }
  .hero-bg::after { background: linear-gradient(0deg, var(--black) 8%, rgba(10, 10, 10, .75) 45%, rgba(10, 10, 10, .1) 75%, rgba(10, 10, 10, .5) 100%); }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; padding-top: 52vh; padding-bottom: 24px; }
  .hero-title { font-size: 32px; margin-top: 12px; }
  .hero-desc { font-size: 14px; -webkit-line-clamp: 2; }
  .hero-cta { margin-top: 18px; }
  .hero-cta .btn { flex: 1; height: 48px; padding: 0 16px; }
  .hero-posters { gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .hero-thumb, .hero-thumb.on { width: 54px; flex: none; }
  .row-arrow { display: none; }
  .shelf { margin-top: 36px; }
  .shelf-head h2 { font-size: 19px; }
  .row { gap: 10px; }
  .row .card { flex-basis: 128px; }
  .card-title { font-size: 13px; }
  .rank-num { font-size: 104px; margin-right: -12px; }
  .rank-card .poster { width: 118px; }
  .promo-card { flex-direction: column; align-items: flex-start; gap: 20px; padding: 28px 22px; }
  .promo-card h2 { font-size: 24px; }
  .promo-card .btn-gold { margin: 0; width: 100%; }
  .genre-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .genre-tile { height: 100px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
}
