/* ════════════════════════════════════════════════════════════════════════════
   CUSTOM VIDEO CONTROLS  —  YouTube-style
   সব ভেরিয়েবল main.css এর :root থেকে নেওয়া
   ════════════════════════════════════════════════════════════════════════════ */

/* ── player-wrap পরিবর্তন ── */
.player-wrap {
    user-select: none;
}
.player-wrap.vc-paused { cursor: default; }

/* ── Control bar wrapper ── */
.vc-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0 0 2px;
  background: linear-gradient(transparent, rgba(0,0,0,.85) 60%);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 20;
  pointer-events: none;
}

.vc-bar.vc-visible {
  opacity: 1;
  pointer-events: all;
}

/* fullscreen এ bar সবসময় দেখাবে যতক্ষণ mouse move হয় */
:fullscreen .vc-bar.vc-visible,
:-webkit-full-screen .vc-bar.vc-visible {
  opacity: 1;
}

/* ── Progress row ── */
.vc-progress-row {
  position: relative;   /* hover thumbnail positioned relative to this */
  padding: 0 12px;
}

.vc-progress {
  position: relative;
  height: 18px;          /* বড় hit area */
  display: flex;
  align-items: center;
  cursor: pointer;
  outline: none;
}

/* Track */
.vc-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,.25);
  border-radius: 3px;
  overflow: hidden;
  transition: height .15s ease;
}

.vc-progress:hover .vc-track,
.vc-progress:focus-visible .vc-track {
  height: 5px;
}

/* Buffered */
.vc-buffered {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: rgba(255,255,255,.35);
  border-radius: 3px;
  transition: width .3s ease;
}

/* Filled / played */
.vc-filled {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent, #ff0000);
  border-radius: 3px;
  transition: width .1s linear;
}

/* Thumb (circle handle) */
.vc-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 13px; height: 13px;
  transform: translate(-50%, -50%) scale(0);
  background: #fff;
  border-radius: 50%;
  transition: transform .15s ease;
  pointer-events: none;
  box-shadow: 0 0 4px rgba(0,0,0,.5);
  z-index: 2;
}

.vc-progress:hover .vc-thumb,
.vc-progress:focus-visible .vc-thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* ── Chapter markers — thin white ticks on the track ── */
/*
  Each marker is a 2px wide white tick that sits inside .vc-track.
  overflow:hidden on .vc-track clips anything outside it, so the
  ticks never bleed outside the bar.  On hover the track grows from
  3px → 5px, so the ticks grow with it automatically.

  A small gap (1px transparent on each side) separates adjacent
  chapter segments — same trick YouTube uses so chapters look like
  distinct blocks rather than a single continuous bar.
*/
.vc-chapter-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg, #0f0f0f);   /* matches player background = gap colour */
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  border-radius: 0;
}

/* ── Hover thumbnail tooltip — YouTube-style ── */
/*
  YouTube behaviour:
  - Thumbnail floats above the scrubber, centered on cursor
  - Clamped so it never exits the player edges
  - Time label centered below the image, white on dark pill
  - Appears instantly on hover, fades out on leave
  - No border-radius on image corners (YouTube uses none)
  - Shadow underneath the card
*/
.vc-hover-thumb {
  position: absolute;
  /* sits just above the progress row (18px) + a small gap */
  bottom: calc(100% + 8px);  /* relative to .vc-progress-row */
  left: 0;                   /* JS overrides via transform: translateX() */
  width: 160px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .1s ease, visibility .1s ease;
  text-align: center;
  z-index: 40;
  /* drop shadow like YouTube */
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}


.vc-hover-img-wrap {
  width: 160px;
  height: 90px;         /* 16:9 */
  overflow: hidden;
  border-radius: 2px;
  background: #0a0a0a;
}

.vc-hover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.vc-hover-time {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
  font-family: var(--mono, 'Roboto Mono', monospace);
  background: rgba(0,0,0,.75);
  border-radius: 3px;
  padding: 2px 8px;
  line-height: 1.6;
}

/* Chapter name — sits between thumbnail and timestamp */
.vc-hover-chapter {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  font-family: var(--font, 'Roboto', sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

/* ── Buttons row ── */
.vc-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 8px;
  gap: 4px;
}

.vc-left,
.vc-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── Generic icon button ── */
.vc-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  opacity: .9;
  transition: opacity .15s, background .15s;
  flex-shrink: 0;
}

