/* =====================================================================
   ZyyNime — stylesheet
   Base: hampir-hitam netral, teks cream hangat, satu aksen vermillion.
   Tiap grup konten (Anime/TV Live/Film/YouTube/Donghua/Manga) mewarnai
   ulang token di bawah lewat body[data-theme=...] — lihat akhir file.
   ===================================================================== */

:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  --bg: #0a0b0d;
  --bg-raised: #101216;
  --bg-rgb: 10, 11, 13;
  --tint: 232, 72, 60;
  --glow1: rgba(232, 72, 60, .08);
  --glow2: rgba(232, 72, 60, .04);
  --surface: rgba(255, 255, 255, .04);
  --surface-hi: rgba(255, 255, 255, .075);
  --surface-solid: #17191d;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);

  --accent: #e8483c;
  --accent-soft: rgba(232, 72, 60, .15);
  --accent-glow: rgba(232, 72, 60, .38);
  --accent-ink: #fdf3f1;
  --danger: #ff6b6b;

  --text: #f4efe6;
  --text-dim: #a8a49c;
  --text-faint: #706c66;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, .8);

  --header-h: 60px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--accent-soft); color: var(--text); }

/* scrollbar tipis */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 99px; }

.glass {
  background: var(--surface-solid);
  border: 1px solid var(--line);
}

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--bg-rgb), .92);
  border-bottom: 1px solid var(--line);
  transition: transform .32s var(--ease-out);
}
.site-header.hide { transform: translateY(-100%); }

.header-inner {
  max-width: 1240px; margin: 0 auto;
  height: var(--header-h);
  padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
}

.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; user-select: none; }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-name { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; font-style: italic; }
.brand-name b { color: var(--accent); font-weight: 600; font-style: normal; }

.mode-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px 0 12px;
  border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: border-color .2s, background .2s;
}
.mode-pill:hover { border-color: var(--line-strong); background: var(--surface-hi); }
.mode-pill .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.mode-pill svg { opacity: .7; }

.header-spacer { flex: 1; }
.mode-pill { white-space: nowrap; min-width: 0; max-width: 100%; }
.mode-pill #mode-pill-text { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) {
  .desk-nav { display: none !important; }
  .header-inner { padding: 0 14px; gap: 12px; }
  .header-spacer { display: none; }
  .mode-pill { margin-left: auto; min-width: 0; }
  .brand-name { font-size: 18px; }
}

.desk-nav { display: flex; gap: 4px; }
.desk-nav button {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 8px;
  transition: color .2s, background .2s;
}
.desk-nav button:hover { color: var(--text); background: var(--surface); }
.desk-nav button.active { color: var(--accent); }

/* =====================================================================
   Layout
   ===================================================================== */
main {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  padding: 24px 20px calc(var(--nav-h) + var(--safe-b) + 48px);
}
@media (min-width: 900px) { main { padding-bottom: 80px; } }

.section-title {
  display: flex; align-items: center; gap: 12px;
  margin: 36px 0 16px;
}
.section-title:first-child { margin-top: 4px; }
.section-title h2 { font-size: 20px; font-weight: 600; font-style: italic; }
.section-title .count {
  font-size: 12px; font-weight: 600; color: var(--text-faint);
  font-family: 'Inter', sans-serif;
}
.section-title .push { margin-left: auto; }

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 600; font-style: italic; }
.page-head p { margin: 6px 0 0; color: var(--text-dim); font-size: 14px; font-family: 'Inter', sans-serif; }

/* =====================================================================
   Search bar
   ===================================================================== */
.searchbar {
  position: relative; display: flex; align-items: center;
  width: 100%; max-width: 640px; height: 48px;
  margin-bottom: 22px;
  border-radius: var(--radius); padding: 0 6px 0 18px;
  background: var(--surface-solid); border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.searchbar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.searchbar .s-icon { color: var(--text-faint); flex-shrink: 0; margin-right: 12px; display: flex; }
.searchbar:focus-within .s-icon { color: var(--accent); }
.searchbar input {
  flex: 1; min-width: 0; height: 100%;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 500;
}
.searchbar input::placeholder { color: var(--text-faint); }
.searchbar .s-clear {
  width: 32px; height: 32px; border: none; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--text-faint);
  display: none; align-items: center; justify-content: center; margin-right: 4px;
}
.searchbar .s-clear:hover { color: var(--text); background: var(--surface-hi); }
.searchbar.has-text .s-clear { display: flex; }
.searchbar .s-go {
  height: 36px; min-width: 36px; padding: 0 18px; flex-shrink: 0;
  border: none; border-radius: 7px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  transition: filter .2s;
}
.searchbar .s-go:hover { filter: brightness(1.1); }
.searchbar .s-go:active { filter: brightness(.95); }
@media (max-width: 480px) {
  .searchbar { height: 46px; padding-left: 14px; }
  .searchbar .s-go { padding: 0; width: 36px; height: 36px; min-width: 36px; justify-content: center; }
  .searchbar .s-go span { display: none; }
}
.searchbar .s-go svg { display: none; }
@media (max-width: 480px) { .searchbar .s-go svg { display: block; } }

