/* 黑果漫剧 - 前台设计系统 V3（对标 ReelShort：Coral Red × Bold Sans）
   近黑底 #0a0a0e | 珊瑚红 #ff2e55 -> 橙 #ff7a3d | 粗黑无衬线标题 | 竖屏海报货架
   铁律：类名与 CSS 变量契约不变（player JS / 主题切换 / 测试断言依赖） */

:root {
  --bg: #020203;
  --panel: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f5f7;
  --muted: #a3a3b2;
  --grad: linear-gradient(135deg, #ff2e55, #ff7a3d);
  --success: #22c55e;
  --success-soft-bg: rgba(34, 197, 94, 0.14);
  --success-soft-text: #4ade80;
  --radius: 14px;
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  /* 主题可切换变量（themes/<key>.css 覆盖）：midnight-reel 默认值 */
  --nav-bg: rgba(2, 2, 3, 0.82);
  --overlay-bg: rgba(2, 2, 3, 0.95);
  --ghost-bg: rgba(255, 255, 255, 0.045);
  --chip-bg: rgba(255, 255, 255, 0.06);
  --track: rgba(255, 255, 255, 0.12);
  --hero-bg: radial-gradient(700px 320px at 15% 0%, rgba(255, 46, 85, 0.14), transparent 65%),
    radial-gradient(700px 320px at 85% 0%, rgba(255, 122, 61, 0.10), transparent 65%);
  --accent: #ff2e55;
  --accent-2: #ff7a3d;
  --accent-soft-bg: rgba(255, 46, 85, 0.18);
  --accent-soft-bg-2: rgba(255, 46, 85, 0.12);
  --accent-soft-text: #ffb3c2;
  --link-color: #ff8ba0;
  --warn-bg: rgba(255, 46, 85, 0.08);
  --warn-border: rgba(255, 46, 85, 0.35);
  --warn-text: #ffb3c2;
  --error-text: #ff8ba0;
  --input-bg: rgba(255, 255, 255, 0.05);
  --glow: 0 8px 30px rgba(255, 46, 85, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.022em; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(255, 46, 85, 0.4); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: 12px;
  font-weight: 600; font-size: 0.94rem; letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 12px 40px rgba(255, 46, 85, 0.5); }
.btn-ghost {
  border-color: var(--border-strong); color: var(--text);
  background: var(--ghost-bg); backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--text); }
.btn-play { background: #fff; color: #020203; }
.btn-play:hover { background: #f2f2f5; }
.btn-lg { padding: 14px 34px; font-size: 1.08rem; border-radius: 999px; }

/* ---- Nav（玻璃拟态）---- */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 15px 28px;
  display: flex; align-items: center; gap: 30px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--muted); font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s ease; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-signin {
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 7px 18px; color: var(--text);
}
.nav-links a.nav-signin:hover { border-color: var(--text); }
/* 已登录：顶栏显示用户名（邮箱 @ 前缀），品牌色高亮 */
.nav-links a.nav-user {
  border-color: var(--accent); color: var(--accent); font-weight: 600;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-links a.nav-user:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ---- Page shell ---- */
.page { min-height: 70vh; }

/* ---- Billboard Hero（ReelShort 式：左文案右竖海报；5 剧轮播）---- */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg), var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-slide { position: relative; display: none; }
.hero-slide.active { display: block; animation: hero-fade-in 0.6s ease; }
@keyframes hero-fade-in { from { opacity: 0; } to { opacity: 1; } }
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3;
  display: flex; justify-content: center; gap: 10px;
}
.hero-dot {
  width: 26px; height: 4px; border-radius: 999px;
  border: none; cursor: pointer; padding: 0;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.25s ease, width 0.25s ease;
}
.hero-dot.active { background: var(--accent); width: 38px; }
.hero-art {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
  transform: scale(1.04); opacity: 0.35;
}
.hero-art-ph {
  background:
    radial-gradient(900px 420px at 78% 18%, rgba(255, 46, 85, 0.35), transparent 60%),
    radial-gradient(700px 380px at 90% 85%, rgba(255, 122, 61, 0.22), transparent 60%),
    radial-gradient(520px 300px at 55% 45%, rgba(59, 130, 246, 0.14), transparent 65%),
    linear-gradient(160deg, #170b10 0%, #070406 60%, #020203 100%);
}
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(2, 2, 3, 0.92) 0%, rgba(2, 2, 3, 0.55) 55%, transparent 85%);
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
  padding: 90px 28px 84px;
  display: flex; align-items: center; gap: 56px;
}
.hero-copy { flex: 1; min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 16px;
}
.hero-badge::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; font-weight: 900;
  letter-spacing: -0.03em;
  max-width: 620px; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 4px 0;
  color: var(--muted); font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.01em;
  margin: 18px 0 0;
}
.hero-tags .tag-sep { margin: 0 12px; color: var(--border-strong); }
.hero-desc {
  color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 540px;
  margin: 16px 0 30px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
/* 右侧竖海报（ReelShort 标志性 9:16 大卡） */
.hero-poster {
  position: relative; flex-shrink: 0;
  width: 300px; aspect-ratio: 2 / 3; border-radius: 20px;
  background-size: cover; background-position: center;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 0 6px rgba(255, 46, 85, 0.08);
  transform: rotate(1.5deg);
}
.hero-poster-ph {
  background:
    radial-gradient(160px 110px at 70% 25%, rgba(255, 46, 85, 0.55), transparent),
    linear-gradient(160deg, #2a1020, #120a14);
}
.hero-poster-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--grad); color: #fff;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  box-shadow: var(--glow);
}
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(0deg, var(--bg), transparent); z-index: 1; }

/* ---- Section head ---- */
.trending, .latest-wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.trending { padding-top: 46px; }
.latest-wrap { padding-bottom: 40px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 22px; }
.section-title { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.02em; }
.view-all {
  margin-left: auto; color: var(--muted); font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.01em; transition: color 0.15s ease;
}
.view-all:hover { color: var(--text); }

