/* ===== 站内广告位（容器 class 刻意不用 ad/banner，降低被 AdBlock 误伤的概率） ===== */

.hg-promo {
  position: relative;
  display: block;
  margin: 14px 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}

.hg-promo__link {
  display: block;
  position: relative;
  text-decoration: none;
}

.hg-promo__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover !important;
}

.hg-promo__tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.hg-promo__inner {
  padding: 0;
  line-height: 0;
}

.hg-promo__inner img,
.hg-promo__inner iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

/* --- 横幅：贴边、无外边距（放在内容容器里由容器控制） --- */
.hg-promo--banner {
  margin: 12px 0;
  border-radius: 10px;
}
.hg-promo--banner .hg-promo__img {
  aspect-ratio: 32 / 5;   /* 640×100 */
  width: 100%;
  object-fit: cover !important;
}
@media (min-width: 1024px) {
  .hg-promo--banner .hg-promo__img { aspect-ratio: 97 / 9; }  /* 970×90 */
}

/* --- 原生卡：与视频卡/剧卡同尺寸 --- */
.hg-promo--native .hg-promo__img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover !important;
}

/* --- 视频流原生卡（竖屏 9:16，占满一屏） --- */
.hg-promo--home_feed_native {
  margin: 0;
  border-radius: 0;
  border: 0;
  background: #0b0b0d;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hg-promo--home_feed_native .hg-promo__link {
  width: 100%;
  height: 100%;
}
.hg-promo--home_feed_native .hg-promo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 详情页侧栏（暂不做 PC 单独版，保留样式） --- */
.hg-promo--sidebar .hg-promo__img {
  aspect-ratio: 300 / 250;
}

/* --- 播放前贴片 --- */
.hg-preroll {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
}
.hg-preroll__stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hg-preroll__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.hg-preroll__stage .hg-promo__inner {
  width: 100%;
  text-align: center;
}
.hg-preroll__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, .8);
  background: rgba(0, 0, 0, .5);
}
.hg-preroll__skip {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.hg-preroll__skip:disabled {
  opacity: .55;
  cursor: default;
}
.hg-preroll__skip:hover:not(:disabled) {
  background: rgba(0, 0, 0, .75);
}

/* --- 视频流里的广告卡（feed.js 渲染） --- */
.ff-item--ad {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08080a;
}
.ff-item--ad .hg-promo {
  margin: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

/* ================================================================== */
/* 开屏 / 弹窗 / 暂停广告 / 左上角轮播                                    */
/* ================================================================== */

/* --- 首页开屏 --- */
.hg-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0c;
  padding: 0;
}
.hg-splash[hidden] { display: none; }
.hg-splash__stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hg-splash__stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hg-splash__stage .hg-promo__inner { width: 100%; height: 100%; }
.hg-splash__close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.hg-splash__tag {
  position: absolute;
  left: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, .8);
  background: rgba(0, 0, 0, .5);
}

/* --- 首页弹窗 --- */
.hg-popad {
  position: fixed;
  inset: 0;
  z-index: 9000;   /* 低于年龄门（2147483001），保证顺序：开屏 > 年龄确认 > 弹窗 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .72);
  padding: 24px;
}
.hg-popad[hidden] { display: none; }
.hg-popad__box {
  position: relative;
  width: min(420px, 82vw);
  border-radius: 14px;
  overflow: visible;
  background: #111;
}
.hg-popad__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}
.hg-popad__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.hg-popad__tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, .8);
  background: rgba(0, 0, 0, .55);
}

/* --- 暂停广告（叠加在播放器上） --- */
.hg-pausead {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .82);
}
.hg-pausead[hidden] { display: none; }
.hg-pausead__box {
  position: relative;
  width: min(520px, 86%);
  max-height: 86%;
}
.hg-pausead__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
}
.hg-pausead__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.hg-pausead__tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, .75);
  background: rgba(0, 0, 0, .55);
}

/* --- 视频流左上角轮播 --- */
.hg-corner {
  position: fixed;
  left: 12px;
  top: calc(84px + env(safe-area-inset-top));
  z-index: 60;
  width: 96px;
  border-radius: 10px;
  overflow: visible;
}
.hg-corner[hidden] { display: none; }
.hg-corner__track {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.hg-corner__item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
}
.hg-corner__item.is-on { opacity: 1; }
.hg-corner__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hg-corner__close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.hg-corner__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 10px 5px 3px;
  font-size: 9px;
  text-align: left;
  color: rgba(255, 255, 255, .7);
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  pointer-events: none;
}
@media (max-width: 1023px) {
  .hg-corner { width: 82px; top: calc(76px + env(safe-area-inset-top)); }
}
/* 开屏自动关闭倒计时（无关闭按钮） */
.hg-splash__count {
  position: absolute;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, .82);
  background: rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
/* ===== 沉浸层（全屏观看）里的广告 ===== */
.wo-item--ad {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08080a;
}
.wo-item--ad .hg-promo {
  margin: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.wo-item--ad .hg-promo__link {
  width: 100%;
  height: 100%;
}
.wo-item--ad .hg-promo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wo-item--ad .hg-promo__inner {
  width: 100%;
  height: 100%;
}
.wo-item--ad .hg-promo__inner .hg-promo__img {
  object-fit: contain;
}

/* 左上角轮播在沉浸层之上（沉浸层 .wo 的 z-index 由 watch.css 决定） */
.hg-corner { z-index: 9999; }