:root {
  --vod-brand: #0087BD;
  /* Plyr 控件强调色：进度条 / 大播放钮 / 激活态（原默认 #00b2ff） */
  --plyr-color-main: var(--vod-brand);
  --vod-canvas-bg: #000;
  --vod-download-bar-bg: #111;
  --vod-download-filename: #c2c2c2;
  --vod-download-meta: #757A81;
  --vod-download-action: #A2A7AE;
  --vod-download-action-hover: var(--vod-brand);
  --vod-download-placeholder-filename: #94a3b8;
  --vod-download-placeholder-meta: #555;
  --vod-gate-overlay-bg: #000;
  --vod-gate-cta-login: #d7e3f4;
  --vod-gate-cta-login-hover: var(--vod-brand);
  --vod-gate-vip-icon: #e4c27a;
  --vod-gate-vip-icon-ring: rgba(228, 194, 122, 0.45);
  --vod-gate-vip-main: #e6d7b0;
  --vod-download-btn-fg: #fff;
  --vod-download-btn-bg: rgba(255, 255, 255, 0.08);
  --vod-download-btn-hover-bg: rgba(255, 255, 255, 0.14);
  --vod-download-btn-hover-fg: #fff;
  --vod-editor-badge-bg: #ef4444;
  --vod-editor-badge-fg: #fff;
  --vod-editor-badge-ring: #2a2e30;
}

/* 播放器根节点再写一遍，避免外层样式覆盖 :root */
.vod-player-card .vod-player-wrapper,
.vod-player-card .vod-player-wrapper .plyr {
  --plyr-color-main: var(--vod-brand, #0087BD);
}

/* 底栏控件：桌面端悬停才显示（含暂停时常显的情况）；触摸设备沿用 Plyr 默认 */
@media (hover: hover) and (pointer: fine) {
  .vod-player-card .vod-player-wrapper .plyr--video .plyr__controls {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
    transition: opacity .25s ease, transform .25s ease;
  }
  .vod-player-card .vod-player-wrapper .plyr--video:hover .plyr__controls,
  .vod-player-card .vod-player-wrapper .plyr--video:focus-within .plyr__controls {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.vod-watch-page {
  position: relative;
}

/* 静态环境光：四边按可用距离分别淡出（JS 写入 --vod-amb-*） */
.vod-watch-page .vod-ambient {
  position: absolute;
  top: var(--vod-amb-top, 0px);
  left: var(--vod-amb-left, 0px);
  width: var(--vod-amb-w, 100%);
  height: var(--vod-amb-h, 78%);
  z-index: 0;
  pointer-events: none;
  overflow: visible;
  margin: 0;
  padding: 0;
}
.vod-watch-page .vod-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--vod-ambient-poster);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(64px) saturate(1.25);
  opacity: 0.18;
  transform: scale(1.04);
  border-radius: 0;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 var(--vod-amb-ft, 0px), #000 calc(100% - var(--vod-amb-fb, 8px)), transparent 100%),
    linear-gradient(to right, transparent 0, #000 var(--vod-amb-fl, 0px), #000 calc(100% - var(--vod-amb-fr, 8px)), transparent 100%);
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 var(--vod-amb-ft, 0px), #000 calc(100% - var(--vod-amb-fb, 8px)), transparent 100%),
    linear-gradient(to right, transparent 0, #000 var(--vod-amb-fl, 0px), #000 calc(100% - var(--vod-amb-fr, 8px)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.vod-watch-page--ambient-black .vod-ambient::before {
  background-image: none;
  background-color: #000;
  filter: blur(56px);
  opacity: 0.4;
}
.vod-watch-page .vod-ambient::after {
  content: none;
}
@media (prefers-reduced-motion: reduce) {
  .vod-watch-page .vod-ambient {
    display: none;
  }
}

.vod-watch-page .vod-player-card {
  position: relative;
  z-index: 1;
  margin: 0 auto 20px;
  border-radius: 0;
  overflow: visible;
  background: var(--vod-canvas-bg);
  box-sizing: border-box;
  /* 对齐 B 站 .bpx-player-container：四周轻晕 8px */
  box-shadow: 0 0 8px #0a0b0c;
}

.vod-player-card .vod-player-wrapper > video {
  width: 100%;
  height: 100%;
  display: block;
}

.vod-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  text-align: center;
  background: var(--vod-gate-overlay-bg);
}

/* 有加载封面时：封面作底图 + 半透明压暗，避免纯黑挡住海报 */
.vod-gate-overlay--with-poster {
  background-color: #000;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.68)),
    var(--vod-gate-poster);
  background-size: cover, contain;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.vod-gate-overlay__inner {
  max-width: 480px;
  width: 100%;
}

.vod-gate-overlay__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.vod-watch-page .vod-gate-overlay__cta-sub,
.vod-watch-page .vod-gate-overlay__cta-sub:link,
.vod-watch-page .vod-gate-overlay__cta-sub:visited {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: var(--vod-gate-cta-login) !important;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
  text-decoration: none !important;
  text-shadow: none;
  border-bottom: 1px solid rgba(215, 227, 244, 0.28);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.vod-watch-page .vod-gate-overlay__cta-sub:hover,
.vod-watch-page .vod-gate-overlay__cta-sub:focus {
  color: var(--vod-gate-cta-login-hover) !important;
  border-bottom-color: rgba(92, 168, 255, 0.55);
  text-decoration: none !important;
}

.vod-gate-overlay__vip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 2px;
  border-radius: 50%;
  border: 1px solid var(--vod-gate-vip-icon-ring);
  color: var(--vod-gate-vip-icon);
  box-sizing: border-box;
}

.vod-gate-overlay__vip-svg {
  width: 24px;
  height: 24px;
  display: block;
}

@media (min-width: 640px) {
  .vod-gate-overlay__vip-icon {
    width: 56px;
    height: 56px;
  }
  .vod-gate-overlay__vip-svg {
    width: 28px;
    height: 28px;
  }
}

.vod-gate-overlay__cta-main {
  margin: 0;
  padding: 0;
  color: var(--vod-gate-vip-main);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
  .vod-gate-overlay__cta-main {
    font-size: 22px;
  }
}

.vod-gate-overlay--migrate .vod-gate-overlay__cta-main,
.vod-gate-overlay--placeholder .vod-gate-overlay__cta-main {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.55;
  color: #e8e8e8;
}

@media (min-width: 640px) {
  .vod-gate-overlay--migrate .vod-gate-overlay__cta-main,
  .vod-gate-overlay--placeholder .vod-gate-overlay__cta-main {
    font-size: 17px;
  }
}

.vod-gate-overlay__notice-sub {
  margin: 0;
  max-width: 28em;
  color: rgba(210, 210, 210, 0.78);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

.vod-gate-overlay--preview-end[hidden] {
  display: none !important;
}
.vod-player-wrapper[data-play-gate="block"] .plyr__control--overlaid,
.vod-player-wrapper[data-play-gate="block"] .plyr__controls {
  display: none !important;
}

.vod-player-wrapper[data-play-gate="block"] .plyr {
  pointer-events: none;
}

.vod-player-wrapper:not([data-stream-active="1"]) .plyr [data-plyr="fullscreen"],
.vod-player-wrapper:not([data-stream-active="1"]) .plyr .plyr__control[data-plyr="fullscreen"],
.vod-player-wrapper .plyr [data-plyr="fullscreen"].vod-plyr-fs-disabled,
.vod-player-wrapper .plyr .plyr__control[data-plyr="fullscreen"].vod-plyr-fs-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.vod-watch-page .vod-download-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  background: var(--vod-download-bar-bg);
  box-sizing: border-box;
}

.vod-watch-page .vod-download-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.vod-watch-page .vod-download-filename {
  width: 100%;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--vod-download-filename);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  text-align: left;
}

.vod-watch-page .vod-download-row--placeholder .vod-download-filename {
  color: var(--vod-download-placeholder-filename);
}

.vod-watch-page .vod-meta-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0 6px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: var(--vod-download-meta);
  line-height: 1.25;
  text-align: left;
  text-indent: 0;
}

.vod-watch-page .vod-meta-sep {
  flex: 0 0 auto;
  color: var(--vod-download-meta);
  opacity: 0.7;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  user-select: none;
}

.vod-watch-page .vod-meta-stat {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}

.vod-watch-page .vod-meta-stat__label,
.vod-watch-page .vod-meta-stat__value {
  font-size: 12px;
  font-weight: 400;
  color: var(--vod-download-meta);
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}

.vod-watch-page .vod-meta-stat__label {
  opacity: .85;
}

.vod-watch-page .vod-download-row--placeholder .vod-meta-stat__value {
  color: var(--vod-download-placeholder-meta);
}

.vod-watch-page .vod-download-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.vod-watch-page a.vod-download-btn,
.vod-watch-page a.vod-download-probe {
  text-decoration: none;
}

.vod-watch-page .vod-meta-stat--action.vod-download-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-shrink: 0;
  margin: 0;
  box-sizing: border-box;
  min-height: 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--vod-download-action) !important;
  font: inherit;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.vod-watch-page .vod-download-btn__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.vod-watch-page .vod-meta-stat--action.vod-download-btn .vod-meta-stat__value {
  color: inherit;
  font-size: 13px;
  font-weight: 500;
}