/* =====================================================================
   Chips / filter
   ===================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -20px; padding-right: 20px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  padding: 7px 14px; border-radius: 7px;
  border: 1px solid var(--line);
  transition: all .2s var(--ease-out);
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
}

select.select {
  appearance: none; -webkit-appearance: none;
  color: var(--text); font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 36px 9px 14px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background-color: var(--surface-solid);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8a49c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select.select option { background: #17191d; color: var(--text); }
select.select:focus { outline: none; border-color: var(--accent); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }

/* =====================================================================
   Poster cards & grid — 2:3 tajam, satu shadow, tanpa glass
   ===================================================================== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; } }
@media (max-width: 380px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card { position: relative; cursor: pointer; outline-offset: 4px; min-width: 0; }
.card .poster {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 4px;
  background: var(--surface-hi);
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.card .poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease-out); }
.card .poster::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(var(--bg-rgb),.7) 0%, transparent 38%);
}
@media (hover: hover) {
  .card:hover .poster { box-shadow: 0 0 0 2px var(--accent); }
  .card:hover .poster img { transform: scale(1.04); }
}
.card:active .poster { transform: scale(.98); }

.card .badge {
  position: absolute; top: 6px; z-index: 2;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 4px 7px; border-radius: 4px;
}
.card .badge.l { left: 6px; background: rgba(0,0,0,.7); color: var(--text); }
.card .badge.r { right: 6px; background: var(--accent); color: var(--accent-ink); }

.card .info { padding: 9px 1px 0; }
.card .c-title {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 14px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .info { display: flex; flex-direction: column; }
.card .c-meta { margin-top: 3px; font-size: 12px; color: var(--text-faint); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Inter', sans-serif; }

.progress-line { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.14); z-index: 3; }
.progress-line i { display: block; height: 100%; background: var(--accent); }

.card .del {
  position: absolute; top: 6px; right: 6px; z-index: 4;
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: rgba(0,0,0,.7); color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.card .del:hover { background: var(--danger); color: #fff; }

/* Shelf (horizontal) */
.shelf { position: relative; margin: 0 -20px; }
@media (min-width: 1280px) {
  .shelf { margin: 0; }
  .shelf-track { padding-left: 0; padding-right: 0; scroll-padding-left: 0; }
}
.shelf-track {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 20px 16px;
  scroll-snap-type: x proximity; scroll-padding-left: 20px;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track .card { flex: 0 0 150px; scroll-snap-align: start; }
@media (min-width: 720px) { .shelf-track .card { flex-basis: 170px; } }
.shelf-ctl { display: none; position: absolute; right: 20px; top: -46px; gap: 6px; }
@media (hover: hover) and (min-width: 720px) { .shelf-ctl { display: flex; } }
.shelf-ctl button {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  color: var(--text); display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.shelf-ctl button { border: 1px solid var(--line); background: var(--surface-solid); }
.shelf-ctl button:hover { border-color: var(--accent); color: var(--accent); }

/* =====================================================================
   Hero (halaman utama anime) — editorial, satu judul besar
   ===================================================================== */
.hero {
  position: relative; overflow: hidden; margin-bottom: 8px;
  border-radius: var(--radius-lg);
  min-height: 340px; display: flex; align-items: flex-end;
  cursor: pointer;
}
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(var(--bg-rgb),1) 4%, rgba(var(--bg-rgb),.75) 40%, rgba(var(--bg-rgb),.1) 90%);
}
.hero .body { position: relative; z-index: 2; padding: 32px; max-width: 640px; }
.hero .tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--accent);
  margin-bottom: 10px; font-family: 'Inter', sans-serif;
}
.hero h2 { font-size: clamp(28px, 5vw, 44px); line-height: 1.05; font-weight: 600; font-style: italic; }
.hero p { margin: 12px 0 0; color: var(--text-dim); font-size: 14px; font-family: 'Inter', sans-serif; max-width: 52ch; }
.hero .play {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 22px; border-radius: 7px; border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px;
  transition: filter .2s;
}
.hero .play:hover { filter: brightness(1.1); }

/* =====================================================================
   Detail
   ===================================================================== */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px 0 10px; margin-bottom: 20px;
  border-radius: 7px; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface-solid); color: var(--text-dim); font-size: 13px; font-weight: 600;
  transition: all .2s;
}
.back-btn:hover { color: var(--accent); border-color: var(--accent); }

