:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface2: #1f1f25;
  --text: #ffffff;
  --muted: #9a9aa5;
  --accent: #7c5cff;
  --gold: #ffcf4d;
  --red: #ff3b5c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg);
  padding: 10px 14px 8px; display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: 1px; color: var(--accent); }
.search { flex: 1; background: var(--surface); border-radius: 20px; padding: 8px 14px;
  color: var(--muted); font-size: 13px; }
.scroll { flex: 1; overflow-y: auto; padding-bottom: 70px; }
.block { margin: 14px 0; }
.sec-title { font-size: 17px; font-weight: 700; margin: 0 14px 10px; }
.row { display: flex; gap: 12px; overflow-x: auto; padding: 0 14px 4px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }

/* 卡片 */
.card { flex: 0 0 auto; cursor: pointer; }
.card .poster { position: relative; border-radius: 10px; overflow: hidden;
  display: flex; align-items: flex-end; color: #fff; }
.card .poster .cover-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.card .poster > :not(.cover-img) { z-index:1; }
.card .poster .ttl { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 10px; font-weight: 800;
  font-size: 15px; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.card .poster .scrim { position: absolute; left:0; right:0; bottom:0; height: 40%;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.card .poster .rate { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55);
  border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: 700; color: var(--gold); }
.card .poster .ep { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6);
  border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: 700; }
.card .poster .new { position: absolute; top: 8px; right: 8px; background: var(--red);
  border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 800; color:#fff; }
.card .name { font-size: 13px; font-weight: 600; margin-top: 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.card .meta { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

/* 横滑精选：横向宽卡 */
.row .card.wide .poster { width: 200px; height: 112px; }
.row .card.wide .name, .row .card.wide .meta { max-width: 200px; }
/* 竖海报 */
.row.portraits .card .poster { width: 116px; height: 160px; }
.row.portraits .card .ttl { font-size: 13px; }

.vip-banner { margin: 6px 14px; background: linear-gradient(135deg,#7c5cff,#b06bff);
  border-radius: 14px; padding: 16px; font-weight: 800; font-size: 16px; color:#fff;
  display:flex; align-items:center; justify-content:space-between; }
.vip-banner small { display:block; font-weight:500; font-size:12px; opacity:.85; margin-top:4px; }

.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%;
  max-width: 480px; background: #050506; border-top: 1px solid #222; display: flex;
  justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 20; }
.tab { color: var(--muted); font-size: 11px; text-align: center; flex: 1; cursor: pointer; }
.tab span { display: block; margin-top: 2px; }
.tab.active { color: var(--accent); }

/* ===== 播放页 ===== */
.player-page { background:#000; max-width:480px; margin:0 auto; min-height:100vh; }
.pv { position: relative; width:100%; background:#000; display:flex; align-items:center; justify-content:center; }
.pv video { width:100%; max-height: 88vh; background:#000; display:block; }
/* 开声引导按钮：位于视频下方，不遮挡画面 */
.sound-tip { padding: 12px 14px 4px; background:#0d0d0f; text-align:center; }
.sound-tip button { width:100%; max-width:320px; border:0; border-radius:24px;
  background:var(--accent); color:#fff; font-size:15px; font-weight:700;
  padding:12px 0; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.sound-tip.hidden { display:none; }
.back { position:fixed; top:10px; left:10px; z-index:5; background:rgba(0,0,0,.5);
  color:#fff; border-radius:20px; padding:6px 12px; font-size:13px; cursor:pointer; }
.eps { background:#0d0d0f; padding:10px 14px 30px; }
.eps h3 { font-size:15px; margin:6px 0 10px; }
.ep-list { display:flex; flex-wrap:wrap; gap:8px; }
.ep-item { background:var(--surface2); border-radius:8px; padding:8px 12px; font-size:13px;
  cursor:pointer; }
.ep-item.active { background:var(--accent); color:#fff; }
.ep-item.locked { opacity:.5; }
