/* پخش هوشمند — پوسته‌ی پلیر (Dark/OLED سینمایی)
   نوار کنترل عمداً LTR است: ترتیب پخش/تمام‌صفحه و حرکت نوار زمان در همه‌ی
   پلیرهای دنیا چپ‌به‌راست است و کاربر فارسی‌زبان هم همان را انتظار دارد.
   پنل‌ها و منوها RTL می‌مانند. */

.hv-root {
  --hv-accent: #e11d48;
  --hv-fg: #f8fafc;
  --hv-dim: #a1a7b5;
  --hv-surface: rgba(14, 14, 20, .96);
  --hv-hover: rgba(255, 255, 255, .14);
  --hv-line: rgba(255, 255, 255, .10);
  --hv-bar: 64px;
  position: fixed;
  /* مرورگر تلویزیون‌های قدیمی `inset` را نمی‌فهمند؛ بدون این چهار خط، پلیر
     هیچ ابعادی نمی‌گرفت و روی صفحه «هیچ چیزی دیده نمی‌شد». */
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: 2147483000;
  background: #000;
  display: none;
  direction: ltr;
  font-family: Vazirmatn, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, system-ui, sans-serif;
  color: var(--hv-fg);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hv-root.on { display: block; }
.hv-root * { box-sizing: border-box; }
.hv-root button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- صحنه ---------- */
.hv-stage { position: absolute; top:0; right:0; bottom:0; left:0; inset: 0; overflow: hidden; }
.hv-video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.hv-root.idle { cursor: none; }

/* سایه‌های بالا/پایین تا متن روی هر تصویری خوانا بماند */
.hv-shade { position: absolute; left: 0; right: 0; pointer-events: none; opacity: 1; transition: opacity .25s ease; }
.hv-shade.t { top: 0; height: 170px; background: linear-gradient(to bottom, rgba(0,0,0,.80), transparent); }
.hv-shade.b { bottom: 0; height: 220px; background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.45) 45%, transparent); }
.hv-root.idle .hv-shade { opacity: 0; }

/* ---------- نوار بالا ---------- */
.hv-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px; transition: opacity .25s ease, transform .25s ease;
}
.hv-root.idle .hv-top { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.hv-titles { flex: 1; min-width: 0; direction: rtl; text-align: right; }
.hv-t1 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5;
         overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.hv-t2 { margin: 3px 0 0; font-size: 13px; font-weight: 500; color: var(--hv-dim); line-height: 1.6; }

/* ---------- دکمه‌ها ---------- */
.hv-btn {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; position: relative;
  transition: background .18s ease, transform .18s ease;
}
.hv-btn:hover { background: var(--hv-hover); }
.hv-btn:active { transform: scale(.92); }
.hv-btn:focus-visible { outline: 2px solid var(--hv-fg); outline-offset: 2px; }
.hv-btn svg { width: 24px; height: 24px; fill: currentColor; pointer-events: none; }
.hv-btn.sm svg { width: 21px; height: 21px; }
.hv-btn.on { color: var(--hv-accent); }
.hv-btn[disabled] { opacity: .35; cursor: default; }
.hv-btn[disabled]:hover { background: none; }

/* تاگل‌های متنی: زیرنویس و دوبله — عمداً متن دارند تا کاربر دنبالشان نگردد */
.hv-pill {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  height: 34px; padding: 0 13px; margin: 0 2px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; direction: rtl; position: relative;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.hv-pill:hover { background: var(--hv-hover); }
.hv-pill:focus-visible { outline: 2px solid var(--hv-fg); outline-offset: 2px; }
.hv-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(255, 255, 255, .35); transition: background .18s ease, box-shadow .18s ease;
}
.hv-pill.on { background: rgba(225, 29, 72, .22); border-color: var(--hv-accent); }
.hv-pill.on .dot { background: var(--hv-accent); box-shadow: 0 0 8px var(--hv-accent); }
.hv-pill[disabled] { opacity: .34; cursor: default; }
.hv-pill[disabled]:hover { background: rgba(255, 255, 255, .10); }

/* راهنمای دکمه — چون آیکن‌ها بدون متن‌اند */
.hv-btn::after, .hv-pill::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%); background: rgba(0,0,0,.9); color: #fff;
  font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 6px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease; direction: rtl;
}
.hv-btn:hover::after, .hv-pill:hover::after { opacity: 1; }
@media (hover: none) { .hv-btn::after, .hv-pill::after { display: none; } }