.detail-hero { display: grid; grid-template-columns: 200px 1fr; gap: 26px; margin-bottom: 28px; }
@media (max-width: 640px) { .detail-hero { grid-template-columns: 120px 1fr; gap: 16px; } }
.detail-hero .cover {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block;
  border-radius: 6px;
  background: var(--surface-hi); box-shadow: var(--shadow);
}
.detail-hero h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.1; font-weight: 600; font-style: italic; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag-pill {
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 6px;
  color: var(--text-dim); background: var(--surface-solid); border: 1px solid var(--line);
  font-family: 'Inter', sans-serif;
}
.tag-pill.hot { color: var(--accent); border-color: var(--accent); }
.synopsis {
  color: var(--text-dim); font-size: 14.5px; line-height: 1.75; max-width: 68ch; white-space: pre-line;
  font-family: 'Inter', sans-serif;
}
.synopsis.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.more-btn { background: none; border: none; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px 0; }

/* =====================================================================
   Player
   ===================================================================== */
.player-wrap {
  background: #000; border-radius: 6px; overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.player-wrap video { width: 100%; display: block; max-height: 72vh; background: #000; }
.player-wrap iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; background: #000; }
.player-empty {
  aspect-ratio: 16/9; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center; padding: 20px;
  color: var(--text-faint); font-size: 14px; font-weight: 600;
}
.player-empty svg { color: var(--accent); opacity: .8; }

.row { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.row .lbl { color: var(--text-faint); font-size: 12px; font-weight: 600; margin-right: 2px; font-family: 'Inter', sans-serif; }
.seg {
  font-size: 12.5px; font-weight: 600; padding: 7px 15px; border-radius: 7px; cursor: pointer;
  color: var(--text-dim); border: 1px solid var(--line); background: var(--surface-solid); transition: all .2s;
}
.seg:hover { color: var(--text); border-color: var(--line-strong); }
.seg.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 7px; }
.ep-grid button {
  height: 40px; border-radius: 6px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-solid);
  color: var(--text-dim); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px;
  transition: all .15s var(--ease-out);
}
.ep-grid button:hover:not(.active) { border-color: var(--accent); color: var(--text); }
.ep-grid button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

.pager { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pager button {
  height: 36px; padding: 0 15px; border-radius: 7px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-solid);
  font-size: 13px; font-weight: 600; color: var(--text-dim); transition: all .2s;
}
.pager button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }
.pager .info { color: var(--text-faint); font-size: 12.5px; font-weight: 600; font-family: 'Inter', sans-serif; }

/* =====================================================================
   Jadwal
   ===================================================================== */
.jadwal-day { border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; background: var(--surface-solid); }
.jadwal-day summary {
  display: flex; align-items: center; gap: 10px; padding: 15px 16px; cursor: pointer;
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-style: italic; font-size: 15px; list-style: none;
}
.jadwal-day summary::-webkit-details-marker { display: none; }
.jadwal-day summary .n { margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 600; font-family: 'Inter', sans-serif; }
.jadwal-day summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint); transform: rotate(45deg); transition: transform .25s var(--ease-out); margin-left: 4px; }
.jadwal-day[open] summary::after { transform: rotate(-135deg); }
.jadwal-day[open] summary { color: var(--accent); }
.jadwal-entries { padding: 0 18px 16px; }
.jadwal-entry { border-top: 1px solid var(--line); padding: 12px 0 0; margin-top: 12px; }
.jadwal-entry .jt { font-weight: 700; font-size: 14px; }
.jadwal-entry .ji { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.jadwal-empty { padding: 0 18px 16px; font-size: 13px; color: var(--text-faint); }

/* =====================================================================
   States
   ===================================================================== */
.state { text-align: center; padding: 72px 20px; color: var(--text-faint); font-size: 14px; font-weight: 600; animation: stateIn .35s var(--ease-out) both; }
.state.err { color: var(--danger); }
.state .big { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-style: italic; font-size: 18px; color: var(--text); margin-bottom: 6px; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 72px 20px; color: var(--text-faint); font-size: 13px; font-weight: 600; animation: stateIn .3s var(--ease-out) both; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--surface-hi); border-top-color: var(--accent);
  animation: spin .75s linear infinite;
}
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stateIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
@media (max-width: 560px) { .skeleton-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; } }
.sk { border-radius: 4px; aspect-ratio: 2/3; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-hi) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.sentinel { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 28px 0; color: var(--text-faint); font-size: 13px; font-weight: 600; }

