:root{
  --bg:#0a0a0f;
  --panel:#12121a;
  --panel2:#1a1a24;
  --line:#262633;
  --text:#f4f4f7;
  --mute:#9a9aab;
  --red:#e50f2a;
  --red2:#b30a1f;
  --r:12px;
  --side:236px;
  --pad:28px;
  --nav:64px;
}

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

html,
body{
  background:var(--bg);
  color:var(--text);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow-x:hidden;
  max-width:100%;
}

a{
  color:inherit;
  text-decoration:none;
}

button{
  font:inherit;
  color:inherit;
  background:none;
  border:0;
  cursor:pointer;
}

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

img{
  display:block;
  max-width:100%;
}

:focus-visible{
  outline:2px solid var(--red);
  outline-offset:2px;
}

.app{
  display:grid;
  grid-template-columns:
    var(--side)
    minmax(0,1fr);
  min-height:100vh;
}

.main{
  min-width:0;
}

.only-mobile,
.bottom-nav{
  display:none;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  background:var(--panel);
  border-right:1px solid var(--line);
  padding:22px 14px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.sidebar .logo{
  margin:0 8px 18px;
}

.side-link{
  display:flex;
  align-items:center;
  gap:14px;
  padding:11px 14px;
  border-radius:10px;
  color:#d6d6de;
  font-size:15px;
  transition:.2s;
}

.side-link:hover{
  background:var(--panel2);
}

.side-link.on{
  background:
    linear-gradient(
      90deg,
      var(--red2),
      #7a0d18
    );
  color:#fff;
}

.side-title{
  margin:22px 14px 6px;
  color:var(--mute);
  font-size:14px;
}

.side-link.sm{
  padding:8px 14px;
  font-size:14px;
  color:var(--mute);
}

.side-promo{
  margin-top:auto;
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px;
  font-size:13px;
  color:#d6d6de;
  display:flex;
  gap:10px;
  align-items:center;
}

.side-promo svg{
  color:#f5b73b;
}


/* =========================================================
   HEADER
========================================================= */

.logo{
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:900;
  font-size:26px;
  letter-spacing:-.5px;
}

.logo svg{
  fill:var(--red);
  stroke:none;
  width:26px;
  height:26px;
}

.logo b{
  color:var(--red);
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px var(--pad);
  background:rgba(10,10,15,.85);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}

.topbar .logo{
  display:none;
}

.search-box{
  flex:1;
  max-width:540px;
  margin-right:auto;
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--panel2);
  border:1px solid transparent;
  border-radius:10px;
  padding:0 14px;
  height:42px;
  color:var(--mute);
  transition:.2s;
}

.search-box:focus-within{
  border-color:var(--red);
  color:var(--text);
}

.search-box input{
  flex:1;
  min-width:0;
  background:none;
  border:0;
  outline:0;
  color:var(--text);
  font:inherit;
  font-size:14px;
}

.icon-btn{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  transition:.2s;
}

.icon-btn:hover{
  background:var(--panel2);
}

.avatar{
  background:#3a3a48;
}


/* =========================================================
   GENERAL
========================================================= */

#view{
  padding-bottom:48px;
  outline:0;
}

.sec{
  padding:0 var(--pad);
  margin-top:32px;
}

.sec-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}

.sec-head h2{
  font-size:20px;
  font-weight:700;
}

.sec-head a{
  font-size:13px;
  color:var(--mute);
  display:flex;
  align-items:center;
  gap:4px;
}

.sec-head a:hover{
  color:#fff;
}

.sec-head svg{
  width:16px;
  height:16px;
}


/* =========================================================
   HERO
========================================================= */

.hero{
  position:relative;
  height:clamp(340px,44vw,460px);
  overflow:hidden;
  background:var(--panel);
}

.hero-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:opacity .5s;
}

.hero::after{
  content:"";
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      90deg,
      rgba(10,10,15,.95) 5%,
      rgba(10,10,15,.35) 55%,
      transparent
    ),
    linear-gradient(
      0deg,
      var(--bg),
      transparent 30%
    );
}

.hero-body{
  position:absolute;
  z-index:2;
  left:var(--pad);
  bottom:56px;
  max-width:520px;
}

.badge{
  display:inline-block;
  background:var(--red);
  font-size:12px;
  font-weight:700;
  letter-spacing:.5px;
  padding:6px 12px;
  border-radius:6px;
  margin-bottom:12px;
}

.hero h1{
  font-size:
    clamp(
      30px,
      4.2vw,
      50px
    );
  font-weight:900;
  line-height:1.05;
  letter-spacing:-1px;
  margin-bottom:10px;
}

.meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  color:#cfcfd8;
  font-size:14px;
  align-items:center;
}

.meta i{
  width:4px;
  height:4px;
  border-radius:50%;
  background:var(--mute);
}

.hero p{
  margin:12px 0 18px;
  color:#e2e2ea;
  font-size:15px;
  line-height:1.5;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:46px;
  padding:0 22px;
  border-radius:10px;
  font-weight:600;
  font-size:15px;
  transition:.2s;
}

.btn svg{
  width:18px;
  height:18px;
}

.btn.primary{
  background:var(--red);
}

.btn.primary:hover{
  background:#ff1f3a;
}

.btn.primary svg{
  fill:currentColor;
  stroke:none;
}

.btn.ghost{
  border:1px solid #55555f;
  background:rgba(20,20,28,.6);
}

.btn.ghost:hover{
  background:var(--panel2);
}

.btn.on{
  border-color:var(--red);
  color:#ff5a6d;
}

.btn:active{
  transform:scale(.97);
}

.dots{
  position:absolute;
  z-index:3;
  right:var(--pad);
  bottom:22px;
  display:flex;
  gap:8px;
}

.dots button{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#666;
  transition:.2s;
}

.dots button.on{
  background:var(--red);
  width:22px;
  border-radius:8px;
}


/* =========================================================
   CARDS
========================================================= */

.row{
  display:flex;
  gap:16px;
  overflow-x:auto;
  scroll-snap-type:x proximity;
  padding-bottom:6px;
  scrollbar-width:none;
}

.row::-webkit-scrollbar{
  display:none;
}

.row .card{
  flex:0 0 clamp(
    140px,
    13vw,
    172px
  );
  scroll-snap-align:start;
}

.grid{
  display:grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(160px,1fr)
    );
  gap:22px 16px;
}

.card{
  display:block;
  min-width:0;
}

.card .poster{
  position:relative;
  aspect-ratio:2/3;
  border-radius:var(--r);
  overflow:hidden;
  background:var(--panel2);
  transition:
    transform .25s,
    box-shadow .25s;
}

/* Poster film: portrait dan tidak boleh mengikuti rasio backdrop. */
.card:not(.wide) .poster{
  aspect-ratio:2/3;
}