/* ---- Poster wall（方案B 竖屏海报墙）---- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 20px;
}
.poster-card { display: flex; flex-direction: column; gap: 9px; }
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 16px;
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 52%);
}
.poster-card:hover .poster {
  transform: translateY(-6px); border-color: var(--border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 46, 85, 0.3);
}
.poster-real { background-size: cover; background-position: center; }
/* 渐变占位海报（无 cover_url 时）：霓虹光斑质感 */
.ph-1 { background: radial-gradient(110px 70px at 70% 25%, rgba(255, 46, 136, 0.55), transparent), linear-gradient(160deg, #2a1230, #120a18); }
.ph-2 { background: radial-gradient(110px 70px at 30% 30%, rgba(168, 85, 247, 0.55), transparent), linear-gradient(160deg, #1d1030, #0f0a1c); }
.ph-3 { background: radial-gradient(110px 70px at 60% 70%, rgba(59, 130, 246, 0.5), transparent), linear-gradient(160deg, #0f1a30, #0a0f1c); }
.ph-4 { background: radial-gradient(110px 70px at 40% 25%, rgba(16, 185, 129, 0.45), transparent), linear-gradient(160deg, #0c2620, #081512); }
.ph-5 { background: radial-gradient(110px 70px at 70% 60%, rgba(234, 179, 8, 0.45), transparent), linear-gradient(160deg, #2d2210, #161009); }
.ph-6 { background: radial-gradient(110px 70px at 35% 65%, rgba(244, 63, 94, 0.5), transparent), linear-gradient(160deg, #2c0f18, #160a0e); }
.poster-title {
  position: absolute; left: 13px; right: 13px; bottom: 13px; z-index: 2;
  font-weight: 600; font-size: 0.95rem; line-height: 1.35; letter-spacing: -0.005em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 10px; border-radius: 999px; font-size: 0.7rem;
  font-weight: 800; letter-spacing: 0.05em;
}
.badge-free { background: var(--success); color: #052e13; }
.badge-locked {
  background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.85); backdrop-filter: blur(4px);
}
.poster-meta { color: var(--muted); font-size: 0.82rem; }


/* ---- ReelShort 式货架（横向滑动）+ TOP10 排名 ---- */
.shelf {
  display: flex; gap: 18px;
  overflow-x: auto; padding: 6px 2px 18px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf .poster-card { width: 172px; flex-shrink: 0; scroll-snap-align: start; }

/* 首页货架固定显 6 个（2026-11-08 二次钦定：去掉「更多」按钮，看全部走顶部「查看全部」链接） */
@media (min-width: 821px) {
  .trending .shelf, .latest-wrap .shelf { flex-wrap: wrap; overflow: visible; }
  .trending .shelf .poster-card:nth-child(n+7),
  .latest-wrap .shelf .poster-card:nth-child(n+7) { display: none; }
}
.rank-wrap { position: relative; }
.rank-num {
  position: absolute; left: -10px; top: -14px; z-index: 3;
  font-size: 4.2rem; font-weight: 900; line-height: 1;
  color: var(--text); font-style: italic;
  text-shadow: 0 0 1px rgba(255, 46, 85, 0.9), 3px 3px 0 rgba(255, 46, 85, 0.85);
  pointer-events: none;
}
/* 卡片标题外置（ReelShort：标题在海报下方） */
.card-name {
  display: block; margin-top: 4px;
  font-weight: 600; font-size: 0.92rem; line-height: 1.4;
  letter-spacing: -0.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-meta { color: var(--muted); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.01em; }
.card-meta .tag-sep { margin: 0 8px; color: var(--border-strong); }
.badge-hot { background: var(--grad); color: #fff; box-shadow: var(--glow); }

/* ---- VIP 转化横幅（方案B 玻璃渐变卡）---- */
.vip-strip {
  max-width: 1200px; margin: 46px auto 10px; padding: 0 28px;
}
.vip-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 30px 34px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 46, 85, 0.14), rgba(255, 122, 61, 0.10));
  border: 1px solid rgba(255, 46, 85, 0.32);
  backdrop-filter: blur(8px);
}
.vip-card::before {
  content: ""; position: absolute; top: -60px; right: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 46, 85, 0.35), transparent 70%);
  filter: blur(30px);
}
.vip-title { font-size: 1.4rem; }
.vip-note { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.vip-card .btn { position: relative; }

/* ---- Promo（转化落地页）---- */
/* column：promo-inner 主卡与 promo-eps 剧集列表是兄弟节点，必须纵向堆叠，
   行向 flex 会在窄视口把它们排成两栏导致横向溢出 */
.promo { display: flex; flex-direction: column; align-items: center; padding: 64px 24px 80px; }
.promo-inner {
  display: flex; gap: 40px; align-items: center; flex-wrap: wrap;
  max-width: 880px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 22px; padding: 44px;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.promo-cover {
  width: 240px; aspect-ratio: 2 / 3; border-radius: 16px;
  background-size: cover; background-position: center;
  border: 1px solid var(--border); flex-shrink: 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}
.promo-cover-ph { background: linear-gradient(160deg, #2a1020, #ff2e55 140%); }
.promo-body { flex: 1; min-width: 260px; }
.promo-title { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 12px; }
.promo-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.promo-meta-free {
  font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px;
  background: var(--grad); color: #fff; box-shadow: var(--glow);
}
.promo-meta-total { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.promo-meta-cat {
  color: var(--muted); font-size: 12.5px; padding: 3px 10px; border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--border);
}
.promo-intro { margin-bottom: 22px; }
.promo-intro-title { font-size: 0.95rem; color: var(--muted); font-weight: 700; margin-bottom: 8px; letter-spacing: 0.02em; }
.promo-intro-text {
  color: var(--text); opacity: 0.88; font-size: 15px; line-height: 1.75; white-space: pre-line;
}
.promo-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.promo-cta { flex: 1; min-width: 180px; max-width: 320px; padding: 15px 26px; font-size: 1.05rem; }
.promo-cta-alt {
  flex: 1; min-width: 180px; max-width: 320px; padding: 15px 26px; font-size: 1.05rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.promo-note { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }

/* ---- Legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { font-size: 2.1rem; margin-bottom: 6px; }
.legal-updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 32px; }
.legal h2 { font-size: 1.25rem; margin: 32px 0 10px; }
.legal p { color: var(--text); margin-bottom: 14px; }
.legal code {
  background: var(--ghost-bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; font-size: 0.88em;
}
.legal strong { color: var(--text); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(0deg, rgba(255, 46, 85, 0.04), transparent 60%);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 30px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 22px; align-items: center; }
.footer-links a { color: var(--muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--text); }
.footer-loc {
  color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
  margin-left: 6px;
}
.footer-loc:hover { color: var(--text); border-color: var(--border-strong); }
.footer-copy { color: var(--muted); font-size: 0.85rem; }

/* ---- Mobile ---- */
/* 2026-11-04 移动端体检修复：删除老的 .nav-links{display:none}（640px）——
   它与 820px 断点的「保留登录药丸」规则打架，导致 iPhone/安卓整条导航消失 */
@media (max-width: 640px) {
  .hero-inner { flex-direction: column-reverse; padding: 40px 20px 44px; gap: 24px; text-align: center; }
  .hero-badge { justify-content: center; }
  .hero-title, .hero-desc { max-width: none; }
  .hero-actions { justify-content: center; }
  .hero-poster { width: 190px; }
  .hero-tags { justify-content: center; }
  .promo-inner { padding: 24px; justify-content: center; text-align: center; }
  .promo-cta { margin: 0 auto; }
  .footer-inner { flex-direction: column; text-align: center; }
  .vip-card { padding: 24px 22px; }
}

/* ==== browse / search / drama detail ==== */
.listing { max-width: 1200px; margin: 0 auto; padding: 40px 28px 64px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 28px; }
.chip {
  padding: 7px 17px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--chip-bg); color: var(--muted);
  font-size: 0.88rem; font-weight: 600;
  backdrop-filter: blur(6px);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; margin-top: 36px;
}
.pagination a, .pagination span {
  color: var(--muted); padding: 8px 16px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 0.9rem;
}
.pagination a:hover { color: var(--text); border-color: var(--border-strong); }
.search-form { display: flex; gap: 10px; max-width: 560px; margin: 18px 0 30px; }
.search-form input {
  flex: 1; padding: 12px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--input-bg); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
}
.search-form input:focus { outline: none; border-color: var(--accent); }
.empty-state {
  text-align: center; color: var(--muted); padding: 56px 24px;
  border: 1px dashed var(--border); border-radius: 20px;
}

/* ---- Drama detail ---- */
.drama-hero {
  position: relative; overflow: hidden;
  padding: 48px 28px 40px;
}
.drama-hero-inner {
  position: relative; z-index: 1;
  display: flex; gap: 40px; align-items: center; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto; width: 100%;
}
.drama-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(800px 340px at 80% 0%, rgba(255, 46, 85, 0.18), transparent 62%),
    radial-gradient(600px 300px at 12% 10%, rgba(255, 122, 61, 0.12), transparent 62%),
    linear-gradient(0deg, var(--bg) 4%, transparent 55%);
}
.drama-cover {
  position: relative; z-index: 1;
  width: 230px; aspect-ratio: 2 / 3; border-radius: 18px; flex-shrink: 0;
  background-size: cover; background-position: center;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.6);
}
.drama-cover-ph { background: linear-gradient(160deg, #2a1020, #ff2e55 140%); }
.drama-info { position: relative; z-index: 1; flex: 1; min-width: 280px; }
.drama-below { position: relative; z-index: 1; flex: 1 1 100%; } /* 简介+按钮：桌面全宽沉底 */
.drama-title { font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 900; letter-spacing: -0.025em; margin-bottom: 14px; }
.drama-cats { margin: 0 0 16px; }
.drama-desc { color: var(--muted); line-height: 1.7; max-width: 640px; margin-bottom: 26px; }
.drama-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.drama-episodes { max-width: 1200px; margin: 0 auto; padding: 22px 28px 48px; }
.drama-episodes .section-head { margin-top: 0; }

/* ---- Episode list ---- */
.ep-list { list-style: none; display: grid; gap: 10px; }
.ep-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-radius: 13px;
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ep-item:hover { border-color: var(--border-strong); transform: translateX(3px); }
.ep-item.current { border-color: var(--accent-2); }
.ep-seq { color: var(--muted); font-weight: 800; min-width: 46px; font-size: 0.88rem; }
.ep-name { flex: 1; }
.ep-state {
  padding: 3px 10px; border-radius: 999px; flex-shrink: 0;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em;
}
.ep-free { background: var(--success); color: #052e13; }
.ep-owned { background: var(--accent-soft-bg); border: 1px solid var(--accent); color: var(--accent-soft-text); }
.ep-preview { background: var(--accent-soft-bg-2); border: 1px solid var(--accent); color: var(--accent-soft-text); }
.ep-locked { background: var(--chip-bg); border: 1px solid var(--border-strong); color: var(--muted); }

/* 简介展开按钮：桌面不截断不显示，仅移动端由 JS 按需点亮 */
.drama-desc-toggle {
  display: none; width: 100%; margin: 6px 0 0; padding: 2px 0;
  background: none; border: none; text-align: center;
  color: var(--accent); font-size: 0.82rem; font-weight: 800; cursor: pointer;
}

/* 桌面端集数列表改网格（2026-11-10 候选方案B：海报卡片） */
.ep-thumb { display: none; }
@media (min-width: 821px) {
  .ep-list {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
  }
  .ep-item {
    flex-direction: column; align-items: stretch;
    gap: 8px; padding: 0 0 10px; overflow: hidden;
  }
  .ep-thumb {
    display: block; width: 100%; aspect-ratio: 2 / 3;
    background-size: cover; background-position: center;
  }
  .ep-item:hover { transform: translateY(-2px); border-color: var(--accent); }
  .ep-seq { min-width: 0; padding: 0 10px; font-size: 0.9rem; }
  .ep-name { display: none; }
  .ep-state { margin: 0 10px; align-self: flex-start; }
}

/* ---- Subscribe strip ---- */
.sub-strip {
  max-width: 1200px; margin: 0 auto 64px; padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  backdrop-filter: blur(8px);
}
.sub-strip-text { font-weight: 700; font-size: 1.05rem; }
.sub-strip-note { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

/* ==== player ==== */
.player-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 18px;
  background: var(--overlay-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.player-back { color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.player-back:hover { color: var(--text); }
.player-topbar-title {
  flex: 1; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.player-page { background: #000; }

/* 横屏：常规 16:9 + 右侧选集 */
.player-horizontal .player-layout { display: flex; }
.player-horizontal .video-shell {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 53px); background: #000;
}
.player-horizontal .main-video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
/* 右侧面板（横竖屏通用）：剧信息（右上方）+ 播放列表 */
.ep-panel {
  width: 320px; flex-shrink: 0;
  max-height: calc(100vh - 53px); overflow-y: auto;
  padding: 14px; background: var(--bg);
  border-left: 1px solid var(--border);
}
.ep-panel-title { font-size: 0.88rem; margin: 14px 0 10px; }
.watch-side .watch-info-head {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 0; background: none; border: none; border-radius: 0;
}
.watch-side .watch-info-cover {
  width: 56px; aspect-ratio: 2 / 3; border-radius: 7px; flex-shrink: 0;
  background-size: cover; background-position: center;
  border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.watch-info-cover-ph { background: linear-gradient(160deg, #2a1020, #ff2e55 140%); }
.watch-side .watch-info-meta { flex: 1; min-width: 0; }
.watch-side .watch-info-title {
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 800;
  letter-spacing: -0.01em; margin: 0 0 7px; line-height: 1.35;
}
.watch-side .watch-info-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.watch-info-tag {
  font-size: 10.5px; color: var(--muted); padding: 2px 7px;
  background: var(--chip-bg); border: 1px solid var(--border); border-radius: 999px;
}
.watch-info-tag-count { font-weight: 700; color: var(--text); }
.watch-side .watch-info-desc {
  color: var(--text); opacity: 0.8; font-size: 12px; line-height: 1.65;
  white-space: pre-line; margin: 10px 0 0;
  max-height: 132px; overflow-y: auto;
}
/* 面板内选集列表：紧凑版（区别于详情页大行距） */
.watch-side .ep-list { grid-template-columns: 1fr; gap: 5px; }
.watch-side .ep-item {
  padding: 8px 10px; border-radius: 9px; gap: 8px;
  font-size: 0.82rem;
}
.watch-side .ep-item:hover { transform: none; }
.watch-side .ep-seq { min-width: 34px; font-size: 0.78rem; }
.watch-side .ep-name {
  font-size: 0.8rem; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 竖屏：全屏 9:16 + 悬浮上下集 + 右侧剧信息面板 */
.player-vertical .player-layout {
  position: relative; display: flex; justify-content: center;
  align-items: flex-start;
}
.player-vertical .video-shell {
  position: relative; width: 100%;
  max-width: min(100vw, calc((100vh - 53px) * 9 / 16));
}
.player-vertical .main-video {
  width: 100%; aspect-ratio: 9 / 16;
  max-height: calc(100vh - 53px); background: #000;
}
.vertical-nav {
  position: fixed; right: 14px; bottom: 90px; z-index: 25;
  display: flex; flex-direction: column; gap: 12px;
}
.vnav-btn {
  padding: 12px 18px; border-radius: 999px; text-align: center;
  background: var(--chip-bg); border: 1px solid var(--border-strong);
  color: var(--text); font-weight: 700; font-size: 0.9rem;
  backdrop-filter: blur(8px);
}
.vnav-btn:hover { border-color: var(--accent-2); }

/* 广告与试看覆盖层 */
.ad-badge {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.65); color: var(--muted);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
}
.ad-skip {
  position: absolute; top: 12px; right: 12px; z-index: 6; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(240, 240, 246, 0.4);
  background: rgba(0, 0, 0, 0.65); color: var(--text); font-size: 0.82rem;
}
/* 连播被浏览器静音兜底时的「点此恢复声音」提示 */
.unmute-hint {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%);
  z-index: 7; cursor: pointer; white-space: nowrap;
  padding: 9px 18px; border-radius: 999px; border: none;
  background: rgba(0, 0, 0, 0.78); color: var(--text);
  font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.gate-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay-bg);
}
.gate-card { text-align: center; padding: 32px; max-width: 380px; }
.gate-title { font-size: 1.6rem; margin-bottom: 10px; }
.gate-text { color: var(--muted); margin-bottom: 22px; }
.gate-note { color: var(--muted); font-size: 0.85rem; margin-top: 12px; }
.hidden { display: none !important; }

/* 锁定层 */
.lock-layer {
  display: flex; gap: 36px; align-items: center; flex-wrap: wrap;
  max-width: 880px; margin: 0 auto; padding: 56px 24px;
}
.lock-cover {
  width: 220px; aspect-ratio: 2 / 3; border-radius: 16px; flex-shrink: 0;
  background-size: cover; background-position: center;
  border: 1px solid var(--border-strong); box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
}
.lock-cover-ph { background: linear-gradient(160deg, #2a1020, #ff2e55 140%); }
.lock-body { flex: 1; min-width: 260px; }
.lock-ep { color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.lock-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }
.lock-text { color: var(--muted); margin-bottom: 24px; }
.lock-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.lock-note { color: var(--muted); font-size: 0.88rem; margin-top: 14px; }

/* ---- 桌面端播放页 B 站式两栏 + 操作栏（2026-10-29 钦定，≤820px 全部还原手机沉浸式）---- */
@media (min-width: 821px) {
  .player-horizontal .player-layout,
  .player-vertical .player-layout { height: calc(100vh - 53px); justify-content: flex-start; }
  /* 竖屏基样式的 flex-start 会阻断高度链（左列撑不到布局高，操作栏被顶出屏） */
  .player-vertical .player-layout { align-items: stretch; }
  .watch-left {
    flex: 1; min-width: 0; min-height: 0;
    display: flex; flex-direction: column;
  }
  /* 播放器：高度吃满剩余空间，宽度按比例自适应——不再撑爆全屏 */
  .player-horizontal .video-shell,
  .player-vertical .video-shell { flex: 1; min-height: 0; width: 100%; max-width: none; }
  .player-horizontal .main-video {
    width: auto; height: 100%; max-width: 100%;
    display: block; margin: 0 auto;
  }
  .player-vertical .main-video {
    width: auto; height: 100%; max-width: 100%;
    display: block; margin: 0 auto;
  }
  /* 桌面竖屏：悬浮上下集按钮退场（选集面板接管） */
  .vertical-nav { display: none; }

  /* 操作栏：视频下方（剧名 + 播放量 + 点赞/收藏/转发） */
  .watch-actionbar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 18px;
    background: var(--bg); border-top: 1px solid var(--border);
  }
  .watch-ab-meta { flex: 1; min-width: 0; }
  .watch-ab-title {
    font-family: var(--font-display); font-size: 1rem; font-weight: 800;
    letter-spacing: -0.01em; margin: 0 0 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .watch-ab-stats { color: var(--muted); font-size: 0.78rem; margin: 0; }
  .watch-ab-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .ab-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 15px; border-radius: 999px; cursor: pointer;
    background: var(--chip-bg); border: 1px solid var(--border);
    color: var(--text); font-size: 0.82rem; font-weight: 700;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
  }
  .ab-btn svg { display: block; }
  .ab-btn:hover { border-color: var(--accent-2); }
  .ab-btn.active { color: var(--accent); background: var(--chip-bg); border-color: var(--accent); }
  .ab-btn:disabled { opacity: 0.6; cursor: wait; }
  /* 转发「已复制」提示 */
  .ab-toast {
    position: fixed; left: 50%; bottom: 8%; transform: translateX(-50%) translateY(8px);
    z-index: 60; padding: 10px 20px; border-radius: 999px;
    background: rgba(0, 0, 0, 0.85); color: #fff; font-size: 0.85rem; font-weight: 600;
    opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none;
  }
  .ab-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Mobile（detail / player）---- */
@media (max-width: 640px) {
  .drama-hero { padding: 32px 20px 24px; }
  .drama-hero-inner { gap: 22px; align-items: flex-start; }
  .drama-cover { width: 150px; }
  .drama-episodes { padding: 18px 20px 40px; }
  .lock-layer { justify-content: center; text-align: center; }
  .lock-actions { justify-content: center; }
}

/* ---- 播放页移动端优化：面板下移全宽 + 顶栏紧凑 + 选集双列 ---- */
@media (max-width: 820px) {
  .player-horizontal .player-layout,
  .player-vertical .player-layout { flex-direction: column; }
  /* 手机端保持原有沉浸式，不显示桌面操作栏 */
  .watch-actionbar { display: none; }
  /* 横屏播放器容器不再撑满一屏（桌面端陪右侧面板才需要 100vh，手机纵向堆叠后只抱紧视频） */
  .player-horizontal .video-shell { min-height: 0; }
  .player-horizontal .main-video { width: 100%; height: auto; }
  .player-horizontal .ep-panel,
  .player-vertical .ep-panel {
    width: 100%; max-height: none;
    border-left: none; border-top: 1px solid var(--border);
    padding: 12px;
  }
  /* 顶栏紧凑 */
  .player-topbar { padding: 8px 12px; gap: 10px; }
  .player-topbar-title { font-size: 0.88rem; }
  .player-topbar .btn { padding: 6px 12px; font-size: 0.82rem; }
  /* 选集四列横排，紧凑不拉长；副标题（Episode N 与第N集重复）手机端不显示 */
  .watch-side .ep-list { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .watch-side .ep-item { padding: 9px 6px; justify-content: center; }
  .watch-side .ep-name { display: none; }
  /* 悬浮上下集按钮在非全屏播放器上会压住选集列表，手机端隐藏（列表本身即可选集） */
  .vertical-nav { display: none; }
  /* 播放器收敛：竖屏不再全屏铺满，60vh 高度居中，选集列表进屏可见 */
  .player-vertical .video-shell { display: flex; justify-content: center; background: #000; }
  .player-vertical .main-video { width: auto; height: 60vh; max-width: 100%; }
  /* 简介折叠为紧凑高度 */
  .watch-side .watch-info-desc { max-height: 96px; font-size: 12px; }
  /* 竖屏悬浮上下集按钮避开底部安全区 */
  .vertical-nav { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Library（收藏 / 追更 / 继续观看）---- */
.library { max-width: 1200px; margin: 0 auto; padding: 40px 28px 72px; }
.library .section-head { margin-top: 36px; }
.library .section-head:first-child { margin-top: 0; }
.library-empty { color: var(--muted); padding: 12px 0 8px; }
.poster-sub {
  position: absolute; left: 11px; bottom: 11px; z-index: 2;
  color: var(--text); font-size: 0.8rem; font-weight: 700;
}
.progress-track {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: block; height: 5px; background: var(--track);
}
.progress-fill { display: block; height: 100%; background: var(--accent-2); }

/* ===== 订阅页 / 登录页 / 账户页（玻璃卡片）===== */
.sub-wrap, .auth-wrap { max-width: 460px; margin: 40px auto 72px; padding: 0 16px; }
.sub-title, .auth-wrap .sub-title { font-size: 30px; color: var(--text); text-align: center; margin: 0 0 8px; }
.sub-subtitle { color: var(--muted); text-align: center; margin: 0 0 24px; }
.sub-card, .auth-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px 26px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}
.sub-badge {
  display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--grad); border-radius: 999px; padding: 4px 14px; margin-bottom: 16px;
  box-shadow: var(--glow);
}
.sub-price-row { display: flex; align-items: baseline; gap: 10px; }
.sub-price {
  font-size: 46px; font-weight: 800; color: var(--text);
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sub-price-note { color: var(--muted); font-size: 14px; }
.sub-then { color: var(--muted); margin: 4px 0 18px; }
.sub-features { list-style: none; margin: 0 0 22px; padding: 0; }
.sub-features li { color: var(--text); padding: 8px 0 8px 26px; position: relative; border-bottom: 1px solid var(--border); }
.sub-features li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.sub-cta, .auth-submit, .acct-portal { width: 100%; text-align: center; }
.sub-fineprint { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.sub-unconfigured { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); border-radius: 10px; padding: 12px 14px; font-size: 14px; text-align: center; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; background: transparent; border: 1px solid var(--border);
  color: var(--muted); border-radius: 10px; padding: 10px 0;
  cursor: pointer; font-size: 14px; font-weight: 600;
}
.auth-tab.active { background: var(--chip-bg); color: var(--text); border-color: var(--border-strong); }
.field-label { display: block; color: var(--muted); font-size: 13px; margin: 12px 0 6px; }
.field-input {
  width: 100%; box-sizing: border-box;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); padding: 12px 13px; font-size: 15px;
}
.field-input:focus { outline: none; border-color: var(--accent); }
.auth-submit { margin-top: 20px; }
.auth-switch { color: var(--muted); font-size: 13px; margin-top: 14px; }
.auth-switch a, .acct-email + .acct-status-row + .acct-meta + p a { color: var(--link-color); }
.auth-error { color: var(--error-text); font-size: 14px; margin-top: 12px; }
.hidden { display: none; }
.acct-email { color: var(--text); font-size: 16px; margin: 0 0 16px; }
.acct-status-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.acct-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--chip-bg); color: var(--muted); font-size: 13px; }
.acct-badge-active { background: var(--success-soft-bg); color: var(--success-soft-text); }
.acct-meta { color: var(--muted); font-size: 14px; margin: 6px 0; }
.acct-portal { margin-top: 16px; }
.acct-cancel { margin-top: 12px; width: 100%; text-align: center; color: var(--error-text, #e5484d); border-color: var(--error-text, #e5484d); }
.acct-cancel:hover { background: rgba(229, 72, 77, 0.08); }
.acct-cancel:disabled { opacity: 0.5; cursor: wait; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }

/* ---- 浏览页二级分类行 ---- */
.chip-row-sub { margin-top: -18px; }
.chip-row-sub .chip { font-size: 0.85rem; }

/* ---- 详情页标签行链接 ---- */
.drama-cats a { color: var(--muted); transition: color 0.15s ease; }
.drama-cats a:hover { color: var(--text); }

/* ===== 会员中心（侧栏 + 分区框架）===== */
.acct-wrap {
  max-width: 1020px; margin: 32px auto 72px; padding: 0 16px;
  display: grid; grid-template-columns: 236px 1fr; gap: 22px; align-items: start;
}
.acct-side {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 24px 16px 18px;
  position: sticky; top: 88px;
}
.acct-avatar {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 22px; box-shadow: var(--glow);
}
.acct-user-email {
  text-align: center; color: var(--text); font-weight: 600; font-size: 14px;
  word-break: break-all; margin: 0 0 10px;
}
.acct-side .acct-badge { display: block; text-align: center; }
.acct-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
.acct-nav button {
  text-align: left; padding: 11px 14px; border-radius: 10px;
  background: transparent; border: none; color: var(--muted);
  font-size: 14.5px; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.acct-nav button:hover { color: var(--text); background: var(--chip-bg); }
.acct-nav button.active { background: var(--accent-soft-bg); color: var(--text); }
.acct-signout {
  display: block; margin-top: 16px; padding: 11px 14px;
  color: var(--link-color); font-size: 14px; font-weight: 600;
  border-top: 1px solid var(--border);
}
.acct-main { min-width: 0; }
.acct-panel { display: none; flex-direction: column; gap: 16px; }
.acct-panel.active { display: flex; }
.acct-panel h2 {
  font-family: var(--font-display); font-size: 21px; font-weight: 800;
  color: var(--text); letter-spacing: -0.02em; margin: 0;
}
.acct-h2-2nd { margin-top: 10px; }
.acct-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px;
}
.acct-card h2 { margin-bottom: 14px; }
.acct-card .field-label { margin-top: 0; }
.acct-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.acct-stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px;
}
.acct-stat b {
  display: block; font-size: 26px; font-weight: 800; color: var(--text);
  font-family: var(--font-display); letter-spacing: -0.02em;
}
.acct-stat span { color: var(--muted); font-size: 13px; }
.acct-kv {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.acct-kv:last-child { border-bottom: none; }
.acct-kv span { color: var(--muted); }
.acct-kv b { color: var(--text); font-weight: 600; }
.acct-hist { display: flex; flex-direction: column; gap: 10px; }
.acct-hist-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 13px 16px;
  transition: border-color 0.15s ease;
}
.acct-hist-row:hover { border-color: var(--border-strong); }
.acct-hist-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.acct-hist-title { color: var(--text); font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-hist-ep { color: var(--muted); font-size: 13px; }
.acct-bar { display: block; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.acct-bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.acct-hist-play { color: var(--link-color); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.acct-more { margin: 6px 0 0; }
.acct-more a { color: var(--link-color); font-size: 14px; font-weight: 600; }
.acct-table-wrap { overflow-x: auto; padding: 8px 16px 14px; }
.acct-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.acct-table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.acct-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.acct-table tr:last-child td { border-bottom: none; }
.acct-td-muted { color: var(--muted); font-size: 13px; }
.acct-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--chip-bg); color: var(--muted);
}
.acct-pill-paid { background: var(--success-soft-bg); color: var(--success-soft-text); }
.acct-pill-failed { background: var(--warn-bg); color: var(--warn-text); }
.acct-pill-refunded { background: var(--chip-bg); color: var(--muted); }
.acct-pill-pending { background: var(--accent-soft-bg-2); color: var(--accent-soft-text); }
.acct-h3 { color: var(--text); font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.acct-note { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.acct-pw-save { margin-top: 18px; width: 100%; text-align: center; }
.acct-ok { color: var(--success-soft-text); font-size: 14px; margin-top: 12px; }
@media (max-width: 820px) {
  .acct-wrap { grid-template-columns: 1fr; }
  .acct-side { position: static; }
  .acct-nav { flex-direction: row; flex-wrap: wrap; }
  .acct-nav button { padding: 9px 12px; font-size: 13.5px; }
  .acct-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 落地页播放列表（免费集直接播） ---- */
.promo-eps { max-width: 760px; margin: 34px auto 0; padding: 0 16px; }
.promo-eps-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  color: var(--text); letter-spacing: -0.02em; margin: 0 0 14px;
}
.promo-ep-grid { display: flex; flex-direction: column; gap: 8px; }
.promo-ep {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.promo-ep:hover { border-color: var(--border-strong); background: var(--chip-bg); }
.promo-ep-num { color: var(--muted); font-weight: 800; font-size: 13px; min-width: 44px; flex-shrink: 0; }
.promo-ep-name {
  color: var(--text); font-size: 14.5px; font-weight: 600;
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.promo-ep-dur { color: var(--muted); font-size: 12.5px; flex-shrink: 0; }
.promo-ep-tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.promo-ep-free { border-color: rgba(255, 46, 85, 0.45); }
.promo-ep-free .promo-ep-tag { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.promo-ep-preview .promo-ep-tag { background: var(--chip-bg); color: var(--text); }
.promo-ep-lock { opacity: 0.62; }
.promo-ep-lock .promo-ep-tag { background: var(--chip-bg); color: var(--muted); }
.promo-eps-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }


/* ===== 移动端全面适配打磨（2026-10-26 批复：页面自适应问题）===== */
@media (max-width: 820px) {
  /* 导航（2026-11-04 体检修复）：保留 首页/浏览 短链 + 登录/会员药丸 + 订阅按钮；
     手机用户不再「只能看 logo」 */
  .nav-inner { padding: 12px 16px; gap: 12px; }
  .nav-links { gap: 12px; flex-shrink: 1; overflow: hidden; }
  .nav-links a:not(.nav-signin) { display: none; }
  .nav-links a[href="/"] { display: inline-block; }
  .nav-links a[href="/browse"] { display: inline-block; }
  .nav-links a { font-size: 0.86rem; }
  .nav-links a.nav-signin { display: inline-block; padding: 6px 13px; font-size: 0.82rem; }
  .logo-img { height: 28px; flex-shrink: 0; }
  /* 版心统一收边 */
  .trending, .latest-wrap, .listing, .vip-strip, .drama-episodes, .library {
    padding-left: 16px; padding-right: 16px;
  }
  .trending { padding-top: 32px; }
  /* 首页货架手机端改网格：一屏整齐 3×2=6 个短剧，不再横向滑动露半张图 */
  .shelf {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px; overflow: visible; padding-bottom: 4px;
  }
  .shelf .poster-card { width: auto; min-width: 0; }
  .vip-card { padding: 24px 20px; }
  .vip-title { font-size: 1.2rem; }
  /* 详情页 */
  .drama-hero { padding: 32px 16px 28px; }
  .drama-hero-inner { gap: 20px; }
  .drama-cover { width: 150px; }
  .drama-info { min-width: 0; }
  .drama-episodes { padding: 18px 16px 40px; }
  /* 落地页 */
  .promo { padding: 32px 14px 56px; }
  .promo-inner { padding: 24px 18px; gap: 22px; justify-content: center; }
  .promo-cover { width: 170px; }
  .promo-body { min-width: 0; }
  .promo-cta, .promo-cta-alt { min-width: 0; flex: 1 1 100%; max-width: none; }
  /* 锁定层 */
  .lock-layer { padding: 36px 16px; gap: 22px; }
  .lock-cover { width: 150px; }
  .lock-body { min-width: 0; }
  /* 播放页解锁卡 */
  .gate-card { padding: 22px; max-width: 92vw; }
  .gate-title { font-size: 1.3rem; }
}

@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  /* 导航：旧规则整个藏掉了 .nav-links（登录入口都丢了），这里救回并只保留药丸按钮 */
  .nav-links { display: flex; }
  /* 按钮统一收紧 */
  .btn { padding: 10px 18px; font-size: 0.9rem; }
  .btn-lg { padding: 12px 26px; font-size: 1rem; }
  /* 输入框 ≥16px：防 iOS 聚焦自动放大 */
  .field-input, .search-form input { font-size: 16px; }
  /* 导航再紧凑一档 */
  .nav-inner { padding: 10px 14px; gap: 10px; }
  .logo-img { height: 26px; }
  .nav-links { gap: 8px; margin-left: auto; }
  .nav-links a.nav-signin { padding: 6px 11px; font-size: 0.78rem; }
  /* Hero */
  .hero-inner { padding: 40px 16px 44px; gap: 24px; }
  .hero-poster { width: 180px; }
  .hero-title { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  .hero-desc { font-size: 0.94rem; }
  /* 海报墙 */
  .card-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
  .shelf { gap: 12px 8px; }
  .shelf .poster-card { width: auto; min-width: 0; }
  .section-title { font-size: 1.15rem; }
  .section-head { margin-bottom: 16px; }
  /* VIP 横幅改纵向堆叠 */
  .vip-card { flex-direction: column; align-items: flex-start; }
  .vip-card .btn { width: 100%; }
  /* browse / 分页 */
  .listing { padding-top: 28px; }
  .chip { padding: 6px 13px; font-size: 0.82rem; }
  .pagination { gap: 10px; margin-top: 26px; }
  .pagination a, .pagination span { padding: 7px 12px; }
  /* 详情页（2026-11-08 钦定：方案二紧凑分区式·grid 精确分区）——
     上行：左海报 + 右侧（标题/集数/分类）；下行：简介与按钮全宽 */
  .drama-hero { padding: 20px 14px 16px; }
  .drama-hero-inner {
    display: grid;
    grid-template-columns: 110px 1fr;
    grid-template-areas: "cover head" "below below";
    gap: 12px;
    align-items: start;
  }
  .drama-cover { grid-area: cover; width: 110px; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.5); }
  .drama-info { grid-area: head; display: block; min-width: 0; }
  .drama-title { margin: 2px 0 8px; font-size: 1.12rem; line-height: 1.35; }
  .drama-eps { margin: 0 0 10px; font-size: 0.8rem; }
  .drama-cats { margin: 0; font-size: 0.78rem; }
  .drama-below { grid-area: below; margin: 0; }
  .drama-desc {
    margin: 0; font-size: 0.88rem; line-height: 1.55;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden;
  }
  .drama-desc.expanded { display: block; }
  .drama-desc-toggle:not(.hidden) { display: block; }
  .drama-actions { margin: 10px 0 0; gap: 9px; }
  .drama-actions .btn-lg { padding: 12px 18px; }
  .drama-actions .btn-primary { order: -1; flex: 1 1 100%; } /* 订阅主按钮置顶全宽 */
  .drama-actions .btn { flex: 1 1 42%; } /* 试看/解锁第二行并排 */
  /* 集数列表网格化：多集剧不再一行一条拖出长页 */
  .drama-episodes { padding: 14px 14px 36px; }
  .drama-episodes .ep-list { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
  .drama-episodes .ep-item {
    padding: 9px 8px; gap: 6px; justify-content: center; flex-wrap: wrap;
    text-align: center; transform: none !important;
  }
  .drama-episodes .ep-seq { min-width: 0; font-size: 0.85rem; }
  .drama-episodes .ep-name { display: none; } /* 集名手机端让位给紧凑网格 */
  .drama-episodes .ep-item:hover { transform: none; }
  .ep-list-single { grid-template-columns: 1fr !important; } /* 全集单文件剧保持全宽一行 */
  /* 落地页 */
  .promo-cover { width: 150px; margin: 0 auto; }
  .promo-title { font-size: 1.55rem; }
  .promo-intro-text { font-size: 14px; }
  .promo-ep { padding: 11px 12px; gap: 10px; }
  /* 锁定层 */
  .lock-cover { width: 130px; }
  .lock-actions .btn { flex: 1 1 100%; }
  /* 订阅 / 登录 */
  .sub-wrap, .auth-wrap { margin-top: 20px; }
  .sub-card, .auth-card { padding: 24px 18px; }
  .sub-price { font-size: 38px; }
  /* 会员中心 */
  .acct-wrap { padding: 0 12px; margin-top: 20px; }
  .acct-card { padding: 18px 15px; }
  .acct-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .acct-stat b { font-size: 22px; }
  /* 页脚 */
  .footer-inner { padding: 24px 16px; }
  .footer-links { flex-wrap: wrap; gap: 12px 16px; justify-content: center; }
  /* 播放页小屏补充 */
  .player-topbar-title { font-size: 0.8rem; }
}

/* ---------- PWA（2026-11-02）---------- */
/* 页脚「安装应用」按钮：仅浏览器支持安装时由 pwa.js 点亮 */
.pwa-install {
  background: none; border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); cursor: pointer; font-size: 0.82rem;
  padding: 3px 14px; transition: all 0.2s ease;
}
.pwa-install:hover { background: var(--accent); color: #fff; }
/* 离线回落页 */
.offline-page {
  align-items: center; display: flex; justify-content: center;
  min-height: 55vh; padding: 40px 16px;
}
.offline-card {
  background: var(--surface, rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
  max-width: 420px; padding: 48px 36px; text-align: center; width: 100%;
}
.offline-icon { font-size: 3rem; margin-bottom: 16px; }
.offline-card h1 { font-size: 1.4rem; margin-bottom: 12px; }
.offline-card p { color: var(--muted, #9a9aa5); line-height: 1.7; margin-bottom: 24px; }
.offline-retry {
  background: var(--accent); border-radius: 999px; color: #fff;
  display: inline-block; font-weight: 600; padding: 10px 32px;
  text-decoration: none; transition: filter 0.2s ease;
}
.offline-retry:hover { filter: brightness(1.15); }

/* 首页安装横幅（2026-11-02 钦定）：导航下、Hero 上，品牌渐变通栏 */
.pwa-banner {
  align-items: center; animation: pwa-slide-down 0.45s ease both;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; display: flex; gap: 14px; padding: 12px 20px; position: relative;
}
@keyframes pwa-slide-down {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwa-banner-icon { font-size: 1.6rem; flex-shrink: 0; }
.pwa-banner-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pwa-banner-title { font-size: 0.95rem; font-weight: 700; }
.pwa-banner-sub, .pwa-banner-ios { font-size: 0.82rem; opacity: 0.92; }
.pwa-banner-btn {
  background: #fff; border: none; border-radius: 999px; color: var(--accent);
  cursor: pointer; flex-shrink: 0; font-size: 0.85rem; font-weight: 700;
  margin-left: auto; padding: 8px 20px; transition: transform 0.15s ease;
}
.pwa-banner-btn:hover { transform: scale(1.04); }
.pwa-banner-close {
  background: none; border: none; color: #fff; cursor: pointer; flex-shrink: 0;
  font-size: 1.2rem; line-height: 1; opacity: 0.75; padding: 4px;
}
.pwa-banner-close:hover { opacity: 1; }
@media (max-width: 720px) {
  .pwa-banner { gap: 10px; padding: 10px 14px; }
  .pwa-banner-btn { padding: 7px 14px; }
}

/* 转发升级（2026-11-02）：手机悬浮分享球 + 社交分享弹层 */
.m-share-fab { display: none; }
@media (max-width: 820px) {
  .m-share-fab {
    align-items: center; background: var(--accent); border: none; border-radius: 50%;
    bottom: 20px; box-shadow: 0 6px 18px rgba(255, 46, 85, 0.45); color: #fff;
    cursor: pointer; display: flex; height: 46px; justify-content: center;
    position: fixed; right: 14px; width: 46px; z-index: 40;
  }
  .m-share-fab:active { transform: scale(0.94); }
}
.share-sheet {
  align-items: flex-end; background: rgba(0, 0, 0, 0.65); display: flex;
  inset: 0; justify-content: center; position: fixed; z-index: 60;
}
.share-sheet-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px 16px 0 0;
  max-width: 420px; padding: 20px 18px 18px; width: 100%;
}
.share-sheet-title { font-weight: 800; margin-bottom: 16px; text-align: center; }
.share-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.share-item { align-items: center; color: var(--text); display: flex; flex-direction: column; font-size: 0.7rem; gap: 6px; text-decoration: none; }
.share-item svg { background: var(--chip-bg); border-radius: 50%; box-sizing: border-box; height: 44px; padding: 11px; transition: transform 0.15s ease; width: 44px; }
.share-item:hover svg { transform: scale(1.08); }
.share-item[data-share="x"] svg { background: #000; color: #fff; }
.share-item[data-share="facebook"] svg { background: #1877f2; color: #fff; }
.share-item[data-share="whatsapp"] svg { background: #25d366; color: #fff; }
.share-item[data-share="telegram"] svg { background: #229ed9; color: #fff; }
.share-copy {
  background: var(--chip-bg); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); cursor: pointer; font-weight: 700; padding: 10px; width: 100%;
}
.share-copy:hover { border-color: var(--accent-2); }
@media (min-width: 821px) {
  .share-sheet { align-items: center; }
  .share-sheet-card { border-radius: 16px; }
}

/* 支付成功落地页（PayPal/Stripe 共用 /billing/success） */
.pay-success-card { text-align: center; }
.pay-success-icon { font-size: 3rem; margin-bottom: 8px; }
.pay-success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---- 付费墙二选一弹层（2026-11-04 钦定）---- */
.paywall-choice { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.paywall-card {
  flex: 0 1 240px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--chip-bg, rgba(255,255,255,0.05)); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 20px 18px; color: var(--text); cursor: pointer;
  font: inherit; text-align: center; transition: border-color .15s, transform .15s;
}
.paywall-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.paywall-sub { border-color: var(--accent); }
.paywall-card .pw-badge {
  background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; letter-spacing: .04em;
}
.paywall-card .pw-name { font-weight: 700; }
.paywall-card .pw-price { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.paywall-card .pw-price small { font-size: 0.8rem; font-weight: 400; color: var(--muted, #9a9aa8); }
.paywall-card .pw-desc { font-size: 0.82rem; color: var(--muted, #9a9aa8); line-height: 1.4; }
.paywall-choice-gate { margin: 14px 0 6px; }

/* 剧集详情页：总集数（2026-11-04 钦定「详情页显示一共几集」） */
.drama-eps { color: var(--accent); font-size: 0.92rem; font-weight: 700; letter-spacing: 0.02em; margin: -6px 0 14px; }

/* ---- 播放页顶栏：用户名 + 手机桌面（2026-11-04 钦定）---- */
.player-topbar-user {
  flex-shrink: 0; color: var(--text); font-weight: 700; font-size: 0.88rem;
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player-topbar-user:hover { color: var(--accent); }
.player-a2hs { flex-shrink: 0; font-size: 0.8rem; padding: 6px 12px; }
/* 手机端：隐藏片名，只留集数（播放器本来就在该剧内） */
@media (max-width: 820px) {
  .player-topbar-drama { display: none; }
}
/* 手机桌面按钮仅移动端出现 */
@media (min-width: 821px) {
  .player-a2hs { display: none !important; }
}
/* iOS「添加到主屏幕」引导气泡 */
.pwa-ios-toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(8px);
  z-index: 90; max-width: 86vw; padding: 12px 16px;
  background: var(--overlay-bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 12px;
  font-size: 0.86rem; line-height: 1.5; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pwa-ios-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 首页手机端：隐藏 TOP 10 榜（2026-11-04 钦定），热播/最新由路由限 9 个 */
@media (max-width: 820px) {
  .sec-top10 { display: none; }
}

/* 窄屏手机（2026-11-04 体检）：<480px 文字链再收，只留登录/会员药丸，防挤爆 */
@media (max-width: 480px) {
  .nav-links a[href="/"], .nav-links a[href="/browse"] { display: none; }
  .nav-links { gap: 8px; }
}

/* 触屏设备（2026-11-04 体检）：取消 hover 位移/发光粘滞——手指点过的卡片不再「卡」在悬停态 */
@media (hover: none) and (pointer: coarse) {
  .btn:hover, .btn-primary:hover, .btn-play:hover, .btn-ghost:hover { transform: none; }
  .poster-card:hover .poster { transform: none; }
  .chip:hover, .paywall-card:hover { transform: none; }
  .nav-links a:hover, .nav-links a.nav-user:hover { color: inherit; }
  .nav-links a.nav-signin:hover { border-color: var(--border-strong); }
}