/* ---------- مرکز صحنه ---------- */
.hv-center {
  position: absolute; top:0; right:0; bottom:0; left:0; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 34px; pointer-events: none; transition: opacity .25s ease;
}
.hv-root.idle .hv-center { opacity: 0; }
.hv-center .hv-btn { pointer-events: auto; width: 58px; height: 58px; background: rgba(0,0,0,.35); }
.hv-center .hv-btn svg { width: 30px; height: 30px; }
.hv-center .hv-big { width: 78px; height: 78px; background: rgba(255,255,255,.15); backdrop-filter: blur(8px); }
.hv-center .hv-big svg { width: 38px; height: 38px; }
.hv-center .hv-big:hover { background: rgba(255,255,255,.26); }

/* پرش دوضربه‌ای موبایل */
.hv-tapzone { position: absolute; top: 0; bottom: var(--hv-bar); width: 32%; pointer-events: none; }
.hv-tapzone.l { left: 0; } .hv-tapzone.r { right: 0; }
.hv-tapzone span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.55); border-radius: 999px; padding: 10px 16px;
  font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s ease;
}
.hv-tapzone.flash span { opacity: 1; }

/* ---------- زیرنویس (خودمان رندر می‌کنیم تا در همه‌ی مرورگرها یکسان و خوانا باشد) ---------- */
.hv-cap {
  position: absolute; left: 6%; right: 6%; bottom: 84px;
  text-align: center; direction: rtl; pointer-events: none;
  transition: bottom .25s ease; z-index: 4;
}
.hv-root.idle .hv-cap { bottom: 40px; }
.hv-cap span {
  display: inline-block; background: rgba(0,0,0,.62); padding: 4px 12px; border-radius: 6px;
  font-size: 20px;
  font-size: clamp(15px, 2.4vw, 26px); font-weight: 600; line-height: 1.75;
  text-shadow: 0 2px 6px rgba(0,0,0,.9);
}
.hv-cap:empty { display: none; }