.card .poster img.card-image{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Backdrop hanya untuk card.wide. */
.card.wide .poster{
  aspect-ratio:16/9;
}

.card.wide .poster img.card-image{
  aspect-ratio:16/9;
  object-fit:cover;
}

.card .rate{
  position:absolute;
  top:8px;
  left:8px;
  background:rgba(0,0,0,.7);
  border-radius:6px;
  padding:3px 7px;
  font-size:12px;
  font-weight:600;
  display:flex;
  gap:3px;
  align-items:center;
}

.card .rate svg{
  width:12px;
  height:12px;
  fill:#f5b73b;
  stroke:none;
}

.card .hov{
  position:absolute;
  inset:0;
  background:
    linear-gradient(
      0deg,
      rgba(0,0,0,.75),
      transparent 60%
    );
  opacity:0;
  transition:.25s;
  display:grid;
  place-items:center;
}

.card .hov span{
  width:48px;
  height:48px;
  border-radius:50%;
  background:var(--red);
  display:grid;
  place-items:center;
}

.hov svg{
  fill:#fff;
  stroke:none;
  width:20px;
  height:20px;
}

.card h3{
  font-size:14px;
  font-weight:600;
  margin-top:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.card p{
  font-size:12.5px;
  color:var(--mute);
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.card .bar{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  background:rgba(255,255,255,.2);
}

.card .bar i{
  display:block;
  height:100%;
  background:var(--red);
}

@media (hover:hover){

  .card:hover .poster{
    transform:
      translateY(-6px)
      scale(1.03);

    box-shadow:
      0 14px 34px
      rgba(229,15,42,.22);
  }

  .card:hover .hov{
    opacity:1;
  }

}

.card:active .poster{
  transform:scale(.97);
}

.card.wide{
  flex-basis:
    clamp(
      220px,
      20vw,
      280px
    );
}

/* =========================================================
   CHIPS
========================================================= */

.chips{
  display:flex;
  gap:10px;
  overflow-x:auto;
  scrollbar-width:none;
  padding-bottom:4px;
}

.chips::-webkit-scrollbar{
  display:none;
}

.chip{
  flex:none;
  padding:10px 18px;
  border-radius:999px;
  background:var(--panel2);
  border:1px solid var(--line);
  font-size:14px;
  transition:.2s;
  white-space:nowrap;
}

.chip:hover{
  border-color:#555;
}

.chip.on{
  background:var(--red);
  border-color:var(--red);
}


/* =========================================================
   TILES
========================================================= */

.tiles{
  display:grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(170px,1fr)
    );
  gap:14px;
}

.tile{
  height:92px;
  border-radius:var(--r);
  padding:16px;
  font-weight:700;
  font-size:17px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  transition:.2s;
  border:1px solid
    rgba(255,255,255,.06);
}

.tile small{
  font-weight:400;
  font-size:12px;
  opacity:.75;
}

.tile:hover{
  transform:translateY(-3px);
}

.page-title{
  padding:
    28px
    var(--pad)
    0;

  font-size:26px;
  font-weight:800;
}

.empty{
  margin:48px auto;
  max-width:360px;
  text-align:center;
  color:var(--mute);
  line-height:1.6;
  padding:0 20px;
}

.empty svg{
  width:44px;
  height:44px;
  margin-bottom:12px;
  opacity:.6;
}

.empty b{
  display:block;
  color:var(--text);
  font-size:17px;
  margin-bottom:4px;
}


/* =========================================================
   DETAIL
========================================================= */

.detail{
  position:relative;
}

.detail-bg{
  height:
    clamp(
      260px,
      38vw,
      420px
    );

  position:relative;
  overflow:hidden;
}

.detail-bg img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.detail-bg::after{
  content:"";
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      0deg,
      var(--bg),
      rgba(10,10,15,.3)
    );
}

.back{
  position:absolute;
  z-index:3;
  top:16px;
  left:var(--pad);
  height:40px;
  padding:
    0
    14px
    0
    8px;

  border-radius:999px;

  background:
    rgba(0,0,0,.55);

  display:flex;
  align-items:center;
  gap:4px;
  font-size:14px;
  backdrop-filter:blur(8px);
}

.detail-body{
  position:relative;
  z-index:2;

  display:grid;

  grid-template-columns:
    230px
    1fr;

  gap:32px;

  padding:
    0
    var(--pad);

  margin-top:-150px;
}

.detail-body .cover{
  aspect-ratio:2/3;
  border-radius:var(--r);
  overflow:hidden;
  box-shadow:
    0 20px 50px
    rgba(0,0,0,.6);
}

.cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.detail-info{
  padding-top:96px;
}

.detail-info h1{
  font-size:
    clamp(
      28px,
      3.4vw,
      42px
    );

  font-weight:900;
  letter-spacing:-.8px;
  margin-bottom:10px;
}

.tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0;
}

.tag{
  padding:5px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:13px;
  color:#d6d6de;
}

.tag:hover{
  border-color:var(--red);
}

.desc{
  line-height:1.7;
  color:#d0d0da;
  max-width:680px;
  margin-bottom:22px;
}

.facts{
  display:grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(120px,1fr)
    );

  gap:12px;

  max-width:680px;
  margin-top:26px;
}

.facts div{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px 14px;
}

.facts small{
  display:block;
  color:var(--mute);
  font-size:12px;
  margin-bottom:3px;
}


/* =========================================================
   CUSTOM VIDEO PLAYER
========================================================= */

.watch{
  display:grid;

  grid-template-columns:
    minmax(0,1fr)
    340px;

  gap:28px;

  padding:
    20px
    var(--pad);
}

.player{
  aspect-ratio:16/9;
  width:100%;
  background:#000;
  border-radius:var(--r);
  overflow:hidden;
  position:relative;
  cursor:pointer;

  --control-bg:
    rgba(12,12,16,.86);
}

.player video{
  width:100%;
  height:100%;
  display:block;
  background:#000;

  /*
   * Jangan crop video.
   * Video mempertahankan aspect ratio.
   */

  object-fit:contain;
}

/*
 * Display mode player.
 * Fit = tampilkan seluruh video tanpa crop.
 * Fill = isi seluruh area player dengan crop seperlunya.
 */
.player.video-fill video{
  object-fit:cover;
}

.player.video-fill:fullscreen video,
.player.video-fill:-webkit-full-screen video{
  object-fit:cover;
}

.player:fullscreen,
.player:-webkit-full-screen{
  width:100vw;
  height:100vh;
  aspect-ratio:auto;
  border-radius:0;
}

.player:fullscreen video,
.player:-webkit-full-screen video{
  object-fit:contain;
}


/* Dim overlay (tampil saat navigasi terlihat) */

.player-dim{
  position:absolute;
  inset:0;
  z-index:5;

  background:
    rgba(0,0,0,.28);

  opacity:0;
  pointer-events:none;

  transition:
    opacity .2s ease;
}

.player.controls-visible
.player-dim{
  opacity:1;
}


/* Kontrol tengah: mundur / play-pause / maju */

.center-controls{
  position:absolute;
  z-index:7;

  inset:0;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;

  opacity:0;
  pointer-events:none;

  transition:
    opacity .2s ease;
}

.player.controls-visible
.center-controls{
  opacity:1;

  /*
   * PENTING: container ini
   * inset:0 (menutupi seluruh
   * player). Jangan set
   * pointer-events:auto di sini,
   * atau seluruh area akan
   * "menelan" klik menuju
   * seek/volume/fullscreen
   * di bawahnya. Hanya tombol
   * anak yang boleh interaktif
   * (lihat .center-btn).
   */
}

.center-btn{
  width:46px;
  height:46px;
  flex:0 0 46px;

  display:grid;
  place-items:center;

  border-radius:50%;

  background:
    rgba(255,255,255,.12);

  backdrop-filter:
    blur(8px);
  -webkit-backdrop-filter:
    blur(8px);

  box-shadow:
    0 2px 10px
    rgba(0,0,0,.35);

  color:#fff;

  pointer-events:none;

  transition:
    background .15s ease,
    transform .15s ease;
}

.player.controls-visible
.center-btn{
  pointer-events:auto;
}

.center-btn:hover{
  background:
    rgba(255,255,255,.22);
}

.center-btn:active{
  transform:scale(.92);
}

.center-btn svg{
  width:20px;
  height:20px;
}

.center-btn.play-center{
  width:62px;
  height:62px;
  flex-basis:62px;

  background:
    rgba(229,15,42,.85);

  box-shadow:
    0 4px 16px
    rgba(229,15,42,.4);
}

.center-btn.play-center:hover{
  background:
    var(--red);
}

.center-btn.play-center svg{
  width:26px;
  height:26px;
}


/* Kontrol bawah */

.player-controls{
  position:absolute;
  z-index:6;

  left:0;
  right:0;
  bottom:0;

  display:flex;
  align-items:center;
  gap:8px;

  padding:
    10px
    12px
    calc(
      10px +
      env(safe-area-inset-bottom)
    );

  background:
    linear-gradient(
      transparent,
      var(--control-bg)
    );

  opacity:0;
  pointer-events:none;

  transform:
    translateY(8px);

  transition:.2s;
}

.player.controls-visible
.player-controls{
  opacity:1;
  pointer-events:auto;
  transform:none;
}

.player-btn{
  width:36px;
  height:36px;
  flex:0 0 36px;

  display:grid;
  place-items:center;

  border-radius:50%;

  background:
    rgba(255,255,255,.12);

  backdrop-filter:
    blur(6px);
  -webkit-backdrop-filter:
    blur(6px);

  color:#fff;

  transition:
    background .15s ease,
    transform .15s ease;
}

.player-btn svg{
  width:18px;
  height:18px;
}

.player-btn:hover{
  background:
    rgba(255,255,255,.22);
}

.player-btn:active{
  transform:scale(.92);
}

.player-time{
  font-size:12px;
  color:#fff;
  white-space:nowrap;
  flex:0 0 auto;

  font-variant-numeric:
    tabular-nums;
}


/* Seek / progress bar kustom */

.seek-wrap{
  position:relative;
  flex:1;
  min-width:60px;

  display:flex;
  align-items:center;

  height:20px;
}

.seek-track{
  position:absolute;
  left:0;
  right:0;

  height:4px;
  border-radius:2px;

  background:
    rgba(255,255,255,.25);

  pointer-events:none;
}

.seek-fill{
  position:absolute;
  left:0;

  height:4px;
  border-radius:2px;

  background:var(--red);
  width:0%;

  pointer-events:none;
}