.danger-btn {
  height: 36px; padding: 0 15px; border-radius: 7px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,107,107,.4); color: var(--danger);
  font-size: 13px; font-weight: 600; transition: all .2s;
}
.danger-btn:hover { background: rgba(255,107,107,.12); }

/* =====================================================================
   Manga — daftar chapter memanjang, bukan poster grid
   ===================================================================== */
.chapter-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.chapter-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chapter-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; transition: background .15s; background: var(--surface-solid); border: none;
}
.chapter-item:hover { background: var(--surface-hi); }
.chapter-item .ch-t { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-item .ch-d { font-size: 12px; color: var(--text-faint); font-weight: 500; flex-shrink: 0; font-family: 'Inter', sans-serif; }
.chapter-item .ch-arrow { color: var(--accent); flex-shrink: 0; opacity: .7; }
.chapter-item.read { opacity: .5; }
.chapter-item.current { background: var(--accent-soft); }

/* ---------- Reader ---------- */
body.reading { padding-bottom: 0; }
body.reading .site-header { display: none; }
body.reading main { padding-top: 0; max-width: 100%; padding-left: 0; padding-right: 0; padding-bottom: 0; }
body.reading .bottom-nav { display: none; }

.reader { position: relative; }

/* Bar atas reader: hilang saat scroll-down, muncul lagi saat scroll-up */
.reader-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transform: translateY(0);
  transition: transform .34s var(--ease-out);
  background: rgba(var(--bg-rgb), .96);
  border-bottom: 1px solid var(--line);
}
.reader-bar.hidden { transform: translateY(-110%); box-shadow: none; }
.reader-bar.hidden .reader-progress i { box-shadow: none; }
.reader-bar-inner {
  max-width: 900px; margin: 0 auto; padding: 8px 14px;
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 7px; cursor: pointer; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: all .2s;
}
.icon-btn:hover { color: var(--accent); background: var(--surface-hi); }
.reader-titles { min-width: 0; }
.reader-titles .rt-series { font-size: 11.5px; color: var(--text-faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Inter', sans-serif; }
.reader-titles .rt-chapter { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reader-nav { display: flex; align-items: center; gap: 6px; }
.nav-btn {
  height: 36px; min-width: 36px; padding: 0 12px; border-radius: 7px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-solid);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: all .2s var(--ease-out);
}
.nav-btn:hover:not(.disabled) { border-color: var(--accent); color: var(--accent); }
.nav-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nav-btn.primary:hover:not(.disabled) { filter: brightness(1.08); color: var(--accent-ink); }
.nav-btn.disabled { opacity: .3; pointer-events: none; }
.nav-btn .lbl-txt { display: none; }
@media (min-width: 640px) { .nav-btn .lbl-txt { display: inline; } }

.reader-progress { height: 3px; background: transparent; }
.reader-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .12s linear; }

.reader-pages { display: flex; flex-direction: column; align-items: center; padding-top: 62px; background: #000; min-height: 100vh; }
.reader-page { width: 100%; max-width: 860px; display: block; min-height: 220px; background: #050505; }
.reader-page.err { display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 13px; padding: 40px 20px; cursor: pointer; }

/* Akhir chapter: kartu ajakan lanjut */
.reader-end { max-width: 860px; margin: 0 auto; padding: 36px 20px 60px; text-align: center; }
.reader-end .done { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.reader-end .sub { color: var(--text-faint); font-size: 13px; margin-bottom: 20px; font-family: 'Inter', sans-serif; }
.reader-end .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.reader-end .nav-btn { height: 44px; padding: 0 20px; font-size: 14px; }
.reader-end .nav-btn .lbl-txt { display: inline; }

/* Tombol melayang "ke atas" */
.fab-top {
  position: fixed; right: 16px; bottom: calc(20px + var(--safe-b)); z-index: 55;
  width: 44px; height: 44px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface-solid);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all .3s var(--ease-out);
}
.fab-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* =====================================================================
   Bottom nav (mobile) + Source sheet
   ===================================================================== */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: none; align-items: stretch; justify-content: space-around;
  background: rgba(var(--bg-rgb), .97);
  border-top: 1px solid var(--line);
}
@media (max-width: 899px) { .bottom-nav { display: flex; } }
.bottom-nav button {
  flex: 1; background: none; border: none; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-faint); font-size: 11px; font-weight: 600;
  transition: color .2s;
}
.bottom-nav button.active { color: var(--accent); }
.bottom-nav button.active::before {
  content: ''; position: absolute; top: 0; width: 24px; height: 2px;
  background: var(--accent);
}

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .65);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 101; left: 0; right: 0; bottom: 0;
  max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 16px 16px 0 0; padding: 10px 18px calc(24px + var(--safe-b));
  background: var(--bg-raised);
  border: 1px solid var(--line-strong); border-bottom: none;
  transform: translateY(105%); transition: transform .4s var(--ease-out);
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.9);
}
.sheet.open { transform: translateY(0); }
@media (min-width: 900px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 76px; width: 420px; max-height: 76vh; border-radius: var(--radius-lg); border-bottom: 1px solid var(--line-strong); transform: translate(-50%, -14px) scale(.97); opacity: 0; pointer-events: none; transition: transform .3s var(--ease-out), opacity .25s; }
  .sheet.open { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
}
.sheet .grab { width: 36px; height: 4px; border-radius: 99px; background: var(--line-strong); margin: 4px auto 14px; }
@media (min-width: 900px) { .sheet .grab { display: none; } }
.sheet h3 { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.sheet .sheet-sub { color: var(--text-faint); font-size: 12.5px; margin-bottom: 16px; font-family: 'Inter', sans-serif; }
.sheet .grp-label { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--text-faint); margin: 18px 0 8px; font-family: 'Inter', sans-serif; }
.sheet-list { display: flex; flex-direction: column; gap: 2px; }
.sheet-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 8px; cursor: pointer;
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  background: none; border: none;
  transition: background .15s;
}
.sheet-item:hover { color: var(--text); background: var(--surface-hi); }
.sheet-item .ico { width: 32px; height: 32px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--surface-hi); color: var(--text-dim); flex-shrink: 0; }
.sheet-item .sub { display: block; font-size: 11.5px; color: var(--text-faint); font-weight: 500; margin-top: 1px; font-family: 'Inter', sans-serif; }
.sheet-item.active { color: var(--accent); background: var(--accent-soft); }
.sheet-item.active .ico { background: var(--accent); color: var(--accent-ink); }
.sheet-item .tick { margin-left: auto; color: var(--accent); opacity: 0; }
.sheet-item.active .tick { opacity: 1; }

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


