/* =====================================================================
   泰语站前台样式（模板见 prototype/th/）
   布局：电脑端左侧导航栏 + 顶栏；手机端顶栏 + 底部标签栏
   ===================================================================== */
:root {
  --bg: #0b0b14;
  --bg-2: #10101b;
  --surface: #161624;
  --surface-2: #1d1d2e;
  --surface-3: #26263a;
  --line: #2a2a40;
  --text: #f3f3f8;
  --text-2: #b4b4c8;
  --text-3: #7c7c96;
  --accent: #ff4f79;
  --accent-2: #ff8a3d;
  --grad: linear-gradient(120deg, #ff3d7f 0%, #ff8a3d 100%);
  --sub: #38bdf8;
  --dub: #fbbf24;
  --thai: #34d399;
  --radius: 14px;
  --radius-sm: 10px;
  --side: 248px;
  --top: 68px;
  --font: "Noto Sans Thai", "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-h: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 var(--font); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 600; line-height: 1.35; margin: 0; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-3); }


/* ---------- 整体布局 ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--line); padding: 18px 14px 30px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.main { flex: 1; min-width: 0; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

.logo { display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-h); font-weight: 700; font-size: 24px; letter-spacing: -.3px; padding: 4px 8px 18px; }
.logo .k { background: var(--grad); color: #fff; border-radius: 8px; padding: 0 7px; margin-left: 4px; font-size: 18px; line-height: 28px; }
.side nav a, .side .grp a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-size: 15px; transition: background .15s, color .15s; }
.side nav a:hover, .side .grp a:hover { background: var(--surface); color: var(--text); }
.side nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.side nav a.on .i { color: var(--accent); }
.side h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 18px 12px 6px; font-weight: 600; }
.side .grp a { padding: 6px 12px; font-size: 14px; }
.side .grp a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); flex: none; }
.side .grp a:hover::before { background: var(--accent); }
.side .more-link { color: var(--accent) !important; }

/* ---------- 顶栏 ---------- */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(11, 11, 20, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(42, 42, 64, .6); }
.top .logo { display: none; padding: 0; }
.search { position: relative; flex: 1; max-width: 560px; }
.search .box { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; }
.search .box:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.search kbd { font: 12px var(--font); color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.suggest { position: absolute; left: 0; right: 0; top: 52px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); padding: 6px; display: none; }
.suggest.show { display: block; }
.suggest a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.suggest a:hover { background: var(--surface-2); }
.suggest .pt { width: 40px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; flex: none; background: var(--surface-3); }
.suggest b { display: block; font-weight: 600; }
.suggest small { color: var(--text-3); }
.suggest .all { justify-content: center; color: var(--accent); font-size: 14px; }
.top .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.pill-btn:hover { color: var(--text); }
.top .m-search { display: none; }

/* ---------- 按钮、标签 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-family: var(--font-h); font-size: 16px; border: 0; cursor: pointer; white-space: nowrap; }
.btn-main { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(255, 61, 127, .35); }
.btn-main:hover { filter: brightness(1.08); }
.btn-soft { background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(6px); }
.btn-soft:hover { background: rgba(255, 255, 255, .16); }
.btn-line { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; }
.b-q { background: rgba(255, 255, 255, .92); color: #111; }
.b-sub { background: rgba(56, 189, 248, .16); color: var(--sub); }
.b-dub { background: rgba(251, 191, 36, .16); color: var(--dub); }
.b-th { background: rgba(52, 211, 153, .16); color: var(--thai); }
.b-ep { background: var(--accent); color: #fff; }
.b-age { border: 1px solid var(--text-3); color: var(--text-2); }
.b-new { background: var(--grad); color: #fff; }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--surface-3); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }

/* ---------- 区块标题 ---------- */
.sec { margin-top: 44px; }
.sec-h { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sec-h h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.sec-h h2 .bar { width: 4px; height: 22px; border-radius: 4px; background: var(--grad); }
.sec-h .sub { color: var(--text-3); font-size: 14px; }
.sec-h .more { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); font-size: 14px; white-space: nowrap; }
.sec-h .more:hover { color: var(--accent); }
.sec-h .nav-btns { margin-left: auto; display: flex; gap: 6px; }
.sec-h .nav-btns + .more { margin-left: 8px; }
.sec-h .nav-btns button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.sec-h .nav-btns button:hover { color: var(--text); }
.sec-h .nav-btns .i { width: 16px; height: 16px; }

/* ---------- 海报卡片 ---------- */
.row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 16px) / 6); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 16px; }
.pc { display: block; min-width: 0; }
.pc .ps { position: relative; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.pc .ps img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pc:hover .ps img { transform: scale(1.05); }
.pc .ps::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; }
.pc .tl { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.pc .bl { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 8px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pc .rt { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: #fde68a; }
.pc .rt .i { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.pc .hover-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(11, 11, 20, .35); }
.pc .hover-play span { width: 54px; height: 54px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(255, 61, 127, .45); }
.pc .hover-play .i { width: 22px; height: 22px; margin-left: 3px; }
.pc:hover .hover-play { opacity: 1; }
.pc .t { margin-top: 10px; font-weight: 600; font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc:hover .t { color: var(--accent); }
.pc .s { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 14px; background: radial-gradient(120% 80% at 0% 0%, rgba(255, 61, 127, .35), transparent 60%), radial-gradient(120% 80% at 100% 100%, rgba(255, 138, 61, .3), transparent 60%), var(--surface-2); font-family: var(--font-h); font-weight: 600; font-size: 16px; line-height: 1.35; color: #fff; }
.ph .i { width: 26px; height: 26px; opacity: .6; margin-bottom: auto; }
.ph small { font: 12px var(--font); color: var(--text-2); }

.pc .ph { padding-bottom: 40px; }
.pc .ph small { display: none; }
.grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ---------- 首页大图 ---------- */
.feature { position: relative; margin: 20px 0 0; border-radius: 22px; overflow: hidden; min-height: 470px; background: var(--surface); }
.feature .sl { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; pointer-events: none; }
.feature .sl.on { opacity: 1; pointer-events: auto; }
.feature .bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; transform: scale(1.04); }
.feature .bg.blur { filter: blur(30px) saturate(1.3); opacity: .55; transform: scale(1.2); }
.feature .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 11, 20, .96) 0%, rgba(11, 11, 20, .78) 42%, rgba(11, 11, 20, .1) 100%), linear-gradient(0deg, rgba(11, 11, 20, .7), transparent 50%); }
.feature .in { position: relative; height: 100%; min-height: 470px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 44px 48px; }
.feature .kick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-2); letter-spacing: .04em; }
.feature h2 { font-size: 44px; margin: 10px 0 2px; max-width: 620px; }
.feature .en { color: var(--text-2); font-size: 17px; }
.feature .meta { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; margin: 16px 0; color: var(--text-2); font-size: 14px; }
.feature .meta .rt { color: #fde68a; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.feature .meta .rt .i { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.feature .ov { max-width: 560px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feature .acts { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.feature .poster { width: 250px; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); transform: rotate(2deg); }
.feature .thumbs { position: absolute; right: 24px; bottom: 22px; display: flex; gap: 8px; z-index: 2; }
.feature .thumbs button { width: 46px; height: 66px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-3); cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.feature .thumbs button.on { border-color: #fff; opacity: 1; }
.feature .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.feature .bar { position: absolute; left: 48px; bottom: 28px; display: flex; gap: 6px; z-index: 2; }
.feature .bar span { width: 26px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); }
.feature .bar span.on { background: var(--grad); width: 42px; }

/* 分类方块 */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat { position: relative; height: 96px; border-radius: var(--radius); padding: 14px 16px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-family: var(--font-h); font-weight: 600; font-size: 18px; }
.cat small { font: 13px var(--font); opacity: .85; }
.cat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.cat:hover { filter: brightness(1.1); }


/* 今日新集（横向卡片） */
.eps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ec { display: flex; gap: 14px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; }
.ec:hover { border-color: var(--accent); }
.ec .pt { width: 78px; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; flex: none; background: var(--surface-3); }
.ec .pt img { width: 100%; height: 100%; object-fit: cover; }
.ec .b { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ec b { font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec .en { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec .tg { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.ec time { color: var(--text-3); font-size: 12px; }

/* 两栏：内容 + 侧栏 */
.two { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.panel h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel h3 .i { color: var(--accent); }
.rank a { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.rank a:first-of-type { border-top: 0; }
.rank .no { width: 28px; font: 700 22px var(--font-h); color: var(--text-3); text-align: center; flex: none; }
.rank a:nth-of-type(-n+3) .no { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rank .pt { width: 46px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; flex: none; background: var(--surface-3); }
.rank .pt img { width: 100%; height: 100%; object-fit: cover; }
.rank b { display: block; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rank small { color: var(--text-3); font-size: 12px; }
.seg { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 8px; }
.seg button { flex: 1; height: 32px; border-radius: 999px; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--surface-3); color: var(--text); font-weight: 600; }

/* 专题 */
.colls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.coll { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); padding: 18px; min-height: 210px; }
.coll .fan { display: flex; height: 110px; margin-bottom: 14px; }
.coll .fan div { width: 74px; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, .5); background: var(--surface-3); }
.coll .fan div + div { margin-left: -26px; }
.coll .fan div:nth-child(1) { transform: rotate(-6deg); }
.coll .fan div:nth-child(3) { transform: rotate(6deg); }
.coll .fan img { width: 100%; height: 100%; object-fit: cover; }
.coll h3 { font-size: 18px; }
.coll p { color: var(--text-2); font-size: 14px; margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coll small { color: var(--text-3); font-size: 13px; }
.coll:hover { border-color: var(--accent); }

/* SEO 文字 */
.about { margin-top: 56px; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.about h2 { color: var(--text); font-size: 20px; margin-bottom: 8px; }
.about h3 { color: var(--text); font-size: 16px; margin: 18px 0 4px; }
.about p { margin: 0 0 8px; }
.about a { color: var(--accent); }

/* ---------- 列表页 ---------- */
.crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--text-3); margin: 22px 0 12px; }
.crumb a:hover { color: var(--text); }
.crumb .sep { opacity: .5; }
.ph1 { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ph1 h1 { font-size: 32px; }
.ph1 p { color: var(--text-2); margin: 6px 0 0; max-width: 760px; flex-basis: 100%; }
.filters { margin: 22px 0; display: grid; gap: 10px; }
.filters .fr { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.filters .fr b { width: 84px; flex: none; color: var(--text-3); font-size: 13px; font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--text-3); font-size: 14px; }
.toolbar select { margin-left: auto; height: 38px; border-radius: 999px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.pager { display: flex; gap: 6px; justify-content: center; margin: 36px 0 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.pager .on { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; }

/* ---------- 详情页 ---------- */
.dhero { position: relative; overflow: hidden; }
.dhero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; filter: blur(28px) saturate(1.2); opacity: .45; transform: scale(1.15); }
.dhero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 11, 20, .5), var(--bg) 92%); }
.dhero .in { position: relative; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; padding-top: 28px; padding-bottom: 20px; }
.dhero .poster { border-radius: 18px; overflow: hidden; aspect-ratio: 2/3; background: var(--surface-2); box-shadow: 0 24px 50px rgba(0, 0, 0, .55); }
.dhero .poster img { width: 100%; height: 100%; object-fit: cover; }
.dhero h1 { font-size: 38px; }
.dhero .en { color: var(--text-2); font-size: 17px; margin-top: 2px; }
.dhero .tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.dhero .score { display: flex; gap: 20px; flex-wrap: wrap; margin: 4px 0 6px; }
.dhero .score div { display: flex; flex-direction: column; }
.dhero .score b { font: 700 22px var(--font-h); }
.dhero .score b.y { color: #fde68a; }
.dhero .score small { color: var(--text-3); font-size: 12px; }
.dhero .acts { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.dhero .ov { color: var(--text-2); max-width: 780px; }
.dhero .ov.empty { color: var(--text-3); font-style: italic; }
.facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; margin: 18px 0 0; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text-2); }
.facts dd a { color: var(--text); }
.facts dd a:hover { color: var(--accent); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 46px; padding: 0 16px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 16px; }
.people a { text-align: center; font-size: 13px; }
.people .av { width: 86px; height: 86px; border-radius: 50%; margin: 0 auto 8px; background: var(--surface-3); display: grid; place-items: center; font: 600 26px var(--font-h); color: var(--text-2); }
.people small { display: block; color: var(--text-3); }

/* 剧集：季 + 集 */
.seasons { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.eplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ep { display: flex; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ep:hover { border-color: var(--accent); }
.ep .th { width: 120px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-3); position: relative; display: grid; place-items: center; color: var(--text-3); font: 700 22px var(--font-h); }
.ep .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ep b { font-size: 14px; display: block; }
.ep small { color: var(--text-3); font-size: 12px; }
.ep.soon { opacity: .55; pointer-events: none; }
.ep.cur { border-color: var(--accent); background: rgba(255, 79, 121, .08); }
.epnums { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.epnums a { height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.epnums a:hover { border-color: var(--accent); }
.epnums a.cur { background: var(--grad); border-color: transparent; color: #fff; }
.epnums a.soon { opacity: .4; pointer-events: none; }
.next-air { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(255, 61, 127, .14), rgba(255, 138, 61, .1)); border: 1px solid rgba(255, 79, 121, .3); margin-bottom: 16px; }
.next-air .i { color: var(--accent); }
.next-air b { color: var(--text); }

/* ---------- 播放页 ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-top: 20px; }
.player { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; }
.player .cover { position: absolute; inset: 0; background-size: cover; background-position: center; }
.player .cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(0, 0, 0, .25), rgba(0, 0, 0, .75)); }
.player .big { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; border: 0; background: none; cursor: pointer; color: #fff; }
.player .big span { width: 84px; height: 84px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(255, 61, 127, .2); }
.player .big .i { width: 34px; height: 34px; margin-left: 5px; }
.player .big small { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 14px; color: var(--text-2); }
.player .msg { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; color: var(--text-2); text-align: center; padding: 20px; }
.lights-off .side, .lights-off .top, .lights-off .foot, .lights-off .tabbar, .lights-off .watch-wrap > .crumb, .lights-off .wside, .lights-off .wtitle, .lights-off .servers, .lights-off .ctrl, .lights-off .watch-wrap ~ *, .lights-off .ad-slot { opacity: .06; transition: opacity .3s; }
.lights-off .ctrl #lights { opacity: 1; }
.btn-line.on { border-color: var(--accent); color: var(--accent); }
.ctrl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.ctrl .sp { flex: 1; }
.servers { margin-top: 18px; display: grid; gap: 10px; }
.servers .sr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.servers .sr > b { width: 92px; flex: none; font-size: 13px; }
.servers button { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.servers button .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.servers button.on { border-color: transparent; background: var(--grad); color: #fff; }
.tip { margin-top: 12px; font-size: 13px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.wtitle { margin-top: 22px; }
.wtitle h1 { font-size: 26px; }
.wtitle .en { color: var(--text-3); }
.wside .panel + .panel { margin-top: 16px; }
.wside .eplist { grid-template-columns: 1fr; max-height: 560px; overflow-y: auto; padding-right: 4px; }

/* 时间表 */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 18px 0 24px; }
.days button { padding: 10px 6px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.days button b { font: 600 15px var(--font-h); color: var(--text); }
.days button small { font-size: 12px; }
.days button.on { background: var(--grad); border-color: transparent; color: #fff; }
.days button.on b { color: #fff; }
.slot { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.slot time { font: 600 18px var(--font-h); color: var(--accent); }
.slot .eps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 搜索 */
.big-search { margin: 26px 0 8px; }
.big-search .box { height: 58px; border-radius: 18px; font-size: 18px; }
.hot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-state .i { width: 56px; height: 56px; color: var(--text-3); margin: 0 auto 12px; }

/* 404 */
.nf { text-align: center; padding: 70px 20px 30px; }
.nf .code { font: 800 140px/1 var(--font-h); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf h1 { font-size: 28px; margin: 6px 0 8px; }
.nf p { color: var(--text-2); max-width: 520px; margin: 0 auto 22px; }

/* ---------- 底栏 ---------- */
.foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 40px 0 120px; color: var(--text-3); font-size: 14px; }
.foot .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot h4 { color: var(--text); font-size: 15px; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a:hover { color: var(--accent); }
.foot .kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.foot .kw a { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.foot .copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* 手机底部标签栏 */
.tabbar { display: none; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; background: var(--surface-3); color: var(--text); padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: .25s; z-index: 90; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.open { display: block; }
.drawer .mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.drawer .side { position: absolute; left: 0; top: 0; bottom: 0; width: 290px; height: auto; display: block !important; }


/* =====================================================================
   正式版补充：原型里没有、动态页面需要的组件
   ===================================================================== */
[hidden] { display: none !important; }
.logo img { height: var(--logo-h); width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.chip-select { height: 36px; border-radius: 999px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.tabs a, .tabs button { height: 46px; padding: 0 16px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; display: inline-flex; align-items: center; }
.tabs a.on, .tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.toolbar b { color: var(--text); }
.toolbar h2 { color: var(--text); }
.empty-state h2 { color: var(--text); font-size: 20px; margin-bottom: 6px; }
.search-h { font-size: 24px; margin-top: 18px; }
.intro-box { margin-top: 24px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.dhero .crumb { margin-top: 0; }
.dhero .tags .chip-sm { height: 24px; }
.ph1 h1 span { margin-right: 6px; }

/* 搜索联想 */
.suggest .pt img { width: 100%; height: 100%; object-fit: cover; }
.suggest .none { padding: 14px; color: var(--text-3); font-size: 14px; }

/* 演员 */
.people .person { text-align: center; font-size: 13px; }
.people .av { overflow: hidden; }
.people .av img { width: 100%; height: 100%; object-fit: cover; }

/* 集列表 */
.ep-panel .seasons { margin-bottom: 12px; }
.ep-panel-body { transition: opacity .15s; }
.ep .th .no { position: relative; z-index: 1; font: 700 22px var(--font-h); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.ep .b { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep .b b .badge { margin-left: 6px; height: 18px; font-size: 11px; vertical-align: 2px; }
.ep .ov { color: var(--text-3); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.epnums span { height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px dashed var(--line); color: var(--text-3); font-size: 14px; }
.wside .epnums { max-height: 420px; overflow-y: auto; padding-right: 4px; }
.wside .panel h3 .chip-select { height: 30px; font-size: 13px; }
.wside .facts { grid-template-columns: 80px minmax(0, 1fr); }

/* 播放器 */
.player .player-box { position: absolute; inset: 0; background: #000 center / cover no-repeat; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-cover { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center; background: radial-gradient(circle, rgba(0, 0, 0, .25), rgba(0, 0, 0, .75)); }
.player-cover .play-circle { width: 84px; height: 84px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(255, 61, 127, .2); }
.player-cover .play-circle .i { width: 34px; height: 34px; margin-left: 5px; }
.player-cover .label { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 15px; color: var(--text-2); }
.player-msg { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; padding: 20px; background: rgba(0, 0, 0, .7); color: var(--text-2); }
.player-msg b { color: var(--text); font-size: 17px; }
.player-msg code { font-size: 12px; word-break: break-all; color: var(--text-3); }
.player-restart { position: absolute; left: 0; right: 0; bottom: 56px; display: flex; justify-content: center; z-index: 2; }
.next-countdown { position: absolute; right: 16px; bottom: 16px; z-index: 3; background: rgba(11, 11, 20, .92); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; max-width: 300px; }
.servers:empty { display: none; }
.servers .sr > b { font-size: 13px; color: var(--text-2); }
.server-tip { font-size: 13px; color: var(--text-3); }
.ctrl .ep-nav { display: flex; gap: 8px; }
.watch-wrap { padding-bottom: 8px; }
.wtitle .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.wtitle p { margin: 0 0 12px; }

/* 播放表 */
.nt-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.nt-stats span { padding: 10px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.nt-stats b { display: block; font: 700 22px var(--font-h); color: var(--text); }
.sched .days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(78px, 1fr); overflow-x: auto; scrollbar-width: none; }
.nt-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: -8px 0 18px; }
.nt-day h2 { font-size: 20px; margin-bottom: 14px; }
.nt-day h2 small { font: 400 14px var(--font); color: var(--text-3); margin-left: 8px; }
.nt-day .eps { margin-bottom: 14px; }

/* Top 100 */
.top-list { display: grid; gap: 12px; margin-top: 24px; }
.top-item { display: grid; grid-template-columns: 56px 92px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.top-item:hover { border-color: var(--accent); }
.top-item .no { font: 800 30px var(--font-h); text-align: center; color: var(--text-3); }
.top-item:nth-child(-n+3) .no { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-item .pt { aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.top-item .pt img { width: 100%; height: 100%; object-fit: cover; }
.top-item .b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.top-item b { font-size: 17px; font-family: var(--font-h); }
.top-item small { color: var(--text-3); }
.top-item .m { color: var(--text-3); font-size: 13px; }
.top-item .m .rt { color: #fde68a; font-weight: 600; display: inline-flex; gap: 3px; align-items: center; }
.top-item .m .rt .i { width: 14px; height: 14px; }
.top-item .ov { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 专题 */
.coll .fan:empty { display: none; }
.coll-hero { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 8px; padding: 26px; border-radius: 22px; background: radial-gradient(120% 80% at 0% 0%, rgba(255, 61, 127, .18), transparent 60%), var(--surface); border: 1px solid var(--line); }
.coll-hero .fan-only { background: none; border: 0; padding: 0; min-height: 0; }
.coll-hero .fan { height: 220px; margin: 0; justify-content: center; }
.coll-hero .fan div { width: 130px; }
.coll-hero .fan div + div { margin-left: -60px; }
.coll-hero .kick { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent-2); letter-spacing: .04em; }
.coll-hero h1 { font-size: 32px; margin: 6px 0 10px; }
.coll-hero .desc { color: var(--text-2); }
.coll-hero .desc p { margin: 0 0 10px; }
.coll-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-3); font-size: 14px; margin-top: 12px; }
.coll-meta b { color: var(--text); }

/* 单页、FAQ */
.prose { font-size: 15px; }
.prose h1 { font-size: 30px; color: var(--text); margin-bottom: 14px; }
.prose h2 { font-size: 20px; color: var(--text); margin: 22px 0 8px; }
.prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { width: 32%; color: var(--text); }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-h); }
.faq p { color: var(--text-2); margin: 8px 0 0; }

/* 其他 */
.totop { position: fixed; right: 18px; bottom: 24px; z-index: 45; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
.totop.show { opacity: 1; pointer-events: auto; }
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 720px; margin: 0 auto; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.cookie-banner a { color: var(--accent); }
.ad-slot { margin-top: 16px; text-align: center; }
.footer-notice, .tmdb-attr { flex-basis: 100%; font-size: 12px; }
.tmdb-attr b { color: #01b4e4; margin-right: 4px; }
.tabbar #menu-toggle { color: var(--text-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 1400px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .row { grid-auto-columns: calc((100% - 4 * 16px) / 5); }
}
@media (max-width: 1180px) {
  :root { --side: 220px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .row { grid-auto-columns: calc((100% - 3 * 16px) / 4); }
  .two, .watch { grid-template-columns: minmax(0, 1fr); }
  .eps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .feature .poster { display: none; }
  .feature .in { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .side { display: none; }
  .top { padding: 0 16px; }
  .top .logo { display: inline-flex; font-size: 21px; }
  .top .logo .k { font-size: 15px; line-height: 24px; }
  .wrap { padding: 0 16px; }
  .search { display: none; }
  .search.open { display: block; position: absolute; left: 12px; right: 12px; top: 12px; max-width: none; }
  .top .m-search { display: inline-grid; }
  .top .pill-btn { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(16, 16, 27, .95); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text-3); background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .tabbar a.on { color: var(--accent); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
  .grid.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-auto-columns: calc((100% - 2 * 12px) / 3); gap: 12px; }
  .dhero .in { grid-template-columns: 180px minmax(0, 1fr); gap: 22px; }
  .dhero h1 { font-size: 28px; }
  .foot .cols { grid-template-columns: 1fr 1fr; }
  .days { grid-template-columns: repeat(7, 84px); overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .feature { margin: 12px 0 0; border-radius: 18px; min-height: 0; height: 430px; }
  .feature .in { min-height: 430px; padding: 24px 20px 64px; align-items: end; }
  .feature h2 { font-size: 28px; }
  .feature .ov { -webkit-line-clamp: 2; font-size: 14px; }
  .feature .shade { background: linear-gradient(0deg, rgba(11, 11, 20, .98) 10%, rgba(11, 11, 20, .55) 55%, rgba(11, 11, 20, .1)); }
  .feature .thumbs { display: none; }
  .feature .bar { left: 20px; bottom: 24px; }
  .feature .btn { height: 44px; padding: 0 18px; font-size: 15px; }
  .sec { margin-top: 34px; }
  .sec-h h2 { font-size: 19px; }
  .sec-h .nav-btns { display: none; }
  .sec-h .nav-btns + .more { margin-left: auto; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat { height: 80px; font-size: 16px; }
  .eps, .slot .eps { grid-template-columns: minmax(0, 1fr); }
  .colls { grid-template-columns: minmax(0, 1fr); }
  .dhero .in { grid-template-columns: 1fr; }
  .dhero .poster { width: 150px; }
  .dhero h1 { font-size: 26px; }
  .facts { grid-template-columns: 96px minmax(0, 1fr); }
  .ph1 h1 { font-size: 26px; }
  .filters .fr b { width: 66px; }
  .servers .sr > b { width: 100%; }
  .slot { grid-template-columns: 1fr; gap: 8px; }
  .foot .cols { grid-template-columns: 1fr; }
  .nf .code { font-size: 100px; }
  .eplist { grid-template-columns: minmax(0, 1fr); }
}

/* 正式版补充：响应式 */
@media (max-width: 1180px) {
  .wside .epnums { max-height: none; }
}
@media (max-width: 960px) {
  .totop { bottom: 84px; }
  .cookie-banner { bottom: 84px; }
  .coll-hero { grid-template-columns: 1fr; }
  .coll-hero .fan { height: 180px; }
}
@media (max-width: 640px) {
  .top-item { grid-template-columns: 36px 64px minmax(0, 1fr); gap: 10px; }
  .top-item .no { font-size: 22px; }
  .top-item .ov { display: none; }
  .coll-hero { padding: 18px; }
  .coll-hero h1 { font-size: 24px; }
  .ctrl .btn-sm span { display: none; }
  .ctrl .ep-nav .btn-sm { font-size: 13px; padding: 0 12px; }
  .next-countdown { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