.seek{
  position:relative;
  z-index:1;

  width:100%;
  height:100%;
  margin:0;

  background:transparent;
  cursor:pointer;

  -webkit-appearance:none;
  appearance:none;
}

.seek::-webkit-slider-runnable-track{
  background:transparent;
  height:4px;
}

.seek::-moz-range-track{
  background:transparent;
  height:4px;
  border:none;
}

.seek::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:13px;
  height:13px;
  margin-top:-4.5px;

  border-radius:50%;
  background:var(--red);

  box-shadow:
    0 0 0 3px
    rgba(0,0,0,.35);

  cursor:pointer;
}

.seek::-moz-range-thumb{
  width:13px;
  height:13px;
  border:none;
  border-radius:50%;
  background:var(--red);

  box-shadow:
    0 0 0 3px
    rgba(0,0,0,.35);

  cursor:pointer;
}

.volume-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.volume-popup{
  position:absolute;
  right:0;
  bottom:calc(100% + 10px);

  display:flex;
  align-items:center;

  padding:8px 10px;
  border-radius:8px;

  background:
    var(--control-bg);

  backdrop-filter:
    blur(6px);
  -webkit-backdrop-filter:
    blur(6px);

  opacity:0;
  transform:
    translateY(4px);

  pointer-events:none;

  transition:
    opacity .15s ease,
    transform .15s ease;
}

.volume-wrap.open
.volume-popup{
  opacity:1;
  transform:none;
  pointer-events:auto;
}

.volume{
  width:84px;
  height:20px;
  margin:0;

  background:transparent;
  cursor:pointer;

  -webkit-appearance:none;
  appearance:none;
}

.volume::-webkit-slider-runnable-track{
  height:4px;
  border-radius:2px;
  background:
    rgba(255,255,255,.25);
}

.volume::-moz-range-track{
  height:4px;
  border:none;
  border-radius:2px;
  background:
    rgba(255,255,255,.25);
}

.volume::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:13px;
  height:13px;
  margin-top:-4.5px;

  border-radius:50%;
  background:var(--red);

  cursor:pointer;
}

.volume::-moz-range-thumb{
  width:13px;
  height:13px;
  border:none;
  border-radius:50%;
  background:var(--red);

  cursor:pointer;
}


/* Loading */

.player-loading{
  position:absolute;
  inset:0;
  z-index:4;

  display:none;
  place-items:center;

  background:
    rgba(0,0,0,.16);

  pointer-events:none;
}

.player-loading.on{
  display:grid;
}

.player-loading span{
  width:38px;
  height:38px;

  border:
    3px solid
    rgba(255,255,255,.22);

  border-top-color:#fff;

  border-radius:50%;

  animation:
    playerSpin
    .8s
    linear
    infinite;
}

@keyframes playerSpin{
  to{
    transform:rotate(360deg);
  }
}


/* Native fullscreen button lama disembunyikan */

.fullscreen-btn{
  display:none;
}


/* Error */

.player .err{
  position:absolute;
  inset:0;

  display:none;

  z-index:8;

  place-items:center;
  text-align:center;

  padding:20px;

  color:var(--mute);
  background:#000;
}

.player.fail .err{
  display:grid;
}


/* =========================================================
   QUALITY
========================================================= */

.quality-box{
  margin-top:12px;
  padding:12px 14px;

  background:var(--panel);
  border:1px solid var(--line);

  border-radius:12px;
}

.quality-title{
  font-size:13px;
  color:var(--mute);
  margin-bottom:9px;
  font-weight:700;
}

.quality-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.quality-btn{
  border:1px solid var(--line);
  background:var(--bg);
  color:var(--text);

  border-radius:8px;

  padding:
    7px
    12px;

  font:inherit;
  font-size:13px;
  font-weight:700;

  cursor:pointer;
}

.quality-btn:hover{
  border-color:var(--red);
}

.quality-btn.on{
  background:var(--red);
  border-color:var(--red);
  color:#fff;
}


/* =========================================================
   WATCH INFO
========================================================= */

.watch-info h1{
  font-size:24px;
  font-weight:800;
  margin:18px 0 8px;
}


/* =========================================================
   NEXT FILM
========================================================= */

.side-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.side-list h2{
  font-size:17px;
  margin-bottom:4px;
}

.mini{
  display:flex;
  gap:12px;
}

.mini .th{
  flex:0 0 120px;
  aspect-ratio:16/9;
  border-radius:8px;
  overflow:hidden;
}

.mini img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.mini h3{
  font-size:14px;
}

.mini p{
  font-size:12.5px;
  color:var(--mute);
  margin-top:3px;
}


/* =========================================================
   TRAILER
========================================================= */

.trailer{
  margin-top:26px;
  max-width:820px;
}

.trailer-head{
  display:flex;
  align-items:center;
  margin-bottom:10px;
}

.trailer-head h2{
  font-size:18px;
}

.trailer-box{
  position:relative;
  width:100%;
  aspect-ratio:16/9;

  border-radius:var(--r);
  overflow:hidden;

  background:#000;
  border:1px solid var(--line);
}

