/* 前台样式：影视站风格，无构建依赖，可直接改 */
/* 颜色全部走变量；具体配色见文件末尾的 body.palette-<key> 段（默认 = orange）。 */
:root {
  --bg: #0f1115;
  --bg-soft: #171a21;
  --panel: #1b1f27;
  --line: #262b35;
  --text: #e6e9ef;
  --text-strong: #ffffff;   /* 强文字：logo / 导航高亮 / 卡片标题 hover */
  --text-soft: #b9c0cc;     /* 次级正文：简介 / banner 描述 */
  --muted: #8b93a3;
  --brand: #ff5c38;
  --brand-2: #ff7d38;       /* 渐变第二色 */
  --brand-soft: rgba(255, 92, 56, .14);
  --on-brand: #ffffff;      /* 铺在品牌色上的文字 */
  --gold: #ffb020;
  --gold-ink: #1b1f27;      /* 铺在金色上的文字 */
  --header-bg: rgba(15, 17, 21, .94);
  --tabbar-bg: rgba(15, 17, 21, .97);
  --ph-text: #4b5563;       /* 无封面占位文字 */
  --mask: rgba(15, 23, 42, .55);
  --radius: 10px;
}
* { box-sizing: border-box; }
body.front-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.65 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* 顶栏 */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.site-header-inner {
  max-width: 1220px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.site-logo { font-size: 19px; font-weight: 700; color: var(--text-strong); letter-spacing: .5px; flex: 0 0 auto; }
.site-logo span { color: var(--brand); }
/* 搜索框紧跟 logo（同一行平行）；分类导航在桌面推到最右 */
.site-search { display: flex; gap: 6px; flex: 0 1 auto; min-width: 0; }
.site-search input {
  width: 210px; padding: 7px 12px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 13px;
}
.site-search input:focus { outline: none; border-color: var(--brand); }
.site-search button {
  padding: 7px 16px; border-radius: 20px; border: 0; flex: 0 0 auto;
  background: var(--brand); color: var(--on-brand); font-size: 13px; cursor: pointer;
}
.site-nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { font-size: 14px; color: var(--muted); }
.site-nav a:hover, .site-nav a.on { color: var(--text-strong); }

/* 布局 */
.site-main { max-width: 1220px; margin: 0 auto; padding: 20px 16px 48px; }
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  color: var(--muted); font-size: 13px;
}
.site-footer-inner { max-width: 1220px; margin: 0 auto; padding: 22px 16px; }

/* 区块 */
.section { margin-bottom: 26px; }
.section-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.section-head h2 { margin: 0; font-size: 17px; }
.section-head h2::before {
  content: ""; display: inline-block; width: 4px; height: 15px;
  background: var(--brand); border-radius: 2px; margin-right: 8px; vertical-align: -2px;
}
.section-head .more { margin-left: auto; font-size: 13px; color: var(--muted); }

/* 分类总览页：每个一级分类一组 */
.cat-group { margin-bottom: 8px; }
.cat-group .filter-bar { margin: 10px 0 22px; }

/* 一级分类「整行都是按钮」：<a> 自己撑满一整行（原来热区只有分类名那几个字，
   四周全是死空白，手机上点了没反应）。必须给显式高度/内边距 + :active 反馈。 */
