.watch-page { position: relative; padding-bottom: 40px; }
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.player [hidden] { display: none !important; }

.player-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 12px 12px 0;
}
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--color-foreground);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  pointer-events: none;
}
.ph {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}
.ph-lg { width: 34px; height: 34px; }
.ph-spin { animation: player-spin 0.75s linear infinite; }
@keyframes player-spin { to { transform: rotate(360deg); } }

.player-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.86));
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms var(--ease);
}
.player.is-active .player-shade { opacity: 1; }

.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  z-index: 5;
}
.player-loading .ph { color: var(--color-accent); }

.big-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: rgba(233, 30, 99, 0.94);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.4);
  z-index: 3;
  cursor: pointer;
}
.player.is-playing .big-play,
.player.is-loading .big-play { display: none; }

.skip-flash {
  position: absolute;
  top: 50%;
  left: 8%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 14px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  z-index: 4;
}
.skip-flash.is-fwd {
  left: auto;
  right: 8%;
}

.player-bar {
  position: absolute;
  inset: auto 0 0;
  padding: 0 12px 10px;
  z-index: 6;
  direction: ltr;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  pointer-events: none;
}
.player.is-active .player-bar {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.seek {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.seek-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}
.seek.is-scrubbing .seek-track { height: 6px; }
.seek-buffer,
.seek-played {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
}
.seek-buffer { background: rgba(255, 255, 255, 0.4); }
.seek-played { background: var(--color-accent); }
.seek-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: none;
  border: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.player.is-active .seek-thumb { transform: translate(-50%, -50%); }
.seek.is-scrubbing .seek-thumb {
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
}

.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 44px;
}
.bar-left,
.bar-right {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.ctrl {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: inherit;
  touch-action: manipulation;
}
.ctrl:hover { background: rgba(255, 255, 255, 0.1); }
.ctrl:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.ctrl.is-on { color: var(--color-accent); }
.ctrl.is-disabled,
.ctrl:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
#playBtn .i-pause { display: none !important; }
.player.is-playing #playBtn .i-play { display: none !important; }
.player.is-playing #playBtn .i-pause { display: block !important; }

.vol-wrap .i-vol-low,
.vol-wrap .i-vol-mute { display: none !important; }
.vol-wrap[data-vol="low"] .i-vol-high,
.vol-wrap[data-vol="mute"] .i-vol-high { display: none !important; }
.vol-wrap[data-vol="low"] .i-vol-low { display: block !important; }
.vol-wrap[data-vol="mute"] .i-vol-mute { display: block !important; }

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
}
.vol {
  --vol: 100%;
  width: 84px;
  height: 24px;
  margin: 0 4px 0 0;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.vol:focus { outline: none; }
.vol::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--color-accent) var(--vol),
    rgba(255, 255, 255, 0.28) var(--vol)
  );
}
.vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.vol::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}
.vol::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--color-accent);
}
.vol::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.time {
  margin-inline-start: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #e4e4e7;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ctrl-menu { position: relative; }
.menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 132px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(18, 18, 26, 0.96);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  z-index: 8;
}
.menu button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: start;
  padding: 0 10px;
}
.menu button:hover,
.menu button.is-on { background: rgba(233, 30, 99, 0.18); color: white; }

.paywall {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(8, 8, 12, 0.72), rgba(8, 8, 12, 0.86)),
    center / cover no-repeat;
}
.paywall-card {
  width: min(460px, calc(100% - 32px));
  background: rgba(18, 18, 26, 0.92);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  font-family: inherit;
}
.player-error {
  position: absolute;
  inset-inline: 12px;
  bottom: 88px;
  background: rgba(0, 0, 0, 0.78);
  color: #fda4af;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 7;
  font-size: 13px;
  font-weight: 500;
}
.watch-meta { margin-top: 18px; }
.watch-meta h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
}

.player:fullscreen,
.player:-webkit-full-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}
.player:fullscreen .player-bar,
.player:-webkit-full-screen .player-bar {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

@media (hover: hover) and (pointer: fine) {
  .player:hover .player-shade,
  .player:hover .player-bar {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .player:hover .seek-thumb {
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 768px) {
  .player-shell {
    width: 100%;
    padding: 0;
  }
  .player {
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .player-bar {
    padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .seek { height: 28px; }
  .seek-track { height: 3px; }
  .seek.is-scrubbing .seek-track { height: 5px; }
  .seek-thumb {
    width: 9px;
    height: 9px;
    transform: translate(-50%, -50%);
  }
  .ctrl { width: 44px; height: 44px; }
  .ctrl-skip { display: none; }
  .vol-wrap {
    gap: 4px;
  }
  .vol {
    display: block;
    width: 72px;
    min-width: 72px;
  }
  .vol-wrap.is-open .vol,
  .player.is-active .vol {
    display: block;
  }
  .time { font-size: 12px; margin-inline-start: 2px; }
  .big-play { width: 56px; height: 56px; }
  .watch-page { padding-bottom: 24px; }
  .paywall {
    position: absolute;
    inset: 0;
    z-index: 20;
    place-items: start center;
    padding-top: 48px;
  }
  .watch-meta {
    margin-top: 14px;
    padding-inline: 16px;
  }
  .watch-meta h1 { font-size: 20px; }
}

@media (max-width: 420px) {
  .bar-right .ctrl:not(#fsBtn):not(#qualityBtn) { width: 40px; }
  .time-sep { display: none; }
  #timeDur { display: none; }
}
