/* ============================================================================
   Dawwirli Player — custom pro <video> player (VOD from IPTV + live HLS)
   Self-contained. RTL Arabic. Responsive: mobile / desktop / TV.
   No third-party embeds — plays our own /vod and /hls streams.
   ============================================================================ */
:root{
  --dp-accent:#8b5cf6;      /* violet */
  --dp-accent2:#22d3ee;     /* cyan */
  --dp-accent3:#f472b6;     /* pink */
  --dp-grad:linear-gradient(120deg,#22d3ee,#8b5cf6 55%,#f472b6);
  --dp-bg:#080715;
  --dp-text:#f6f4ff;
  --dp-muted:#a7a3cf;
  --dp-glass:rgba(16,12,40,.66);
  --dp-glass2:rgba(255,255,255,.10);
  --dp-brd:rgba(139,92,246,.4);
  --dp-shadow:0 18px 60px rgba(0,0,0,.62);
  --dp-ctrl:44px;
}

.dp-root{
  position:fixed; inset:0; z-index:9000; display:none;
  background:#05040e;  /* opaque — the stage covers it; no costly backdrop blur */
  align-items:center; justify-content:center;
  font-family:"Segoe UI",Tahoma,"Noto Naskh Arabic",system-ui,sans-serif;
  opacity:0; transition:opacity .2s ease;
}
.dp-root.dp-open{ display:flex; opacity:1; }
/* dvh = the ACTUAL visible viewport (excludes the mobile address bar) so the dock
   never sits below the fold and the video fits the phone screen */
@supports (height:100dvh){ .dp-root{ height:100dvh; } }

.dp-stage{
  position:relative; width:100%; height:100%;
  max-width:min(1600px, 100vw); max-height:100vh;
  /* site-themed indigo backdrop (STATIC — no animated aurora, keeps the player light)
     clearly visible violet/cyan/pink glow so it reads as the brand, not black */
  background:
    radial-gradient(1100px 760px at 50% -6%, rgba(139,92,246,.55), transparent 58%),
    radial-gradient(1000px 720px at 100% 110%, rgba(34,211,238,.34), transparent 55%),
    radial-gradient(820px 680px at 0% 100%, rgba(244,114,182,.22), transparent 55%),
    linear-gradient(160deg, #191447, #0d0b2a 58%, #0b1636);
  /* clip لا hidden: الأخيرة تبقى قابلة للإزاحة برمجيًّا، وscrollIntoView
     في درج الحلقات أزاحت المسرح ١١٠ بكسل فانكشف لونُ الخلفية بجانب
     الفيديو (قِيس على جهاز المالك: scrollLeft=-110 · scrollWidth=1336
     مقابل clientWidth=1226). */
  overflow-x:hidden;   /* بديلٌ للمتصفّحات القديمة */
  overflow:clip;       /* الحديثة: غير قابلةٍ للإزاحة برمجيًّا أصلًا */
  display:flex; align-items:center; justify-content:center;
}
@supports (height:100dvh){ .dp-stage{ max-height:100dvh; } }
@media (min-width:1100px){
  .dp-root{ padding:24px; }
  .dp-stage{ border-radius:20px; box-shadow:var(--dp-shadow); max-height:calc(100vh - 48px); }
}

/* frosted poster of the opened title, behind the video (fills the letterbox area).
   Static blurred IMAGE (not backdrop-filter) so it's cheap — rendered once. */
.dp-bg{ position:absolute; inset:0; z-index:0; background-size:cover; background-position:center;
  filter:blur(42px) brightness(.42) saturate(1.25); transform:scale(1.18);
  opacity:0; transition:opacity .5s ease; pointer-events:none; }
.dp-bg.dp-bg-on{ opacity:1; }
/* transparent + above the frosted poster; letterbox shows the poster, not black */
.dp-video{ position:relative; z-index:1; width:100%; height:100%; object-fit:contain; background:transparent; display:block; }

/* ---- ambient gradient scrims (top + bottom) ---- */
.dp-stage::before,.dp-stage::after{
  content:""; position:absolute; left:0; right:0; height:34%; pointer-events:none;
  z-index:2; opacity:1; transition:opacity .3s ease;
}
.dp-stage::before{ top:0; background:linear-gradient(to bottom, rgba(0,0,0,.68), transparent); }
.dp-stage::after{ bottom:0; height:46%; background:linear-gradient(to top, rgba(0,0,0,.82), transparent); }
.dp-stage.dp-idle::before,.dp-stage.dp-idle::after{ opacity:0; }

/* ---- watermark brand ---- */
.dp-mark{
  position:absolute; top:14px; inset-inline-start:18px; z-index:5;
  display:flex; align-items:center; gap:8px; pointer-events:none;
  opacity:.9; transition:opacity .3s ease;
}
.dp-mark .dp-mark-badge{
  width:30px; height:30px; border-radius:9px; display:grid; place-items:center;
  font-weight:900; font-size:17px; color:#0b0a1f;
  background:var(--dp-grad);
  box-shadow:0 4px 14px rgba(139,92,246,.5);
}
.dp-mark .dp-mark-txt{ font-weight:800; color:var(--dp-text); font-size:15px; letter-spacing:.3px;
  text-shadow:0 2px 8px rgba(0,0,0,.6); }
/* watermark shows ONLY while idle (as branding) — hidden when the top bar/title is up,
   so the badge never overlaps the movie title */
.dp-mark{ opacity:0; }
.dp-stage.dp-idle .dp-mark{ opacity:.8; }
@media (max-width:640px){ .dp-mark .dp-mark-txt{ display:none; } }

/* ---- top bar (title + close) ---- */
.dp-top{
  position:absolute; top:0; inset-inline:0; z-index:6;
  display:flex; align-items:center; gap:12px;
  padding:14px 16px 14px 66px; transition:opacity .3s ease, transform .3s ease;
}
.dp-stage.dp-idle .dp-top{ opacity:0; transform:translateY(-8px); }
.dp-title{ flex:1; min-width:0; color:#fff; font-weight:700; font-size:16px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  text-shadow:0 2px 10px rgba(0,0,0,.7); text-align:start; }
.dp-livepill{
  display:none; align-items:center; gap:6px; font-size:12px; font-weight:800;
  color:#fff; background:var(--dp-accent2); padding:4px 10px; border-radius:20px; }
.dp-livepill::before{ content:""; width:8px; height:8px; border-radius:50%; background:#fff;
  animation:dp-pulse 1.4s infinite; }
.dp-stage.dp-live .dp-livepill{ display:inline-flex; }
@keyframes dp-pulse{ 0%,100%{opacity:1} 50%{opacity:.3} }

/* ---- center controls (big play + skip) ---- */
.dp-center{
  position:absolute; inset:0; z-index:4; display:flex; align-items:center; justify-content:center;
  gap:min(14vw,120px); pointer-events:none; transition:opacity .3s ease;
}
.dp-center button{ pointer-events:auto; }
/* the whole center cluster (big play + ±10 skips) auto-hides with the rest after 3s idle */
.dp-stage.dp-idle .dp-center{ opacity:0; pointer-events:none; }
.dp-big{
  width:82px; height:82px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(12,26,25,.55); color:#fff; font-size:34px;
  display:grid; place-items:center; backdrop-filter:blur(6px);
  border:1.5px solid var(--dp-brd); transition:transform .18s ease, background .2s ease;
}
.dp-big:hover{ background:var(--dp-accent2); transform:scale(1.06); }
.dp-skip{
  width:56px; height:56px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(12,26,25,.4); color:#fff; font-size:14px; font-weight:700;
  display:grid; place-items:center; backdrop-filter:blur(4px);
  border:1px solid var(--dp-brd); position:relative; transition:transform .15s ease, opacity .2s;
}
.dp-skip:hover{ background:rgba(139,92,246,.55); transform:scale(1.05); }
.dp-skip svg{ width:24px; height:24px; }
.dp-skip span{ position:absolute; font-size:10px; font-weight:800; }
.dp-stage.dp-live .dp-skip{ display:none; }
.dp-stage.dp-playing:not(.dp-idle) .dp-big{ opacity:0; pointer-events:none; }
.dp-stage.dp-paused .dp-big{ opacity:1; }

/* buffering spinner */
.dp-spin{
  position:absolute; z-index:4; width:58px; height:58px; border-radius:50%;
  border:3px solid rgba(255,255,255,.18); border-top-color:var(--dp-accent);
  animation:dp-rot .8s linear infinite; display:none;
}
.dp-stage.dp-loading .dp-spin{ display:block; }
.dp-stage.dp-loading .dp-big{ opacity:0; }
@keyframes dp-rot{ to{ transform:rotate(360deg); } }

/* double-tap seek ripples (mobile) */
.dp-tap{ position:absolute; top:0; bottom:0; width:34%; z-index:3; display:none; }
.dp-tap.l{ inset-inline-start:0; } .dp-tap.r{ inset-inline-end:0; }
@media (hover:none){ .dp-tap{ display:block; } }
.dp-tap-fb{
  position:absolute; top:50%; inset-inline-start:50%; transform:translate(-50%,-50%);
  color:#fff; font-weight:800; font-size:14px; background:rgba(0,0,0,.5);
  padding:10px 14px; border-radius:30px; opacity:0; transition:opacity .3s; pointer-events:none; }
.dp-tap.show .dp-tap-fb{ opacity:1; }

/* ---- bottom control dock ---- */
.dp-dock{
  position:absolute; bottom:0; inset-inline:0; z-index:6;
  padding:0 16px 14px; display:flex; flex-direction:column; gap:8px;
  transition:opacity .3s ease, transform .3s ease;
}
.dp-stage.dp-idle .dp-dock{ opacity:0; transform:translateY(12px); }

/* seek/progress bar — always LTR: progress grows left→right like a standard player */
.dp-seekwrap{ position:relative; height:20px; display:flex; align-items:center; cursor:pointer; touch-action:none; direction:ltr; }
.dp-track{ position:relative; width:100%; height:5px; border-radius:6px; background:rgba(255,255,255,.22); overflow:visible; transition:height .12s ease; }
.dp-seekwrap:hover .dp-track{ height:7px; }
.dp-buffered{ position:absolute; inset-block:0; inset-inline-start:0; background:rgba(255,255,255,.32); border-radius:6px; width:0; }
.dp-played{ position:absolute; inset-block:0; inset-inline-start:0; border-radius:6px; width:0;
  background:var(--dp-grad); }
.dp-thumb{ position:absolute; top:50%; inset-inline-start:0; width:14px; height:14px; border-radius:50%;
  background:#fff; box-shadow:0 0 0 4px rgba(139,92,246,.4); transform:translate(50%,-50%); opacity:0; transition:opacity .12s; }
.dp-seekwrap:hover .dp-thumb{ opacity:1; }
.dp-stage.dp-live .dp-seekwrap{ opacity:.5; pointer-events:none; }
/* hover time tooltip */
.dp-hovertime{ position:absolute; bottom:22px; transform:translateX(50%); background:rgba(0,0,0,.85);
  color:#fff; font-size:12px; font-weight:700; padding:3px 8px; border-radius:6px; pointer-events:none;
  opacity:0; white-space:nowrap; }
.dp-seekwrap:hover .dp-hovertime.show{ opacity:1; }

/* control row */
.dp-row{ display:flex; align-items:center; gap:6px; }
.dp-btn{
  width:var(--dp-ctrl); height:var(--dp-ctrl); border:none; border-radius:12px; cursor:pointer;
  background:transparent; color:#fff; display:grid; place-items:center; position:relative;
  transition:background .18s ease, transform .12s ease; flex-shrink:0;
}
.dp-btn:hover{ background:var(--dp-glass2); }
.dp-btn:active{ transform:scale(.92); }
.dp-btn[disabled]{ opacity:.3; pointer-events:none; }
.dp-btn svg{ width:24px; height:24px; fill:currentColor; }
.dp-btn:focus-visible{ outline:2px solid var(--dp-accent); outline-offset:2px; }
/* download button = a distinct RED button so it reads clearly as "تحميل" */
#dpDl{ background:#e23b4e; color:#fff; }
#dpDl:hover{ background:#ff4f78; }
.dp-sp{ flex:1; }
.dp-time{ color:var(--dp-text); font-size:13px; font-weight:600; font-variant-numeric:tabular-nums;
  padding:0 8px; white-space:nowrap; direction:ltr; }
.dp-time b{ color:#fff; }
.dp-live-now{ display:none; color:var(--dp-accent); font-weight:800; font-size:12px; padding:0 8px; cursor:pointer; }
.dp-stage.dp-live .dp-live-now{ display:inline; }

/* volume */
.dp-vol{ display:flex; align-items:center; }
.dp-vol-slider{ width:0; overflow:hidden; transition:width .2s ease; }
.dp-vol:hover .dp-vol-slider, .dp-vol:focus-within .dp-vol-slider{ width:84px; }
.dp-range{ -webkit-appearance:none; appearance:none; height:5px; border-radius:6px; background:rgba(255,255,255,.3);
  outline:none; cursor:pointer; margin:0 8px; }
.dp-range::-webkit-slider-thumb{ -webkit-appearance:none; width:13px; height:13px; border-radius:50%; background:var(--dp-accent); }
.dp-range::-moz-range-thumb{ width:13px; height:13px; border:none; border-radius:50%; background:var(--dp-accent); }
@media (hover:none){ .dp-vol-slider{ width:64px; } }

/* label under some buttons (10) */
.dp-btn .dp-lbl{ position:absolute; font-size:9px; font-weight:800; bottom:6px; }

/* ---- popover menus (settings / subtitles / quality) ---- */
.dp-menu{
  position:absolute; bottom:calc(var(--dp-ctrl) + 18px); inset-inline-end:16px; z-index:8;
  min-width:210px; max-height:60vh; overflow-y:auto;
  background:var(--dp-glass); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  border:1px solid var(--dp-brd); border-radius:16px; box-shadow:var(--dp-shadow);
  padding:8px; display:none; animation:dp-pop .16s ease;
}
.dp-menu.dp-show{ display:block; }
@keyframes dp-pop{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
.dp-menu-h{ color:var(--dp-muted); font-size:12px; font-weight:700; padding:6px 12px 4px; }
.dp-item{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  width:100%; border:none; background:transparent; color:var(--dp-text); cursor:pointer;
  padding:10px 12px; border-radius:10px; font-size:14px; font-weight:600; text-align:start; }
.dp-item:hover{ background:var(--dp-glass2); }
.dp-item.dp-on{ color:var(--dp-accent); }
.dp-item .dp-check{ opacity:0; }
.dp-item.dp-on .dp-check{ opacity:1; }
.dp-menu-sep{ height:1px; background:var(--dp-brd); margin:6px 8px; }
.dp-sync{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:4px 12px 2px; }
.dp-sync-b{ width:38px; height:34px; border-radius:9px; font-size:20px; font-weight:800; cursor:pointer;
  background:var(--dp-glass2); border:1px solid var(--dp-brd); color:var(--dp-text); font-family:inherit; line-height:1; }
.dp-sync-b:hover{ border-color:var(--dp-accent); color:var(--dp-accent); }
.dp-sync-b:active{ transform:scale(.94); }
.dp-sync-v{ font-size:14px; font-weight:800; min-width:52px; text-align:center; font-variant-numeric:tabular-nums; }
.dp-sync-hint{ color:var(--dp-muted); font-size:11px; padding:2px 12px 8px; text-align:center; }
/* custom-rendered subtitles (so the sync offset is instant + reliable) */
.dp-subs{ position:absolute; left:50%; transform:translateX(-50%); bottom:13%; z-index:6; max-width:88%;
  text-align:center; direction:rtl; pointer-events:none; white-space:pre-line;
  color:#fff; font-size:clamp(16px,2.7vw,30px); font-weight:700; line-height:1.4;
  text-shadow:0 2px 4px #000, 0 0 10px rgba(0,0,0,.9);
  background:rgba(0,0,0,.5); padding:.12em .55em; border-radius:8px; }
.dp-subs:empty{ display:none; }
.dp-stage.dp-idle .dp-subs{ bottom:7%; }   /* controls hidden → drop subs lower */

/* ---- error overlay ---- */
.dp-error{
  position:absolute; inset:0; z-index:7; display:none; flex-direction:column;
  align-items:center; justify-content:center; gap:16px; text-align:center; padding:24px;
  background:rgba(6,14,13,.82);
}
.dp-stage.dp-err .dp-error{ display:flex; }
.dp-error-ic{ font-size:48px; }
.dp-error-msg{ color:var(--dp-text); font-size:17px; font-weight:700; max-width:420px; }
.dp-error-sub{ color:var(--dp-muted); font-size:14px; }
.dp-error-actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.dp-cta{ border:none; cursor:pointer; padding:11px 22px; border-radius:12px; font-weight:800; font-size:15px;
  font-family:inherit; color:#0b0a1f; background:var(--dp-grad); }
.dp-cta.ghost{ background:transparent; color:var(--dp-text); border:1.5px solid var(--dp-brd); }

/* ---- resume toast ---- */
.dp-resume{
  position:absolute; bottom:calc(var(--dp-ctrl) + 40px); inset-inline-start:16px; z-index:7;
  display:none; align-items:center; gap:12px; padding:10px 14px; border-radius:14px;
  background:var(--dp-glass); backdrop-filter:blur(14px); border:1px solid var(--dp-brd);
  box-shadow:var(--dp-shadow); animation:dp-pop .2s ease; }
.dp-resume.dp-show{ display:flex; }
.dp-resume span{ color:var(--dp-text); font-size:13px; font-weight:600; }
.dp-resume button{ border:none; cursor:pointer; padding:7px 14px; border-radius:9px; font-weight:800; font-size:13px;
  font-family:inherit; color:#0b0a1f; background:var(--dp-accent); }
.dp-resume .dp-resume-x{ background:transparent; color:var(--dp-muted); padding:6px 8px; }

/* ---- next-episode toast ---- */
.dp-next{
  position:absolute; bottom:calc(var(--dp-ctrl) + 40px); inset-inline-end:16px; z-index:7;
  display:none; align-items:center; gap:12px; padding:12px 16px; border-radius:14px;
  background:var(--dp-glass); backdrop-filter:blur(14px); border:1px solid var(--dp-brd);
  box-shadow:var(--dp-shadow); }
.dp-next.dp-show{ display:flex; }
.dp-next span{ color:var(--dp-text); font-size:13px; font-weight:600; }
.dp-next button{ border:none; cursor:pointer; padding:8px 16px; border-radius:10px; font-weight:800; font-size:13px;
  font-family:inherit; color:#0b0a1f; background:var(--dp-grad); }

/* ---- captions styling ---- */
.dp-video::cue{ background:rgba(0,0,0,.65); color:#fff; font-size:.9em; line-height:1.4;
  font-family:"Noto Naskh Arabic","Segoe UI",sans-serif; }

/* ---- episodes drawer ---- */
.dp-drawer{
  position:absolute; top:0; bottom:0; inset-inline-end:0; z-index:8; width:min(340px,86vw);
  background:var(--dp-glass); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-inline-start:1px solid var(--dp-brd); box-shadow:-20px 0 60px rgba(0,0,0,.5);
  transform:translateX(-100%); transition:transform .28s ease; display:flex; flex-direction:column; }
[dir="rtl"] .dp-drawer{ transform:translateX(100%); }
.dp-drawer.dp-show{ transform:none; }
.dp-drawer-h{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; font-weight:800; font-size:16px;
  color:var(--dp-text); border-bottom:1px solid var(--dp-brd); }
.dp-drawer-list{ overflow-y:auto; padding:8px; display:flex; flex-direction:column; gap:6px; }
.dp-ep{ display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:12px; border:1px solid transparent;
  background:transparent; color:var(--dp-text); cursor:pointer; text-align:start; font-family:inherit; }
.dp-ep:hover{ background:var(--dp-glass2); }
.dp-ep.dp-on{ background:var(--dp-glass2); border-color:var(--dp-brd); }
.dp-ep-n{ width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; border-radius:9px; font-weight:800; font-size:14px;
  color:#0b0a1f; background:var(--dp-grad); }
.dp-ep-t{ flex:1; min-width:0; font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dp-ep-now{ color:var(--dp-accent2); font-size:13px; }

/* ---- toast ---- */
.dp-toast{ position:absolute; bottom:calc(var(--dp-ctrl) + 46px); inset-inline-start:50%; transform:translateX(50%) translateY(8px); z-index:9;
  background:var(--dp-glass); backdrop-filter:blur(14px); border:1px solid var(--dp-brd); color:var(--dp-text);
  padding:9px 16px; border-radius:12px; font-size:13px; font-weight:700; opacity:0; pointer-events:none; transition:.25s; white-space:nowrap; }
.dp-toast.dp-show{ opacity:1; transform:translateX(50%); }

/* ============ TV mode (large screens / 10-foot) ============ */
@media (min-width:1600px){
  :root{ --dp-ctrl:56px; }
  .dp-big{ width:104px; height:104px; font-size:44px; }
  .dp-skip{ width:72px; height:72px; }
  .dp-title{ font-size:22px; }
  .dp-btn svg{ width:30px; height:30px; }
  .dp-time{ font-size:17px; }
  .dp-item{ font-size:17px; padding:13px 16px; }
}
/* focus ring is bright for remote navigation */
.dp-root.dp-tv .dp-btn:focus,.dp-root.dp-tv .dp-item:focus,.dp-root.dp-tv .dp-cta:focus{
  outline:3px solid var(--dp-accent); outline-offset:3px; background:var(--dp-glass2);
}

/* ============ mobile ============ */
@media (max-width:640px){
  :root{ --dp-ctrl:38px; }
  .dp-big{ width:60px; height:60px; font-size:24px; }
  .dp-skip{ width:46px; height:46px; }
  .dp-center{ gap:min(22vw,84px); }
  .dp-dock{ padding:0 6px calc(8px + env(safe-area-inset-bottom,0px)); }
  .dp-btn svg{ width:21px; height:21px; }
  .dp-row{ gap:1px; flex-wrap:nowrap; }
  .dp-time{ font-size:12px; padding:0 3px; }
  .dp-title{ font-size:13px; }
  .dp-menu{ inset-inline:10px; min-width:auto; }
  /* hide volume slider on touch (use device volume) */
  .dp-vol-slider{ display:none; }
  /* the control row is tight on phones — drop secondary buttons so PLAY + seek + eps
     + subtitles + settings + FULLSCREEN always fit (fullscreen was getting pushed off-screen).
     PiP barely works on mobile; download/share stay available from the film's detail page. */
  #dpPip, #dpDl, #dpShare{ display:none !important; }
}

/* respect reduced motion */
@media (prefers-reduced-motion:reduce){
  .dp-root,.dp-stage::before,.dp-stage::after,.dp-top,.dp-dock,.dp-big,.dp-skip{ transition:none; }
  .dp-spin{ animation-duration:1.4s; }
}

/* Design refresh: player polish, CSS-only. */
:root{
  --dp-accent:#28d7cf;
  --dp-accent2:#7567ff;
  --dp-accent3:#ff5c93;
  --dp-grad:linear-gradient(135deg,#f7c948 0%,#ff8a5c 48%,#ff5c93 100%);
  --dp-bg:#03040a;
  --dp-glass:rgba(7,9,22,.72);
  --dp-glass2:rgba(255,255,255,.11);
  --dp-brd:rgba(40,215,207,.34);
}
.dp-root{ background:#03040a; }
.dp-stage{
  background:
    radial-gradient(960px 660px at 18% -8%,rgba(40,215,207,.26),transparent 58%),
    radial-gradient(900px 620px at 94% 108%,rgba(255,92,147,.18),transparent 58%),
    linear-gradient(160deg,#0f142b,#060817 62%,#03040a);
}
.dp-stage::before{ background:linear-gradient(to bottom,rgba(0,0,0,.72),transparent); }
.dp-stage::after{ background:linear-gradient(to top,rgba(0,0,0,.84),transparent); }
.dp-mark .dp-mark-badge,.dp-big:hover,.dp-cta,.dp-next button,.dp-ep-n{
  background:var(--dp-grad);
  color:#171008;
}
.dp-big,.dp-skip{
  background:rgba(7,9,22,.54);
  border-color:rgba(255,255,255,.16);
  box-shadow:0 16px 44px rgba(0,0,0,.34);
}
.dp-skip:hover,.dp-btn:hover,.dp-item:hover{
  background:rgba(40,215,207,.12);
}
.dp-dock{ padding-inline:clamp(10px,2vw,22px); }
.dp-track{ background:rgba(255,255,255,.2); }
.dp-played{ background:var(--dp-grad); }
.dp-thumb{ box-shadow:0 0 0 4px rgba(247,201,72,.25); }
.dp-menu,.dp-resume,.dp-next,.dp-toast,.dp-drawer{
  background:rgba(7,9,22,.78);
  border-color:rgba(40,215,207,.25);
}
.dp-item.dp-on,.dp-live-now{ color:#28d7cf; }
.dp-livepill{ background:#ef4444; }
.dp-error{ background:rgba(3,4,10,.86); }
@media (min-width:1100px){
  .dp-stage{ border-radius:18px; }
}
@media (max-width:640px){
  .dp-dock{ padding-inline:8px; }
  .dp-menu{ border-radius:14px; }
}
/* ============================================================================
   Premium pass 2: player as a clean cinema control surface. CSS-only.
   ============================================================================ */
.dp-root{
  color-scheme:dark;
}
.dp-stage{
  isolation:isolate;
}
.dp-bg.dp-bg-on{
  opacity:.92;
  filter:blur(48px) brightness(.36) saturate(1.28);
}
.dp-video{
  filter:drop-shadow(0 28px 70px rgba(0,0,0,.42));
}
.dp-top{
  padding:18px 18px 18px 72px;
  background:linear-gradient(180deg,rgba(0,0,0,.52),transparent);
}
.dp-title{
  font-size:17px;
  font-weight:800;
}
.dp-mark .dp-mark-badge{
  border-radius:8px;
  box-shadow:0 10px 28px rgba(255,107,107,.3);
}
.dp-big{
  width:88px;
  height:88px;
  border-radius:999px;
  backdrop-filter:blur(18px) saturate(1.2);
  -webkit-backdrop-filter:blur(18px) saturate(1.2);
}
.dp-big svg{
  transform:scale(1.12);
}
.dp-skip{
  width:60px;
  height:60px;
  backdrop-filter:blur(14px) saturate(1.15);
  -webkit-backdrop-filter:blur(14px) saturate(1.15);
}
.dp-dock{
  padding-bottom:18px;
  background:linear-gradient(0deg,rgba(0,0,0,.46),transparent);
}
.dp-row{
  min-height:46px;
  padding:5px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(7,9,22,.58);
  backdrop-filter:blur(18px) saturate(1.18);
  -webkit-backdrop-filter:blur(18px) saturate(1.18);
  box-shadow:0 18px 54px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.08);
}
.dp-btn{
  border-radius:11px;
}
.dp-btn:hover{
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(40,215,207,.18);
}
.dp-seekwrap{
  height:24px;
  margin-inline:6px;
}
.dp-track{
  height:6px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.dp-seekwrap:hover .dp-track{
  height:9px;
}
.dp-buffered{
  background:rgba(255,255,255,.28);
}
.dp-played{
  box-shadow:0 0 18px rgba(255,107,107,.45);
}
.dp-thumb{
  width:16px;
  height:16px;
  opacity:1;
}
.dp-menu{
  border-radius:16px;
  box-shadow:0 28px 80px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.08);
}
.dp-menu-h{
  color:#cfd7ea;
}
.dp-item{
  min-height:40px;
  border-radius:11px;
}
.dp-item.dp-on{
  background:rgba(40,215,207,.12);
}
.dp-resume,.dp-next,.dp-toast{
  border-radius:14px;
  box-shadow:0 22px 60px rgba(0,0,0,.45);
}
.dp-drawer{
  width:min(390px,88vw);
  background:rgba(7,9,22,.86);
}
.dp-drawer-h{
  min-height:58px;
  background:linear-gradient(180deg,rgba(255,255,255,.08),transparent);
}
.dp-ep{
  min-height:54px;
  border-radius:13px;
}
.dp-ep:hover,.dp-ep.dp-on{
  background:rgba(40,215,207,.11);
}
.dp-error{
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.dp-cta{
  border-radius:12px;
  min-height:42px;
  box-shadow:0 14px 34px rgba(255,107,107,.2);
}
.dp-cta.ghost{
  background:rgba(255,255,255,.08);
}
@media(max-width:640px){
  .dp-top{ padding:12px 12px 12px 54px; }
  .dp-big{ width:68px; height:68px; }
  .dp-skip{ width:48px; height:48px; }
  .dp-row{
    border-radius:14px;
    padding:3px;
    min-height:42px;
  }
  .dp-seekwrap{ margin-inline:2px; }
  .dp-time{ max-width:86px; overflow:hidden; text-overflow:ellipsis; }
}
/* ============================================================================
   FINAL PASS — transport direction + seek indicator.
   (Layered file: THIS block is last and wins.)
   ============================================================================ */

/* The seek bar is forced LTR (progress fills left→right), so the transport must
   follow it. In RTL the flex row put «رجوع 10» on the right and «تقديم 10» on the
   left — i.e. backwards relative to the progress bar. */
.dp-center{ direction:ltr; }

/* Same for the double-tap zones: physical left = rewind, physical right = forward
   (they were mapped with inset-inline-* which flips under RTL). */
.dp-tap.l{ inset-inline-start:auto !important; inset-inline-end:auto !important; left:0 !important; right:auto !important; }
.dp-tap.r{ inset-inline-start:auto !important; inset-inline-end:auto !important; right:0 !important; left:auto !important; }

/* The indicator was pinned to the START of the played bar, so it never moved while
   the fill grew. Ride the END of the fill = the actual playhead. */
.dp-thumb{
  inset-inline-start:auto !important; inset-inline-end:auto !important;
  left:100% !important; right:auto !important;
  transform:translate(-50%,-50%) !important;
}

/* ---- TV: make the player's close (✕) unmistakable, like the page exit buttons ---- */
@media (min-width:1600px){
  #dpClose{
    background:rgba(10,14,26,.92) !important;
    border:2px solid rgba(255,255,255,.3) !important;
    border-radius:16px !important;
    box-shadow:0 10px 30px rgba(0,0,0,.6) !important;
  }
  #dpClose:hover{ background:#ff4f78 !important; border-color:transparent !important; }
  #dpClose:focus-visible{ outline:3px solid #28e0d0 !important; outline-offset:3px !important; }
  #dpClose svg{ width:30px !important; height:30px !important; }
}

/* next-episode auto-countdown pill: cancel button + subtle pulse while counting */
.dp-next-x{ border:none; cursor:pointer; padding:8px 14px; border-radius:10px; font-weight:800; font-size:13px;
  font-family:inherit; color:var(--dp-text); background:rgba(255,255,255,.12); }
.dp-next-x:hover{ background:rgba(255,255,255,.2); }
.dp-next.dp-next-auto{ box-shadow:0 0 0 2px rgba(40,224,208,.5), var(--dp-shadow); }

.dp-note{ padding:7px 14px 10px; font-size:11.5px; line-height:1.6; color:rgba(255,255,255,.5); max-width:230px; }

/* حالة التحضير — هادئة لا تحذيرية */
/* display:flex يتغلّب على السمة hidden، فكان el.hidden=true يُخفيه منطقيًا
   ويبقى مرئيًا فوق فيلمٍ يعمل. القاعدة التالية تحسم الأمر. */
.dp-prep-box[hidden]{ display:none !important; }
.dp-prep-box{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:12px; text-align:center; padding:24px; z-index:6;
  background:rgba(3,4,10,.82); color:#fff; }
.dp-prep-box b{ font-size:17px; font-weight:800; }
.dp-prep-box span{ font-size:13px; color:rgba(255,255,255,.6); max-width:320px; line-height:1.8; }
.dp-prep-ring{ width:42px; height:42px; border-radius:50%;
  border:3px solid rgba(255,255,255,.12); border-top-color:var(--dp-accent,#FFAC2D);
  animation:dpspin 1s linear infinite; }
@keyframes dpspin{ to{ transform:rotate(360deg) } }
.dp-prep-bar{ display:block; width:min(280px,70%); height:4px; border-radius:99px;
  background:rgba(255,255,255,.1); overflow:hidden; }
.dp-prep-bar u{ display:block; height:100%; border-radius:99px;
  background:linear-gradient(90deg,#FF7B00,#FFAC2D); transition:width .6s ease; }

/* ═══ زرّ تخطّي المقدّمة ═══
   يظهر أسفل يمين المشغّل في النافذة التي تقع فيها المقدّمة عادةً، ويختفي
   وحده بعدها. مكانه فوق شريط التحكّم كي لا يزاحمه، وبعيد عن أزرار التنقّل. */
.dp-intro{
  position:absolute; inset-inline-end:22px; bottom:92px; z-index:6;
  display:none; align-items:center; gap:7px;
  height:40px; padding-inline:18px; border:0; border-radius:10px;
  background:rgba(10,14,22,.88); color:#fff; backdrop-filter:blur(10px);
  font-family:inherit; font-size:14px; font-weight:700; cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.16);
  transition:background .18s ease, transform .18s ease;
}
.dp-intro.dp-show{ display:inline-flex; animation:dpSkipIn .26s ease both }
.dp-intro:hover{ background:linear-gradient(135deg,#FF7B00,#FFAC2D); color:#1A1000; transform:translateY(-2px) }
@keyframes dpSkipIn{ from{ opacity:0; transform:translateY(8px) } to{ opacity:1; transform:none } }
@media (max-width:600px){ .dp-intro{ bottom:78px; inset-inline-end:14px; height:36px; font-size:13px } }

/* ═══ درج الحلقات والمواسم ═══
   ينزلق من الجانب فوق الفيديو، ولا يغطّيه كلّه — فالمشاهد يرى ما يشاهده
   بينما يختار. يُغلق بالزرّ أو بالضغط خارجه أو بمفتاح Escape. */
.dp-eps{
  position:absolute; inset-block:0; inset-inline-end:0; z-index:9;
  width:min(360px, 86vw); display:flex; flex-direction:column;
  background:linear-gradient(to left, rgba(6,9,16,.97), rgba(6,9,16,.93));
  backdrop-filter:blur(14px); border-inline-start:1px solid rgba(255,255,255,.1);
  transform:translateX(102%); transition:transform .26s cubic-bezier(.4,0,.2,1);
  box-shadow:-18px 0 46px rgba(0,0,0,.5);
}
[dir="rtl"] .dp-eps{ transform:translateX(-102%) }
.dp-eps.dp-show{ transform:none }
/* الإخفاء الحقيقيّ: الإزاحة وحدها تركت جزءًا من اللوحة داخل الشاشة على
   بعض المقاسات (قِيس على جهاز المالك: x=-233px وright=127px مع
   display:flex وopacity:1) — فالنسبة المئويّة تُحسب من عرض اللوحة لا
   من المسافة الباقية. السمة hidden تحسمها في كلّ اتجاهٍ ومقاس. */
.dp-eps[hidden]{ display:none !important; }
.dp-eps-h{ display:flex; align-items:center; gap:10px; padding:16px 18px 12px;
  border-bottom:1px solid rgba(255,255,255,.08) }
.dp-eps-h b{ flex:1; min-width:0; font-size:15px; font-weight:800; color:#fff;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.dp-eps-x{ flex:none; width:30px; height:30px; border:0; border-radius:8px; cursor:pointer;
  background:rgba(255,255,255,.08); color:#fff; font-size:14px; line-height:1 }
.dp-eps-x:hover{ background:rgba(255,255,255,.16) }
.dp-eps-seasons{ display:flex; gap:6px; overflow-x:auto; padding:12px 18px 0; scrollbar-width:none }
.dp-eps-seasons::-webkit-scrollbar{ display:none }
.dp-eps-s{ flex:none; padding:6px 13px; border-radius:999px; cursor:pointer; font-family:inherit;
  font-size:12.5px; font-weight:700; color:#cfd8e6;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1) }
.dp-eps-s.on{ background:linear-gradient(135deg,#FF7B00,#FFAC2D); color:#1A1000; border-color:transparent }
.dp-eps-list{ flex:1; min-height:0; overflow-y:auto; padding:12px 12px 18px; display:flex;
  flex-direction:column; gap:4px }
.dp-eps-i{ position:relative; display:flex; align-items:center; gap:11px; width:100%;
  padding:10px 12px; border:0; border-radius:10px; cursor:pointer; font-family:inherit;
  text-align:start; background:transparent; color:#dbe3ef; overflow:hidden }
.dp-eps-i:hover{ background:rgba(255,255,255,.07) }
.dp-eps-i.on{ background:rgba(255,172,45,.14); color:#fff }
.dp-eps-i .n{ flex:none; width:26px; text-align:center; font-size:13px; font-weight:800; color:#8e9bb0 }
.dp-eps-i.on .n{ color:#FFAC2D }
.dp-eps-i .t{ flex:1; min-width:0; font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.dp-eps-i .ok{ flex:none; color:#31D07A; font-weight:800; font-size:13px }
.dp-eps-i .pb{ position:absolute; inset-inline:12px; bottom:4px; height:2px;
  background:rgba(255,255,255,.14); border-radius:2px; display:block }
.dp-eps-i .pb u{ display:block; height:100%; border-radius:2px;
  background:linear-gradient(90deg,#FF7B00,#FFAC2D) }
.dp-eps-wait{ padding:28px 12px; text-align:center; color:#8e9bb0; font-size:13px }
@media (max-width:600px){ .dp-eps{ width:min(320px,92vw) } }


/* رأس المشغّل ودرج الحلقات يحترمان شريط الساعة في التطبيق المحفوظ */
.dp-top{padding-top:calc(14px + env(safe-area-inset-top,0px))}
.dp-eps{padding-top:env(safe-area-inset-top,0px)}
/* أزرار الحلقات هدفُ لمسٍ كامل — كانت تعتمد على حشوةٍ قد تضيق */
.dp-eps-i{min-height:46px}
.dp-eps-x{min-width:44px;min-height:44px}

/* القفل: تختفي الواجهة كلّها ويبقى زرُّ الفكّ وحدَه — كما تفعل
   تطبيقات البثّ. لا نُبقي زرًّا آخر يعمل كي لا تُلمس الأزرار سهوًا. */
.dp-root.dp-locked .dp-dock,
.dp-root.dp-locked .dp-top,
.dp-root.dp-locked .dp-big,
.dp-root.dp-locked .dp-skip,
.dp-root.dp-locked .dp-tap{ pointer-events:none !important; opacity:0 !important; }
.dp-unlock{
  position:absolute; z-index:12; inset-inline-start:50%; bottom:12%;
  transform:translateX(-50%);
  display:none; align-items:center; gap:9px;
  padding:12px 20px; border:1px solid rgba(255,255,255,.24); border-radius:99px;
  background:rgba(7,9,22,.72); color:#fff; cursor:pointer;
  font:800 13.5px 'IBM Plex Sans Arabic','Cairo',sans-serif;
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  box-shadow:0 14px 40px rgba(0,0,0,.5);
}
.dp-unlock svg{ width:20px; height:20px; }
.dp-root.dp-locked .dp-unlock{ display:flex; }
.dp-unlock:active{ transform:translateX(-50%) scale(.96); }

/* جذر المشغّل مثبَّت على الشاشة كاملةً — لا شيء يفيض منه */
.dp-root.dp-open{ overflow:clip; overscroll-behavior:none; }