.cat-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 13px 15px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text-strong);
  font-size: 15px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;                 /* 去掉移动端 300ms 点击延迟，反馈更跟手 */
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.cat-row .cat-name { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.cat-row .cat-name::before {
  content: ""; display: inline-block; width: 4px; height: 15px;
  background: var(--brand); border-radius: 2px; flex: 0 0 4px;
}
.cat-row .cat-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.cat-row:hover, .cat-row:active { background: var(--brand-soft); border-color: var(--brand); }
.cat-row:active { transform: scale(.99); }
.cat-row:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 视频卡片网格 */
.vod-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.vod-card { position: relative; }
.vod-card .pic {
  /* 必须是块级：<a> 默认 display:inline，而 aspect-ratio 对行内盒不生效，
     会导致封面区宽高塌成 0、占位文字溢出压住标题（无封面时尤其明显）。 */
  display: block;
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: var(--radius); background: var(--panel);
}
.vod-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.vod-card:hover .pic img { transform: scale(1.05); }
.vod-card .pic .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--ph-text); font-size: 12px;
}
.vod-card .tag {
  position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 11px; background: rgba(0, 0, 0, .6); color: #fff;
}
.vod-card .tag-vip { background: var(--gold); color: #3b2600; font-weight: 600; }
.vod-card .score {
  position: absolute; right: 6px; top: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 11px; background: rgba(0, 0, 0, .6); color: var(--gold);
}
.vod-card .title {
  margin-top: 7px; font-size: 13px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vod-card .title:hover { color: var(--brand); }
.vod-card .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 首页横幅 */
.banner {
  position: relative; height: 260px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(120deg, var(--panel), var(--bg));
}
.banner img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.banner-body {
  position: absolute; left: 26px; bottom: 24px; right: 26px;
}
.banner-body h3 { margin: 0 0 6px; font-size: 22px; color: #fff; }
.banner-body p {
  margin: 0 0 12px; color: #cbd2dd; font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 详情页 */
.detail-top { display: flex; gap: 22px; flex-wrap: wrap; }
.detail-pic { width: 220px; flex: 0 0 220px; }
.detail-pic img { width: 100%; border-radius: var(--radius); background: var(--panel); }
.detail-pic .ph {
  aspect-ratio: 2 / 3; border-radius: var(--radius); background: var(--panel);
  display: flex; align-items: center; justify-content: center; color: var(--ph-text);
}
.detail-info { flex: 1; min-width: 260px; }
.detail-info h1 { margin: 0 0 10px; font-size: 22px; }
.detail-meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.detail-meta span { margin-right: 14px; }
.detail-desc {
  font-size: 13px; color: var(--text-soft); line-height: 1.8;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.player-box {
  margin-top: 18px; background: #000; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
}
.player-box video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.player-tip { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

.src-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.src-tabs button {
  padding: 6px 14px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px;
}
.src-tabs button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--text-strong); }
.ep-list { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-list button {
  min-width: 62px; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); cursor: pointer; font-size: 13px;
}
.ep-list button.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* 播放页 */
.play-wrap { max-width: 980px; margin: 0 auto; }
.play-head { margin-top: 18px; }
.play-head h1 { margin: 0 0 8px; font-size: 20px; }
.player-box { position: relative; }
.btn-play {
  display: inline-block; padding: 8px 20px; border-radius: 20px;
  background: var(--brand); color: var(--on-brand); font-size: 14px;
}
.trial-bar {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--radius);
  background: rgba(255, 176, 32, .12); border: 1px solid rgba(255, 176, 32, .35);
  color: var(--gold); font-size: 13px;
}
.trial-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.pause-ad {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .72); z-index: 5;
}
.pause-ad-inner { max-width: 78%; text-align: center; color: #fff; font-size: 14px; }
.src-tabs { margin-top: 18px; }
.ep-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ep-list a {
  min-width: 62px; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-size: 13px; text-align: center;
}
.ep-list a:hover { border-color: var(--brand); color: var(--brand); }
.ep-list a.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* 筛选条 */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px;
}
.filter-bar a {
  padding: 5px 12px; border-radius: 16px; font-size: 13px; color: var(--muted);
  border: 1px solid transparent;
}
.filter-bar a:hover { color: var(--text-strong); }
.filter-bar a.on { background: var(--brand-soft); border-color: var(--brand); color: var(--text-strong); }

/* 分页 */
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 22px 0 0; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-soft); font-size: 13px;
}
.pager .current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* 空态 */
.empty {
  padding: 46px 16px; text-align: center; color: var(--muted); font-size: 13px;
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius);
}

@media (max-width: 720px) {
  /* 手机端：第一行 = logo + 搜索框（并行），第二行 = 分类导航整行 */
  .site-header-inner { flex-wrap: wrap; gap: 8px 10px; }
  .site-search { flex: 1 1 auto; margin-left: 0; min-width: 0; }
  .site-search input { flex: 1 1 auto; width: auto; min-width: 0; }
  .site-nav { margin-left: 0; flex: 1 1 100%; gap: 14px; }
  .detail-pic { width: 130px; flex: 0 0 130px; }
  .banner { height: 190px; }
}

/* ===== 会员域（M4）：登录/注册/用户中心 =====
   注：顶栏「充值 / 用户名 / 登录 / 注册」入口已移除（腾出视觉空间，移动端底部菜单「我的」承担该入口）。 */