/* =====================================================================
   Live TV · Film · YouTube (halaman NanzStream)
   ===================================================================== */

/* Chip kategori (geser horizontal di HP) */
.chip-row {
  display: flex; gap: 8px; margin: 0 -20px 22px; padding: 2px 20px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.chip-row::-webkit-scrollbar { display: none; }
@media (min-width: 1280px) { .chip-row { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }
.chip {
  flex: 0 0 auto; height: 34px; padding: 0 15px; border-radius: 7px; cursor: pointer;
  font-size: 13px; font-weight: 600; white-space: nowrap; scroll-snap-align: start;
  color: var(--text-dim); background: var(--surface-solid); border: 1px solid var(--line);
  transition: all .2s var(--ease-out);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.searchbar + .chip-row { margin-top: 0; }

/* Grid YouTube: kartu landscape 16:9, radius kecil ala platform video */
.yt-grid { display: grid; grid-template-columns: 1fr; gap: 22px 16px; }
@media (min-width: 560px)  { .yt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .yt-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .yt-grid { grid-template-columns: repeat(4, 1fr); } }

.yt-card { cursor: pointer; min-width: 0; outline-offset: 4px; }
.yt-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 6px; background: var(--surface-hi);
  transition: transform .2s var(--ease-out);
}
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-dur {
  position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 4px;
  font-size: 11.5px; font-weight: 700; line-height: 1.2; color: #fff; background: rgba(0,0,0,.8);
}
.yt-info { padding: 10px 2px 0; min-width: 0; }
.yt-title {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.yt-meta { margin-top: 3px; font-size: 12.5px; color: var(--text-faint); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Inter', sans-serif; }
@media (hover: hover) { .yt-card:hover .yt-thumb { transform: scale(1.015); } }
.yt-card:active .yt-thumb { transform: scale(.98); }

.yt-sk i { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); }
.yt-sk b { display: block; height: 12px; border-radius: 6px; margin-top: 10px; width: 85%; }
.yt-sk b + b { width: 55%; height: 10px; margin-top: 8px; }
.yt-sk i, .yt-sk b { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-hi) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }

.yt-watch-info { margin: 4px 0 26px; }
.yt-watch-info h1 { font-size: clamp(18px, 3vw, 24px); font-weight: 700; line-height: 1.3; }
.yt-watch-info p { margin: 6px 0 0; color: var(--text-dim); font-size: 13.5px; font-weight: 600; }

/* Shelf di hub: ukuran kartu landscape */
.shelf-yt .shelf-track .yt-card { flex: 0 0 250px; scroll-snap-align: start; }
.shelf-live .shelf-track .live-tile { flex: 0 0 170px; scroll-snap-align: start; }
@media (min-width: 720px) { .shelf-yt .shelf-track .yt-card { flex-basis: 290px; } .shelf-live .shelf-track .live-tile { flex-basis: 190px; } }

/* Live TV: ubin logo channel (logo tidak dipotong) */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
@media (max-width: 480px) { .live-grid { grid-template-columns: repeat(2, 1fr); } }
.live-tile { cursor: pointer; min-width: 0; outline-offset: 4px; }
.live-logo {
  position: relative; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--surface-solid); border: 1px solid var(--line);
  padding: 16px; overflow: hidden; transition: border-color .2s;
}
.live-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.live-logo > span:not(.live-badge) { color: var(--accent); opacity: .7; }
.live-badge {
  position: absolute; top: 7px; left: 7px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em; line-height: 1;
  padding: 4px 7px; border-radius: 4px; background: rgba(0,0,0,.75); color: var(--text);
}
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; }
.live-name { margin-top: 8px; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-meta { margin-top: 2px; font-size: 12px; color: var(--text-faint); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Inter', sans-serif; }
@media (hover: hover) { .live-tile:hover .live-logo { border-color: var(--accent); } }
.live-tile:active .live-logo { transform: scale(.98); }


/* Player: selalu 16:9, tidak dipaksa tinggi 420px lagi */
.player-wrap iframe { aspect-ratio: 16 / 9; height: auto; min-height: 0; }

/* Tombol server: pill rapi, bukan kotak kecil */
.row-label { color: var(--text-faint); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; }
.server-row { gap: 8px; margin-bottom: 26px; }
.server-row .seg { height: 38px; padding: 0 18px; font-family: inherit; }

/* =====================================================================
   TEMA PER GRUP KONTEN — body[data-theme] diset dari app.js (applyTheme)
   Satu bg netral dipertahankan (#0a0b0d–#0f1013); yang berubah cuma
   hue aksen, supaya semua grup terasa satu keluarga tapi tetap beda.
   Anime pakai token dasar (vermillion) sebagai bahasa utama produk.
   ===================================================================== */
body[data-theme="youtube"] {
  --bg: #0f0f10; --bg-rgb: 15, 15, 16; --bg-raised: #161617;
  --surface: rgba(255,255,255,.045); --surface-hi: rgba(255,255,255,.08); --surface-solid: #1c1c1d;
  --line: rgba(255,255,255,.1); --line-strong: rgba(255,255,255,.2);
  --accent: #cc4125; --accent-soft: rgba(204,65,37,.15); --accent-glow: rgba(204,65,37,.3); --accent-ink: #fdf3f1;
  --text: #efefef; --text-dim: #a8a8a8; --text-faint: #737373;
}
/* Film: merah-gold gelap ala lampu bioskop/plakat klasik — bukan lavender lembut */
body[data-theme="film"] {
  --bg: #120c08; --bg-rgb: 18, 12, 8; --bg-raised: #1a120b;
  --surface-solid: #201509;
  --accent: #c9762e; --accent-soft: rgba(201,118,46,.16); --accent-glow: rgba(201,118,46,.35); --accent-ink: #1c1005;
  --text: #f3ece0; --text-dim: #b8a68f; --text-faint: #7c6f5c;
}
/* TV Live: biru-broadcast, berasa "mengudara" — dot merah LIVE jadi satu-satunya kontras hangat */
body[data-theme="tv"] {
  --bg: #070c14; --bg-rgb: 7, 12, 20; --bg-raised: #0c131f;
  --surface-solid: #101a29;
  --accent: #2e8bc9; --accent-soft: rgba(46,139,201,.16); --accent-glow: rgba(46,139,201,.35); --accent-ink: #051019;
  --text: #e8eef5; --text-dim: #96a5b8; --text-faint: #62707f;
}
body[data-theme="manga"] {
  --bg: #0f0a0d; --bg-rgb: 15, 10, 13; --bg-raised: #171015;
  --surface-solid: #1c1418;
  --accent: #d9668e; --accent-soft: rgba(217,102,142,.15); --accent-glow: rgba(217,102,142,.32); --accent-ink: #1c0510;
  --text: #f3e9ee; --text-dim: #b09aa4; --text-faint: #776570;
}
body[data-theme="donghua"] {
  --bg: #0e0c07; --bg-rgb: 14, 12, 7; --bg-raised: #16130c;
  --surface-solid: #1a160e;
  --accent: #cc9a3d; --accent-soft: rgba(204,154,61,.15); --accent-glow: rgba(204,154,61,.3); --accent-ink: #1c1608;
  --text: #f0ead9; --text-dim: #b3a98c; --text-faint: #786f57;
}
body[data-theme="history"] {
  --bg: #090c10; --bg-rgb: 9, 12, 16; --bg-raised: #0f131a;
  --surface-solid: #131820;
  --accent: #4a8fc7; --accent-soft: rgba(74,143,199,.15); --accent-glow: rgba(74,143,199,.32); --accent-ink: #08131c;
  --text: #e9eff4; --text-dim: #9dabb8; --text-faint: #67747f;
}
body { transition: background-color .3s; }

/* ---------- YouTube: chrome mendekati platform aslinya, radius kecil ---------- */
body[data-theme="youtube"] .site-header { background: rgba(15,15,16,.95); }
body[data-theme="youtube"] .chip { border-radius: 7px; }
body[data-theme="youtube"] .chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
body[data-theme="youtube"] .yt-thumb { border-radius: 6px; }
.yt-row { display: flex; gap: 12px; padding-top: 10px; }
.yt-row .yt-info { padding: 0; flex: 1; }
.yt-ava {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 15px; color: #fff; text-transform: uppercase;
}
.yt-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.25); }
.yt-progress i { display: block; height: 100%; background: var(--accent); }