.vc-btn:hover  { opacity: 1; background: rgba(255,255,255,.12); }
.vc-btn:active { background: rgba(255,255,255,.2); }
.vc-btn:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 1px; }

.vc-btn svg {
  width: 20px; height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Play button — slightly bigger */
.vc-play svg { width: 22px; height: 22px; }
.vc-play .vc-play-icon  { fill: #fff; stroke: none; }
.vc-play .vc-pause-icon rect { fill: #fff; stroke: none; }

/* Muted state */
.vc-mute.vc-muted svg { color: var(--text2, #aaa); }

/* ── Volume wrap + tooltip ── */
.vc-vol-wrap {
  position: relative;
  display: flex;
  align-items: center;
  --thumb-pct: 100%;  /* JS keeps this in sync */
}

/* Tooltip above the thumb */
.vc-vol-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  /* center over thumb: thumb travels from ~6px to (width-6px) */
  left: calc(var(--thumb-pct) * (72px - 13px) / 100 + 6px - 50%);
  /* fallback for moz where thumb-pct math differs slightly */
  transform: translateX(-50%);
  background: rgba(28,28,28,.92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono, monospace);
  letter-spacing: .3px;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
  z-index: 50;
}

/* arrow under tooltip */
.vc-vol-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(28,28,28,.92);
}

/* show tooltip on wrap hover */
.vc-vol-wrap:hover .vc-vol-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Volume slider ── */
.vc-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 3px;
  border-radius: 3px;
  /* filled track via gradient using --thumb-pct */
  background: linear-gradient(
    to right,
    #fff var(--thumb-pct),
    rgba(255,255,255,.3) var(--thumb-pct)
  );
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: width .15s ease, height .15s ease;
}

/* expand on hover — YouTube style */
.vc-vol-wrap:hover .vc-vol {
  width: 88px;
  height: 4px;
}

.vc-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 3px rgba(0,0,0,.4);
  transition: transform .12s ease;
}

.vc-vol-wrap:hover .vc-vol::-webkit-slider-thumb {
  transform: scale(1.15);
}

.vc-vol::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

.vc-vol::-moz-range-progress {
  background: #fff;
  border-radius: 3px;
}

/* ── Time display ── */
.vc-time {
  font-size: 12px;
  color: #fff;
  font-family: var(--mono, monospace);
  white-space: nowrap;
  margin-left: 4px;
  opacity: .9;
}

.vc-sep { margin: 0 2px; opacity: .5; }
.vc-dur { opacity: .65; }

/* ── Speed selector ── */
.vc-speed-wrap {
  position: relative;
}

.vc-speed .vc-speed-label {
  font-size: 12px;
  font-family: var(--mono, monospace);
  font-weight: 500;
  padding: 0 2px;
}

.vc-speed-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(28,28,28,.97);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 120px;
  display: none;
  flex-direction: column;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

.vc-speed-menu.open {
  display: flex;
}

.vc-speed-item {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s, color .12s;
  font-family: var(--mono, monospace);
  border-radius: 4px;
  margin: 0 4px;
}

.vc-speed-item:hover  { background: rgba(255,255,255,.1); color: #fff; }
.vc-speed-item.active { color: var(--accent, #ff0000); font-weight: 600; }

/* ── Theater button ── */
.vc-theater svg { width: 20px; height: 20px; }

/* ── Loop button ─────────────────────────────────────────────────────────── */
.vc-loop svg { width: 18px; height: 18px; }

.vc-loop-active {
  color: var(--accent, #ff0000);
}

.vc-loop-active svg {
  filter: drop-shadow(0 0 4px var(--accent, #ff0000));
}
/* ── Ambient mode button ─────────────────────────────────────────────────── */
.vc-ambient svg { width: 18px; height: 18px; }

.vc-ambient-active {
  color: var(--accent, #ff0000);
}

.vc-ambient-active svg {
  filter: drop-shadow(0 0 5px var(--accent, #ff0000));
}





.vc-theater-active {
  color: var(--accent, #ff0000);
}

/* ── PiP button ── */
.vc-pip svg { width: 18px; height: 18px; }

.vc-pip-active {
  color: var(--accent, #ff0000);
}

/* ── Fullscreen button ── */
.vc-fs svg { width: 18px; height: 18px; }

/* ── Double-tap seek ripple ── */
.vc-seek-ripple {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  z-index: 30;
  color: #fff;
}

.vc-seek-ripple.show { opacity: 1; }
.vc-seek-left  { left: 12%; }
.vc-seek-right { right: 12%; }

.vc-seek-ripple svg {
  width: 36px; height: 36px;
  fill: rgba(255,255,255,.8);
}

.vc-seek-ripple span {
  font-size: 12px;
  font-family: var(--mono, monospace);
  background: rgba(0,0,0,.5);
  border-radius: 20px;
  padding: 2px 8px;
}

/* ── PiP button — এখন বারের সাথে মিলিয়ে adjust ── */
.pip-btn {
  bottom: 52px;   /* control bar এর উপরে */
}

/* ── Fullscreen overrides ── */
:fullscreen .player-wrap,
:-webkit-full-screen .player-wrap {
  border-radius: 0;
}

:fullscreen #mainPlayer,
:-webkit-full-screen #mainPlayer {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── On-screen display (OSD) — YouTube-style center feedback ── */
/*
  YouTube shows a brief centered indicator when you press:
  Space/K  → play/pause icon
  ↑↓       → volume bar
  ←/→ J/L  → seek arrows + seconds
*/
.vc-osd {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.85);
  background: rgba(0,0,0,.65);
  border-radius: 50%;
  width: 68px;
  height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
  z-index: 35;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
}

.vc-osd svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.vc-osd-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.vc-osd-hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.85);
}

/* volume OSD — wider pill */
.vc-osd-vol-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
}

.vc-osd:has(.vc-osd-vol-wrap) {
  border-radius: 12px;
  width: auto;
  height: auto;
}

.vc-osd-vol-bar {
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,.3);
  border-radius: 4px;
  overflow: hidden;
}

.vc-osd-vol-fill {
  height: 100%;
  background: #fff;
  border-radius: 4px;
  transition: width .1s ease;
}

.vc-osd-vol-pct {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  font-family: var(--mono, monospace);
}

/* seek OSD — label below icon */
.vc-osd-label {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  font-family: var(--mono, monospace);
  line-height: 1;
}

/* ── Video ended screen ── */
.vc-ended {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: rgba(0,0,0,.65);
  z-index: 30;
  opacity: 0;
  transition: opacity .25s ease;
  padding: 24px;
}

.vc-ended-visible { opacity: 1; }

/* Replay button */
.vc-ended-replay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  cursor: pointer;
  transition: background .15s, transform .15s;
  flex-shrink: 0;
  padding: 0;
  justify-content: center;
}

.vc-ended-replay:hover {
  background: rgba(255,255,255,.22);
  transform: scale(1.08);
}

.vc-ended-replay svg {
  width: 32px; height: 32px;
  stroke: #fff;
}

.vc-ended-replay span {
  display: none; /* circle only */
}

/* Next video card */
.vc-ended-next {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 240px;
  cursor: pointer;
}

.vc-ended-next-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.8);
  font-family: var(--mono, monospace);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.vc-ended-countdown {
  color: rgba(255,255,255,.5);
  font-weight: 400;
}

.vc-ended-next-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px;
  transition: background .15s;
}

.vc-ended-next:hover .vc-ended-next-card {
  background: rgba(255,255,255,.18);
}

.vc-ended-thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #111;
}

.vc-ended-thumb-placeholder {
  width: 120px;
  height: 68px;
  border-radius: 4px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}

.vc-ended-next-info {
  flex: 1;
  min-width: 0;
}

.vc-ended-next-title {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: none;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* countdown progress bar */
.vc-ended-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
  overflow: hidden;
}

@keyframes vc-ended-countdown {
  from { width: 100%; }
  to   { width: 0%; }
}

.vc-ended-bar {
  height: 100%;
  background: var(--accent, #ff0000);
  border-radius: 3px;
  animation: vc-ended-countdown linear forwards;
}

/* ── Buffering spinner — YouTube-style ── */
@keyframes vc-spin {
  to { transform: rotate(360deg); }
}

.vc-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 25;
  opacity: 0;
  transition: opacity .2s ease;
}

.vc-spinner-visible {
  opacity: 1;
}

.vc-spinner svg {
  width: 100%;
  height: 100%;
}

.vc-spinner-arc {
  transform-origin: center;
  animation: vc-spin .9s linear infinite;
}

/* ── Mobile responsive ── */
@media (max-width: 600px) {
  .vc-vol     { width: 48px; }
  .vc-vol-wrap:hover .vc-vol { width: 60px; }
  .vc-time    { font-size: 11px; }
  .vc-btn svg { width: 18px; height: 18px; }
}

@media (max-width: 400px) {
  .vc-vol     { display: none; }
  .vc-time    { display: none; }
}
/* ═══════════════════════════════════════════════════════════════
   Thumbnail Picker — Step 2 of the upload modal
   ═══════════════════════════════════════════════════════════════ */

#yt-thumb-picker {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.thumb-picker-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.thumb-picker-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 0 0 12px;
  line-height: 1.4;
}

/* Grid: auto frames + upload card */
.thumb-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

/* ── Base card ── */
.thumb-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.thumb-card:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.3);
}