.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px;
}
.auth-card h1 { margin: 0 0 18px; font-size: 20px; }
.auth-msg { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.auth-msg.err { background: rgba(255, 77, 79, .12); color: #ff8f8a; border: 1px solid rgba(255, 77, 79, .3); }
.auth-msg.ok { background: rgba(64, 200, 130, .1); color: #57d29a; border: 1px solid rgba(64, 200, 130, .3); }
.auth-form label { display: block; margin-bottom: 14px; }
.auth-form label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.auth-form label .req { color: var(--brand); font-style: normal; }
.auth-form input {
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
}
.auth-form input:focus { outline: none; border-color: var(--brand); }
.auth-form.compact { margin-top: 6px; }
.auth-btn {
  width: 100%; padding: 11px; border: none; border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); font-size: 15px; font-weight: 600;
}
.auth-btn:hover { filter: brightness(1.08); }
.auth-foot { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--brand); }
.auth-tip { font-size: 12px; color: var(--gold); margin: -4px 0 12px; }

.user-wrap { max-width: 640px; margin: 26px auto; display: flex; flex-direction: column; gap: 18px; }
.user-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.user-h2 { margin: 0 0 12px; font-size: 15px; }
.user-head { display: flex; gap: 16px; align-items: center; }
.user-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: 0 0 58px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--on-brand);
}
.user-name { font-size: 17px; font-weight: 600; }
.user-name .vip-badge {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, #ffb020, #ff8a00); color: #3b2600;
  padding: 2px 8px; border-radius: 10px; vertical-align: 2px;
}
.user-name .vip-badge.off { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.user-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.user-stats {
  display: flex; gap: 10px; margin: 18px 0 4px;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.user-stats a, .user-stats div {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.user-stats a:hover { border-color: var(--brand); }
.user-stats b { display: block; font-size: 18px; }
.user-stats span { font-size: 12px; color: var(--muted); }
.user-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ubtn {
  display: inline-block; padding: 8px 18px; border-radius: 8px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); font-size: 13px;
}
.ubtn:hover { border-color: var(--brand); color: var(--text-strong); }
.ubtn.gold { background: linear-gradient(135deg, #ffb020, #ff8a00); border-color: transparent; color: #3b2600; font-weight: 600; }
.ubtn.danger { color: #ff8f8a; }
.ubtn.small { padding: 5px 12px; font-size: 12px; }
.invite-line { display: flex; align-items: center; gap: 12px; }
.invite-line code {
  font-size: 20px; letter-spacing: 4px; color: var(--gold);
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 18px;
}

/* 收藏 / 历史列表 */
.fav-cell { position: relative; }
.fav-del { margin-top: 6px; text-align: center; }
.fav-del .link-danger {
  background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 6px;
}
.fav-del .link-danger:hover { color: #ff8f8a; }
.watch-day { margin-top: 6px; text-align: center; font-size: 12px; color: var(--muted); }

/* 详情页收藏按钮 —— 横排一行（form 是块级元素，不设 inline-flex 会各占一行） */
.detail-actions { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-actions > form { display: inline-flex; margin: 0; }
.fav-btn {
  padding: 9px 24px; border-radius: 20px; cursor: pointer; font-size: 14px; white-space: nowrap;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
}
.fav-btn:hover { border-color: var(--brand); }
.fav-btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* 播放页「查看详情页 / 更多信息」入口 */
.detail-more { margin-top: 14px; }
.btn-lg { padding: 11px 26px; border-radius: 10px; font-size: 15px; font-weight: 600; }

@media (max-width: 720px) {
  .user-stats { flex-wrap: wrap; }
  .user-stats a, .user-stats div { flex: 1 1 40%; }
  /* 互动按钮：手机上一行三等分，铺满整行、不换行 */
  .detail-actions { gap: 8px; }
  .detail-actions > form { flex: 1 1 30%; min-width: 0; }
  .detail-actions > form .fav-btn { width: 100%; padding: 10px 6px; }
  .detail-actions > .fav-btn { flex: 1 1 30%; min-width: 0; padding: 10px 6px; }
  .detail-more .btn { width: 100%; }
}

/* ===== 支付域（M5）：充值/流水/提现 ===== */
.pay-wrap { max-width: 720px; margin: 30px auto; }
.wallet-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.wallet-bar span { font-size: 12px; color: var(--muted); display: block; }
.wallet-bar b { font-size: 22px; color: var(--gold); }
.wallet-frozen { font-size: 12px; color: var(--muted); }
.wallet-links { display: flex; gap: 12px; font-size: 13px; }
.wallet-links a { color: var(--brand); }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pkg-item {
  position: relative; cursor: pointer; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 12px; transition: all .15s;
}
.pkg-item:hover { border-color: var(--brand); }
.pkg-item input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-item:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pkg-name { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pkg-price { font-size: 24px; font-weight: 700; color: var(--brand); }
.pkg-coins { font-size: 13px; color: var(--gold); margin-top: 4px; }
.pkg-gift { font-size: 12px; color: #2ecc71; margin-top: 2px; }
.pkg-vip { font-size: 12px; color: #ffb020; margin-top: 2px; }
.form-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.form-label { font-size: 13px; color: var(--muted); }
.pay-types { display: flex; gap: 12px; flex-wrap: wrap; }
/* 支付方式：原来只有 13px 文字 + 原生小圆点，太小不好点。改成卡片式按钮。 */
.pay-type {
  position: relative; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; min-width: 132px;
  border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg-soft); color: var(--text);
  font-size: 15px; font-weight: 600;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
}
.pay-type:hover { border-color: var(--brand); }
.pay-type:active { transform: scale(.985); }
.pay-type.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
/* 原生 radio 视觉隐藏但保留键盘可达 */
.pay-type input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pay-type .pay-ico {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  background: var(--muted);
}
.pay-type .pay-ico.alipay { background: #1677ff; }
.pay-type .pay-ico.wxpay { background: #07c160; }
.pay-type .pay-ico.qqpay { background: #12b7f5; }
.pay-type .pay-name { white-space: nowrap; }
@media (max-width: 480px) {
  .pay-type { flex: 1 1 calc(50% - 6px); min-width: 0; justify-content: center; padding: 12px 10px; }
}

/* 通用键值表（充值结果/流水/提现） */
.kv-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.kv-table th, .kv-table td {
  padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
}
.kv-table th { color: var(--muted); font-weight: 500; width: 110px; white-space: nowrap; }
.kv-table thead th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--bg-soft); }
.kv-table tbody tr:hover td { background: var(--bg-soft); }
.kv-table td .hint { display: inline; }

.auth-form select {
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
}
.auth-form select:focus { outline: none; border-color: var(--brand); }

@media (max-width: 640px) {
  .kv-table th { width: 84px; }
  .form-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============ M8 站点域 ============ */
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 8px; font-size: 13px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--brand); }

.footer-ad { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.footer-ad-item { background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; text-align: center; font-size: 13px; }
.footer-ad-item img { max-width: 100%; border-radius: 6px; }

.static-page { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.static-page h1 { margin: 0 0 18px; font-size: 22px; }
.static-body { font-size: 14px; line-height: 1.9; color: var(--text); }
.static-body h2 { font-size: 17px; margin: 22px 0 10px; }
.static-body h3 { font-size: 15px; margin: 18px 0 8px; }
.static-body p { margin: 0 0 12px; }
.static-body ul, .static-body ol { padding-left: 22px; }
.static-body a { color: var(--brand); }
.static-body img { max-width: 100%; }
.static-body table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.static-body th, .static-body td { border: 1px solid var(--line); padding: 8px 10px; font-size: 13px; }

.notice-mask {
  position: fixed; inset: 0; background: var(--mask); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.notice-box {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; width: 100%; max-width: 460px; max-height: 76vh;
  overflow: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.notice-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.notice-head button {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0 4px;
}
.notice-head button:hover { color: var(--text); }
.notice-body { padding: 18px; font-size: 14px; line-height: 1.85; }
.notice-body p { margin: 0 0 10px; }
.notice-body img { max-width: 100%; }

@media (max-width: 640px) {
  .static-page { padding: 18px; }
}

/* ==================== 首页轮播图（前端装修） ==================== */
/* 只用 transform 位移 + overflow:hidden，不产生横向滚动条 */
.hero {
  position: relative; height: 260px; border-radius: var(--radius);
  overflow: hidden; margin-bottom: 24px;
  background: linear-gradient(120deg, var(--panel), var(--bg));
}
.hero-track {
  display: flex; height: 100%;
  transition: transform .45s ease; will-change: transform;
}
.hero-slide { position: relative; flex: 0 0 100%; height: 100%; }
.hero-link { display: block; height: 100%; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 22px 14px;
  font-size: 16px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .42); color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer; opacity: 0; transition: opacity .2s, background .2s;
}
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: var(--brand); }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; gap: 6px; justify-content: center;
}
.hero-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .45); cursor: pointer; transition: all .2s;
}
.hero-dot.on { width: 18px; border-radius: 4px; background: var(--brand); }

@media (max-width: 720px) {
  .hero { height: 170px; }
  .hero-title { font-size: 14px; padding: 26px 14px 12px; }
  /* 触屏没有 hover，箭头常显并缩小，避免遮挡图片 */
  .hero-arrow { opacity: 1; width: 28px; height: 28px; font-size: 17px; }
  .hero-prev { left: 6px; }
  .hero-next { right: 6px; }
}

/* ===== 页面小标题条（专题总览 / 排行榜 / 资讯 等列表页共用）===== */
.page-banner { padding: 14px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.page-banner h1 { margin: 0 0 4px; font-size: 22px; color: var(--text-strong); letter-spacing: .5px; }
.page-banner .hint { margin: 0; }

/* ===== 专题（M14）=====
   注意：这里所有尺寸都要**显式**给出。
   `img { display: block }` 之外全站没有 max-width 兜底，
   而 object-fit 只有在 img 自身拿到 width/height 时才生效 ——
   少写一个 height，封面就会按原图撑满第一屏（曾经就是这样）。 */
.topic-cover {
  width: 100%;
  height: 200px;          /* ★ 必须封顶，否则海报原图直接占满首屏 */
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.topic-hero { margin-bottom: 20px; }
.topic-hero-body h1 { margin: 10px 0 4px; font-size: 20px; color: var(--text-strong); }
.topic-hero-body p { margin: 0 0 6px; color: var(--text-soft); }

.topic-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.topic-card {
  display: flex; gap: 12px; align-items: center;
  padding: 10px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s;
}
.topic-card:hover { border-color: var(--brand); }
.topic-card-pic {
  flex: 0 0 88px; width: 88px; height: 118px;
  border-radius: 8px; overflow: hidden; background: var(--bg-soft);
}
.topic-card-pic img { width: 100%; height: 100%; object-fit: cover; }
.topic-card-pic .ph {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--ph-text); font-size: 12px;
}
.topic-card-body { min-width: 0; }
.topic-card-body h3 { margin: 0 0 4px; font-size: 15px; color: var(--text-strong); }
.topic-card-body .hint { margin: 0 0 6px; font-size: 12px; }
.topic-count { font-size: 12px; color: var(--brand); }

@media (min-width: 860px) {
  .topic-hero { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: center; }
  .topic-cover { height: 340px; }
  .topic-hero-body h1 { margin-top: 0; font-size: 24px; }
}
@media (max-width: 720px) {
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card-pic { flex: 0 0 76px; width: 76px; height: 102px; }
}


/* ===== 移动端底部菜单栏（TabBar，仅 ≤720px 可见） ===== */
/* 桌面端不显示：避免与顶部导航重复。DOM 始终存在，由这里控制可见性。 */
.mobile-tabbar { display: none; }

@media (max-width: 720px) {
  .mobile-tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--tabbar-bg);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
    /* iPhone 全面屏底部横条留白，非全面屏该值为 0 */
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tabbar .tab {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 7px 0 6px;
    color: var(--muted); font-size: 11px; line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
    /* 站内信未读红点要绝对定位到这个格子里 */
    position: relative;
  }
  .mobile-tabbar .tab svg { width: 22px; height: 22px; display: block; }
  .mobile-tabbar .tab-label { white-space: nowrap; }
  .mobile-tabbar .tab.on { color: var(--brand); }
  /* 未读红点（站内信）：挂在小图标右上角，不挤压文字 */
  .mobile-tabbar .tab-dot {
    position: absolute; top: 4px; left: 50%; margin-left: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #ff3b30; box-shadow: 0 0 0 2px var(--tabbar-bg);
  }

  /* 底部栏是 fixed，会盖住页脚最后一行 → 给内容留出等高避让（含安全区） */
  .front-body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
}

/* ===== 前台通用按钮（detail 页评论区等处使用；前台原先没有 .btn）===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer;
  line-height: 1.2; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(1.08); color: var(--on-brand); }

/* ===== 评论（M12）===== */
.comment-section .cmt-count { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.cmt-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.cmt-form textarea {
  width: 100%; resize: vertical; min-height: 74px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); font: inherit;
}
.cmt-form textarea:focus { outline: none; border-color: var(--brand); }
.cmt-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmt-form-foot .hint { font-size: 12px; color: var(--muted); }
.cmt-guest { flex-direction: row; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.cmt-list { display: flex; flex-direction: column; gap: 4px; }
.cmt-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cmt-item:last-child { border-bottom: none; }
.cmt-avatar {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.cmt-body { flex: 1 1 auto; min-width: 0; }
.cmt-head { display: flex; align-items: baseline; gap: 8px; }
.cmt-head b { font-size: 13px; }
.cmt-head .hint { font-size: 11px; color: var(--muted); }
.cmt-text { margin: 4px 0 6px; word-break: break-word; }
.cmt-ops { display: flex; gap: 14px; }
.cmt-ops button {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font-size: 12px;
}
.cmt-ops button:hover { color: var(--brand); }
.cmt-like.on { color: var(--brand); }
.cmt-like i { font-style: normal; }
.cmt-replies { margin-top: 8px; padding-left: 14px; border-left: 2px solid var(--line); }
.cmt-sub { padding: 9px 0; }
.cmt-sub:last-child { border-bottom: none; }

/* 继续观看按钮（详情页） */
.btn-resume {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  background: var(--gold); color: var(--gold-ink); font-size: 13px; font-weight: 600;
}
.btn-resume:hover { filter: brightness(1.06); }

/* ===== 播放工具栏（P2 倍速/全屏/弹幕开关）===== */
.play-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 9px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.play-toolbar .pt-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.play-toolbar select {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 8px; font-size: 13px;
}
.pt-btn {
  padding: 5px 12px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--muted); cursor: pointer; font-size: 13px;
}
.pt-btn:hover { color: var(--text); border-color: var(--brand); }
.pt-btn.on { color: var(--brand); border-color: var(--brand); }
.pt-resume { margin-left: auto; font-size: 12px; color: var(--gold); }

/* 网页全屏（影院模式）：CSS 撑满视口，不依赖原生 Fullscreen API。
   退出入口 .fs-exit 必须放在 .player-box 内部（外面会被全屏一起隐藏 → 退不出来）。 */
.player-box.theater { position: fixed; inset: 0; z-index: 90; margin: 0; border-radius: 0; }
.player-box.theater video { height: 100vh; aspect-ratio: auto; }
html.fs-open, html.fs-open body { overflow: hidden; }
.fs-exit {
  display: none; position: absolute; top: 12px; right: 12px; z-index: 20;
  align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(0, 0, 0, .58); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.fs-exit:hover { background: rgba(0, 0, 0, .78); border-color: #fff; }

/* 试看结束的会员引导弹窗：视口级浮层（fixed），居中卡片。
   放播放器容器内会被 .player-box 的 overflow:hidden 裁掉按钮，故用 fixed。
   z-index 95 > 影院模式 90，全屏状态下也能盖住。不自动跳转，点击按钮或 X/遮罩关闭。 */
.vip-modal {
  position: fixed; inset: 0; z-index: 95;
  display: none; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .74);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.vip-card {
  position: relative; width: min(330px, 92%); max-height: 86vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 18px 16px; text-align: center;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .5);
}
.vip-close {
  position: absolute; top: 4px; right: 6px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%;
  color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer;
}
.vip-close:hover { background: var(--bg-soft); color: var(--text); }
.vip-icon { font-size: 32px; line-height: 1; }
.vip-title { margin: 8px 0 6px; font-size: 17px; color: var(--text-strong); }
.vip-desc { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.vip-btn {
  display: block; padding: 11px 0; border-radius: 10px; text-decoration: none;
  background: var(--brand); color: var(--on-brand); font-size: 15px; font-weight: 600;
}
.vip-btn:hover { filter: brightness(1.08); }
.vip-later {
  display: block; width: 100%; margin-top: 8px; padding: 7px;
  background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer;
}
.vip-later:hover { color: var(--text); }

/* ===== 弹幕层（M15）===== */
.dmk-layer {
  position: absolute; left: 0; right: 0; top: 0; height: 62%;
  overflow: hidden; pointer-events: none; z-index: 5;
}
.dmk {
  position: absolute; white-space: nowrap; font-size: 18px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9); will-change: transform;
}
.dmk-scroll { left: 100%; animation-name: dmk-move; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes dmk-move {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 100%)); }
}
.dmk-top, .dmk-bottom { left: 50%; transform: translateX(-50%); animation: dmk-fade 4s linear forwards; }
@keyframes dmk-fade {
  0% { opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; }
}
.dmk-send { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dmk-send input#dmkText {
  flex: 1 1 220px; min-width: 140px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit;
}
.dmk-send input#dmkText:focus { outline: none; border-color: var(--brand); }
.dmk-send select {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 8px; font-size: 13px;
}
.dmk-color { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.dmk-color input[type=color] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; }

/* ===== 继续观看（M13 首页 / 用户中心）===== */
.resume-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.resume-item { display: block; flex: 0 0 132px; width: 132px; color: inherit; text-decoration: none; }
.resume-pic { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel); aspect-ratio: 16 / 10; }
.resume-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resume-pic .ph { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 12px; }
.resume-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .25); }
.resume-bar i { display: block; height: 100%; background: var(--brand); }
.resume-title { margin-top: 6px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume-sub { font-size: 11px; color: var(--muted); }

/* ===== 图形验证码（M17）===== */
.cap-row { display: flex; align-items: center; gap: 8px; }
.cap-row > input { flex: 1 1 auto; min-width: 0; }
.cap-box {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--panel); cursor: pointer; line-height: 0; user-select: none;
}
.cap-box svg { display: block; }
.cap-box:hover { border-color: var(--brand); }

/* ===== 每日签到（M16）===== */
.signin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.signin-info { display: flex; flex-direction: column; gap: 2px; }
.ok-text { color: #3ddc97; }
.signin-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.signin-days .sd {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); font-size: 12px;
}

/* ===== 演员维度（M20 补做）===== */
.detail-actors { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 8px; }
.detail-actors .da-label { color: var(--muted); font-size: 12px; margin-right: 2px; }
.detail-actors a {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.detail-actors a:hover { border-color: var(--brand); color: var(--brand); }
.actor-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.actor-cloud a {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.actor-cloud a:hover { border-color: var(--brand); color: var(--brand); }
.actor-cloud a b { color: var(--muted); font-weight: 600; font-size: 11px; margin-left: 2px; }

/* ===== 用户评分（M20 补做）===== */
.rate-box { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rate-stars { display: inline-flex; line-height: 1; }
.rate-stars .star {
  background: none; border: 0; padding: 0 1px; cursor: pointer;
  font-size: 19px; color: var(--line); line-height: 1; transition: color .12s, transform .12s;
}
.rate-stars .star:hover { transform: scale(1.15); }
.rate-stars .star.on { color: var(--gold); }
.rate-info { font-size: 12px; color: var(--muted); }

/* ===== 站内信（M21）：会员收件箱 + 详情 =====
   列表项是**整行链接**（`a.msg-item`），热区 = 整行 —— 别再出现
   「只有标题那几个字能点、四周死空白」的老问题（见铁律 37）。 */
.msg-ops {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 13px; color: var(--muted);
}
.msg-ops form { display: inline; }
.msg-count { margin-right: auto; }
.msg-count b { color: var(--brand); font-size: 15px; }

.msg-list { display: flex; flex-direction: column; gap: 8px; }
.msg-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 62px; padding: 12px 15px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, background .15s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.msg-item:hover, .msg-item:active { border-color: var(--brand); background: var(--brand-soft); }
.msg-item:active { transform: scale(.995); }
.msg-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* 未读：左侧实心圆点 + 标题加粗；已读圆点留位但透明，保证两种行左边缘对齐 */
.msg-dot {
  flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line);
}
.msg-item.unread .msg-dot { background: var(--brand); border-color: var(--brand); }
.msg-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.msg-title {
  font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-item.unread .msg-title { color: var(--text-strong); font-weight: 600; }
.msg-meta { font-size: 12px; color: var(--muted); }
.msg-new {
  flex: 0 0 auto; font-size: 11px; line-height: 1.6; padding: 0 7px; border-radius: 9px;
  background: var(--brand); color: var(--on-brand);
}

/* 详情 */
.msg-detail {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px;
}
.msg-detail-title { margin: 0 0 8px; font-size: 18px; color: var(--text-strong); line-height: 1.45; }
.msg-detail-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.msg-tag {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand); font-size: 12px;
}
/* 正文是后台富文本，长链接/长词不能撑破移动端布局 */
.msg-detail-body { font-size: 14px; line-height: 1.85; color: var(--text-soft); word-break: break-word; }
.msg-detail-body p { margin: 0 0 10px; }
.msg-detail-body a { color: var(--brand); }
.msg-detail-body img { max-width: 100%; height: auto; }
.msg-detail-ops { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.msg-detail-ops form { display: inline; }

/* ==================================================================
   配色方案（site.palette → body.palette-<key>）
   与布局解耦：这里只覆盖颜色变量。默认色值写在 :root（= orange）。
   新增配色：加一段 body.palette-<key>，并在 site/service.js 的 PALETTES 补一行。
   选择器 body.palette-* 的优先级 (0,1,1) 高于 .theme-dark (0,1,0)，
   因此无论用哪套 layout 都能正确覆盖颜色。
   ================================================================== */
body.palette-orange {
  --brand: #ff5c38; --brand-2: #ff7d38; --brand-soft: rgba(255, 92, 56, .14);
}
body.palette-blue {
  --brand: #3b82f6; --brand-2: #2563eb; --brand-soft: rgba(59, 130, 246, .16);
}
body.palette-purple {
  --brand: #8b5cf6; --brand-2: #7c3aed; --brand-soft: rgba(139, 92, 246, .16);
}
body.palette-green {
  --brand: #10b981; --brand-2: #059669; --brand-soft: rgba(16, 185, 129, .16);
}
body.palette-gold {
  --brand: #ffb020; --brand-2: #ff8a00; --brand-soft: rgba(255, 176, 32, .16);
  --on-brand: #3b2600;
}
body.palette-rose {
  --brand: #f43f5e; --brand-2: #e11d48; --brand-soft: rgba(244, 63, 94, .16);
}
body.palette-cyan {
  --brand: #06b6d4; --brand-2: #0891b2; --brand-soft: rgba(6, 182, 212, .16);
  --on-brand: #04222b;
}
body.palette-yellow {
  --brand: #ffd400; --brand-2: #ffb800; --brand-soft: rgba(255, 212, 0, .16);
  --on-brand: #3b2c00;
}
/* 白：整站亮色底，主色取高饱和橙红（显色） */
body.palette-light {
  --bg: #f4f6f9; --bg-soft: #ffffff; --panel: #ffffff; --line: #e4e7ee;
  --text: #181b22; --text-strong: #0b0f17; --text-soft: #4b5563; --muted: #6b7280;
  --brand: #ff3d00; --brand-2: #ff6f2e; --brand-soft: rgba(255, 61, 0, .12);
  --on-brand: #ffffff;
  --gold: #f59e0b; --gold-ink: #3b2600;
  --header-bg: rgba(255, 255, 255, .92); --tabbar-bg: rgba(255, 255, 255, .97);
  --ph-text: #9aa2af; --mask: rgba(15, 23, 42, .45);
}

/* ===== 卡片美化：悬浮上浮 + 高亮描边 + 播放角标 ===== */
.vod-card .pic {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: transform .18s ease, box-shadow .18s ease, outline-color .18s ease;
  outline: 2px solid transparent;
}
.vod-card:hover .pic {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .34);
  outline-color: var(--brand);
}
.vod-card .pic::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .5), transparent 46%);
  opacity: 0; transition: opacity .18s ease;
}
.vod-card:hover .pic::after { opacity: 1; }
.vod-card .pic .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.7);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; padding-left: 3px; opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; z-index: 2;
}
.vod-card:hover .pic .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ===== 播放页：声音浮层 + 自动播放兜底 ===== */
.sound-toggle {
  position: absolute; right: 12px; top: 12px; z-index: 6;
  display: none; align-items: center; gap: 6px;
  padding: 7px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 13px;
  backdrop-filter: blur(4px);
}
.sound-toggle:hover { background: var(--brand); color: var(--on-brand); }
.autoplay-mask {
  position: absolute; inset: 0; z-index: 7; display: none;
  align-items: center; justify-content: center; cursor: pointer;
  background: rgba(0, 0, 0, .5);
}
.autoplay-mask .am-btn {
  width: 74px; height: 74px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: var(--on-brand); font-size: 30px; padding-left: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.autoplay-mask .am-tip {
  position: absolute; left: 0; right: 0; bottom: 18px; text-align: center;
  color: #fff; font-size: 13px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

/* ===== 个人中心（会员页）重做：Hero + 指标 + 双栏 ===== */
.uc-wrap { max-width: 1040px; margin: 22px auto; display: flex; flex-direction: column; gap: 16px; }

.uc-hero {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 20px 22px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), transparent 60%), var(--panel);
  border: 1px solid var(--line);
}
.uc-avatar {
  position: relative; overflow: hidden; cursor: pointer;
  width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: var(--on-brand);
}
.uc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.uc-avatar-edit {
  position: absolute; left: 0; right: 0; bottom: 0; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .52); color: #fff; font-size: 12px; line-height: 1;
}
.uc-avatar:hover .uc-avatar-edit { background: rgba(0, 0, 0, .74); }
.uc-avatar:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.uc-avatar.uploading { opacity: .5; pointer-events: none; }
.uc-avatar.uploading::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: uc-spin .8s linear infinite;
}
@keyframes uc-spin { to { transform: rotate(360deg); } }
.uc-hero-main { flex: 1 1 240px; min-width: 0; }
.uc-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uc-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.uc-hero-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.uc-coin { text-align: center; }
.uc-coin b { display: block; font-size: 24px; color: var(--gold); line-height: 1.1; }
.uc-coin span { font-size: 12px; color: var(--muted); }