.vod-watch-page .vod-meta-stat--action.vod-download-btn:hover:not(:disabled),
.vod-watch-page .vod-meta-stat--action.vod-download-btn:focus-visible:not(:disabled) {
  background: none;
  color: var(--vod-download-action-hover) !important;
}

.vod-watch-page .vod-meta-stat--action.vod-download-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: none;
  color: var(--vod-download-meta) !important;
}

.vod-watch-page .vod-download-btn__icon {
  display: block;
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .vod-watch-page .vod-download-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 0;
    padding: 10px 12px 12px;
  }
  .vod-watch-page .vod-download-main {
    flex: 1 1 100%;
  }
  .vod-watch-page .vod-download-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .vod-watch-page .vod-meta-stat--action.vod-download-btn {
    min-height: 32px;
  }
}

.vod-player-card .vod-player-wrapper {
  margin-bottom: 0 !important;
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.vod-player-card .vod-player-wrapper .plyr {
  display: block;
}

.fabuba-player-btn-wrapper {
  position: relative;
  float: left;
}

.fabuba-player-count-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  background: var(--vod-editor-badge-bg);
  color: var(--vod-editor-badge-fg);
  border: none;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 2px var(--vod-editor-badge-ring, #2a2e30),
    0 1px 2px rgba(0, 0, 0, 0.35);
  -webkit-font-smoothing: antialiased;
}

.fabuba-player-count-badge.fabuba-player-count-badge--visible {
  display: inline-flex;
}

.fabuba-player-count-badge.badge-large {
  min-width: 20px;
  padding: 0 5px;
  font-size: 9px;
}

.player-error {
  padding: 12px 16px;
  margin: 12px 0;
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: 6px;
  font-size: 14px;
}

.fb-thread-anims {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 16px auto 8px;
  max-width: 100%;
}

.fb-thread-anims__img {
  display: block;
  width: auto;
  max-width: min(480px, 100%);
  height: auto;
}