.thumb-card:focus-visible {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

.thumb-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Selected state ── */
.thumb-card.selected {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
}

/* ── Check mark (shown when selected) ── */
.thumb-card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.thumb-card-check svg {
  width: 11px;
  height: 11px;
  color: #111;
}

.thumb-card.selected .thumb-card-check {
  opacity: 1;
  transform: scale(1);
}

/* ── Frame card ── */
.thumb-card--frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ── Upload card ── */
.thumb-card--upload {
  border-style: dashed;
}

.thumb-card--upload.drag-over {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.08);
}

.thumb-card-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  padding: 8px;
}

.thumb-card-upload-inner svg {
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
}

.thumb-card-upload-inner span {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  text-align: center;
  line-height: 1.2;
  white-space: normal;
}

.thumb-card--upload #yt-thumb-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Done badge on upload card */
.thumb-card--upload.upload-done {
  border-style: solid;
}

/* ── Progress bar ── */
.thumb-picker-progress {
  margin-top: 8px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.thumb-picker-progress-bar {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 2px;
  transition: width 0.2s ease;
}
/* ── Mobile gesture feedback (v3.1) ──────────────────────────────────────────
   swipe volume indicator, long-press speed badge
   ──────────────────────────────────────────────────────────────────────────── */

/* Volume swipe — OSD reuses .vc-osd-vol-wrap, no extra CSS needed */

/* Long-press 2× speed — corner badge */
.vc-speed-badge {
  position:        absolute;
  top:             12px;
  left:            50%;
  transform:       translateX(-50%);
  background:      rgba(0,0,0,.72);
  color:           #fff;
  font-size:       13px;
  font-weight:     700;
  font-family:     var(--mono, monospace);
  padding:         4px 14px;
  border-radius:   20px;
  pointer-events:  none;
  z-index:         40;
  display:         flex;
  align-items:     center;
  gap:             6px;
  animation:       vcFadeIn .15s ease;
}

/* Swipe seek ripple — bigger label on mobile */
@media (max-width: 640px) {
  .vc-seek-ripple span {
    font-size: 14px;
    padding:   3px 12px;
  }
  .vc-seek-ripple svg {
    width:  42px;
    height: 42px;
  }
}

/* Pinch fullscreen hint — brief pulse on _wrap when pinch fires */
.vc-pinch-pulse {
  position:   absolute;
  inset:      0;
  border:     2px solid rgba(255,255,255,.35);
  border-radius: inherit;
  pointer-events: none;
  z-index:    45;
  animation:  vcPinchPulse .4s ease forwards;
}
@keyframes vcPinchPulse {
  from { opacity: 1; transform: scale(1);    }
  to   { opacity: 0; transform: scale(1.04); }
}
/* ── Closed Captions (CC) button + menu ─────────────────────────────────────
   Design mirrors the speed menu for visual consistency.
   ──────────────────────────────────────────────────────────────────────────── */

.vc-cc-wrap {
  position: relative;
}

.vc-cc svg {
  width: 22px;
  height: 22px;
}

/* Glow when CC is active */
.vc-cc.vc-cc-active svg {
  stroke: var(--accent, #ff0000);
  filter: drop-shadow(0 0 3px var(--accent, #ff0000));
}

/* Dropdown menu */
.vc-cc-menu {
  position:    absolute;
  bottom:      calc(100% + 8px);
  right:       0;
  background:  rgba(28,28,28,.97);
  border:      1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding:     4px 0;
  min-width:   150px;
  display:     none;
  flex-direction: column;
  z-index:     50;
  box-shadow:  0 8px 24px rgba(0,0,0,.5);
}

.vc-cc-menu.open { display: flex; }

/* Menu header label */
.vc-cc-menu::before {
  content:     'Subtitles';
  display:     block;
  font-size:   10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color:       rgba(255,255,255,.4);
  padding:     6px 16px 4px;
}

.vc-cc-item {
  background:  none;
  border:      none;
  color:       rgba(255,255,255,.8);
  text-align:  left;
  padding:     8px 16px;
  font-size:   13px;
  cursor:      pointer;
  transition:  background .12s, color .12s;
  border-radius: 4px;
  margin:      0 4px;
  display:     flex;
  align-items: center;
  gap:         8px;
}

.vc-cc-item::before {
  content:     '';
  width:       6px;
  height:      6px;
  border-radius: 50%;
  background:  transparent;
  flex-shrink: 0;
  transition:  background .12s;
}

.vc-cc-item:hover  { background: rgba(255,255,255,.1); color: #fff; }
.vc-cc-item.active { color: var(--accent, #ff0000); font-weight: 600; }
.vc-cc-item.active::before { background: var(--accent, #ff0000); }

/* ── Native <video> caption / subtitle rendering ─────────────────────────────
   ::cue pseudo-element styles the text rendered by the browser's
   built-in VTT renderer.  Works in all modern browsers without JS.
   ──────────────────────────────────────────────────────────────────────────── */

video::cue {
  background-color: rgba(0, 0, 0, 0.75);
  color:            #ffffff;
  font-family:      'Inter', system-ui, sans-serif;
  font-size:        1em;
  font-weight:      400;
  line-height:      1.5;
  text-shadow:      none;
  white-space:      pre-wrap;
}

video::cue(b)  { font-weight: 700; }
video::cue(i)  { font-style:  italic; }
video::cue(u)  { text-decoration: underline; }

/* Slightly larger text in fullscreen */
:fullscreen video::cue,
:-webkit-full-screen video::cue {
  font-size: 1.2em;
}

/* ── Quality selector ────────────────────────────────────────────────────────
   Mirrors speed menu design for visual consistency.
   ──────────────────────────────────────────────────────────────────────────── */

.vc-quality-wrap {
  position: relative;
}

.vc-quality {
  display:     flex;
  align-items: center;
  gap:         2px;
}

.vc-quality-label {
  font-size:   12px;
  font-family: var(--mono, monospace);
  font-weight: 500;
  min-width:   32px;
  text-align:  center;
}

.vc-quality svg {
  opacity:    .6;
  flex-shrink: 0;
  transition: transform .15s;
}

.vc-quality[aria-expanded="true"] svg { transform: rotate(180deg); }

.vc-quality-menu {
  position:    absolute;
  bottom:      calc(100% + 8px);
  right:       0;
  background:  rgba(28,28,28,.97);
  border:      1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding:     4px 0;
  min-width:   110px;
  display:     none;
  flex-direction: column;
  z-index:     50;
  box-shadow:  0 8px 24px rgba(0,0,0,.5);
}

.vc-quality-menu::before {
  content:       'Quality';
  display:       block;
  font-size:     10px;
  font-weight:   600;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:         rgba(255,255,255,.4);
  padding:       6px 16px 4px;
}

.vc-quality-menu.open { display: flex; }

.vc-quality-item {
  background:   none;
  border:       none;
  color:        rgba(255,255,255,.8);
  text-align:   center;
  padding:      8px 16px;
  font-size:    13px;
  font-family:  var(--mono, monospace);
  cursor:       pointer;
  transition:   background .12s, color .12s;
  border-radius:4px;
  margin:       0 4px;
}

.vc-quality-item:hover  { background: rgba(255,255,255,.1); color: #fff; }
.vc-quality-item.active { color: var(--accent, #ff0000); font-weight: 600; }