.uc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.uc-stats a, .uc-stats div {
  text-align: center; padding: 14px 8px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.uc-stats a:hover { border-color: var(--brand); transform: translateY(-2px); }
.uc-stats b { display: block; font-size: 20px; }
.uc-stats span { font-size: 12px; color: var(--muted); }

.uc-body { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: start; }
.uc-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; }
.uc-nav a {
  padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--muted);
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.uc-nav a:hover { background: var(--bg-soft); color: var(--text); }
.uc-nav a.on { background: var(--brand-soft); border-color: var(--brand); color: var(--text-strong); font-weight: 600; }

/* 个人中心的站内信入口（桌面与移动端都显示；有未读时整条高亮 + 尾部数字变红） */
.uc-msg-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; margin-top: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s, background .15s;
}
.uc-msg-entry:hover, .uc-msg-entry:active { border-color: var(--brand); }
.uc-msg-entry.has-unread { border-color: var(--brand); background: var(--brand-soft); }
.uc-msg-ico {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--brand); font-size: 18px;
}
.uc-msg-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uc-msg-txt b { font-size: 14px; color: var(--text-strong); }
.uc-msg-txt span { font-size: 12px; color: var(--muted); }
.uc-msg-txt span i { font-style: normal; font-weight: 700; color: var(--brand); }
.uc-msg-go { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }

