/* ------------------------------------------------------------------
 * 本地站补丁样式：只补原站由 JS/内联样式负责的部分，避免改动原 CSS 文件。
 * ------------------------------------------------------------------ */

/* 首屏轮播缩略图：宽度与轨道动画由 home.css（原站内联样式）负责，
   这里只保证面板不会溢出到标题区之外 */

/* 小屏：首屏简介改多行、操作按钮收紧，避免右侧被裁 */
@media (max-width: 1023px) {
  .hg-hero__desc {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .hg-web-play__actions { gap: 8px; }
  .hg-web-play__actions .hg-web-play__action { font-size: 12px; padding: 0 8px; gap: 4px; }
}

/* 空状态 */
.hg-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 0;
  color: rgba(255, 255, 255, .55);
  font-size: 14px;
}

/* 静态信息页正文 */
.hg-static-block {
  margin: 4px 0 28px;
  padding: 20px 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 1.9;
}

.hg-static-block p { margin: 0 0 10px; }
.hg-static-block p:last-child { margin-bottom: 0; }

.hg-faq__item {
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  padding: 12px 0;
}

.hg-faq__item summary {
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  list-style: none;
}

.hg-faq__item summary::-webkit-details-marker { display: none; }
.hg-faq__item summary::after { content: '+'; float: right; color: rgba(255, 255, 255, .45); }
.hg-faq__item[open] summary::after { content: '–'; }
.hg-faq__body { color: rgba(255, 255, 255, .62); font-size: 13px; line-height: 1.9; padding-top: 8px; }

/* 最近浏览弹层 */
.hg-history-dialog {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: none;
}

.hg-history-dialog.is-open { display: block; }

.hg-history-dialog__mask {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .6);
  cursor: pointer;
}

.hg-history-dialog__panel {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 32px));
  max-height: 60vh;
  overflow: auto;
  padding: 20px;
  border-radius: 14px;
  background: #14120f;
  border: 1px solid rgba(255, 255, 255, .08);
}

.hg-history-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hg-history-dialog__actions { display: flex; align-items: center; gap: 10px; }

.hg-history-dialog__clear,
.hg-history-dialog__close {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
  cursor: pointer;
}

.hg-history-dialog__list { display: flex; flex-direction: column; gap: 10px; }

.hg-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
}

.hg-history-item img { border-radius: 6px; object-fit: cover; }

/* 播放器容器：原站由 xgplayer 接管，这里给原生 video 一个稳定的容器高度 */
.hg-web-play__viewport { position: relative; }
.hg-web-play__video { width: 100%; height: 100%; display: block; background: #000; }

/* 收藏/点赞激活态 */
.hg-web-play__action.is-on { color: var(--color-primary, #f0263c); }

/* ---------------- 18+ 年龄确认（复刻原站 hg-age-modal） ---------------- */
html.hg-age-locked { overflow: hidden; }
html.hg-age-locked::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: #0d0d0d;
}

.hg-age-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  color: #fff;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hg-age-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(240, 38, 60, .10), transparent 60%);
}

.hg-age-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(500px, calc(100vw - 48px));
  gap: 40px;
  text-align: center;
}

.hg-age-modal__logo {
  display: block;
  width: min(260px, 60vw);
  height: auto;
  aspect-ratio: 260 / 72;
  object-fit: contain;
}

.hg-age-modal__notice { margin: 0; width: 100%; font-size: clamp(18px, 4.8vw, 24px); font-weight: 500; line-height: 1.6; }
.hg-age-modal__actions { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 16px; }

.hg-age-modal .hg-age-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 30px;
  font-size: clamp(14px, 4vw, 16px);
  line-height: 1.375;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}

.hg-age-modal .hg-age-modal__btn:active { transform: scale(.98); }
.hg-age-modal .hg-age-modal__btn--enter { background: #f0263c; color: #000; font-weight: 600; }
.hg-age-modal .hg-age-modal__btn--enter:hover { opacity: .92; }
.hg-age-modal .hg-age-modal__btn--leave { border: 1px solid rgba(255, 255, 255, .07); background: #181713; color: rgba(255, 255, 255, .8); font-weight: 500; }
.hg-age-modal .hg-age-modal__btn--leave:hover { border-color: rgba(255, 255, 255, .16); color: #fff; }
.hg-age-modal__legal { margin: 0; width: 100%; color: rgba(255, 255, 255, .4); font-size: clamp(12px, 3.2vw, 14px); line-height: 1.5; }
.hg-age-modal__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
