/* ============ SVIP影视 - 主题参考 ys.54420.xyz（深绿黑底 + 绿蓝双色调玻璃风） ============ */
:root {
  --accent: #35d08e;
  --accent2: #2ea3ff;
  --bg: #0b0f0d;
  --bg2: #131a16;
  --card: rgba(255,255,255,.04);
  --card2: rgba(255,255,255,.06);
  --text: #e6efe9;
  --muted: #a3b8ad;
  --line: rgba(255,255,255,.08);
  --danger: #ff4040;
  --radius: 14px;
  --topbar-h: 60px;
  --search-h: 58px;
  --botnav-h: 58px;
  /* 大类页面字体（可由后台配置覆盖） */
  --cat-title-font: 20px;
  --cat-card-font: 14.5px;
  --cat-meta-font: 12.5px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 80% -100px, rgba(53,208,142,.12), transparent 60%),
    radial-gradient(900px 420px at 10% -80px, rgba(46,163,255,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15.5px;
  padding-top: calc(var(--topbar-h) + var(--search-h));
  padding-bottom: calc(var(--botnav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  min-height: 100vh;
  overflow-x: clip; /* 兜底：任何子元素意外超宽都不触发横向滚动（clip 不影响 fixed 导航定位） */
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; }

/* 白色主题：覆盖深色变量 */
body[data-theme="light"] {
  --bg: #f4f6f8;
  --bg2: #eef1f4;
  --card: #ffffff;
  --card2: #f0f3f6;
  --text: #17211c;
  --muted: #4c5d54;
  --line: #dde3e0;
  --danger: #e5483a;
  background: #f4f6f8;
}
body[data-theme="light"] .poster .ph { color: rgba(0,0,0,.12); background: linear-gradient(160deg, #eef1f4, #e3e8ea); }
body[data-theme="light"] .icbtn { color: #5f7268; }
body[data-theme="light"] .icbtn:hover { color: #1a2420; }
body[data-theme="light"] .bottomnav a { color: #6b7c74; }
body[data-theme="light"] .searchbox input::placeholder { color: #8fa298; }
body[data-theme="light"] .logo-ic { color: #fff; }
body[data-theme="light"] .topbar { background: rgba(255,255,255,.85); }
body[data-theme="light"] .bottomnav { background: rgba(255,255,255,.9); }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 max(14px, env(safe-area-inset-left));
  background: rgba(11,15,13,.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
/* 搜索行：导航栏下方独立一行，PC/手机自适应 */
.searchrow {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 999;
  height: var(--search-h);
  display: flex; align-items: center; justify-content: center;
  padding: 0 max(14px, env(safe-area-inset-left));
  background: rgba(11,15,13,.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
body[data-theme="light"] .searchrow { background: rgba(255,255,255,.85); }
.logo { display: flex; align-items: center; gap: 8px; justify-self: start; min-width: 0; }
.top-left { display: flex; align-items: center; gap: 8px; justify-self: start; min-width: 0; }
.logo-ic {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #04150d; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.logo-txt {
  font-weight: 800; font-size: 17px; letter-spacing: .5px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.searchbox {
  width: min(720px, 100%);
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 4px 4px 16px; height: 42px;
}
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.searchbox input {
  flex: 1; background: none; border: 0; outline: none;
  color: var(--text); font-size: 15px; font-weight: 500; min-width: 0;
}
.searchbox input::placeholder { color: #a4b8ac; }
.searchbtn {
  border: 0; cursor: pointer; height: 32px; padding: 0 18px;
  border-radius: 999px; font-weight: 700; font-size: 14px; color: #06120c;
  background: linear-gradient(90deg, var(--accent), #7fe7b9);
}
.topactions { display: flex; align-items: center; gap: 4px; justify-self: end; min-width: 0; }
.icbtn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--card); color: #d6e3da; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.icbtn:hover { color: var(--text); }
.icbtn svg { width: 21px; height: 21px; fill: currentColor; }
.icbtn.crown { color: #f5c518; background: color-mix(in srgb, #f5c518 14%, var(--card)); }

/* 抽屉弹出面板（历史/收藏） */
.popover {
  position: absolute; top: calc(var(--topbar-h) + var(--search-h) + 6px); right: 10px; z-index: 1001;
  width: min(320px, 92vw); background: var(--card2); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.pop-foot { margin-top: 12px; display: flex; justify-content: space-between; font-size: 13px; }
.pop-foot a { color: var(--accent); font-weight: 600; }
.hidden { display: none !important; }
.drawtabs { display: flex; gap: 6px; margin-bottom: 10px; }
.drawtab {
  flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 7px 0; font-size: 13px; font-weight: 600; cursor: pointer;
}
.drawtab.active { background: var(--accent); border-color: var(--accent); color: #04150d; }
.drawlist { max-height: 330px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.drawitem { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; }
.drawitem:hover { background: var(--card); }
.drawthumb { width: 44px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--card); flex-shrink: 0; }
.drawthumb img { width: 100%; height: 100%; object-fit: cover; }
.drawinfo { min-width: 0; flex: 1; }
.drawname { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawmeta { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawempty { color: var(--muted); text-align: center; padding: 26px 0; font-size: 13px; }

/* ---------- 底部导航 ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: calc(var(--botnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(11,15,13,.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: #ccd9d1; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.bottomnav a svg { width: 23px; height: 23px; fill: currentColor; }
.bottomnav a.active { color: var(--accent); font-weight: 800; }

/* ---------- 通用布局 ---------- */
#view { max-width: 1200px; margin: 0 auto; padding: 16px 14px 30px; }
.sechead { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 12px; }
.sechead:first-child { margin-top: 6px; }
.sechead h2 { margin: 0; font-size: var(--cat-title-font); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sechead h2 i { width: 5px; height: 18px; border-radius: 3px; background: var(--accent); display: inline-block; }
.sechead .sub { color: var(--muted); font-size: 13px; }
.sechead .more { margin-left: auto; color: var(--accent); font-size: 13.5px; font-weight: 600; }
.sechead .more:hover { color: var(--accent); }

/* 公告栏 */
.announce {
  display: flex; align-items: center; gap: 10px; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 12px; padding: 10px 14px; margin-bottom: 6px;
}
.announce .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 22s linear infinite; color: color-mix(in srgb, var(--accent) 70%, var(--text)); font-size: 13px; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- 影片卡片 ---------- */
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .card { width: 128px; flex-shrink: 0; scroll-snap-align: start; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.grid .card { min-width: 0; } /* 允许网格项收缩，防长内容撑破列宽 */
.card { cursor: pointer; min-width: 0; }
.poster {
  position: relative; width: 100%; aspect-ratio: 2/3; border-radius: 12px; overflow: hidden;
  background: var(--card2);
}
/* 图片置于占位字之上：加载成功盖住字母，无封面/加载失败时才露出字母占位 */
.poster img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.poster .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 800; color: color-mix(in srgb, var(--accent) 55%, var(--card2));
  background: linear-gradient(160deg, var(--card2), var(--card));
}
.badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: linear-gradient(135deg, #ff5f1f, #ff8a3d);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 8px 8px 8px 2px;
  max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stag {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent2)));
  color: #04150d; font-size: 12px; font-weight: 800;
  padding: 3px 9px; border-radius: 8px 8px 2px 8px;
  letter-spacing: .3px; max-width: 72%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 45%, transparent);
}
.cname {
  margin-top: 8px; font-size: var(--cat-card-font); font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cmeta { margin-top: 3px; font-size: var(--cat-meta-font); color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card:hover .poster { outline: 2px solid var(--accent); }
.card:hover { transform: translateY(-2px); }
.card { transition: transform .15s; }
.ratetag {
  position: absolute; bottom: 6px; right: 6px; z-index: 2;
  background: rgba(0,0,0,.7); color: #ffd04d; font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: 6px;
}

/* 骨架屏 */
.skel { border-radius: 12px; background: linear-gradient(100deg, var(--card) 40%, var(--card2) 50%, var(--card) 60%); background-size: 200% 100%; animation: shine 1.2s infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.skel-card { width: 128px; flex-shrink: 0; }
.skel-card .skel.poster-sk { aspect-ratio: 2/3; }
.skel-card .skel.line { height: 13px; margin-top: 8px; }
.grid .skel-card { width: auto; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 14px; grid-column: 1/-1; }
.empty a { color: var(--accent); }
.loadmore { text-align: center; margin: 22px 0; }
.btn {
  border: 0; cursor: pointer; border-radius: 999px; padding: 10px 26px;
  font-size: 14px; font-weight: 700; color: #04150d; background: var(--accent);
}
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 播放页 ---------- */
.playwrap { max-width: 980px; margin: 0 auto; }
/* 全局播放器容器：播放页内嵌；离开播放页后仅承载浮动小窗 */
.gplayer { max-width: 1200px; margin: 0 auto; padding: 16px 14px 0; }
.gplayer.hidden { display: none; }
.playerbox {
  position: relative; border-radius: var(--radius); overflow: visible;
  transition: width .25s ease, left .25s ease, top .25s ease;
  will-change: width;
}
.playerarea {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  background: #000; overflow: hidden; border: 1px solid var(--line);
}
.playerarea iframe { width: 100%; height: 100%; border: 0; display: block; }
.pipbar {
  display: none; position: absolute; top: -34px; left: 0; right: 0; height: 30px;
  background: var(--card2); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 10px 10px 0 0; align-items: center; justify-content: space-between;
  padding: 0 10px; font-size: 12px; color: var(--muted); cursor: move;
  touch-action: none; user-select: none;
}
.pipbar button {
  border: 0; background: var(--accent); color: #04150d; border-radius: 6px;
  font-size: 12px; padding: 3px 10px; cursor: pointer; font-weight: 700;
}
.pipacts { display: flex; gap: 6px; align-items: center; }
.pipbar .pipClose { background: var(--card); border: 1px solid var(--line); color: var(--muted); padding: 2px 8px; }
.pipbar .pipClose:hover { border-color: var(--danger, #ff5d5d); color: var(--danger, #ff5d5d); }
/* 画中画浮动小窗 */
.playerbox.pip {
  position: fixed !important; z-index: 1500;
  width: min(430px, 72vw); right: 14px;
  bottom: calc(var(--botnav-h) + env(safe-area-inset-bottom, 0px) + 14px);
  margin: 0; overflow: visible;
}
.playerbox.pip .playerarea { border-radius: 0 0 12px 12px; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.playerbox.pip .pipbar { display: flex; }
.notice {
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--danger) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
  color: color-mix(in srgb, var(--danger) 80%, #fff);
  border-radius: 12px; padding: 11px 14px; margin: 14px 0; font-size: 14px; font-weight: 600;
}
.notice svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.playtitle { font-size: 22px; font-weight: 800; margin: 6px 0 12px; }
.playtools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.favbtn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.favbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.favbtn.on { color: var(--accent); border-color: var(--accent); }
.favbtn.on svg { fill: var(--accent); }
.select {
  height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); padding: 0 14px; font-size: 14px;
  max-width: 46vw; outline: none; cursor: pointer;
}
.select:focus { border-color: var(--accent); }
.ephead { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; }
.ephead h3 { margin: 0; font-size: 17px; }
.ephead .divider { color: var(--line); }
.ephead .all { color: var(--accent); font-size: 14px; cursor: pointer; }
.ephead .next { margin-left: auto; }
.nextep {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 8px 18px; cursor: pointer; font-size: 14px;
}
.nextep:hover { border-color: var(--accent); color: var(--accent); }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.eps.collapsed { max-height: 88px; overflow: hidden; }
.ep {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 9px 4px; text-align: center; cursor: pointer;
  font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ep:hover { border-color: var(--accent); }
.ep.current { background: var(--accent); color: #04150d; font-weight: 700; border-color: var(--accent); }
/* 简介卡片 */
.introcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.introhead { display: flex; gap: 14px; }
/* 详情页封面：收窄降高，3:4 比例避免过高 */
.introhead .poster { width: 92px; aspect-ratio: 3/4; flex-shrink: 0; }
.introhead h2 { margin: 2px 0 10px; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--card2); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--text); opacity: .92; }
.introdes { margin: 14px 0 0; color: var(--text); opacity: .88; font-size: 14px; line-height: 1.7; }
.introdes.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.introdes .toggle { color: var(--accent); cursor: pointer; }

/* VIP解析页 */
.vipcard {
  max-width: 760px; margin: 20px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.vipcard h2 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.vipcard h2 svg { width: 24px; height: 24px; fill: #f5c518; }
.vipcard .tip { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.viprow { display: flex; gap: 10px; flex-wrap: wrap; }
.viprow input {
  flex: 1; min-width: 220px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  padding: 0 14px; outline: none; font-size: 14px;
}
.viprow input:focus { border-color: var(--accent); }
.viprow .select { height: 44px; border-radius: 12px; }
.sitechips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.sitechip {
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.sitechip:hover { color: var(--accent); border-color: var(--accent); }
.vipplayer { margin-top: 18px; }
.vipplayer .playerarea { display: none; }
.vipplayer.show .playerarea { display: block; }

/* 历史收藏页 */
.listtool { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.delmini {
  position: absolute; top: 6px; right: 6px; z-index: 3; width: 24px; height: 24px;
  border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff;
  cursor: pointer; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center;
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--botnav-h) + 24px); transform: translateX(-50%);
  z-index: 2000; background: var(--card2); border: 1px solid var(--line);
  color: var(--text); padding: 10px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: 86vw; text-align: center;
}
.page-loading { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- 直播页 ---------- */
.livewrap { max-width: 1100px; margin: 0 auto; }
.liveplayer {
  position: relative; aspect-ratio: 16/9; background: #000;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
}
.liveplayer video { width: 100%; height: 100%; display: block; background: #000; }
.liveplayer .live-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--muted); gap: 10px;
}
.liveplayer .live-empty svg { width: 48px; height: 48px; opacity: .5; }
.live-now {
  margin: 14px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.live-now .lv-logo {
  width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  background: var(--card); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.live-now .lv-logo img { width: 100%; height: 100%; object-fit: contain; }
.live-now .lv-logo .lv-ph { font-size: 18px; font-weight: 800; color: var(--accent); }
.live-now h1 { margin: 0; font-size: 20px; }
.live-now .lv-group { color: var(--muted); font-size: 13px; }
.livegroups { margin-top: 18px; }
.livegroup-head {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 10px;
  font-size: 16px; font-weight: 700;
}
.livegroup-head i { width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }
.livech-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px;
}
.livech {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; cursor: pointer; transition: border-color .15s, transform .1s;
}
.livech:hover { border-color: var(--accent); transform: translateY(-1px); }
.livech.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.livech .ch-logo {
  width: 40px; height: 40px; border-radius: 8px; overflow: hidden;
  background: var(--card2); display: flex; align-items: center; justify-content: center;
}
.livech .ch-logo img { width: 100%; height: 100%; object-fit: contain; }
.livech .ch-logo .ch-ph { font-size: 16px; font-weight: 800; color: var(--accent); }
.livech .ch-name { font-size: 12.5px; text-align: center; color: var(--text); font-weight: 600; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 响应式：PC ---------- */
@media (min-width: 900px) {
  :root { --topbar-h: 66px; }
  .logo-txt { font-size: 19px; }
  .hscroll .card, .skel-card { width: 168px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
  .topbar { padding: 0 24px; }
  .searchrow { padding: 0 24px; }
  #view { padding: 20px 24px 40px; }
  .bottomnav {
    left: 50%; right: auto; transform: translateX(-50%);
    bottom: 14px; border-radius: 999px; border: 1px solid var(--line);
    width: min(520px, 92vw); padding: 0 8px; height: 56px;
    box-shadow: 0 14px 40px rgba(0,0,0,.45);
  }
  body { padding-bottom: 100px; }
  .playtitle { font-size: 26px; }
}
/* ---------- 响应式：手机/窄屏 ---------- */
@media (max-width: 899px) {
  /* 首页各大分类：固定 3 列网格（配合前台每区最多渲染 12 条 = 3列×4行） */
  /* minmax(0,1fr)：禁止长内容（长标题/URL/未加载图）撑破列宽导致横向溢出、列宽参差 */
  #hotSections .hscroll {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
    overflow: visible; padding: 2px 0 6px;
  }
  #hotSections .hscroll .card, #hotSections .hscroll .skel-card { width: auto; min-width: 0; }
  /* 分类/搜索大网格：手机固定 3 列 */
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .grid .card { min-width: 0; }
  .cname { font-size: 12.5px; }
  .cmeta { font-size: 11px; }
}
@media (max-width: 480px) {
  :root { --search-h: 54px; }
  .logo-txt { display: none; }
  .searchbtn { padding: 0 14px; }
  .icbtn { width: 34px; }
  .stag { font-size: 10.5px; padding: 2px 6px; }
  .badge { font-size: 10px; padding: 2px 6px; }
}