.uc-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.uc-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px;
}
.uc-card-h { margin: 0 0 14px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.uc-card-h::before { content: ""; width: 4px; height: 15px; background: var(--brand); border-radius: 2px; }
.uc-card-sec .uc-sub-block + .uc-sub-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.uc-sub-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

@media (max-width: 720px) {
  .uc-body { grid-template-columns: 1fr; }
  /* 侧栏折成横向 tab（可横滑） */
  .uc-nav {
    position: static; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 4px;
    /* 横滑但隐藏原生滚动条（否则胶囊条下方露出一条灰杠，观感很糙） */
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .uc-nav::-webkit-scrollbar { display: none; }
  .uc-nav a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: var(--bg-soft); border-color: transparent; }
  .uc-nav a.on { border-color: var(--brand); }
  .uc-stats { grid-template-columns: repeat(2, 1fr); }
  .uc-hero-cta { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* ===== 个人中心：移动端专属卡片（VIP 横幅 / 钱包 / 快捷宫格）=====
   桌面（>720px）整块隐藏，保持原双栏；≤720px 才显示，贴近原生 App 的「我的」页。 */
.uc-m { display: none; }
@media (max-width: 720px) {
  .uc-m { display: flex; flex-direction: column; gap: 12px; }

  .uc-vip-banner {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; border-radius: 14px; color: #fff;
    background: linear-gradient(120deg, #1c1f26, #3a2a12 55%, #6b4a12);
    border: 1px solid rgba(255, 176, 32, .4);
  }
  .uc-vip-txt { flex: 1 1 auto; min-width: 0; }
  .uc-vip-txt b { display: block; font-size: 16px; color: var(--gold); }
  .uc-vip-txt span { font-size: 12px; color: #d8c9a8; }
  .uc-vip-btn {
    flex: 0 0 auto; padding: 9px 14px; border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
    font-size: 13px; font-weight: 700; white-space: nowrap;
  }

  .uc-wallet {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; border-radius: 14px;
    background: var(--panel); border: 1px solid var(--line);
  }
  .uc-wallet-main { flex: 1 1 auto; min-width: 0; }
  .uc-wallet-label { font-size: 12px; color: var(--muted); }
  .uc-wallet-val { display: block; font-size: 26px; color: var(--gold); line-height: 1.1; margin-top: 2px; }
  .uc-wallet-ops { display: flex; flex-direction: column; gap: 8px; }
  .uc-op { padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; text-align: center; }
  .uc-op.recharge { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
  .uc-op.withdraw { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }

  .uc-quick {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    padding: 14px 8px; border-radius: 14px;
    background: var(--panel); border: 1px solid var(--line);
  }
  .uc-quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
  .uc-quick i {
    font-style: normal; font-size: 20px; width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; background: var(--bg-soft);
  }

  .uc-tip-card {
    position: relative; display: flex; flex-direction: column; gap: 3px;
    padding: 16px; border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-soft), transparent 70%), var(--panel);
    border: 1px solid var(--line);
  }
  .uc-tip-card b { font-size: 15px; color: var(--text-strong); }
  .uc-tip-card span { font-size: 12px; color: var(--muted); }
  .uc-tip-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 2px 8px; border-radius: 999px; font-size: 11px;
    background: var(--brand); color: var(--on-brand);
  }
}


