/* PROmediaTAJDID — tema merah, putih, hitam */
:root {
  --red: #D7261E;
  --red-text: #C0201A;
  --red-soft: #FF6B60;
  --ink: #111111;
  --ink-2: #333333;
  --muted: #5E5E5E;
  --bg: #F6F5F3;
  --card: #FFFFFF;
  --line: #E4E2DE;
  --thumb: #1A1A1A;
  --top: #111111;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--red-soft); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Bar atas */
.top {
  position: sticky; top: 0; z-index: 20; background: #FFFFFF; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 16px 6px;
  border-bottom: 3px solid var(--red);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 50px; width: auto; display: block; }
.brand-tag { font-size: 10px; font-weight: 800; letter-spacing: 1.4px; line-height: 1.25; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; background: #F0EEEA; display: grid; place-items: center; border: 0; cursor: pointer; }

/* Menu bawah */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--card); border-top: 1px solid var(--line);
  padding: 4px 4px calc(6px + var(--safe-b));
}
.tabs a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tabs a[aria-current="page"] { color: var(--red-text); font-weight: 800; }

/* Susun atur */
main { display: block; max-width: 720px; margin: 0 auto; padding: 16px 16px 28px; outline: none; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
h1, h2, h3 { margin: 0; }
.h-page { font-size: 22px; font-weight: 900; letter-spacing: 0.2px; }
.h-sec { font-size: 15px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; }
.more { font-size: 13px; font-weight: 700; color: var(--red-text); }
.muted { color: var(--muted); font-size: 13px; }
.loading, .empty { color: var(--muted); text-align: center; padding: 40px 12px; }
.note { background: var(--card); border: 1px dashed #CFCBC4; border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }

/* Gambar kecil */
.thumb { position: relative; background: var(--thumb); border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--red); }
.thumb .dur { position: absolute; right: 6px; bottom: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.82); padding: 2px 5px; border-radius: 4px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .8px; padding: 4px 8px; border-radius: 6px; background: var(--red); color: #fff; }
.badge.dark { background: var(--ink); }
.badge.soft { background: #E8E6E2; color: var(--ink); letter-spacing: 0; font-weight: 700; }
.badge .dot { width: 7px; height: 7px; border-radius: 4px; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* Kad hero */
.hero { display: flex; flex-direction: column; background: var(--ink); color: #fff; border-radius: 18px; overflow: hidden; }
.hero .thumb { border-radius: 0; }
.hero .over { position: absolute; top: 12px; left: 12px; }
.hero .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.hero .t { font-size: 17px; font-weight: 800; line-height: 1.25; }
.hero .m { font-size: 13px; color: #C8C8C8; }

/* Senarai baris */
.row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: center; }
.row .t { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row .m { font-size: 12px; color: var(--muted); margin-top: 4px; }
.list { display: flex; flex-direction: column; gap: 12px; }

/* Jalur mendatar */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 62%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.strip > * { scroll-snap-align: start; }
.tile .t { font-size: 13.5px; font-weight: 700; line-height: 1.3; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .m { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Cip penapis */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex-shrink: 0; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }

/* Carian */
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 46px; }
.search svg { width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; outline: none; font: inherit; font-size: 16px; color: var(--ink); min-height: 44px; }

/* Kad siri */
.series { display: flex; flex-direction: column; gap: 10px; background: var(--card); border-radius: 16px; padding: 14px; }
.series .head { display: flex; gap: 12px; align-items: center; }
.series .code { width: 52px; height: 52px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 900; flex-shrink: 0; }
.series .t { font-size: 15px; font-weight: 800; line-height: 1.25; }
.series .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.prog { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.prog .track { flex: 1; height: 6px; border-radius: 3px; background: #ECEAE6; overflow: hidden; }
.prog .fill { height: 6px; background: var(--red); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* Tonton */
.player-wrap { margin: -16px -16px 0; background: #000; aspect-ratio: 16 / 9; position: sticky; top: 65px; z-index: 10; }
.player-wrap iframe, .player-wrap #yt { width: 100%; height: 100%; border: 0; display: block; }
.noembed { position: relative; width: 100%; height: 100%; }
.noembed img { width: 100%; height: 100%; object-fit: cover; opacity: .35; display: block; }
.noembed-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; text-align: center; padding: 16px; }
.noembed-msg p { margin: 0; font-weight: 700; }
.watch-title { font-size: 19px; font-weight: 800; line-height: 1.25; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.act { min-height: 58px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; cursor: pointer; text-align: center; }
.act[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.act svg { width: 20px; height: 20px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; min-height: 44px; }

/* Live */
.event { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 12px; }
.event .when { display: flex; flex-direction: column; align-items: center; gap: 1px; border-radius: 10px; background: var(--ink); color: #fff; padding: 8px 0; text-align: center; }
.event .day { font-size: 10.5px; font-weight: 800; color: var(--red-soft); text-transform: uppercase; }
.event .hr { font-size: 14px; font-weight: 900; }
.event .t { font-size: 14px; font-weight: 800; line-height: 1.3; }
.event .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cal { width: 44px; height: 44px; border-radius: 22px; border: 1px solid #D6D3CE; display: grid; place-items: center; background: var(--card); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 23px; background: var(--red); color: #fff; font-weight: 800; font-size: 14px; border: 0; cursor: pointer; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.foot { font-size: 12px; color: var(--muted); text-align: center; padding-top: 4px; }

@media (min-width: 760px) {
  .tabs { left: 50%; transform: translateX(-50%); max-width: 720px; border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; }
  .player-wrap { margin: 0; border-radius: 14px; overflow: hidden; position: static; }
}
