/* ============================================================
   Reproductor — apariencia tipo YouTube
   ============================================================ */
.vp, .vp * { box-sizing: border-box; }

.vp {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: normal;
}
.vp:not(.vp-fill) { aspect-ratio: 16 / 9; }
.vp.vp-fill { width: 100%; height: 100%; }

.vp-screen { position: absolute; inset: 0; }
.vp-video, .vp-adv {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: #000; object-fit: contain;
}
.vp-adv { display: none; z-index: 6; }
.vp.vp-ad .vp-adv { display: block; }

/* YouTube embebido: tapamos por completo su interfaz nativa */
.vp-yt { position: absolute; inset: 0; overflow: hidden; }
.vp-yt iframe { position: absolute; top: -60px; left: 0; width: 100%; height: calc(100% + 120px); border: 0; pointer-events: none; }
.vp-shield { position: absolute; inset: 0; z-index: 3; background: transparent; }

.vp-poster {
  position: absolute; inset: 0; z-index: 4;
  width: 100%; height: 100%;
  object-fit: cover; background: #000;
  transition: opacity .25s;
}
.vp.vp-started .vp-poster { opacity: 0; pointer-events: none; }
.vp.vp-ended   .vp-poster { opacity: .55; pointer-events: none; }

/* ---------- botón grande de play / replay ---------- */
.vp-big {
  position: absolute; z-index: 5;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 78px; height: 78px; padding: 0; border: 0; cursor: pointer;
  background: transparent;
}
.vp-big svg {
  width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.6));
  transition: transform .15s;
}
.vp:hover .vp-big svg, .vp-big:focus-visible svg { transform: scale(1.1); }
.vp-big[hidden] { display: none; }