.trailer-box video{
  width:100%;
  height:100%;
  display:block;

  object-fit:contain;
  background:#000;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width:767px){

  :root{
    --pad:22px;
  }

  .app{
    grid-template-columns:
      minmax(0,1fr);
  }

  .sidebar{
    display:none;
  }

  .topbar .logo{
    display:flex;
  }

  .watch{
    grid-template-columns:
      minmax(0,1fr);
  }

  .detail-body{
    grid-template-columns:
      180px
      1fr;

    gap:24px;

    margin-top:-110px;
  }

  .detail-info{
    padding-top:70px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:699px){

  :root{
    --pad:16px;
  }

  body{
    padding-bottom:
      calc(
        var(--nav) +
        env(safe-area-inset-bottom)
      );
  }

  .only-mobile{
    display:grid;
  }

  .search-box,
  .topbar .avatar{
    display:none;
  }

  .topbar{
    padding:
      10px
      var(--pad);

    padding-top:
      calc(
        10px +
        env(safe-area-inset-top)
      );

    border:0;

    background:
      linear-gradient(
        var(--bg),
        rgba(10,10,15,.7)
      );
  }

  .topbar .logo{
    margin-right:auto;
    font-size:24px;
  }


  /* Bottom nav */

  .bottom-nav{
    display:grid;

    grid-template-columns:
      repeat(5,1fr);

    position:fixed;

    z-index:30;

    left:0;
    right:0;
    bottom:0;

    height:
      calc(
        var(--nav) +
        env(safe-area-inset-bottom)
      );

    padding-bottom:
      env(safe-area-inset-bottom);

    background:
      rgba(14,14,20,.96);

    backdrop-filter:blur(16px);

    border-top:
      1px solid
      var(--line);
  }

  .bottom-nav a{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    gap:3px;

    font-size:11px;
    color:var(--mute);

    min-height:48px;
  }

  .bottom-nav a.on{
    color:var(--red);
  }

  .bottom-nav svg{
    width:24px;
    height:24px;
  }


  /* Hero */

  .hero{
    height:
      min(
        118vw,
        520px
      );

    margin-top:-62px;
  }

  .hero-body{
    left:var(--pad);
    right:var(--pad);
    bottom:44px;
    max-width:none;
  }

  .hero::after{
    background:
      linear-gradient(
        0deg,
        var(--bg) 8%,
        rgba(10,10,15,.55) 55%,
        rgba(10,10,15,.25)
      );
  }

  .hero p{
    font-size:14px;

    -webkit-line-clamp:2;
  }

  .actions{
    flex-wrap:nowrap;
  }

  .actions .btn{
    flex:1;
    padding:0 12px;
    height:48px;
    font-size:14px;
  }

  .dots{
    right:auto;
    left:50%;
    transform:translateX(-50%);
    bottom:18px;
  }


  /* Sections */

  .sec{
    margin-top:26px;
  }

  .sec-head h2{
    font-size:18px;
  }

  .row{
    gap:12px;

    margin-right:
      calc(
        var(--pad) * -1
      );

    padding-right:
      var(--pad);
  }

  .row .card{
    flex-basis:118px;
  }

  .row .card.wide{
    flex-basis:164px;
  }

  .grid{
    grid-template-columns:
      repeat(
        2,
        minmax(0,1fr)
      );

    gap:18px 12px;
  }

  .tiles{
    grid-template-columns:
      repeat(2,1fr);
  }

  .chip{
    padding:
      11px
      18px;
  }

  .page-title{
    font-size:22px;
    padding-top:16px;
  }


  /* Search */

  .m-search{
    display:flex!important;
  }


  /* Detail */

  .detail-bg{
    height:64vw;
    max-height:340px;
  }

  .detail-body{
    display:block;
    margin-top:-56px;
  }

  .cover{
    display:none;
  }

  .detail-info{
    padding-top:0;
  }

  .detail-info .actions .btn{
    flex:1;
  }


  /* Watch */

  .watch{
    padding:0;
    gap:0;
    display:block;
  }

  .player{
    border-radius:0;

    position:relative;

    /*
     * Tetap 16:9,
     * video di dalamnya contain.
     */
    aspect-ratio:16/9;
  }

  .watch-info{
    padding:
      0
      var(--pad);
  }

  .side-list{
    padding:
      24px
      var(--pad)
      0;

    /*
     * Mobile: tampilkan Tonton Berikutnya sebagai grid 3 kolom.
     * watch() sudah membatasi daftar menjadi maksimal 6 film.
     */
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px 10px;
  }

  .side-list h2{
    grid-column:1 / -1;
    margin:0;
    font-size:20px;
  }

  .mini{
    display:block;
    min-width:0;
  }

  .mini .th{
    width:100%;
    flex:none;
    aspect-ratio:2/3;
    border-radius:8px;
  }

  .mini h3{
    margin-top:8px;
    font-size:13px;
    line-height:1.3;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mini p{
    font-size:11px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .back{
    top:
      calc(
        12px +
        env(safe-area-inset-top)
      );

    left:12px;
  }


  /* Player mobile */

  .player-controls{
    padding:
      8px
      10px
      calc(
        8px +
        env(safe-area-inset-bottom)
      );

    gap:6px;
  }

  .player-btn{
    width:32px;
    height:32px;
    flex-basis:32px;
  }

  .player-btn svg{
    width:16px;
    height:16px;
  }

  .player-time{
    font-size:11px;
    max-width:88px;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .volume{
    width:58px;
  }

  .volume-popup{
    right:-4px;
  }

  .seek-wrap{
    min-width:40px;
  }

  .center-controls{
    gap:14px;
  }

  .center-btn{
    width:38px;
    height:38px;
    flex-basis:38px;
  }

  .center-btn svg{
    width:16px;
    height:16px;
  }

  .center-btn.play-center{
    width:50px;
    height:50px;
    flex-basis:50px;
  }

  .center-btn.play-center svg{
    width:22px;
    height:22px;
  }


  /* Trailer */

  .trailer{
    margin-top:20px;
  }

  .trailer-box{
    border-radius:10px;
  }

}


/* =========================================================
   MOBILE SEARCH
========================================================= */

.m-search{
  display:none;

  margin:
    14px
    var(--pad)
    0;

  height:46px;

  background:var(--panel2);

  border-radius:12px;

  align-items:center;
  gap:10px;

  padding:
    0
    14px;

  color:var(--mute);
}

.m-search input{
  flex:1;
  min-width:0;

  background:none;
  border:0;
  outline:0;

  color:var(--text);

  font:inherit;
  font-size:16px;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion:reduce){

  *{
    transition:none!important;
    animation:none!important;
  }

}/* =========================================================
   IDFLIX — VIDEO PLAYER UI V2
   Based on the supplied player reference.
========================================================= */

.player{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:var(--r,12px);
  background:
    radial-gradient(120% 90% at 28% 18%, #2a2118 0%, #14110d 46%, #050403 100%);
  --player-accent:#e5342f;
  --player-control-bg:rgba(20,18,17,.56);
  --player-muted:rgba(245,242,238,.68);
  cursor:default;
}

.player video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  background:transparent;
}

.player:fullscreen,
.player:-webkit-full-screen{
  width:100vw;
  height:100vh;
  aspect-ratio:auto;
  border-radius:0;
}

.player:fullscreen video,
.player:-webkit-full-screen video{
  object-fit:contain;
}

.player-dim{
  position:absolute;
  inset:0;
  z-index:5;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(0,0,0,.50) 0%,transparent 27%,transparent 66%,rgba(0,0,0,.66) 100%);
  opacity:0;
  transition:opacity .28s ease;
}

.player.controls-visible .player-dim{
  opacity:1;
}

.player-topbar{
  position:absolute;
  z-index:8;
  top:0;
  left:0;
  right:0;
  display:flex;
  align-items:center;
  gap:12px;
  padding:15px 17px;
  padding-top:calc(15px + env(safe-area-inset-top,0px));
  opacity:0;
  pointer-events:none;
  transform:translateY(-4px);
  transition:opacity .28s ease,transform .28s ease;
}

.player.controls-visible .player-topbar{
  opacity:1;
  pointer-events:auto;
  transform:none;
}

.player-back{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  color:#fff;
  background:var(--player-control-bg);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  transition:background .15s ease,transform .15s ease;
}

.player-back:hover{background:rgba(255,255,255,.17)}
.player-back:active{transform:scale(.92)}
.player-back svg{width:19px;height:19px}

.player-titleblock{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.player-title{
  min-width:0;
  max-width:min(70vw,620px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#fff;
  font-size:15px;
  line-height:1.2;
  font-weight:650;
  text-shadow:0 1px 5px rgba(0,0,0,.5);
}

.player-episode{
  color:var(--player-muted);
  font-size:12px;
  line-height:1.2;
  white-space:nowrap;
}

.center-controls{
  position:absolute;
  inset:0;
  z-index:8;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .28s ease;
}

.player.controls-visible .center-controls{
  opacity:1;
}

.center-btn.play-center{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:#e5342f;
  color:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.26);
  pointer-events:auto;
  transition:filter .15s ease,transform .15s ease;
}

.center-btn.play-center:hover{filter:brightness(1.08)}
.center-btn.play-center:active{transform:scale(.93)}
.center-btn.play-center svg{width:25px;height:25px}

.player-loading{
  position:absolute;
  inset:0;
  z-index:7;
  display:none;
  place-items:center;
  background:rgba(0,0,0,.12);
  pointer-events:none;
}

.player-loading.on{display:grid}

.player-loading span{
  width:34px;
  height:34px;
  border:3px solid rgba(255,255,255,.22);
  border-top-color:#fff;
  border-radius:50%;
  animation:playerSpin .8s linear infinite;
}

@keyframes playerSpin{to{transform:rotate(360deg)}}

.player-controls{
  position:absolute;
  z-index:9;
  left:0;
  right:0;
  bottom:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 17px 14px;
  padding-bottom:calc(14px + env(safe-area-inset-bottom,0px));
  background:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.16) 22%,rgba(0,0,0,.72) 100%);
  opacity:0;
  pointer-events:none;
  transform:translateY(5px);
  transition:opacity .28s ease,transform .28s ease;
}

.player.controls-visible .player-controls{
  opacity:1;
  pointer-events:auto;
  transform:none;
}

.progress-row{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
}

.player-current-time,
.player-duration{
  flex:0 0 auto;
  min-width:42px;
  color:#fff;
  font-size:12px;
  line-height:1;
  font-variant-numeric:tabular-nums;
  text-shadow:0 1px 4px rgba(0,0,0,.6);
}

.player-duration{text-align:right}

.seek-wrap{
  position:relative;
  flex:1 1 auto;
  min-width:60px;
  height:20px;
  display:flex;
  align-items:center;
  touch-action:none;
}

.seek-track,
.seek-fill{
  position:absolute;
  left:0;
  top:50%;
  height:5px;
  border-radius:3px;
  transform:translateY(-50%);
  pointer-events:none;
}

.seek-track{
  width:100%;
  background:rgba(255,255,255,.25);
}

.seek-fill{
  width:0;
  background:#e5342f;
}

.seek{
  position:relative;
  z-index:2;
  width:100%;
  height:20px;
  margin:0;
  background:transparent;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}

.seek::-webkit-slider-runnable-track{height:5px;background:transparent}
.seek::-moz-range-track{height:5px;background:transparent;border:0}
.seek::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:13px;
  height:13px;
  margin-top:-4px;
  border:0;
  border-radius:50%;
  background:#e5342f;
  box-shadow:0 0 0 2px rgba(0,0,0,.25);
  cursor:pointer;
}
.seek::-moz-range-thumb{
  width:13px;
  height:13px;
  border:0;
  border-radius:50%;
  background:#e5342f;
  box-shadow:0 0 0 2px rgba(0,0,0,.25);
  cursor:pointer;
}

.player-bottom-row{
  width:100%;
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.player-left-controls,
.player-right-controls{
  display:flex;
  align-items:center;
  gap:5px;
}

.player-left-controls{min-width:0}
.player-right-controls{margin-left:auto;flex:0 0 auto}

.player-btn{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#fff;
  transition:background .15s ease,transform .15s ease;
}

.player-btn:hover{background:rgba(255,255,255,.12)}
.player-btn:active{transform:scale(.91)}
.player-btn svg{width:20px;height:20px}

.player-skip-btn{
  width:36px;
  height:36px;
  flex-basis:36px;
  border-radius:8px;
}

.player-skip-btn svg{width:23px;height:23px}

.quality-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:22px;
  padding:0 7px;
  margin-left:3px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:5px;
  color:#fff;
  background:rgba(0,0,0,.18);
  font-size:10.5px;
  font-weight:650;
  letter-spacing:.3px;
  line-height:1;
}

.volume-wrap,
.settings-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.volume-popup{
  position:absolute;
  right:0;
  bottom:calc(100% + 9px);
  display:flex;
  align-items:center;
  padding:8px 10px;
  border-radius:8px;
  background:rgba(24,22,21,.94);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 8px 24px rgba(0,0,0,.35);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  opacity:0;
  visibility:hidden;
  transform:translateY(4px);
  pointer-events:none;
  transition:opacity .15s ease,transform .15s ease,visibility .15s ease;
}

.volume{
  width:82px;
  height:20px;
  margin:0;
  -webkit-appearance:none;
  appearance:none;
  background:transparent;
}

.volume::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:rgba(255,255,255,.25)}
.volume::-moz-range-track{height:4px;border:0;border-radius:2px;background:rgba(255,255,255,.25)}
.volume::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:12px;height:12px;margin-top:-4px;border:0;border-radius:50%;background:#e5342f;
}
.volume::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:#e5342f}