/* ---------- نوار پایین ---------- */
.hv-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 16px 12px;
  transition: opacity .25s ease, transform .25s ease;
}
.hv-root.idle .hv-bottom { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* نوار زمان */
.hv-scrub { position: relative; height: 20px; display: flex; align-items: center; cursor: pointer; }
.hv-track { position: relative; width: 100%; height: 4px; border-radius: 3px;
            background: rgba(255,255,255,.28); transition: height .15s ease; }
.hv-scrub:hover .hv-track, .hv-scrub.drag .hv-track { height: 6px; }
.hv-buf, .hv-play-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.hv-buf { background: rgba(255,255,255,.38); }
.hv-play-fill { background: var(--hv-accent); }
.hv-thumb {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%;
  background: var(--hv-accent); transform: translate(-50%, -50%) scale(0);
  transition: transform .15s ease; box-shadow: 0 0 0 4px rgba(225,29,72,.25);
}
.hv-scrub:hover .hv-thumb, .hv-scrub.drag .hv-thumb { transform: translate(-50%, -50%) scale(1); }
.hv-peek {
  position: absolute; bottom: 26px; transform: translateX(-50%);
  background: rgba(0,0,0,.92); padding: 4px 9px; border-radius: 6px;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.hv-scrub:hover .hv-peek, .hv-scrub.drag .hv-peek { opacity: 1; }

/* ردیف کنترل‌ها */
.hv-ctrls { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.hv-spring { flex: 1; }
.hv-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
           color: var(--hv-dim); padding: 0 10px; white-space: nowrap; }
.hv-time b { color: var(--hv-fg); font-weight: 700; }

/* صدا */
.hv-vol { display: flex; align-items: center; }
.hv-vol-slot { width: 0; overflow: hidden; transition: width .22s ease; display: flex; align-items: center; }
.hv-vol:hover .hv-vol-slot, .hv-vol-slot.open { width: 84px; }
.hv-vol input { width: 76px; margin: 0 4px; accent-color: var(--hv-fg); cursor: pointer; }

/* برچسب متنی کنار آیکن (کیفیت فعلی) */
.hv-tag {
  font-size: 11px; font-weight: 800; letter-spacing: .3px;
  background: rgba(255,255,255,.16); border-radius: 4px; padding: 2px 5px;
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
}

/* ---------- منوی تنظیمات (چرخ‌دنده) ---------- */
.hv-menu {
  position: absolute; right: 16px; bottom: calc(var(--hv-bar) + 14px);
  width: 292px; max-height: 460px; max-height: min(62vh, 460px);
  background: var(--hv-surface); border: 1px solid var(--hv-line);
  border-radius: 14px; overflow: hidden; direction: rtl;
  box-shadow: 0 20px 60px rgba(0,0,0,.65);
  opacity: 0; transform: translateY(10px) scale(.97); transform-origin: bottom right;
  pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 6;
}
.hv-menu.on { opacity: 1; transform: none; pointer-events: auto; }
.hv-menu-scroll { max-height: 460px; max-height: min(62vh, 460px); overflow-y: auto; overscroll-behavior: contain; }
.hv-mhead {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--hv-line); font-size: 14px; font-weight: 700;
  position: sticky; top: 0; background: var(--hv-surface); z-index: 1;
}
.hv-mhead .hv-back { width: 30px; height: 30px; border-radius: 8px; display: inline-flex;
                     align-items: center; justify-content: center; }
.hv-mhead .hv-back:hover { background: var(--hv-hover); }
.hv-mhead .hv-back svg { width: 18px; height: 18px; fill: currentColor; }

.hv-mrow {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; font-size: 13.5px; text-align: right;
  transition: background .15s ease; min-height: 46px;
}
.hv-mrow:hover { background: var(--hv-hover); }
.hv-mrow .lbl { flex: 1; font-weight: 600; }
.hv-mrow .val { color: var(--hv-dim); font-size: 12.5px; font-weight: 600; }
.hv-mrow .arw { width: 16px; height: 16px; fill: var(--hv-dim); flex: 0 0 auto; }
.hv-mrow .tick { width: 18px; height: 18px; fill: var(--hv-accent); flex: 0 0 auto; opacity: 0; }
.hv-mrow.sel .tick { opacity: 1; }
.hv-mrow.sel .lbl { color: var(--hv-accent); }
.hv-mnote { padding: 9px 14px 13px; font-size: 11.5px; color: var(--hv-dim); line-height: 1.8; }

/* ---------- کشوی قسمت‌ها ---------- */
.hv-drawer {
  position: absolute; top: 0; bottom: 0; right: 0; width: 380px; max-width: 92%; width: min(380px, 92vw);
  background: var(--hv-surface); border-left: 1px solid var(--hv-line);
  direction: rtl; display: flex; flex-direction: column; z-index: 7;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.61,.36,1);
  box-shadow: -24px 0 60px rgba(0,0,0,.6);
}
.hv-drawer.on { transform: none; }
.hv-dhead { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hv-line); }
.hv-dhead h3 { flex: 1; margin: 0; font-size: 15px; font-weight: 700; }
.hv-seasons { display: flex; gap: 7px; padding: 12px 16px; overflow-x: auto; border-bottom: 1px solid var(--hv-line); }
.hv-seasons::-webkit-scrollbar { display: none; }
.hv-chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.08); border: 1px solid transparent; transition: .15s ease; white-space: nowrap;
}
.hv-chip:hover { background: var(--hv-hover); }
.hv-chip.on { background: var(--hv-accent); color: #fff; }
.hv-eplist { flex: 1; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.hv-epitem {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px;
  border-radius: 11px; text-align: right; transition: background .15s ease; min-height: 56px;
}
.hv-epitem:hover { background: var(--hv-hover); }
.hv-epitem.on { background: rgba(225,29,72,.16); }
.hv-epnum {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hv-epitem.on .hv-epnum { background: var(--hv-accent); color: #fff; }
.hv-epmeta { flex: 1; min-width: 0; }
.hv-epmeta b { display: block; font-size: 13.5px; font-weight: 700; }
.hv-epmeta span { display: block; font-size: 11.5px; color: var(--hv-dim); margin-top: 3px; }

/* ---------- وضعیت‌ها ---------- */
.hv-load {
  position: absolute; top:0; right:0; bottom:0; left:0; inset: 0; display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; background: rgba(0,0,0,.55); z-index: 5; direction: rtl;
  text-align: center; padding: 24px;
}
.hv-load.on { display: flex; }
.hv-spin { width: 46px; height: 46px; border: 3px solid rgba(255,255,255,.18);
           border-top-color: var(--hv-accent); border-radius: 50%; animation: hvspin .9s linear infinite; }
@keyframes hvspin { to { transform: rotate(360deg); } }
.hv-load p { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.9; max-width: 380px; }
.hv-load .sub { font-size: 12.5px; color: var(--hv-dim); font-weight: 500; }
.hv-prog { width: 320px; max-width: 70%; width: min(320px, 70vw); height: 5px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.hv-prog i { display: block; height: 100%; background: var(--hv-accent); transition: width .4s ease; }
.hv-cta {
  display: inline-block; background: var(--hv-accent); color: #fff; border-radius: 10px;
  padding: 11px 22px; font-size: 14px; font-weight: 700; text-decoration: none; margin-top: 4px;
}
.hv-cta:hover { filter: brightness(1.12); }

/* ادامه‌ی تماشا */
.hv-resume {
  position: absolute; right: 20px; bottom: calc(var(--hv-bar) + 20px); z-index: 5;
  background: var(--hv-surface); border: 1px solid var(--hv-line); border-radius: 12px;
  padding: 12px 14px; direction: rtl; display: none; align-items: center; gap: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
}
.hv-resume.on { display: flex; }
.hv-resume span { font-size: 13px; font-weight: 600; }
.hv-resume button { background: var(--hv-accent); border-radius: 8px; padding: 7px 14px;
                    font-size: 12.5px; font-weight: 700; color: #fff; }
.hv-resume .x { background: none; color: var(--hv-dim); padding: 7px 4px; }

/* ---------- موبایل ---------- */
@media (max-width: 640px) {
  .hv-root { --hv-bar: 56px; }
  .hv-top { padding: 12px 12px; }
  .hv-t1 { font-size: 14.5px; }
  .hv-t2 { font-size: 11.5px; }
  .hv-center { gap: 20px; }
  .hv-center .hv-btn { width: 48px; height: 48px; }
  .hv-center .hv-big { width: 64px; height: 64px; }
  .hv-bottom { padding: 0 8px 8px; }
  .hv-btn { width: 40px; height: 40px; }
  .hv-btn svg { width: 21px; height: 21px; }
  .hv-time { font-size: 11.5px; padding: 0 6px; }
  .hv-vol-slot { display: none; }
  /* تاگل‌ها روی موبایل می‌مانند — جای «تصویر شناور» را می‌گیرند */
  .hv-pip { display: none; }
  .hv-pill { height: 30px; padding: 0 10px; font-size: 11.5px; gap: 5px; margin: 0 1px; }
  .hv-pill .dot { width: 7px; height: 7px; }
  /* منو روی موبایل: شیت پایین — دسترسی راحت‌تر با انگشت */
  .hv-menu { right: 0; left: 0; bottom: 0; width: auto; max-height: 72vh;
             border-radius: 18px 18px 0 0; transform: translateY(100%); transform-origin: bottom center; }
  .hv-menu.on { transform: none; }
  .hv-menu-scroll { max-height: 72vh; padding-bottom: env(safe-area-inset-bottom, 0); }
  .hv-mrow { min-height: 50px; padding: 13px 16px; }

  /* نوار کنترل روی صفحه‌های باریک می‌شکست و چرخ‌دنده از لبه بیرون می‌زد.
     حالا در صورت کمبود جا اسکرول افقی می‌شود و هیچ دکمه‌ای گم نمی‌شود. */
  .hv-ctrls {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .hv-ctrls::-webkit-scrollbar { display: none; }
  .hv-ctrls > * { flex: 0 0 auto; }
}

/* ---------- بستنِ پلیر: همیشه در دسترس ----------
   روی اندروید وقتی پیام خطا/آماده‌سازی روی تصویر بود، آن لایه جلوی دکمه‌ی
   بستن را می‌گرفت و کاربر نمی‌توانست پخش آنلاین را ببندد. */
.hv-top { z-index: 12; }
.hv-load { z-index: 6; }
.hv-root.idle .hv-top { opacity: 1; transform: none; pointer-events: auto; }
.hv-root.idle .hv-top .hv-titles { opacity: 0; transition: opacity .25s ease; }
.hv-close {
  min-width: 44px; min-height: 44px;      /* اندازه‌ی لمسیِ استاندارد */
  display: inline-flex; align-items: center; justify-content: center;
}

/* پیام‌های روی تصویر روی صفحه‌ی کوچک از کادر بیرون می‌زدند */
.hv-load { padding: 16px; box-sizing: border-box; }
.hv-load p { max-width: 90vw; margin-inline: auto; }
.hv-cta { display: inline-block; margin-top: 12px; }

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

/* ---------- فهرست ساده‌ی قسمت‌ها ---------- */
.hv-dnote {
  margin: 0 18px 10px; font-size: 12.5px; color: #8b97b2;
}
.hv-epgroup {
  position: sticky; top: 0; z-index: 1;
  margin: 14px 0 6px; padding: 7px 18px;
  font-size: 12.5px; font-weight: 700; color: #9fb0d0;
  background: linear-gradient(#151b24, #151b24 70%, rgba(21,27,36,0));
}
.hv-epgroup:first-child { margin-top: 0; }

/* ================= سازگاری با مرورگرِ تلویزیون‌های قدیمی =================
   این مرورگرها متغیر CSS (--x / var()) را نمی‌فهمند و هر خطی که var() دارد را
   کنار می‌گذارند؛ نتیجه‌اش پنل‌های بی‌رنگ و نامرئی بود. این بلوک عمداً *پیش از*
   بقیه در ترتیب آبشار نیست، بلکه مقادیر ثابت را می‌گذارد و مرورگر مدرن با
   ویژگیِ بالاتر (کلاس روت) همان var را برنده می‌کند. */
.hv-root .hv-menu, .hv-root .hv-drawer, .hv-root .hv-mhead, .hv-root .hv-resume {
  background-color: rgba(14, 14, 20, .96);
}
.hv-root .hv-play-fill, .hv-root .hv-thumb, .hv-root .hv-cta,
.hv-root .hv-chip.on, .hv-root .hv-resume button { background-color: #e11d48; }
.hv-root .hv-resume .x { background-color: transparent; }
.hv-root .hv-spin { border-top-color: #e11d48; }
.hv-root .hv-time, .hv-root .hv-t2, .hv-root .hv-mnote, .hv-root .hv-load .sub { color: #a1a7b5; }
.hv-root { color: #f8fafc; }
/* جایگزینِ calc(var(--hv-bar) + …) — همان اعداد، ولی بدون متغیر */
.hv-root .hv-menu { bottom: 78px; }
.hv-root .hv-resume { bottom: 84px; }
.hv-root .hv-tapzone { bottom: 64px; }
@media (max-width: 640px) {
  .hv-root .hv-menu { bottom: 0; }        /* روی موبایل، منو شیتِ پایین است */
  .hv-root .hv-resume { bottom: 76px; }
  .hv-root .hv-tapzone { bottom: 56px; }
}

/* ---------- پیام کوتاه گوشه‌ی تصویر ---------- */
.hv-toast {
  position: absolute; bottom: 92px; right: 20px; z-index: 8; direction: rtl;
  max-width: 78%; padding: 10px 14px; border-radius: 10px;
  background: rgba(0, 0, 0, .88); color: #fff;
  font-size: 12.5px; font-weight: 600; line-height: 1.8;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.hv-toast.on { opacity: 1; transform: none; }

/* ---------- حرکت با ریموتِ تلویزیون ----------
   کنترل‌ها فقط `:focus-visible` داشتند، آن هم با var() — مرورگر تلویزیون‌های
   قدیمی هیچ‌کدام را نمی‌فهمند و کاربر با دکمه‌های جهت‌دار حرکت می‌کرد بدون
   اینکه ببیند روی کدام دکمه است. `:focus` ساده با رنگ ثابت، همه‌جا کار می‌کند. */
.hv-root .hv-btn:focus,
.hv-root .hv-pill:focus,
.hv-root .hv-mrow:focus,
.hv-root .hv-epitem:focus,
.hv-root .hv-chip:focus,
.hv-root .hv-scrub:focus,
.hv-root .hv-resume button:focus {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  background-color: rgba(225, 29, 72, .30);
}

/* ---------- حرکت با ریموتِ تلویزیون ----------
   کنترل‌ها فقط `:focus-visible` داشتند، آن هم با var() — مرورگر تلویزیون‌های
   قدیمی هیچ‌کدام را نمی‌فهمند و کاربر با دکمه‌های جهت‌دار حرکت می‌کرد بدون
   اینکه ببیند روی کدام دکمه است. `:focus` ساده با رنگ ثابت، همه‌جا کار می‌کند. */
.hv-root .hv-btn:focus,
.hv-root .hv-pill:focus,
.hv-root .hv-mrow:focus,
.hv-root .hv-epitem:focus,
.hv-root .hv-chip:focus,
.hv-root .hv-scrub:focus,
.hv-root .hv-resume button:focus {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  background-color: rgba(225, 29, 72, .30);
}

/* ================= دکمهٔ «پخش آنلاین» داخل مودالِ خودِ قالب =================
   کلاس‌های خودِ قالب را به ارث می‌برد تا هم‌شکل «پخش با vlc» و «پخش با مرورگر»
   باشد؛ این قاعده‌ها فقط رنگ تأکیدی می‌دهند تا از بقیه جدا دیده شود. */
.chosePlayModal a.hlsvod-online {
  background: #1f6feb !important;
  background: linear-gradient(135deg, #2b7cf6, #1554b8) !important;
  color: #fff !important;
  border-color: #1f6feb !important;
  font-weight: 700;
}
.chosePlayModal a.hlsvod-online:hover { filter: brightness(1.1); }
.chosePlayModal a.hlsvod-online:focus { outline: 3px solid #fff; outline-offset: 2px; }

/* ================= دعوت به اشتراک — داخل خودِ مودال =================
   مودالِ این قالب یک نوارِ افقیِ کوتاه است (flex، پس‌زمینه‌ی تیره، بدون
   padding). پس این هم یک نوار است که *جای همان دکمه‌ها* را می‌گیرد و کلِ
   عرض مودال را پر می‌کند — نه یک کادرِ شناور که مثل پاپ‌آپِ دوم دیده شود. */
.chosePlayModal.hlsvod-locked a.direct,
.chosePlayModal.hlsvod-locked a.vlc,
.chosePlayModal.hlsvod-locked a[href^="vlc://"],
.chosePlayModal.hlsvod-locked a[href^="VLC://"],
.chosePlayModal.hlsvod-locked .btns,
.chosePlayModal.hlsvod-locked > p { display: none !important; }

.chosePlayModal .hlsvod-lock {
  flex: 1 1 100%;                 /* داخل نوارِ flex، کلِ عرض را بگیر */
  box-sizing: border-box; width: 100%;
  display: flex; align-items: center; flex-wrap: wrap;
  margin: 0; padding: 13px 16px;
  border: 0; border-radius: inherit;
  direction: rtl; text-align: right; color: #fff;
  background: #241338;
  background: linear-gradient(100deg, #3d1c56 0%, #211339 55%, #160e29 100%);
  font-family: Vazirmatn, Tahoma, system-ui, sans-serif;
}

/* نشانِ ویژه */
.chosePlayModal .hlsvod-lock .hlsvod-lock-ico {
  flex: 0 0 auto;
  width: 44px; height: 44px; margin: 0 0 0 13px;
  border-radius: 50%; line-height: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f5a524;
  background: linear-gradient(145deg, #ffd873, #f0a020);
  box-shadow: 0 6px 18px rgba(240, 160, 32, .40), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.chosePlayModal .hlsvod-lock .hlsvod-lock-ico svg { width: 23px; height: 23px; fill: #241338; }

.chosePlayModal .hlsvod-lock .hlsvod-lock-txt { flex: 1 1 190px; min-width: 0; }
.chosePlayModal .hlsvod-lock b {
  display: block; margin: 0; font-size: 14.5px; font-weight: 800; line-height: 1.6; color: #fff;
}
.chosePlayModal .hlsvod-lock i {
  display: block; margin: 3px 0 0; font-style: normal;
  font-size: 11.5px; line-height: 1.75; color: #c0b6dc;
}

/* دکمه‌ها */
.chosePlayModal .hlsvod-lock .hlsvod-lock-btns {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; margin: 0;
}
.chosePlayModal .hlsvod-lock a.hlsvod-lock-cta {
  display: inline-block; margin: 0 0 0 8px; padding: 10px 22px;
  border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 800; line-height: 1.4;
  text-decoration: none !important; white-space: nowrap;
  background: #e11d48;
  background: linear-gradient(135deg, #ff4d6d, #d81a45);
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(216, 26, 69, .42);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.chosePlayModal .hlsvod-lock a.hlsvod-lock-cta:last-child { margin-left: 0; }
.chosePlayModal .hlsvod-lock a.hlsvod-lock-cta:hover {
  transform: translateY(-2px); box-shadow: 0 11px 24px rgba(216, 26, 69, .55);
}
.chosePlayModal .hlsvod-lock a.hlsvod-lock-cta:active { transform: translateY(0); }
.chosePlayModal .hlsvod-lock a.hlsvod-lock-cta:focus { outline: 3px solid #fff; outline-offset: 2px; }
/* ثبت‌نام کم‌رنگ‌تر تا «ورود» کارِ اصلی بماند */
.chosePlayModal .hlsvod-lock a.hlsvod-lock-cta.alt {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: none; font-weight: 700;
}
.chosePlayModal .hlsvod-lock a.hlsvod-lock-cta.alt:hover {
  background: rgba(255, 255, 255, .19); box-shadow: none;
}

/* ---- ریسپانسیو: روی صفحه‌ی باریک، ستونی و وسط‌چین ---- */
@media (max-width: 640px) {
  .chosePlayModal .hlsvod-lock {
    flex-direction: column; text-align: center; padding: 16px 14px;
  }
  .chosePlayModal .hlsvod-lock .hlsvod-lock-ico { margin: 0 0 10px; }
  .chosePlayModal .hlsvod-lock .hlsvod-lock-txt { flex: 0 0 auto; }
  .chosePlayModal .hlsvod-lock .hlsvod-lock-btns { margin-top: 12px; justify-content: center; }
  .chosePlayModal .hlsvod-lock a.hlsvod-lock-cta { margin: 0 4px; }
}
@media (max-width: 380px) {
  .chosePlayModal .hlsvod-lock .hlsvod-lock-btns { flex-direction: column; width: 100%; }
  .chosePlayModal .hlsvod-lock a.hlsvod-lock-cta { margin: 0 0 8px; text-align: center; }
  .chosePlayModal .hlsvod-lock a.hlsvod-lock-cta:last-child { margin-bottom: 0; }
}