.vp-replay {
  position: absolute; z-index: 5;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center;
}
.vp.vp-ended:not(.vp-ad) .vp-replay { display: flex; }
.vp-replay:hover { background: rgba(0,0,0,.8); }
.vp-replay svg { width: 44px; height: 44px; fill: #fff; }

/* ---------- cargando ---------- */
.vp-spinner {
  position: absolute; z-index: 5; left: 50%; top: 50%;
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border: 4px solid rgba(255,255,255,.25); border-top-color: #fff;
  border-radius: 50%; animation: vp-spin .9s linear infinite; display: none;
}
.vp.vp-loading .vp-spinner { display: block; }
@keyframes vp-spin { to { transform: rotate(360deg); } }

/* ---------- degradado y barra inferior ---------- */
.vp-gradient {
  position: absolute; left: 0; right: 0; bottom: 0; height: 148px; z-index: 8;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='148'%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23000' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23000' stop-opacity='.72'/%3E%3C/linearGradient%3E%3Crect width='1' height='148' fill='url(%23g)'/%3E%3C/svg%3E") repeat-x bottom;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.vp-chrome {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 9;
  padding: 0 12px 0; opacity: 0; transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}
.vp.vp-show .vp-chrome, .vp.vp-show .vp-gradient { opacity: 1; transform: none; }
.vp.vp-show { cursor: default; }
.vp.vp-hide { cursor: none; }

/* ---------- barra de progreso ---------- */
.vp-progress { position: relative; height: 5px; margin: 0 0 -1px; cursor: pointer; touch-action: none; }
.vp-progress::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -6px; }
.vp-bars { position: absolute; left: 0; right: 0; top: 2px; height: 3px; transition: transform .1s, top .1s; transform-origin: bottom; }
.vp-progress:hover .vp-bars, .vp.vp-scrubbing .vp-bars { top: 0; height: 5px; }
.vp-bars > div { position: absolute; left: 0; top: 0; height: 100%; transform-origin: 0 0; }
.vp-bg   { width: 100%; background: rgba(255,255,255,.2); }
.vp-load { width: 100%; background: rgba(255,255,255,.4); transform: scaleX(0); }
.vp-hoverbar { width: 100%; background: rgba(255,255,255,.5); transform: scaleX(0); }
.vp-play { width: 100%; background: #f00; transform: scaleX(0); }
.vp.vp-ad .vp-play { background: #fc0; }

.vp-scrub {
  position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  border-radius: 50%; background: #f00; transform: scale(0); transition: transform .1s;
}
.vp-progress:hover .vp-scrub, .vp.vp-scrubbing .vp-scrub { transform: scale(1); }

.vp-marker {
  position: absolute; top: 0; height: 100%; width: 4px; margin-left: -2px;
  background: #fc0; border-radius: 1px; z-index: 2;
}

/* ---------- miniatura sobre la línea de tiempo ---------- */
.vp-tip {
  position: absolute; bottom: 54px; left: 0; z-index: 10;
  transform: translateX(-50%); display: none; pointer-events: none; text-align: center;
}
.vp.vp-tip-on .vp-tip { display: block; }
.vp-tip-frame {
  width: 160px; height: 90px; background: #000 center/cover no-repeat;
  border: 2px solid #fff; border-radius: 2px; overflow: hidden;
  box-shadow: 0 0 8px rgba(0,0,0,.5);
}
.vp-tip-frame canvas, .vp-tip-frame .vp-tip-img { width: 100%; height: 100%; display: block; object-fit: cover; }
.vp-tip-time { margin-top: 4px; font-size: 13px; font-weight: 500; text-shadow: 0 0 3px rgba(0,0,0,.9); }
.vp-tip.vp-tip-plain .vp-tip-frame { display: none; }
.vp-tip.vp-tip-plain .vp-tip-time { background: rgba(28,28,28,.9); padding: 3px 6px; border-radius: 3px; }

/* ---------- controles ---------- */
.vp-controls { display: flex; align-items: center; height: 48px; }
.vp-left, .vp-right { display: flex; align-items: center; }
.vp-right { margin-left: auto; }

.vp-btn {
  width: 46px; height: 48px; padding: 0; border: 0; background: transparent;
  cursor: pointer; opacity: .92; outline: none;
}
.vp-btn:hover { opacity: 1; }
.vp-btn:focus-visible { box-shadow: inset 0 0 0 2px #3ea6ff; border-radius: 4px; }
.vp-btn svg { width: 100%; height: 100%; fill: #fff; display: block; }

.vp-time { font-size: 13px; padding: 0 10px 0 6px; letter-spacing: .3px; white-space: nowrap; }
.vp-time .sep { opacity: .8; margin: 0 2px; }

/* volumen */
.vp-vol { display: flex; align-items: center; }
.vp-vol-slider { width: 0; overflow: hidden; transition: width .2s, margin .2s; height: 48px; display: flex; align-items: center; }
.vp-vol:hover .vp-vol-slider, .vp-vol.vp-open .vp-vol-slider { width: 62px; margin-right: 6px; }
.vp-vol-track { position: relative; width: 52px; height: 3px; background: rgba(255,255,255,.3); cursor: pointer; }
.vp-vol-fill { position: absolute; inset: 0; width: 100%; background: #fff; transform-origin: 0 0; }
.vp-vol-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #fff; border-radius: 50%; }

/* menú de ajustes */
.vp-menu {
  position: absolute; right: 12px; bottom: 56px; z-index: 11;
  min-width: 190px; background: rgba(28,28,28,.92); border-radius: 12px;
  padding: 8px 0; font-size: 13px; display: none; overflow: hidden;
}
.vp.vp-menu-on .vp-menu { display: block; }
.vp-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer; white-space: nowrap;
}
.vp-menu-item:hover { background: rgba(255,255,255,.12); }
.vp-menu-item .val { margin-left: auto; opacity: .8; }
.vp-menu-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,.2); cursor: pointer; margin-bottom: 6px; }
.vp-menu-item.on { background: rgba(255,255,255,.08); }
.vp-menu-item .chk { width: 14px; opacity: 0; }
.vp-menu-item.on .chk { opacity: 1; }

/* ---------- interfaz de anuncio ---------- */
.vp-adui { position: absolute; inset: 0; z-index: 7; display: none; pointer-events: none; }
.vp.vp-ad .vp-adui { display: block; }

.vp-adbadge {
  position: absolute; left: 12px; bottom: 58px;
  background: #ffcc00; color: #111; font-size: 12px; font-weight: 700;
  padding: 3px 6px; border-radius: 2px; letter-spacing: .2px;
}
.vp-advisit {
  position: absolute; left: 12px; bottom: 88px; pointer-events: auto;
  background: rgba(0,0,0,.65); color: #fff; text-decoration: none;
  font-size: 13px; padding: 8px 12px; border-radius: 2px; display: none;
  border-left: 3px solid #ffcc00;
}
.vp.vp-ad .vp-advisit.on { display: inline-block; }
.vp-advisit:hover { background: rgba(0,0,0,.85); }

.vp-adskip {
  position: absolute; right: 12px; bottom: 62px; pointer-events: auto;
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.65);
  font-size: 14px; padding: 10px 14px; cursor: default; display: flex; align-items: center; gap: 8px;
  font-family: inherit; border-radius: 2px;
}
.vp-adskip.ready { cursor: pointer; background: rgba(0,0,0,.75); }
.vp-adskip.ready:hover { background: #fff; color: #111; }
.vp-adskip svg { width: 20px; height: 20px; fill: currentColor; display: none; }
.vp-adskip.ready svg { display: block; }

.vp.vp-ad .vp-big, .vp.vp-ad .vp-replay, .vp.vp-ad .vp-tip { display: none !important; }
.vp.vp-ad .vp-progress { pointer-events: none; }

/* ---------- título superior (solo embed) ---------- */
.vp-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 9; padding: 14px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.7), rgba(0,0,0,0));
  font-size: 15px; font-weight: 500; opacity: 0; transition: opacity .2s;
  pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.vp.vp-show .vp-top { opacity: 1; }