@media (hover:hover) and (pointer:fine){
  .volume-wrap:hover .volume-popup,
  .volume-wrap:focus-within .volume-popup{
    opacity:1;
    visibility:visible;
    transform:none;
    pointer-events:auto;
  }
}

.settings-popup{
  position:absolute;
  right:0;
  bottom:calc(100% + 9px);
  width:190px;
  padding:7px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  background:rgba(24,22,21,.97);
  color:#fff;
  box-shadow:0 10px 28px rgba(0,0,0,.46);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  opacity:0;
  visibility:hidden;
  transform:translateY(5px);
  pointer-events:none;
  transition:opacity .15s ease,transform .15s ease,visibility .15s ease;
}

.settings-wrap.open .settings-popup{
  opacity:1;
  visibility:visible;
  transform:none;
  pointer-events:auto;
}

.settings-heading{
  padding:5px 9px 7px;
  font-size:12px;
  font-weight:650;
  color:#fff;
}

.settings-section + .settings-section{
  margin-top:4px;
  padding-top:4px;
  border-top:1px solid rgba(255,255,255,.08);
}

.settings-label{
  padding:5px 9px 2px;
  color:rgba(255,255,255,.55);
  font-size:10.5px;
}

.settings-options{display:flex;flex-direction:column;gap:2px}

.settings-option{
  width:100%;
  min-height:34px;
  padding:7px 9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#fff;
  text-align:left;
  font-size:13px;
  cursor:pointer;
}

.settings-option:hover,
.settings-option.on{background:rgba(255,255,255,.08)}
.settings-option svg{width:15px;height:15px;color:#e5342f}
.settings-empty{padding:7px 9px;color:rgba(255,255,255,.52);font-size:12px}

.player .err{
  position:absolute;
  inset:0;
  z-index:20;
  display:none;
  place-items:center;
  padding:20px;
  color:#fff;
  text-align:center;
  background:#070605;
}

.player.fail .err{display:grid}

@media (pointer:coarse){
  .volume-popup{display:none !important}
  .player-btn,.player-skip-btn{width:40px;height:40px;flex-basis:40px}
}

@media (max-width:520px){
  .player-topbar{
    gap:9px;
    padding:11px 12px;
    padding-top:calc(11px + env(safe-area-inset-top,0px));
  }

  .player-back{width:36px;height:36px;flex-basis:36px}
  .player-title{font-size:13.5px;max-width:72vw}
  .player-episode{font-size:11px}

  .center-btn.play-center{
    width:52px;
    height:52px;
    flex-basis:52px;
  }
  .center-btn.play-center svg{width:22px;height:22px}

  .player-controls{
    gap:6px;
    padding:0 11px 10px;
    padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));
  }

  .progress-row{gap:7px}
  .player-current-time,.player-duration{min-width:36px;font-size:11px}
  .player-bottom-row{gap:7px;min-height:38px}
  .player-left-controls,.player-right-controls{gap:1px}
  .player-btn,.player-skip-btn{width:40px;height:40px;flex-basis:40px}
  .player-btn svg{width:20px;height:20px}
  .player-skip-btn svg{width:22px;height:22px}
  .quality-badge{height:21px;min-width:42px;padding:0 6px;font-size:10px}
  .settings-popup{width:176px;right:-2px}
}

@media (prefers-reduced-motion:reduce){
  .player *{transition:none!important;animation:none!important}
}

/* =========================================================
   DESKTOP SIDEBAR FIX
   Ensure the desktop sidebar is visible and the main content
   reserves the sidebar column. Mobile/tablet rules remain intact.
========================================================= */
@media (min-width:1024px){
  .app{
    display:grid !important;
    grid-template-columns:var(--side) minmax(0,1fr) !important;
    min-height:100vh;
  }

  .sidebar{
    display:flex !important;
    position:sticky;
    top:0;
    width:auto;
    min-width:0;
    height:100vh;
    visibility:visible !important;
    opacity:1 !important;
  }

  .main{
    display:block;
    min-width:0;
  }

  .bottom-nav{
    display:none !important;
  }
}

/* =========================================================
   IDFLIX v1.0 — tambahan sesuai PRD
========================================================= */

/* Lencana Tamu (F-01) */
.avatar{position:relative}
.guest-badge{
  position:absolute;right:-4px;bottom:-5px;padding:1px 5px;border-radius:6px;
  background:var(--red);color:#fff;font-size:9px;font-weight:700;letter-spacing:.2px;line-height:1.4;
  pointer-events:none;
}
.guest-pill{
  display:inline-block;margin-left:6px;padding:2px 8px;border-radius:999px;
  background:rgba(229,15,42,.16);color:#ff7a8a;font-size:11px;font-weight:650;vertical-align:middle;
}
.profile-head{
  display:flex;gap:14px;align-items:center;margin:0 0 22px;padding:16px;
  border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03);
}
.profile-head p{margin:4px 0 0;color:rgba(255,255,255,.62);font-size:13px;line-height:1.5}
.profile-avatar{
  flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;border-radius:50%;
  background:rgba(255,255,255,.08);
}
.profile-avatar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}

/* Banner Simpan progresmu */
.save-banner{
  display:flex;gap:14px;align-items:center;justify-content:space-between;
  margin:18px 0 4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;
  background:rgba(229,15,42,.07);font-size:13px;line-height:1.5;
}
.save-banner b{display:block;margin-bottom:2px}
.save-banner span{color:rgba(255,255,255,.7)}
.banner-close{
  flex:0 0 auto;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:10px;
  background:transparent;color:var(--text);font-size:13px;cursor:pointer;
}

/* Bar progres di halaman detail */
.resume-bar{height:4px;margin-top:14px;max-width:320px;border-radius:2px;background:rgba(255,255,255,.18);overflow:hidden}
.resume-bar i{display:block;height:100%;background:var(--red)}