.yt-watch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 1000px) { .yt-watch { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.yt-watch .player-wrap { margin-bottom: 0; border-radius: 8px; box-shadow: none; background: #000; position: relative; }
.yt-watch .player-wrap video { width: 100%; aspect-ratio: 16 / 9; max-height: none; object-fit: contain; }
.yt-watch-info { margin: 14px 0 12px; }
.yt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.yt-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 15px; border-radius: 7px; cursor: pointer;
  background: var(--surface-hi); color: var(--text); border: none; font-weight: 600; font-size: 13.5px;
}
.yt-pill:hover { background: var(--surface-solid); border: 1px solid var(--line-strong); }
.yt-pill.on { background: var(--text); color: var(--bg); }
.yt-note { font-size: 12.5px; color: var(--text-faint); font-weight: 500; margin: -6px 0 16px; line-height: 1.5; font-family: 'Inter', sans-serif; }
.yt-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.yt-mini { display: flex; gap: 10px; cursor: pointer; min-width: 0; }
.yt-mini .yt-thumb { width: 168px; flex-shrink: 0; border-radius: 6px; }
.yt-mini .yt-info { padding: 0; }
.yt-mini .yt-title { font-size: 13.5px; }
@media (max-width: 480px) { .yt-mini .yt-thumb { width: 140px; } }
.audio-cover { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; background: #000 center/cover no-repeat; pointer-events: none; }
.audio-cover::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.audio-cover span { position: relative; font-weight: 700; font-size: 13px; letter-spacing: .02em; color: #fff; display: flex; align-items: center; gap: 8px; font-family: 'Inter', sans-serif; }
.player-wrap.audio-mode .audio-cover { display: flex; }
.player-wrap.audio-mode video { visibility: hidden; }
.player-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--text-dim); font-weight: 600; font-size: 14px; background: rgba(0,0,0,.65); }

/* Mini player: video tetap hidup saat pindah halaman */
#mini-player {
  position: fixed; z-index: 60; left: 10px; right: 10px; display: none; align-items: center; gap: 10px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 10px); padding: 8px 10px 8px 8px; border-radius: 10px;
  background: var(--bg-raised); border: 1px solid var(--line-strong); box-shadow: 0 12px 30px -12px rgba(0,0,0,.85);
}
body.has-mini #mini-player { display: flex; }
body.has-mini main { padding-bottom: 90px; }
@media (min-width: 900px) { #mini-player { left: auto; right: 20px; bottom: 20px; width: 380px; } }
#mini-player .mini-slot { width: 96px; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: #000; flex-shrink: 0; position: relative; cursor: pointer; }
#mini-player .mini-slot video { width: 100%; height: 100%; object-fit: cover; display: block; }
#mini-player .mini-slot .audio-cover { display: flex; }
#mini-player .mini-text { flex: 1; min-width: 0; cursor: pointer; }
#mini-player .mini-title { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mini-player .mini-sub { font-size: 12px; color: var(--text-faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mini-player button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
#mini-player button:hover { background: rgba(255,255,255,.2); }

/* ---------- Filem: gaya poster bioskop — vignette gelap, judul kapital lebar ---------- */
.film-hero {
  position: relative; border-radius: 8px; overflow: hidden; min-height: 340px; margin-bottom: 26px;
  display: flex; align-items: flex-end;
  background: var(--surface-solid) center/cover no-repeat;
}
.film-hero::before { content: ''; position: absolute; inset: 0; background: inherit; filter: blur(30px); transform: scale(1.2); opacity: .5; }
/* Vignette dua-lapis: gelap total di bawah utk teks, gelap di tepi kiri-kanan ala bingkai poster */
.film-hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(var(--bg-rgb),1) 4%, rgba(var(--bg-rgb),.65) 50%, rgba(var(--bg-rgb),.1)),
    linear-gradient(to right, rgba(var(--bg-rgb),.5), transparent 20%, transparent 80%, rgba(var(--bg-rgb),.5));
}
.film-hero .fh-in { position: relative; z-index: 1; display: flex; gap: 24px; align-items: flex-end; padding: 28px; width: 100%; }
.film-hero .fh-poster {
  width: 140px; aspect-ratio: 2 / 3; border-radius: 2px; object-fit: cover; flex-shrink: 0; background: var(--surface-hi);
  box-shadow: 0 24px 48px -16px #000, 0 0 0 1px rgba(255,255,255,.06);
}
/* Judul poster: kapital, tracking lebar — bukan italic seperti section lain */
.film-hero h1 {
  font-family: 'Inter', sans-serif; font-size: clamp(22px, 3.6vw, 34px); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; line-height: 1.15;
}
.film-hero .fh-meta {
  margin: 10px 0 18px; color: var(--accent); font-weight: 700; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; font-family: 'Inter', sans-serif;
}
.film-play {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 2px; border: 1px solid var(--accent); cursor: pointer;
  background: transparent; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.film-play:hover { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 560px) { .film-hero { min-height: 280px; } .film-hero .fh-poster { width: 100px; } .film-hero .fh-in { padding: 16px; gap: 14px; } }
.film-row { margin-bottom: 8px; }
.film-row .shelf-track .card { flex: 0 0 132px; scroll-snap-align: start; }
@media (min-width: 720px) { .film-row .shelf-track .card { flex-basis: 156px; } }
body[data-theme="film"] .card .poster { border-radius: 4px; }
.film-stage { position: relative; margin: 0 -20px 18px; padding: 18px 20px 4px; }
@media (min-width: 900px) { .film-stage { margin: 0 0 18px; } }

/* ---------- Tv Live: pemutar + daftar channel seperti EPG ---------- */
.tv-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 1000px) { .tv-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.tv-stage .player-wrap { position: relative; margin-bottom: 0; background: #000; }
.tv-stage .player-wrap video { width: 100%; aspect-ratio: 16 / 9; max-height: none; object-fit: contain; }
.tv-now { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; }
.tv-now .logo { width: 52px; height: 52px; border-radius: 8px; background: var(--surface-solid); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 6px; flex-shrink: 0; }
.tv-now .logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tv-now h1 { font-family: 'Inter', sans-serif; font-size: clamp(18px, 3vw, 24px); font-weight: 700; font-style: normal; }
.tv-now p { margin: 2px 0 0; color: var(--text-dim); font-size: 13px; font-weight: 500; font-family: 'Inter', sans-serif; }
.tv-live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #ff6b6b; font-family: 'Inter', sans-serif; }
.tv-live-dot i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 6px #ff4d4d; }

/* Rail channel: nomor besar ala EPG kabel TV, bukan cuma logo kecil */
.tv-rail { display: flex; flex-direction: column; gap: 1px; max-height: 70vh; overflow-y: auto; padding-right: 4px; background: var(--line); border-radius: 8px; overflow: hidden; }
@media (max-width: 999px) { .tv-rail { max-height: none; } }
.tv-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; background: var(--surface-solid); }
.tv-item:hover { background: var(--surface-hi); }
.tv-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.tv-item .no {
  order: -1; flex-shrink: 0; width: 34px; text-align: right;
  font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}
.tv-item.active .no { color: var(--accent); }
.tv-item .lg { width: 36px; height: 27px; border-radius: 4px; background: var(--bg-raised); display: flex; align-items: center; justify-content: center; padding: 3px; flex-shrink: 0; }
.tv-item .lg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tv-item .nm { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Inter', sans-serif; }

.tv-help { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tv-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px; background: rgba(0,0,0,.75); color: var(--text-dim); font-weight: 600; font-size: 14px; }
.tv-msg .btn { display: inline-flex; align-items: center; height: 38px; padding: 0 17px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13.5px; border: none; cursor: pointer; }
/* Nomor channel di pojok kartu grid live-tile: gaya sama dgn tv-item, angka besar bukan pill kecil */
.tv-num {
  position: absolute; top: 0; left: 0; z-index: 2;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 4px 8px; border-radius: 0 0 6px 0; background: rgba(0,0,0,.8); color: var(--text);
}

.yt-thumb .del, .live-logo .del {
  position: absolute; top: 6px; right: 6px; z-index: 4; width: 28px; height: 28px; border-radius: 6px;
  border: none; background: rgba(0,0,0,.75); color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.yt-thumb .del:hover, .live-logo .del:hover { background: var(--danger); color: #fff; }
.player-wrap .spinner { margin: 0 auto; }
