/* ==========================================================
   site.css —— 模板补充样式（不动 app.css，避免破坏原样式）
   ========================================================== */

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  display: block;
}
a { text-decoration: none; color: inherit; }
img { border: 0; }
button { font-family: inherit; }
input, textarea { font-family: inherit; }

/* 进站验证页背景 */
.gate-wrap {
  min-height: 100dvh;
  background: #15151b;
}

/* 通用占位/工具类 */
.hg-hidden { display: none !important; }
.hg-empty {
  padding: 60px 20px;
  text-align: center;
  color: rgba(255, 255, 255, .45);
  font-size: 14px;
}
.hg-loading {
  padding: 40px 0;
  text-align: center;
  color: rgba(255, 255, 255, .35);
  font-size: 13px;
}

/* 播放页（watch.php）—— 竖屏全屏播放 */
.watch {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
}
.watch__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.watch__stage video,
.watch__poster {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.watch__poster {
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(.45);
  transform: scale(1.15);
}
.watch__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .62), transparent);
  z-index: 3;
}
.watch__back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.watch__title {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.watch__title small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, .55);
  margin-top: 2px;
}
.watch__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}
.watch__play span {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
}
.watch__side {
  position: absolute;
  right: 12px;
  bottom: 160px;
  display: grid;
  gap: 18px;
  justify-items: center;
  z-index: 3;
}
.watch__side button {
  width: 44px;
  color: #fff;
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 11px;
  background: rgba(0, 0, 0, .30);
  border-radius: 12px;
  padding: 8px 0;
  backdrop-filter: blur(4px);
}
.watch__side button.on { color: #ff7430; }
.watch__eps {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  padding: 0 12px;
  z-index: 3;
}
.watch__eps .hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 8px;
}
.watch__eps .list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.watch__eps .list::-webkit-scrollbar { display: none; }
.watch__eps .ep {
  flex: none;
  min-width: 58px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  font-size: 12px;
  text-align: center;
}
.watch__eps .ep.on {
  background: #ff7430;
  font-weight: 600;
}

/* 轻提示 */
.hg-toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translate(-50%, 12px);
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 20px;
  opacity: 0;
  transition: .25s ease;
  z-index: 99998;
  pointer-events: none;
  white-space: nowrap;
}
.hg-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 验证码失败抖动 */
@keyframes hg-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
.hg-shake { animation: hg-shake .34s ease; }

/* 我的页面 —— 功能列表（自定义补充） */
.mlist {
  margin-top: calc(var(--u, 1px) * 12);
  background: var(--card);
  border-radius: calc(var(--u, 1px) * 14);
  overflow: hidden;
}
.mlist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--u, 1px) * 14) calc(var(--u, 1px) * 14);
  font-size: calc(var(--u, 1px) * 14);
  color: rgba(255, 255, 255, .86);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.mlist a:last-child { border-bottom: 0; }
.mlist a em { font-style: normal; color: rgba(255, 255, 255, .35); }

/* 排行榜横幅 */
.rank .banner { overflow: hidden; }
.rank .banner .title-img { display: block; height: 100%; width: auto; }

/* 详情页补充 */
.drama-detail .detail-desc {
  padding: 0 calc(var(--u, 1px) * 16) calc(var(--u, 1px) * 12);
  color: rgba(255, 255, 255, .62);
  font-size: calc(var(--u, 1px) * 13);
  line-height: 1.7;
}
.drama-detail .play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: calc(var(--u, 1px) * 12);
  padding: calc(var(--u, 1px) * 9) calc(var(--u, 1px) * 18);
  border-radius: 999px;
  background: var(--primary, #ff7430);
  color: #fff;
  font-size: calc(var(--u, 1px) * 14);
  font-weight: 600;
}
.drama-detail .ep-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: calc(var(--u, 1px) * 12) calc(var(--u, 1px) * 16) 24px;
}
.drama-detail .ep-item {
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 10px 0;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 14px;
}
.drama-detail .ep-item i {
  font-style: normal;
  font-size: 10px;
  color: rgba(255, 255, 255, .45);
}

/* 充值页补充 */
.rc .paym { padding: 12px 16px; }
.rc .pays { display: flex; gap: 10px; margin-top: 10px; }
.rc .pays label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  color: rgba(255, 255, 255, .8);
}
.rc .pays img { height: 18px; width: auto; }
.rc .pay-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 16px auto 0;
  height: 46px;
  border-radius: 23px;
  background: linear-gradient(90deg, #ff9a3d, #ff6a1a);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* 论坛补充 */
.plaza .topics .trow {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 16px 4px;
  scrollbar-width: none;
}
.plaza .topics .trow::-webkit-scrollbar { display: none; }
.plaza .topics .topic {
  flex: none;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
  display: grid;
  gap: 2px;
}
.plaza .topics .topic b { font-size: 13px; color: #ffd335; font-weight: 600; }
.plaza .topics .topic span { font-size: 11px; color: rgba(255, 255, 255, .4); }
.plaza .post-feed .acts { display: flex; gap: 16px; font-size: 12px; color: rgba(255, 255, 255, .45); margin-top: 8px; }
.plaza .pf-more { padding: 20px 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .3); }
.plaza .fab-publish img { width: 100%; height: 100%; object-fit: contain; }

/* AI 卡片按钮 */
.ai-home .card .card-go {
  margin-top: 8px;
  width: 100%;
  height: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 12px;
}
.ai-home .sec-head { display: flex; align-items: center; justify-content: space-between; }

/* 充值页：运营说明行 */
.rc .runline {
  margin: calc(var(--u, 1px) * 10) 0 0;
  text-align: center;
  font-size: calc(var(--u, 1px) * 12);
  color: #ffd335;
  letter-spacing: .04em;
}

/* AI 页：参考站头部与分类 chips 之间有 33px 的公告条占位 */
.ai-home > .chips { margin-top: 33px; }

/* 我的：广告小卡 + 服务九宫格容器 */
.mine .admq { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--u,1px) * 8); padding: calc(var(--u,1px) * 12) calc(var(--u,1px) * 14) 0; }
.mine .admq-card { border-radius: calc(var(--u,1px) * 12); overflow: hidden; display: block; }
.mine .admq-card img { display: block; width: 100%; height: auto; }
.mine .grp { padding: calc(var(--u,1px) * 14) calc(var(--u,1px) * 14) 0; }
.mine .grp-t { color: rgba(255,255,255,.9); font-size: calc(var(--u,1px) * 14); font-weight: 600; margin: calc(var(--u,1px) * 6) 0 calc(var(--u,1px) * 12); }
.mine .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--u,1px) * 16) calc(var(--u,1px) * 6); }