.vp.vp-started.vp-playing:not(.vp-show) .vp-top { opacity: 0; }

@media (max-width: 520px) {
  .vp-btn { width: 40px; }
  .vp-time { font-size: 12px; padding: 0 6px; }
  .vp-tip-frame { width: 120px; height: 68px; }
  .vp-adskip { font-size: 12px; padding: 8px 10px; bottom: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .vp *, .vp *::before { transition: none !important; animation-duration: .01ms !important; }
}

/* el botón grande solo antes de empezar */
.vp.vp-started .vp-big { display: none; }

/* ---------- subtítulos ---------- */
.vp-cc {
  position: absolute; left: 0; right: 0; bottom: 62px; z-index: 6;
  text-align: center; pointer-events: none; padding: 0 8%;
  transition: bottom .2s;
}
.vp:not(.vp-show) .vp-cc { bottom: 24px; }
.vp.vp-ad .vp-cc { display: none; }
.vp-cc span {
  display: inline-block; background: rgba(8,8,8,.75); color: #fff;
  padding: 2px 9px; border-radius: 2px; line-height: 1.4;
  font-size: clamp(14px, 2.7vw, 24px);
}
.vp-btn-cc { position: relative; }
.vp-btn-cc.on::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 11px;
  height: 2px; background: #fff; border-radius: 1px;
}

/* ---------- menú del clic derecho ---------- */
.vp-ctx {
  position: absolute; z-index: 20; min-width: 236px; display: none;
  background: rgba(28,28,28,.95); border-radius: 12px; padding: 7px 0;
  font-size: 13px; box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.vp.vp-ctx-on .vp-ctx { display: block; }
.vp-ctx-item { padding: 9px 16px; cursor: pointer; white-space: nowrap; }
.vp-ctx-item:hover { background: rgba(255,255,255,.12); }
