/* ==========================================================
   移动端统一设计系统（片单/记录/搜索/题材/排行/刷剧流共用）
   ========================================================== */
:root{
  --red:#fe2c55;
  --red-dark:#c92a22;
  --ink:#16161a;
  --ink-2:#3d3d45;
  --muted:#8a8a92;
  --muted-2:#b4b4bc;
  --line:#ececf0;
  --bg:#fff;
  --bg-soft:#f6f6f8;
  --radius-s:8px;
  --radius-m:12px;
  --radius-l:16px;
  --shadow-card:0 1px 3px rgba(20,20,26,.06);
  --header-h:52px;
  --tab-h:56px;
  --pad:14px;
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro SC","PingFang SC","Helvetica Neue",Arial,sans-serif;
  font-size:14px;line-height:1.45;
  padding-bottom:calc(var(--tab-h) + env(safe-area-inset-bottom) + 48px);
  -webkit-font-smoothing:antialiased;
}

/* ---------- 顶部栏 ---------- */
.ms-header{
  position:sticky;top:0;z-index:20;
  height:calc(var(--header-h) + env(safe-area-inset-top));
  padding:env(safe-area-inset-top) var(--pad) 0;
  display:flex;align-items:center;gap:10px;
  background:rgba(255,255,255,.96);
  backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.ms-back{
  width:28px;height:28px;margin-left:-6px;display:flex;align-items:center;justify-content:center;
  color:var(--ink);text-decoration:none;border-radius:50%
}
.ms-back svg{width:20px;height:20px}
.ms-title{font-size:17px;font-weight:700;letter-spacing:.2px;flex:1;min-width:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ms-count{font-size:12px;color:var(--muted);font-weight:500}
.ms-lang{
  height:28px;padding:0 10px;border-radius:14px;border:1px solid var(--line);
  background:#fff;color:var(--ink-2);font-size:12px;display:flex;align-items:center;gap:4px
}

/* ---------- 内容区 ---------- */
.ms-body{padding:var(--pad)}
.ms-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px 10px}

/* ---------- 剧卡 ---------- */
.ms-card{display:block;text-decoration:none;color:inherit}
.ms-poster{
  position:relative;width:100%;aspect-ratio:2/3;border-radius:var(--radius-s);overflow:hidden;
  background:linear-gradient(165deg,#2c2c32,#45454d)
}
.ms-ph{position:absolute;inset:0;z-index:0;display:flex;align-items:center;justify-content:center;
  font-size:28px;font-weight:800;color:rgba(255,255,255,.28)}
.ms-poster img{position:relative;z-index:1;width:100%;height:100%;object-fit:cover;display:block}
.ms-badge{
  position:absolute;left:5px;top:5px;z-index:2;font-style:normal;
  font-size:9px;font-weight:700;letter-spacing:.3px;line-height:1.6;
  padding:0 6px;border-radius:4px;color:#fff;background:var(--red)
}
.ms-badge.hot{background:var(--red)}
.ms-badge.new{background:#22a06b}
.ms-badge.exclusive{background:linear-gradient(90deg,#c026d3,#7c3aed)}
.ms-views{
  position:absolute;right:5px;top:5px;z-index:2;font-style:normal;font-size:10px;line-height:1.6;
  padding:0 6px;border-radius:10px;color:#fff;background:rgba(0,0,0,.52)
}
.ms-progress{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(0,0,0,.32);font-style:normal}
.ms-progress b{display:block;height:100%;background:var(--red)}
.ms-name{
  margin-top:7px;min-height:2.6em;font-size:12px;font-weight:600;line-height:1.35;color:var(--ink);
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  overflow-wrap:break-word;word-break:normal
}
.ms-meta{margin-top:3px;font-size:11px;color:var(--muted);font-weight:400}
.ms-soft{color:var(--muted);font-size:13px;line-height:1.5;text-align:center;padding:36px 12px}
.ms-hotlabel{font-size:13px;font-weight:700;margin:8px 0 10px}
.ms-hots{display:flex;flex-wrap:wrap;gap:8px}
.ms-hots a{display:inline-block;max-width:100%;padding:8px 12px;border-radius:16px;background:var(--bg-soft);
  color:var(--ink);text-decoration:none;font-size:13px;font-weight:600}
.ms-bind{margin-top:18px;padding:14px;border-radius:14px;background:var(--bg-soft)}
.ms-bind b{display:block;font-size:14px;margin-bottom:4px}
.ms-bind p{font-size:12.5px;color:var(--muted);line-height:1.45;margin-bottom:10px}
.ms-poster:after{content:"";position:absolute;left:0;right:0;bottom:0;height:22%;z-index:2;pointer-events:none;
  background:linear-gradient(transparent,rgba(0,0,0,.35))}

/* ---------- 空状态 ---------- */
.ms-empty{min-height:56vh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:24px 20px;color:var(--muted)}
.ms-empty-ico{width:56px;height:56px;border-radius:50%;background:var(--bg-soft);color:var(--red);
  display:flex;align-items:center;justify-content:center;margin-bottom:16px}
.ms-empty-ico svg{width:26px;height:26px}
.ms-empty p{font-size:13px;line-height:1.65;margin-bottom:18px}
.ms-btn{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 22px;
  border-radius:20px;background:var(--red);color:#fff;font-size:13.5px;font-weight:600;text-decoration:none}
.ms-btn:active{background:var(--red-dark)}

/* ---------- 搜索框 ---------- */
.ms-search{
  display:flex;align-items:center;gap:8px;height:38px;padding:0 14px;margin-bottom:14px;
  background:var(--bg-soft);border-radius:19px;color:var(--muted)
}
.ms-search input{flex:1;border:0;background:none;outline:none;font-size:14px;color:var(--ink);
  font-family:inherit}
.ms-search svg{width:16px;height:16px;flex:0 0 16px}

/* ---------- 题目瓦片 ---------- */
.ms-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.ms-tile{display:flex;align-items:center;gap:10px;padding:8px;border-radius:var(--radius-m);
  background:var(--bg-soft);text-decoration:none;color:inherit}
.ms-tile-thumb{width:46px;height:64px;border-radius:6px;overflow:hidden;background:#e9e9ee;flex:0 0 46px}
.ms-tile-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.ms-tile b{display:block;font-size:13.5px;font-weight:700;line-height:1.3}
.ms-tile i{display:block;font-style:normal;font-size:11px;color:var(--muted);margin-top:3px}

/* ---------- 排行榜 ---------- */
.ms-rank{display:flex;flex-direction:column;gap:12px}
.ms-rank-row{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.ms-rank-no{flex:0 0 24px;text-align:center;font-size:13.5px;font-weight:700;color:var(--muted-2)}
.ms-rank-no.top1{color:#f0a500;font-size:17px;font-weight:800}
.ms-rank-no.top2{color:#a8adb8;font-size:16px;font-weight:800}
.ms-rank-no.top3{color:#c0763a;font-size:15px;font-weight:800}
.ms-rank-poster{position:relative;width:58px;height:82px;border-radius:var(--radius-s);overflow:hidden;
  background:var(--bg-soft);flex:0 0 58px}
.ms-rank-poster img{width:100%;height:100%;object-fit:cover;display:block}
.ms-rank-info b{display:block;font-size:13px;font-weight:600;line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ms-rank-info i{display:block;font-style:normal;font-size:11px;color:var(--muted);margin-top:4px}

/* ---------- 底部 Tab（全站唯一实现） ---------- */
.ms-tab{
  position:fixed;left:0;right:0;bottom:0;z-index:30;
  height:calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  display:flex;align-items:stretch;
  background:rgba(255,255,255,.97);
  backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px);
  border-top:1px solid var(--line)
}
.ms-tab a{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:#9a9aa2;text-decoration:none;font-size:10.5px;font-weight:500;letter-spacing:.1px
}
.ms-tab a b{display:flex;align-items:center;justify-content:center;height:22px;line-height:1}
.ms-tab a svg{width:22px;height:22px;stroke-width:1.8}
.ms-tab a.on{color:var(--red)}
.ms-tab.dark{background:rgba(12,12,14,.9);border-top-color:rgba(255,255,255,.08)}
.ms-tab.dark a{color:rgba(255,255,255,.55)}
.ms-tab.dark a.on{color:#fe2c55}
.cmtSheet{position:fixed;left:0;right:0;bottom:0;z-index:40;background:#16161a;color:#fff;
  border-radius:16px 16px 0 0;padding:16px 16px calc(72px + env(safe-area-inset-bottom));
  transform:translateY(110%);transition:transform .25s ease}
.cmtSheet.open{transform:translateY(0)}
.cmtMask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:39;display:none}
.cmtMask.open{display:block}
.cmtSheet b{display:block;font-size:15px;margin-bottom:8px}
.cmtSheet p{font-size:13px;color:rgba(255,255,255,.65);line-height:1.5;margin-bottom:14px}
.cmtSheet button{height:40px;padding:0 16px;border:0;border-radius:20px;background:#fe2c55;color:#fff;font-weight:700}

/* ---------- 桌面预览 ---------- */
@media(min-width:769px){
  body{max-width:430px;margin:0 auto;box-shadow:0 0 50px rgba(0,0,0,.08)}
  .ms-tab{max-width:430px;margin:0 auto;left:0;right:0}
}

/* ---------- 首页区块 ---------- */
.ms-section{margin-top:20px}
.ms-section:first-child{margin-top:4px}
.ms-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:10px}
.ms-head h2{font-size:15.5px;font-weight:700;letter-spacing:.1px}
.ms-head a{font-size:12px;color:var(--muted);text-decoration:none}
.ms-rail{display:flex;gap:10px;overflow-x:auto;margin:0 calc(var(--pad) * -1);padding:0 var(--pad) 2px;
  scrollbar-width:none}
.ms-rail::-webkit-scrollbar{display:none}
.ms-rail .ms-card{flex:0 0 108px}
.ms-rail .ms-name{font-size:12px}
.ms-home-head{display:flex;align-items:center;gap:10px}
.ms-logo{display:flex;align-items:center;gap:7px;font-size:16px;font-weight:800;letter-spacing:-.2px}
.ms-logo i{width:22px;height:22px;border-radius:7px;background:var(--red);display:flex;align-items:center;
  justify-content:center;font-style:normal}
.ms-logo svg{width:12px;height:12px;color:#fff}
.ms-iconbtn{width:36px;height:36px;border-radius:50%;background:var(--bg-soft);display:flex;align-items:center;
  justify-content:center;color:var(--ink);border:0;text-decoration:none;flex:0 0 36px}
.ms-iconbtn svg{width:17px;height:17px}
.ms-searchpill{flex:1;min-width:0;display:flex;align-items:center;gap:6px;height:36px;padding:0 12px;
  background:var(--bg-soft);border-radius:18px;color:var(--muted);text-decoration:none;font-size:13px}
.ms-searchpill span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms-searchpill svg{width:15px;height:15px;flex:0 0 15px}

/* 频道条：四个 tag 同一套下划线，不各做一种按钮 */
.ms-chipsbar{position:sticky;top:calc(var(--header-h) + env(safe-area-inset-top));z-index:15;
  background:rgba(255,255,255,.96);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  margin:0 calc(var(--pad) * -1) 12px;padding:0 var(--pad)}
.ms-chips{display:flex;gap:22px;overflow-x:auto;scrollbar-width:none}
.ms-chips button{flex:0 0 auto;border:0;background:none;font-family:inherit;font-size:15px;font-weight:600;
  color:#8d8d96;padding:8px 0 9px;position:relative;cursor:pointer}
.ms-chips button.on{color:var(--ink);font-weight:700}
.ms-chips button.on:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;border-radius:2px;background:var(--red)}
.ms-chips.sub{gap:8px;margin:-4px 0 12px}
.ms-chips.sub button{font-size:12.5px;font-weight:600;background:var(--bg-soft);color:var(--ink-2);
  border-radius:14px;padding:6px 12px}
.ms-chips.sub button.on{background:#fdecea;color:var(--red)}
.ms-chips.sub button.on:after{display:none}
.ms-rankbadge{position:absolute;left:0;top:0;z-index:2;min-width:22px;height:20px;padding:0 6px;
  background:rgba(0,0,0,.55);color:#fff;font-size:11px;font-weight:800;font-style:normal;
  display:flex;align-items:center;justify-content:center;border-bottom-right-radius:8px}
.ms-rankbadge.top{background:var(--red)}

/* 会员 / 我的 / 登录：和首页同一套白底、圆角、红按钮 */
.ms-vip{border-radius:16px;padding:22px 18px 18px;color:#fff;margin-bottom:8px;
  background:linear-gradient(160deg,#3a1614 0%,#e5342c 128%)}
.ms-vip .ms-vip-ico{width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center}
.ms-vip .ms-vip-ico svg{width:20px;height:20px}
.ms-vip b{display:block;font-size:22px;font-weight:800;margin:10px 0 4px;letter-spacing:-.2px}
.ms-vip p{font-size:13px;line-height:1.5;opacity:.88}
.ms-kv{display:flex;justify-content:space-between;align-items:center;min-height:48px;
  border-bottom:1px solid var(--line);font-size:14px}
.ms-kv span{color:var(--muted)}
.ms-kv b{font-weight:700}
.ms-me{display:flex;align-items:center;gap:14px;padding:4px 2px 18px}
.ms-avatar{width:56px;height:56px;border-radius:50%;background:var(--red);color:#fff;flex:0 0 56px;
  display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800}
.ms-me b{display:block;font-size:16px;font-weight:700;line-height:1.3;word-break:break-all}
.ms-me i{display:block;font-style:normal;font-size:12px;color:var(--muted);margin-top:3px}
.ms-pill{display:inline-block;margin-top:6px;font-size:11px;font-weight:700;color:#fff;background:var(--red);
  border-radius:10px;padding:1px 8px;letter-spacing:.3px}
.ms-menu{border-top:1px solid var(--line)}
.ms-menu a{display:flex;align-items:center;gap:12px;height:52px;border-bottom:1px solid var(--line);
  text-decoration:none;color:var(--ink);font-size:15px;font-weight:600}
.ms-menu a svg{width:20px;height:20px;color:var(--ink-2);flex:0 0 20px}
.ms-menu a span{flex:1}
.ms-menu a em{font-style:normal;color:var(--muted-2);font-weight:400;font-size:18px}
.ms-logout{display:flex;align-items:center;justify-content:center;width:100%;height:46px;margin-top:22px;
  border-radius:23px;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:15px;font-weight:600;
  font-family:inherit;cursor:pointer}
.ms-form label{display:block;font-size:12px;color:var(--muted);font-weight:600;margin:14px 0 6px}
.ms-form input{width:100%;height:44px;border:1px solid var(--line);border-radius:12px;padding:0 14px;
  font-size:15px;background:var(--bg-soft);color:var(--ink);outline:none;font-family:inherit}
.ms-form input:focus{border-color:#d0d0d6;background:#fff}
.ms-form .ms-btn,.ms-form button.ms-btn{width:100%;margin-top:18px;height:46px;border:0;font-size:15px;cursor:pointer}
.ms-form .alt{margin-top:16px;text-align:center;font-size:13px;color:var(--muted)}
.ms-form .alt a{color:var(--red);font-weight:700;text-decoration:none}
.ms-form .msg{min-height:18px;margin-top:10px;font-size:12.5px;color:var(--red)}
.ms-rowbtn{display:flex;gap:8px}
.ms-rowbtn input{flex:1}
.ms-rowbtn button{flex:0 0 96px;height:44px;border-radius:12px;border:1px solid var(--line);background:#fff;
  font-weight:600;font-size:13px;color:var(--ink);font-family:inherit;cursor:pointer}
button.ms-btn{border:0;cursor:pointer;font-family:inherit}

/* 福利页：红果那种金币卡 + 签到 + 任务，不是会员购买表单 */
.ms-coin{border-radius:16px;padding:20px 18px 16px;color:#fff;margin-bottom:16px;
  background:linear-gradient(135deg,#ff7a45 0%,#fe2c55 72%)}
.ms-coin em{font-style:normal;font-size:12px;opacity:.9}
.ms-coin b{display:block;font-size:42px;font-weight:800;letter-spacing:-1px;line-height:1;margin:8px 0 6px;color:#fff}
.ms-coin p{font-size:12px;opacity:.85;margin-top:4px}
.ms-days{display:flex;gap:6px;margin:14px 0 6px}
.ms-days i{flex:1;text-align:center;font-style:normal;font-size:11px;font-weight:600;color:var(--muted);
  background:var(--bg-soft);border-radius:10px;padding:8px 0}
.ms-days i.on{background:#ffe8ee;color:var(--red)}
.ms-days i.today{box-shadow:inset 0 0 0 1.5px var(--red);color:var(--red);background:#fff}
.ms-sign{width:100%;height:40px;margin-top:8px;border:0;border-radius:20px;background:#fff;color:var(--red);
  font-size:14px;font-weight:700;font-family:inherit;cursor:pointer}
.ms-sign:disabled{opacity:.55}
.ms-task{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line);
  text-decoration:none;color:inherit}
.ms-task .ms-task-ico{width:36px;height:36px;border-radius:10px;background:#fff0f3;color:var(--red);
  display:flex;align-items:center;justify-content:center;flex:0 0 36px}
.ms-task .ms-task-ico svg{width:18px;height:18px}
.ms-task b{display:block;font-size:14px;font-weight:700}
.ms-task i{display:block;font-style:normal;font-size:12px;color:var(--muted);margin-top:2px}
.ms-task .go{margin-left:auto;height:28px;padding:0 12px;border-radius:14px;background:var(--red);color:#fff;
  font-size:12px;font-weight:700;display:flex;align-items:center;flex:0 0 auto}
