/* ============ ICONPLAY web (mobile-first) ============ */
:root {
  --ink: #0b1220;
  --surface: #111a2e;
  --surface-2: #16233c;
  --line: #1f2b45;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --orange: #e4572e;
  --amber: #f59e0b;
  --teal: #22b8a6;
  --radius: 14px;
  --nav-h: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; background: var(--ink); }

body {
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }

/* ---------------- shell ---------------- */
.app {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  position: relative;
}

@media (min-width: 820px) {
  body { background: #05080f; }
  .app {
    box-shadow: 0 0 0 1px #14203a, 0 24px 80px #000a;
    min-height: 100dvh;
  }
}

.view { min-height: 60vh; }

/* ---------------- tabs ---------------- */
.tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 760px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(17, 26, 46, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 40;
}

.tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  letter-spacing: .2px;
  color: var(--muted);
  transition: color .15s;
}

.tabs svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.tabs a.active { color: var(--orange); }

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: linear-gradient(180deg, var(--ink) 70%, rgba(11, 18, 32, 0.75));
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #0b1220; font-weight: 800; font-size: 12px;
}
.brand-name { font-weight: 700; font-size: 14.5px; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: -1px; }
.topbar .spacer { flex: 1; }

.iconbtn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text);
}
.iconbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- generic ---------------- */
.page-head { padding: 6px 16px 8px; }
.page-head h1 { margin: 0; font-size: 23px; letter-spacing: -.4px; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 16px 8px;
}
.section-head h2 { margin: 0; font-size: 15.5px; }
.section-head small { color: var(--muted); font-size: 11.5px; display: block; }