/* Skeleton (F-02) */
.skeleton-page{padding:16px 0}
.sk{
  border-radius:10px;background:linear-gradient(90deg,#15151d 25%,#20202b 50%,#15151d 75%);
  background-size:200% 100%;animation:sk-shimmer 1.3s linear infinite;
}
.sk-hero{height:clamp(200px,42vw,420px);border-radius:16px}
.sk-title{width:180px;height:20px;margin:26px 0 12px}
.sk-row{display:flex;gap:12px;overflow:hidden}
.sk-card{flex:0 0 clamp(110px,28vw,160px)}
.sk-poster{aspect-ratio:2/3;border-radius:10px}
.sk-line{height:11px;margin-top:8px;border-radius:6px}
.sk-line.short{width:60%}
@keyframes sk-shimmer{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.sk{animation:none}}

/* Tampilan video: Stretch */
.player.video-stretch video{object-fit:fill}

/* Seek: buffer + pratinjau waktu */
.seek-buffer{
  position:absolute;left:0;top:50%;width:0;height:5px;border-radius:3px;transform:translateY(-50%);
  background:rgba(255,255,255,.4);pointer-events:none;
}
.seek-fill{z-index:1}
.seek-tip{
  position:absolute;bottom:22px;transform:translateX(-50%);padding:3px 7px;border-radius:6px;
  background:rgba(0,0,0,.82);color:#fff;font-size:11.5px;font-variant-numeric:tabular-nums;
  pointer-events:none;opacity:0;transition:opacity .1s;z-index:3;white-space:nowrap;
}
.seek-tip.on{opacity:1}

/* Tombol CC & PiP */
.player-btn[hidden]{display:none}
#ccBtn.on{color:#fff;box-shadow:inset 0 -3px 0 var(--red)}
.player-skip-btn{display:none}

/* Mobile: volume memakai tombol perangkat */
@media (pointer:coarse){.volume-wrap{display:none}}

/* Panel Pengaturan */
.settings-popup{
  width:min(280px,calc(100vw - 24px));max-height:min(64vh,420px);overflow-y:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
@media (max-width:520px){.settings-popup{width:min(268px,calc(100vw - 24px));right:-6px}}
.seg{display:flex;flex-wrap:wrap;gap:6px;padding:4px 9px 6px}
.seg-btn{
  min-height:36px;padding:0 11px;border:1px solid rgba(255,255,255,.16);border-radius:8px;
  background:transparent;color:#fff;font-size:12.5px;cursor:pointer;
}
.seg-btn.on{background:var(--red);border-color:var(--red);font-weight:650}
.seg-btn:focus-visible{outline:2px solid #fff;outline-offset:1px}
.sub-label{padding:4px 9px 0;color:rgba(255,255,255,.55);font-size:10.5px}
.range-row{display:flex;align-items:center;gap:10px;padding:4px 9px 8px;font-size:12.5px}
.range-row input{flex:1;min-width:0;height:28px;accent-color:var(--red)}

/* Subtitle (overlay sendiri, kontras tinggi) */
.sub-overlay{
  position:absolute;left:6%;right:6%;bottom:14px;z-index:4;text-align:center;pointer-events:none;
  transition:bottom .2s ease;
}
.player.controls-visible .sub-overlay{bottom:86px}
.sub-overlay>div{display:inline-block;margin:2px auto;padding:2px 9px;border-radius:5px;color:#fff;line-height:1.35;
  text-shadow:0 0 3px #000,0 1px 3px #000,0 0 8px rgba(0,0,0,.9);font-weight:600;white-space:pre-wrap}
.sub-overlay[data-size="s"]{font-size:clamp(12px,2.2vw,17px)}
.sub-overlay[data-size="m"]{font-size:clamp(14px,2.8vw,22px)}
.sub-overlay[data-size="l"]{font-size:clamp(17px,3.6vw,30px)}
.sub-overlay[data-bg="none"]>div{background:none}
.sub-overlay[data-bg="semi"]>div{background:rgba(0,0,0,.55)}
.sub-overlay[data-bg="solid"]>div{background:#000;text-shadow:none}
.player:fullscreen .sub-overlay[data-size="m"]{font-size:clamp(18px,2.6vw,34px)}
.player:fullscreen .sub-overlay[data-size="l"]{font-size:clamp(22px,3.4vw,44px)}

/* Petunjuk loncat 10 detik */
.skip-hint{
  position:absolute;top:50%;z-index:6;display:flex;align-items:center;gap:6px;padding:12px 18px;
  border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font-size:14px;font-weight:650;
  transform:translateY(-50%);opacity:0;pointer-events:none;
}
.skip-hint svg{width:22px;height:22px}
.skip-hint.left{left:10%}.skip-hint.right{right:10%}
.skip-hint.show{animation:skip-pop .7s ease}
@keyframes skip-pop{0%{opacity:0;transform:translateY(-50%) scale(.85)}20%{opacity:1;transform:translateY(-50%) scale(1)}75%{opacity:1}100%{opacity:0}}

/* Toast di dalam player (tetap terlihat saat fullscreen) */
.player-toast{
  position:absolute;top:16px;left:50%;z-index:8;max-width:86%;padding:8px 14px;border-radius:999px;
  background:rgba(0,0,0,.78);color:#fff;font-size:13px;text-align:center;transform:translate(-50%,-6px);
  opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;
}
.player-toast.on{opacity:1;transform:translate(-50%,0)}

/* Kartu Berikutnya (F-10) */
.next-card{
  position:absolute;right:14px;bottom:96px;z-index:9;display:none;width:min(300px,calc(100% - 28px));
  gap:10px;padding:8px;border:1px solid rgba(255,255,255,.14);border-radius:12px;
  background:rgba(14,14,20,.94);color:#fff;
}
.next-card.on{display:flex}
.next-card img{flex:0 0 96px;width:96px;height:60px;border-radius:8px;object-fit:cover}
.next-info{min-width:0;display:flex;flex-direction:column;gap:2px;justify-content:center}
.next-info small{color:rgba(255,255,255,.6);font-size:11px}
.next-info b{font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.next-actions{display:flex;gap:8px;margin-top:4px;align-items:center}
.next-play{
  display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:0 12px;border-radius:8px;
  background:var(--red);color:#fff;font-size:12.5px;font-weight:650;text-decoration:none;
}
.next-play svg{width:13px;height:13px}
.next-close{min-height:36px;padding:0 8px;border:0;background:transparent;color:rgba(255,255,255,.72);font-size:12.5px;cursor:pointer}

/* State error (F-09) */
.player .err p{margin:8px 0 0;color:rgba(255,255,255,.7);font-size:13.5px}
.err-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:16px}
.err-actions .btn{min-height:44px}
.err-actions .btn:disabled{opacity:.55}

@media (max-width:520px){
  .next-card{right:8px;bottom:84px}
  .player.controls-visible .sub-overlay{bottom:78px}
}

/* Breakpoint PRD F-08: mobile < 700 px (bottom-nav), desktop >= 700 px (sidebar). */
@media (min-width:700px) and (max-width:767px){
  .app{grid-template-columns:var(--side) minmax(0,1fr)}
  .sidebar{display:flex}
  .bottom-nav{display:none}
}

/* Target sentuh >= 44 px (PRD F-08) */
@media (pointer:coarse){
  .player-btn,.player-back{width:44px;height:44px;flex-basis:44px}
  .seek-wrap{height:44px}
  .seek{height:44px}
  .icon-btn{min-width:44px;min-height:44px}
  .seg-btn,.settings-option{min-height:44px}
}
@media (pointer:coarse) and (max-width:520px){
  .player-btn,.player-back{width:44px;height:44px;flex-basis:44px}
  .player-left-controls,.player-right-controls{gap:0}
}

/* =========================================================
   Perapihan: Cari, Profil, state kosong
========================================================= */
.page-title:empty{display:none}

/* Cari: genre tepat di bawah kotak pencarian, tidak terpotong */
.search-genres{margin-top:16px}
.search-genres .sec-head{margin-bottom:10px}
.search-genres .sec-head h2{font-size:15px;color:rgba(255,255,255,.72);font-weight:650}
.search-genres .chips{flex-wrap:wrap;overflow:visible;gap:8px;padding-bottom:0}
.search-genres .chip{padding:8px 15px;font-size:13.5px}
.search-hint{
  display:flex;align-items:center;justify-content:center;gap:8px;margin:28px var(--pad) 0;
  color:var(--mute);font-size:13.5px;text-align:center;
}
.search-hint svg{width:18px;height:18px;flex:none;opacity:.7}
#results .empty{margin-top:24px}

/* State kosong: ringkas, dalam kotak putus-putus */
.empty{
  margin:20px auto;max-width:none;padding:22px 18px;
  border:1px dashed var(--line);border-radius:14px;background:rgba(255,255,255,.02);
  font-size:13.5px;line-height:1.55;
}
.sec>.empty,.sec .empty{margin:0}
.empty svg{width:30px;height:30px;margin-bottom:8px;opacity:.55}
.empty b{font-size:15px;margin-bottom:2px}
#results>.empty{margin:20px 0}

/* Profil */
.profile-head{margin:14px var(--pad) 0;padding:14px 16px;gap:14px;align-items:flex-start}
.profile-head b{font-size:16px}
.profile-head p{font-size:12.5px;color:rgba(255,255,255,.58)}
.profile-avatar{flex:0 0 44px;width:44px;height:44px}
.profile-avatar svg{width:22px;height:22px}
/* Di halaman Cari, chip genre adalah tautan ke halaman Film, bukan filter aktif */
.search-genres .chip.on{background:var(--panel2);border-color:var(--line)}
.search-genres + .page-title{padding-top:20px}
.m-search input::-webkit-search-cancel-button,#topSearch::-webkit-search-cancel-button{filter:grayscale(1) brightness(1.8)}


/* Fix: saat menu pengaturan terbuka, timeline di belakang tidak menerima sentuhan. */
.player.settings-open .seek-wrap,
.player.settings-open .seek,
.player.settings-open .seek-tip {
  pointer-events: none !important;
}
.player .settings-popup {
  z-index: 80;
  touch-action: pan-y;
}
.player.settings-open .settings-wrap {
  z-index: 81;
}
.player.settings-open .settings-popup {
  overscroll-behavior: contain;
}

/* =========================================================
   Desktop: sidebar & topbar tetap di tempat saat halaman di-scroll.
   Penyebab bug: overflow-x:hidden di <html> DAN <body> membuat body jadi
   scroll container sendiri, sehingga position:sticky tidak menempel ke viewport.
   `clip` memotong luapan tanpa membuat scroll container. Mobile tidak diubah.
========================================================= */
@media (min-width:700px){
  body{overflow-x:clip}
  .sidebar{
    position:sticky;top:0;align-self:start;
    height:100vh;height:100dvh;overflow-y:auto;overscroll-behavior:contain;
    scrollbar-width:thin;
  }
}

/* =========================================================
   Series / Episode (Eps)
========================================================= */
.eps{margin:22px 0 4px}
.eps-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.eps-head h2{font-size:18px;font-weight:700}
.eps-head span,.eps-empty{color:var(--mute);font-size:13px}
.season-tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px;margin-bottom:6px;scrollbar-width:none}
.season-tabs::-webkit-scrollbar{display:none}
.season-tabs .chip{flex:0 0 auto;border:0;cursor:pointer;font:inherit;min-height:40px}
.ep-list{display:grid;gap:8px}
.ep-list[hidden]{display:none}
.ep{
  display:flex;gap:12px;align-items:center;padding:8px;border-radius:12px;
  border:1px solid transparent;background:rgba(255,255,255,.03);transition:background .15s;
}
.ep:hover{background:rgba(255,255,255,.07)}
.ep.on{border-color:rgba(229,15,42,.55);background:rgba(229,15,42,.1)}
.ep-thumb{position:relative;flex:0 0 128px;aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:#15151d}
.ep-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.ep-thumb .bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(255,255,255,.25)}
.ep-thumb .bar i{display:block;height:100%;background:var(--red)}
.ep-info{min-width:0;display:flex;flex-direction:column;gap:3px}
.ep-info b{font-size:14px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ep-info small{color:var(--mute);font-size:12px}
.eps.compact .ep-thumb{flex-basis:104px}
.eps.compact .eps-head h2{font-size:16px}
.now-ep{margin:4px 0 8px;color:rgba(255,255,255,.8);font-size:14px}
.now-ep b{color:#ff7a8a}
@media (max-width:520px){
  .ep-thumb,.eps.compact .ep-thumb{flex-basis:112px}
}

/* Film: filter jenis + urutan, tautan balik dari Kategori */
.back-link{
  display:inline-flex;align-items:center;gap:6px;margin:18px var(--pad) 0;min-height:44px;
  color:rgba(255,255,255,.72);font-size:14px;
}
.back-link svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.back-link + .page-title{padding-top:2px}
.filters{display:grid;gap:10px;margin-bottom:6px}
.filters .chips{flex-wrap:wrap;overflow:visible;gap:8px;padding-bottom:0;align-items:center}
.filters .chip{min-height:40px;display:inline-flex;align-items:center}
.filters .sort .chip{padding:7px 14px;font-size:13px}
.sort-label{color:var(--mute);font-size:12.5px;margin-right:2px}

/* Tile Kategori: nama di atas jumlah, tidak saling menimpa */
.tile{
  flex-direction:column;align-items:flex-start;justify-content:flex-end;gap:3px;
  min-height:92px;height:auto;overflow-wrap:anywhere;
}
.tile-name{line-height:1.2}
.tile small{display:block;font-size:12px}

/* Halaman putar series: daftar episode selebar kolom (di mobile .side-list adalah grid 3 kolom) */
.side-list.side-eps{display:block}
.side-list.side-eps .eps{margin:0;width:100%}
@media (max-width:699px){
  .side-list.side-eps{padding-top:18px}
}


/* =========================================================
   Mobile redesign: kartu hero, chip atas, nav 4 menu
========================================================= */
.hero-poster{display:none;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top}
.hero-tags,.hero .t-sm,.top-chips{display:none}
@media (max-width:699px){
  :root{--nav:64px}
  .topbar{background:var(--bg);padding-bottom:6px}
  .topbar .logo{display:flex}
  body[data-seg=""] .top-chips{display:flex}
  .top-chips{gap:8px;overflow-x:auto;padding:8px var(--pad) 12px;scrollbar-width:none}
  .top-chips::-webkit-scrollbar{display:none}
  .top-chips a{flex:none;display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 16px;border-radius:999px;font-size:13px;font-weight:600;color:var(--text);background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);backdrop-filter:blur(8px)}
  .top-chips a.on{background:#fff;color:#0a0a0f;border-color:#fff}
  .top-chips svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4}

  .hero{height:auto;aspect-ratio:4/5;max-height:560px;margin:2px var(--pad) 0;border-radius:22px;background:var(--panel2);box-shadow:0 14px 40px rgba(0,0,0,.45)}
  .hero-bg{display:none}
  .hero-poster{display:block}
  .hero::after{background:linear-gradient(0deg,rgba(10,10,15,.96) 4%,rgba(10,10,15,.6) 38%,transparent 66%)}
  .hero-body{left:0;right:0;bottom:16px;padding:0 14px;text-align:center}
  .hero .badge,.hero p,.hero .meta{display:none}
  .hero h1{font-size:clamp(26px,8vw,34px);letter-spacing:.5px;margin:0 0 6px}
  .hero-tags{display:block;font-size:12px;color:rgba(255,255,255,.85);margin-bottom:14px}
  .hero .actions{gap:8px;justify-content:center}
  .hero .actions .btn{height:44px;border-radius:8px;font-size:14px;white-space:nowrap}
  .hero .btn.primary{background:#fff;color:#0a0a0f}
  .hero .btn.ghost{background:rgba(255,255,255,.16);backdrop-filter:blur(10px);border-color:transparent}
  .hero .t-lg{display:none}
  .hero .t-sm{display:inline}
  .dots{top:12px;bottom:auto}

  .bottom-nav{grid-template-columns:repeat(4,1fr);left:0;right:0;bottom:0;height:calc(var(--nav) + env(safe-area-inset-bottom));padding:0 0 env(safe-area-inset-bottom);border-radius:0;border:0;border-top:1px solid var(--line);background:rgba(14,14,20,.96);box-shadow:none}
  .bottom-nav a{font-weight:600}
  .bottom-nav a.on{color:#fff;background:none}
}

/* Halaman Film (mobile): filter ringkas satu baris + grid 3 kolom */
@media (max-width:699px){
  .filters{gap:8px;margin-bottom:4px}
  .filters .chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:8px}
  .filters .chips::-webkit-scrollbar{display:none}
  .filters .chip{flex:none;min-height:34px;padding:0 14px;font-size:13px}
  .filters .sort .chip{min-height:30px;padding:0 12px;font-size:12px}
  .filters .sort-label{flex:none;font-size:12px}
  .filters + .sec .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px}
  .filters + .sec .card h3{font-size:12.5px;margin-top:6px}
  .filters + .sec .card p{font-size:11px}
}

/* Halaman detail (mobile): poster + judul, strip info, tombol ringkas */
.desc-more{display:none}
.facts .star{color:#f5b82e}
.facts .of{color:var(--mute);font-size:.8em}
@media (max-width:699px){
  .detail-bg{height:62vw;max-height:320px}
  .detail .back{width:40px;padding:0;justify-content:center;font-size:0}
  .detail .back svg{width:22px;height:22px}
  .detail-body{display:grid;grid-template-columns:112px minmax(0,1fr);grid-template-rows:1fr auto;gap:0 14px;align-items:end;margin-top:-72px}
  .detail-body .cover{display:block;grid-column:1;grid-row:1 / span 2;width:112px;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.55)}
  .detail-info{display:contents}
  .detail-info h1{grid-column:2;grid-row:1;align-self:end;margin:0 0 8px;font-size:24px;line-height:1.15;letter-spacing:-.3px}
  .detail-info .meta{display:none}
  .detail-info .tags{grid-column:2;grid-row:2;align-self:start;margin:0;gap:6px}
  .detail-info .tag{padding:3px 10px;font-size:11.5px}
  .detail-info > :not(h1):not(.tags):not(.meta){grid-column:1 / -1}
  .detail-info .facts{grid-row:3;display:grid;grid-template-columns:repeat(3,1fr);gap:0;max-width:none;margin:18px 0 0;background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden}
  .detail-info .facts div{background:none;border:0;border-radius:0;padding:12px 6px;text-align:center;font-size:16px;font-weight:700}
  .detail-info .facts div + div{border-left:1px solid var(--line)}
  .detail-info .facts small{font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.6px;margin-bottom:4px}
  .detail-info .actions{grid-row:4;display:flex;gap:10px;margin:16px 0 0}
  .detail-info .actions .btn.primary{flex:1;height:50px;border-radius:12px;font-size:15px}
  .detail-info .actions .btn.ghost{flex:0 0 50px;width:50px;height:50px;padding:0;border-radius:12px;font-size:0;justify-content:center}
  .detail-info .actions .btn.ghost svg{width:22px;height:22px}
  .detail-info .resume-bar{grid-row:5;max-width:none}
  .detail-info .desc{grid-row:6;margin:16px 0 0;font-size:14.5px;line-height:1.65;color:#c9c9d3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .detail-info .desc.open{display:block}
  .detail-info .desc-more{grid-row:7;display:block;justify-self:start;margin-top:6px;padding:4px 0;font-size:13px;font-weight:600;color:var(--red);background:none;border:0}
}

/* Perapian detail mobile + warna menu aktif */
@media (max-width:699px){
  .bottom-nav a.on{color:var(--red)}
  .detail-body{grid-template-columns:104px minmax(0,1fr)}
  .detail-body .cover{width:104px}
  .detail-info h1{font-size:26px}
  .detail-info .tags{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:6px;min-width:0}
  .detail-info .tags::-webkit-scrollbar{display:none}
  .detail-info .tag{flex:none;border:0;background:rgba(255,255,255,.1);padding:4px 10px;font-size:11.5px;color:#e4e4ec}
  .detail-info .actions .btn.primary,
  .detail-info .actions .btn.ghost{height:48px}
  .detail-info .actions .btn.ghost{flex-basis:48px;width:48px;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16)}
}

.facts .sub2{display:block;font-style:normal;font-size:12px;font-weight:500;color:var(--mute);margin-top:2px}

/* Tombol favorit ikon saja: gap bawaan .btn menggeser ikon dari tengah */
@media (max-width:699px){
  .detail-info .actions .btn.ghost{display:flex;align-items:center;justify-content:center;gap:0;padding:0}
}

/* =========================================================
   Desktop (>=700px): navbar atas + hero layar penuh
========================================================= */
.hero-rate,.top-nav{display:none}
@media (min-width:700px){
  :root{--pad:clamp(28px,4vw,64px)}
  .app{display:block !important;grid-template-columns:none !important}
  .sidebar,.bottom-nav{display:none !important}
  .top-nav{display:flex;align-items:center;gap:22px;margin-left:24px}
  .top-nav a{font-size:14px;color:#cfcfd8;white-space:nowrap;transition:color .2s}
  .top-nav a:hover{color:#fff}
  .top-nav a.on{color:#fff;font-weight:700}
  .topbar{position:sticky;top:0;z-index:40;gap:16px;padding:14px var(--pad)}
  .topbar .logo{display:flex;margin:0;font-size:26px}
  .search-box{flex:none;width:min(240px,22vw);max-width:none;margin:0 0 0 auto;height:38px;border-radius:6px;background:rgba(0,0,0,.45);border:1px solid rgba(255,255,255,.25);transition:width .25s,border-color .2s}
  .search-box:focus-within{width:min(340px,30vw);border-color:#fff}
  body[data-seg=""] .topbar{position:fixed;left:0;right:0;top:0;border:0;background:linear-gradient(180deg,rgba(0,0,0,.85),transparent);backdrop-filter:none;transition:background .3s}
  body[data-seg=""] .topbar.solid{background:rgba(10,10,15,.96)}

  .hero{height:clamp(440px,54vw,780px);margin:0;border-radius:0}
  .hero-bg{object-position:center 20%}
  .hero::after{background:
    linear-gradient(90deg,rgba(10,10,15,.92) 0%,rgba(10,10,15,.45) 38%,transparent 65%),
    linear-gradient(0deg,var(--bg) 2%,transparent 34%),
    linear-gradient(180deg,rgba(0,0,0,.55),transparent 22%)}
  .hero-body{left:var(--pad);bottom:24%;max-width:min(560px,46vw)}
  .hero .badge{background:none;padding:0;border-radius:0;font-size:12px;font-weight:600;letter-spacing:5px;color:#e5e5ea;margin-bottom:10px}
  .hero h1{font-size:clamp(36px,5.2vw,72px);letter-spacing:-1.5px}
  .hero p{font-size:clamp(14px,1.3vw,18px);line-height:1.45;max-width:520px;margin:14px 0 20px}
  .hero .actions .btn{height:48px;padding:0 28px;border-radius:6px;font-size:17px}
  .hero .btn.primary{background:#fff;color:#0a0a0f}
  .hero .btn.primary:hover{background:rgba(255,255,255,.8)}
  .hero .btn.ghost{background:rgba(109,109,110,.7);border:0;color:#fff}
  .hero .btn.ghost:hover{background:rgba(109,109,110,.5)}
  .hero-rate{display:block;position:absolute;z-index:3;right:0;bottom:calc(24% + 2px);padding:12px 26px 12px 18px;font-size:17px;font-weight:600;background:rgba(30,30,35,.6);border-left:3px solid rgba(255,255,255,.6)}
  .dots{right:var(--pad);bottom:calc(24% - 36px)}
  .hero + .sec{margin-top:-90px;position:relative;z-index:4}
}


/* Sebelum video pertama kali diputar: hanya tombol play (+ tombol kembali) yang tampil.
   Progres, waktu, kualitas, dan menu bawah muncul setelah video diputar, supaya tidak
   menimpa tombol play. Ditaruh paling akhir agar menang atas aturan .controls-visible. */
.player.not-started .player-controls,
.player.not-started .player-dim{
  opacity:0 !important;
  pointer-events:none !important;
}
.player.not-started .sub-overlay{
  bottom:14px !important;
}

/* Tombol tengah diangkat (--center-lift dihitung di player.js) agar tidak menimpa bar progres.
   padding-bottom 2x geser = menggeser titik tengah flex ke atas sebesar geser. */
.center-controls{
  box-sizing:border-box;
  padding-bottom:calc(var(--center-lift, 0px) * 2);
  transition:opacity .28s ease, padding-bottom .2s ease;
}

/* Sebelum video diputar menu bawah tersembunyi, jadi tombol play tetap tepat di tengah. */
.player.not-started .center-controls{
  padding-bottom:0;
}

/* Player pendek: menu bawah dipadatkan supaya tombol play tengah muat tanpa bergeser. */
@media (max-width:699px){
  .player.compact .player-controls{
    gap:2px;
    padding-top:0;
    padding-bottom:calc(6px + env(safe-area-inset-bottom,0px));
  }
  .player.compact .player-bottom-row{
    min-height:32px;
  }
  .player.compact .player-btn{
    width:32px;
    height:32px;
    flex-basis:32px;
  }
  .player.compact .player-btn svg{
    width:18px;
    height:18px;
  }
}

/* ===== Mode biasa (bukan layar penuh): satu baris =====
   Progres di kiri, tombol layar penuh di kanan tepat di samping progres.
   Kualitas, CC, volume, pengaturan, dan PiP baru muncul di layar penuh (.is-fs
   diatur player.js). `display:contents` membuat tombol di baris bawah menjadi
   anak langsung baris kontrol, sehingga sejajar dengan progres. */
@media (max-width:699px){
  .player:not(.is-fs) .player-controls{
    flex-direction:row;
    align-items:center;
    gap:4px;
    padding:0 6px 6px 12px;
    padding-bottom:calc(6px + env(safe-area-inset-bottom,0px));
  }
  .player:not(.is-fs) .progress-row{
    flex:1 1 auto;
    min-width:0;
    width:auto;
  }
  .player:not(.is-fs) .player-bottom-row,
  .player:not(.is-fs) .player-right-controls{
    display:contents;
  }
  .player:not(.is-fs) .player-left-controls,
  .player:not(.is-fs) #ccBtn,
  .player:not(.is-fs) #volumeWrap,
  .player:not(.is-fs) #settingsWrap,
  .player:not(.is-fs) #pipBtn{
    display:none !important;
  }
  .player:not(.is-fs) #fullscreenBtn{
    flex:0 0 auto;
  }

}