.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 16px 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase;
}
.pill.solid { background: var(--orange); color: #fff; }
.pill.amber { background: var(--amber); color: #231500; }
.pill.ghost { background: #ffffff1a; color: #fff; }
.pill.line { border: 1px solid var(--line); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 16px;
  border-radius: 11px;
  background: var(--orange); color: #fff;
  font-weight: 600; font-size: 14.5px;
  transition: filter .15s, transform .05s;
}
.btn:active { transform: scale(.985); }
.btn:hover { filter: brightness(1.08); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.btn.dark { background: var(--surface-2); color: var(--text); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.card { background: var(--surface); border-radius: var(--radius); padding: 14px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 15px; }
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, #131d31, #1a2740, #131d31); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------- hero ---------------- */
.hero-rail {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 10px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hero-rail::-webkit-scrollbar { display: none; }

.hero {
  position: relative;
  flex: 0 0 88%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: center;
  background: var(--surface-2);
}
@media (min-width: 640px) { .hero { flex-basis: 62%; } }

.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #0000 35%, #0009 70%, #0b1220f2 100%);
}
.hero-body {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 14px;
}
.hero-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.hero h3 { margin: 0 0 3px; font-size: 21px; line-height: 1.2; letter-spacing: -.3px; }
.hero p { margin: 0 0 10px; font-size: 12px; color: #d7e2f2; }
.hero-actions { display: flex; gap: 8px; }

.play-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #111;
  border-radius: 9px; padding: 8px 14px;
  font-weight: 700; font-size: 13px;
}
.play-pill svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------------- posters ---------------- */
.rail .poster { flex: 0 0 154px; scroll-snap-align: start; }
@media (min-width: 640px) { .rail .poster { flex-basis: 172px; } }

.poster { cursor: pointer; }
.poster-img {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.poster-img img { width: 100%; height: 100%; object-fit: cover; }
.poster-img .pill { position: absolute; top: 6px; left: 6px; }
.poster-img .rating {
  position: absolute; top: 6px; right: 6px;
  background: #000000a8; border-radius: 6px;
  padding: 2px 6px; font-size: 10.5px; color: var(--amber); font-weight: 700;
}
.poster-img .watched {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: #ffffff40;
}
.poster-img .watched i { display: block; height: 100%; background: var(--orange); }
.poster-title { margin-top: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  padding: 10px 16px 24px;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 800px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid .poster { min-width: 0; }

/* ---------------- live cards ---------------- */
.chcard {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border-radius: 13px;
  padding: 10px; cursor: pointer;
}
.rail .chcard { flex: 0 0 258px; }

.chlogo {
  flex: 0 0 84px; height: 48px;
  border-radius: 8px; overflow: hidden; background: var(--surface-2);
}
.chlogo img { width: 100%; height: 100%; object-fit: cover; }
.chbody { min-width: 0; flex: 1; }
.chline { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--teal); font-weight: 700; letter-spacing: .3px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.chname { font-size: 13.5px; font-weight: 650; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chnp { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chbar { height: 3px; background: var(--surface-2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.chbar i { display: block; height: 100%; background: var(--orange); }

.live-list { display: flex; flex-direction: column; gap: 10px; padding: 6px 16px 24px; }

/* ---------------- detail ---------------- */
.detail-hero { position: relative; }
.detail-hero img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #0006 0%, #0000 35%, var(--ink) 100%);
}
.detail-nav {
  position: absolute; top: calc(8px + env(safe-area-inset-top, 0px));
  left: 8px; right: 8px; z-index: 3;
  display: flex; justify-content: space-between;
}
.round-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #000000a0; color: #fff;
  backdrop-filter: blur(6px);
}
.round-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round-btn.on { color: var(--orange); }

.detail-body { padding: 0 16px 26px; margin-top: -34px; position: relative; z-index: 2; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.detail-body h1 { margin: 0 0 3px; font-size: 25px; letter-spacing: -.5px; line-height: 1.2; }
.detail-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.detail-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.detail h2 { font-size: 15px; margin: 16px 0 6px; }
.detail p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------------- forms ---------------- */
.form { padding: 8px 16px 28px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%; min-height: 46px; padding: 0 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; color: var(--text); outline: none;
}
.field input:focus { border-color: #2f4a7a; box-shadow: 0 0 0 3px #1d4ed822; }
.form .notice {
  background: #3f1418; color: #fecaca; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}
.split { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------------- account ---------------- */
.account-head {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px 18px;
  background: radial-gradient(500px 200px at 0% 0%, #1b2a4a, transparent);
}
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff; font-weight: 800; font-size: 20px;
}
.account-head h2 { margin: 0; font-size: 18px; }
.account-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.subcard {
  margin: 0 16px 8px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--line);
}
.subcard .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.subcard strong { font-size: 15px; }
.subcard p { margin: 4px 0 10px; color: var(--muted); font-size: 12.5px; }
.plan-tag { color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .4px; }

.list { padding: 4px 10px 20px; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 10px; border-radius: 11px;
}
.list-item + .list-item { border-top: 1px solid var(--line); }
.list-item .li-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
}
.list-item .li-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 14px; }
.list-item .li-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item.danger .li-title, .list-item.danger .li-icon { color: #f87171; }
.list-item .chev { color: var(--line); font-size: 18px; }

.hist-row { display: flex; gap: 10px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
.hist-row::-webkit-scrollbar { display: none; }
.hist-card { flex: 0 0 168px; background: var(--surface); border-radius: 12px; overflow: hidden; cursor: pointer; }
.hist-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hist-card .hc-body { padding: 8px 9px 10px; }
.hist-card .hc-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-card .hc-sub { font-size: 11px; color: var(--muted); }

/* ---------------- plans ---------------- */
.plans { padding: 6px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
}
.plan.popular { border-color: #b45309; box-shadow: 0 0 0 1px #b4530955, 0 10px 30px #00000055; }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.plan h3 { margin: 0; font-size: 15.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.plan .dur { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.plan .price { font-size: 19px; font-weight: 800; color: var(--teal); white-space: nowrap; }
.plan ul { list-style: none; margin: 11px 0 14px; padding: 0; }
.plan li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--muted); padding: 2px 0; }
.plan li::before { content: "✓"; color: var(--teal); font-weight: 800; }

/* ---------------- player ---------------- */
.player {
  position: fixed; inset: 0; z-index: 100;
  background: #000; display: flex; flex-direction: column;
}
.player[hidden] { display: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

.player-top {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 22px;
  background: linear-gradient(180deg, #000000d9, transparent);
  transition: opacity .2s;
}
.player-top.hide { opacity: 0; pointer-events: none; }
.player-title { flex: 1; min-width: 0; }
.player-title strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-title small { display: block; font-size: 11.5px; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pbtn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: #00000066; color: #fff; font-size: 18px;
}
.live-badge {
  background: var(--teal); color: #04201c;
  font-size: 10px; font-weight: 800; letter-spacing: .6px;
  padding: 3px 7px; border-radius: 5px;
}

.player-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%;
  background: #00000066; color: #fff; font-size: 24px;
  display: grid; place-items: center; z-index: 4;
}
.player-center[hidden] { display: none; }

/* indikator buffering live */
.buffering {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.buffering[hidden] { display: none; }
.buffering img {
  width: 78px;
  height: 78px;
  filter: drop-shadow(0 6px 18px #000c);
}

.player-bottom {
  position: relative; z-index: 5; margin-top: auto;
  padding: 34px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, #000000eb, transparent);
}
.player-bottom strong { font-size: 14.5px; display: block; }
.player-sub { font-size: 11.5px; color: #cbd5e1; margin-top: 1px; }
.player .bar { height: 3px; background: #ffffff44; border-radius: 2px; margin-top: 9px; overflow: hidden; }
.player .bar i { display: block; height: 100%; width: 0; background: var(--orange); }
.player-times { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; margin-top: 4px; }
.preview-note {
  display: inline-block; margin-bottom: 7px;
  background: #f59e0b22; color: var(--amber);
  border: 1px solid #f59e0b44;
  border-radius: 7px; padding: 3px 8px;
  font-size: 11px; font-weight: 600;
}
.preview-note[hidden] { display: none; }

/* ---------------- modal & toast ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: #000000b8; backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 22px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.modal-card h3 { margin: 0 0 6px; font-size: 17px; }
.modal-card p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions button { padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.modal-actions .ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.modal-actions .primary { background: var(--orange); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px);
  transform: translateX(-50%);
  max-width: 88vw; z-index: 300;
  background: #e2e8f0; color: #0b1220;
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 30px #0008;
  animation: toast-in .18s ease-out;
}
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------------- misc ---------------- */
.notice-box {
  margin: 0 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12.5px;
}
.badge-line { display: flex; gap: 6px; flex-wrap: wrap; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 6px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border-radius: 9px; padding: 7px 12px;
  background: var(--surface-2); color: var(--muted);
  font-size: 12.5px; white-space: nowrap;
}
.chip.on { background: var(--orange); color: #fff; font-weight: 650; }

.center { display: grid; place-items: center; min-height: 46vh; padding: 24px; text-align: center; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid #2a3a58; border-top-color: var(--orange);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.landing {
  min-height: calc(100dvh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 22px 34px;
  background:
    radial-gradient(700px 320px at 15% -5%, #1d3a6e55, transparent),
    radial-gradient(600px 300px at 105% 5%, #b4530933, transparent);
}
.landing .brand-mark { width: 46px; height: 46px; border-radius: 13px; font-size: 15px; }
.landing h1 { font-size: 33px; line-height: 1.13; letter-spacing: -.8px; margin: 26px 0 10px; }
.landing .lead { color: var(--muted); font-size: 14px; margin: 0 0 20px; max-width: 34ch; }
.landing .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.landing .tag { background: var(--surface-2); color: var(--text); font-size: 11.5px; padding: 6px 10px; border-radius: 8px; }
.landing .legal { text-align: center; color: var(--muted); font-size: 11px; margin-top: 20px; }

/* ---------------- banner slider (iklan / info) ---------------- */
.banner-rail {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding: 4px 16px 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.banner-rail::-webkit-scrollbar { display: none; }

.banner {
  position: relative;
  flex: 0 0 92%;
  aspect-ratio: 8 / 3;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: center;
  background: var(--surface-2);
  cursor: pointer;
}
@media (min-width: 620px) { .banner { flex-basis: 72%; } }

.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #000000d9 0%, #00000073 55%, #0000 100%);
}
.banner-body {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 14px 16px;
}
.banner-body h3 { margin: 6px 0 3px; font-size: 18px; line-height: 1.25; }
.banner-body p { margin: 0; font-size: 12px; color: #d7e2f2; max-width: 36ch; }
.banner-cta { display: inline-block; margin-top: 8px; font-size: 11.5px; color: var(--amber); font-weight: 700; }
.banner-dots { display: flex; gap: 5px; justify-content: center; padding: 9px 0 2px; }
.banner-dots i { width: 6px; height: 4px; border-radius: 2px; background: var(--line); transition: width .2s; }
.banner-dots i.on { width: 16px; background: var(--orange); }

/* ---------------- player ekstra ---------------- */
.preload { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }
.player-next {
  font-size: 11.5px; color: #94a3b8; margin-top: 4px;
  border-left: 2px solid var(--orange);
  padding-left: 7px;
}
.player-next[hidden] { display: none; }
#player-fs { font-size: 17px; }
#player-fs.on { color: var(--orange); }

.player:fullscreen { width: 100vw; height: 100vh; }
.player:fullscreen video { object-fit: contain; }

/* ---------------- channel eksternal (HLS/MP4) ---------------- */
.player-bottom.external .bar,
.player-bottom.external .player-times { display: none; }

/* live internal: sembunyikan timeline agar tampil seperti siaran live */
.player.live-channel .bar,
.player.live-channel .player-times { display: none; }
.player-bottom.external #player-sub { color: var(--amber); }
.player-bottom.external #player-dur { display: none; }

/* ---------------- kontrol auto-hide & EPG overlay ---------------- */
.player-top, .player-bottom { transition: opacity .25s ease; }
.player.ui-hidden .player-top,
.player.ui-hidden .player-bottom { opacity: 0; pointer-events: none; }

.player-actions { margin-top: 10px; display: flex; gap: 8px; }
.player-actions .btn { min-height: 34px; padding: 0 12px; font-size: 12.5px; }

.sheet {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: #000000a8; backdrop-filter: blur(2px); }
.sheet-panel {
  position: relative;
  width: 100%; max-width: 760px; max-height: 74dvh;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column;
  animation: sheet-up .2s ease-out;
}
@keyframes sheet-up { from { transform: translateY(16px); opacity: .5; } }
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.sheet-head strong { font-size: 15px; }
.sheet-sub { font-size: 11.5px; color: var(--muted); }
.sheet-body { overflow-y: auto; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }

.epg-day {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface);
  padding: 9px 16px 6px;
  font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--amber); font-weight: 800;
}
.epg-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid #ffffff08;
}
.epg-item.past { opacity: .45; }
.epg-item.epg-now { background: #f59e0b10; }
.epg-time { flex: 0 0 52px; font-size: 12.5px; font-weight: 700; }
.epg-time span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.epg-info { flex: 1; min-width: 0; }
.epg-title { font-size: 13.5px; }
.epg-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-item .pill { flex: 0 0 auto; }

/* modal harus di atas sheet EPG (termasuk saat fullscreen) */
.modal { z-index: 230; }

/* ---------------- home layout baru ---------------- */
.home-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: linear-gradient(180deg, var(--ink) 78%, rgba(11, 18, 32, 0.65));
  backdrop-filter: blur(10px);
}
.home-logo { height: 34px; width: auto; display: block; }

.brand-mark-img { height: 26px; width: auto; display: block; }

.banner-rail { padding: 0; gap: 0; }
.banner { flex: 0 0 100%; height: clamp(190px, 40vw, 300px); border-radius: 0; aspect-ratio: auto; scroll-snap-align: start; }
@media (min-width: 620px) { .banner { flex-basis: 100%; } }
.banner::after { background: linear-gradient(0deg, #000000d9 0%, #0000004d 55%, #0000 100%); }
.banner-body { padding: 16px 18px 18px; }
.banner-body h3 { font-size: 20px; }
.banner-dots { padding: 10px 0 4px; }

.subhead {
  padding: 12px 16px 2px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
}

/* logo header diperbesar */
.home-head { padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: 12px; }
.home-logo { height: clamp(48px, 12vw, 66px); }
.brand-mark-img { height: 32px; }

/* ---------------- home: logo channel 4 per baris ---------------- */
.live-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 16px 12px;
}
.logo-tile {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  display: block;
}
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }
.logo-tile span {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  padding: 6px; font-size: 11px; text-align: center; color: var(--muted);
}

/* ---------------- VOD detail: slideshow adegan ---------------- */
.detail-hero { aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.detail-hero .hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.3s ease-in-out;
  aspect-ratio: auto;
}
.detail-hero .hero-slide.on { opacity: 1; }
.detail-hero::after { z-index: 1; pointer-events: none; }
.detail-nav { z-index: 3; }

/* ---------------- pemilih kualitas ---------------- */
.pbtn.q { width: auto; min-width: 44px; padding: 0 9px; border-radius: 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; }

.quality-menu {
  position: absolute;
  top: calc(54px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 130;
  min-width: 172px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 44px #000a;
}
.quality-menu[hidden] { display: none; }
.q-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px; color: var(--text); text-align: left;
}
.q-item:hover { background: var(--surface-2); }
.q-item.on { background: var(--surface-2); color: var(--amber); font-weight: 700; }
.q-item.on::after { content: '\2713'; color: var(--amber); }
.q-item:disabled { color: var(--muted); opacity: .7; }

/* ---------------- header baru + drawer ---------------- */
.home-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 6px;
}
.home-head .home-logo {
  justify-self: center;
  height: clamp(54px, 13vw, 74px);
}
.head-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
}
.head-btn:active { background: var(--surface-2); }
.head-btn svg {
  width: 23px; height: 23px;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

.drawer { position: fixed; inset: 0; z-index: 260; }
.drawer[hidden] { display: none; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: #000000a8;
  backdrop-filter: blur(2px);
}
.drawer-panel {
  position: relative;
  width: min(300px, 84vw);
  height: 100%;
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 20px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 50px #000a;
  animation: drawer-in .2s ease-out;
  overflow-y: auto;
}
@keyframes drawer-in { from { transform: translateX(-20px); opacity: .55; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 0 14px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.drawer-logo { height: 30px; width: auto; }
.drawer-nav { display: flex; flex-direction: column; padding: 0 10px; gap: 2px; }
.drawer-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.drawer-nav a::after { content: '›'; color: var(--muted); font-size: 18px; line-height: 1; }
.drawer-nav a:hover, .drawer-nav a.active { background: var(--surface-2); color: var(--amber); }
.drawer-nav a.active::after { color: var(--amber); }

/* ---------------- warna header & footer menu (#172744 = RGB 23,39,68) ---------------- */
.home-head,
.topbar,
.tabs {
  background: #172744;
}

/* ---------------- tombol channel sebelumnya / berikutnya ---------------- */
.player-chnav { display: flex; gap: 8px; margin-top: 8px; }
.chnav-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #ffffff1f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}
.chnav-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chnav-btn .arrow { color: var(--amber); font-weight: 800; flex: 0 0 auto; }
.chnav-btn.next { justify-content: flex-end; text-align: right; }
.chnav-btn:active { background: #ffffff33; }
.chnav-btn:disabled { opacity: .45; }

/* ---------------- landing login + splash logo ---------------- */
.landing.landing-login {
  min-height: 100dvh;
  justify-content: center;
  align-items: center;
  gap: 26px;
  padding: 32px 22px calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
}
.landing-logo {
  width: min(320px, 82vw);
  height: auto;
  display: block;
}
.landing-form { width: min(420px, 100%); padding: 0; }
.landing-form .field { margin-bottom: 14px; }
.landing-form .btn { min-height: 48px; }

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--ink);
  transition: opacity .3s ease;
}
.boot-splash.hide { opacity: 0; pointer-events: none; }
.boot-logo-img {
  width: min(300px, 80vw);
  height: auto;
  display: block;
}

.boot-splash { flex-direction: column; gap: 18px; }

/* watermark logo channel di player */
.player-watermark {
  position: absolute;
  left: 14px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  width: auto;
  height: auto;
  max-width: min(38vw, 120px);
  max-height: 40px;
  opacity: .3;
  filter: url(#wm-white);
  pointer-events: none;
  user-select: none;
}
.player-watermark[hidden] { display: none; }