:root {
  --bg: #0b0d14;
  --bg-soft: #12151f;
  --card: #181c2a;
  --card-hover: #1e2334;
  --border: #262b3d;
  --text: #e8eaf2;
  --text-dim: #9aa0b5;
  --primary: #f59e0b;
  --primary-2: #f97316;
  --grad: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --danger: #ff5c7c;
  --ok: #34d399;
  /* 圆角三档 + 字号三档: 新样式只引用 token, 不再散落硬编码 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
}

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

html, body { background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,20,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  width: 100%; padding: 0 clamp(16px, 3vw, 40px);
  height: 60px; display: flex; align-items: center; gap: 16px;
}
.logo {
  font-size: 20px; font-weight: 800; letter-spacing: .5px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 14px; border-radius: var(--radius-sm); color: var(--text-dim);
  font-size: var(--text-md);
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--card); }

.search-box { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.search-box input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text); outline: none; font-size: var(--text-md);
}
.search-box input:focus { border-color: var(--primary); }
.search-box::before {
  content: ""; position: absolute; left: 11px; top: 9px; width: 18px; height: 18px; opacity: .6;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-4-4"/></svg>') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-4-4"/></svg>') no-repeat center / contain;
}

/* ---------- 缁炬寧鈧?SVG 閸ョ偓鐖ｉ崺铏诡攨閺嶅嘲绱?---------- */
.ic {
  width: 16px; height: 16px; flex: none;
  vertical-align: -0.18em;
}
.page-title .ic, h3 .ic { vertical-align: -0.2em; }
.tabbar a i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 18px; }
.tabbar a i .ic { width: 20px; height: 20px; }
.channel-chip i { display: flex; align-items: center; font-style: normal; font-size: 18px; }
.channel-chip i .ic { width: 18px; height: 18px; }
.drawer-nav a .ic { margin-right: 9px; width: 18px; height: 18px; vertical-align: -0.25em; }
.lock-ico .ic { display: inline-block; }
.tag-lock { display: inline-flex; align-items: center; gap: 3px; }
.tag-lock .ic { width: 12px; height: 12px; }
.ch-info h1 .ic { vertical-align: -0.2em; }

.user-area { display: flex; align-items: center; gap: 10px; white-space: nowrap; }

/* 缁夎濮╃粩顖烆暥闁挸鎻╅幑宄板瀼閹广垺娼?濡楀矂娼扮粩顖炴閽? */
.mobile-channels { display: none; }
.points-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: var(--radius-lg); font-size: var(--text-sm); color: var(--text);
}
.points-chip .ico { color: #fbbf24; }
.member-badge {
  background: var(--grad); color: #fff; font-size: var(--text-sm); font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); padding: 9px 18px;
  font-size: var(--text-md); font-weight: 600; color: #fff;
}
.btn-primary { background: var(--grad); }
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: var(--text-sm); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Layout ---------- */
.container { width: 100%; margin: 0; padding: 20px clamp(16px, 3vw, 40px); flex: 1; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; }

/* ---------- Category pills ---------- */
.cat-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.cat-pill {
  padding: 7px 16px; border-radius: var(--radius-lg); font-size: var(--text-sm);
  background: var(--card); color: var(--text-dim);
  border: 1px solid var(--border);
}
.cat-pill:hover { color: var(--text); border-color: var(--primary); }
.cat-pill.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- Video grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.video-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); min-width: 0;
}
.video-card:hover {
  transform: translateY(-4px); background: var(--card-hover);
  border-color: var(--primary); box-shadow: 0 10px 24px rgba(245,158,11,.18);
}
.video-card .thumb {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1e2e, #232a40); display: block;
}
/* 缁旀牜澧楃亸渚€娼?妤?鐎圭晫娈戦崶?: 閸掑洦宕叉稉?2:3 缁旀牜澧楀В鏂剧伐, 缂冩垶鐗告妯哄閼奉亪鈧倸绨?*/
/* 缁旀牜澧楃亸渚€娼?妤?鐎圭晫娈戦崶?: 閸掑洦宕叉稉?2:3 缁旀牜澧楀В鏂剧伐, 鐎瑰本鏆ｉ弰鍓с仛濞撮攱濮ゆ稉宥堫梿閸?*/
.video-card .thumb.portrait { aspect-ratio: 2 / 3; }
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card .thumb .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #3d4562; font-size: 30px;
}
/* 鐏忎線娼扮憴鎺撶垼: 瀹革缚绗呴幘顓熸杹闁?閻忣偆鍔?, 閸欏厖绗呴弴瀛樻煀闂嗗棙鏆?*/
.video-card .corner-views, .video-card .corner-ep {
  position: absolute; bottom: 6px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); line-height: 1; color: #fff; font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  background: rgba(10, 12, 20, .55); border-radius: var(--radius-sm); padding: 2px 7px;
}
.video-card .corner-views { left: 8px; }
.video-card .corner-views svg {
  width: 15px; height: 15px; flex: none;
  color: #fff; /* 娑撳孩鏋冪€涙鎮撻懝?*/
  transform: translateY(0.5px); /* 閸╄櫣鍤庡顔跨殶, 娑撳孩鏆熺€涙鏃遍崥鎴濈湷娑擃厼顕?*/
}
.video-card .corner-ep { right: 8px; }
.video-card .tag-free, .video-card .tag-lock {
  position: absolute; top: 8px; left: 8px; font-size: var(--text-xs); font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-sm); color: #fff;
}
.tag-free { background: rgba(52,211,153,.9); }
.tag-lock { background: rgba(245,158,11,.92); }
.video-card .meta { padding: 10px 12px 12px; }
.video-card .title {
  font-size: var(--text-sm); font-weight: 600; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 36px;
}
.video-card .sub { font-size: var(--text-sm); color: var(--text-dim); margin-top: 5px; }

.load-more-wrap { text-align: center; margin-top: 24px; }
.empty-tip { text-align: center; color: var(--text-dim); padding: 60px 0; font-size: var(--text-md); }

/* ---------- Detail page ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.player-box {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.player-box video { width: 100%; height: 100%; display: block; }
.pay-mask {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: rgba(8,10,16,.92); backdrop-filter: blur(4px); text-align: center; padding: 20px;
  z-index: 10; /* App WebView 閻?video 閺勵垳鈥栨禒璺烘禈鐏? 娑撳秴濮?z-index 娴兼氨娲婃担蹇涗紕缂?*/
}
.pay-mask .lock-ico { font-size: 40px; }
.pay-mask .msg { color: var(--text-dim); font-size: var(--text-md); max-width: 320px; line-height: 1.6; }
.pay-mask .btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.detail-info { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.detail-info h1 { font-size: 18px; line-height: 1.5; margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; font-size: var(--text-sm); padding: 8px 0; border-top: 1px solid var(--border); }
.info-row .k { color: var(--text-dim); }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--text-dim); font-size: var(--text-sm); }
.back-link:hover { color: var(--primary); }

/* ---------- Panels / cards ---------- */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.panel h2 { font-size: 16px; margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat-tile { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-tile .label { font-size: var(--text-sm); color: var(--text-dim); margin-bottom: 8px; }
.stat-tile .value { font-size: 22px; font-weight: 700; }
.stat-tile .value.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; font-size: var(--text-sm); }
tr:hover td { background: var(--bg-soft); }

/* ---------- Forms ---------- */
/* 閸忋劌鐪潏鎾冲弳閹貉傛閸╄櫣顢呮稉濠氼暯: 閺堫亜鎳℃稉顓犵矋娴犺埖鐗卞蹇曟畱鐟?input/textarea/select 娑旂喍绻氶幐浣圭箒閼规煡顥撻弽?*/
input, textarea, select {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); outline: none;
  font-family: inherit; font-size: var(--text-md);
}
input, select { height: 40px; padding: 0 14px; }
textarea { padding: 10px 14px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--text-dim); opacity: .75; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
input::selection, textarea::selection { background: rgba(124, 92, 255, .35); }
select option { background: var(--card, #1a1f2e); color: var(--text); }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: var(--text-sm); color: var(--text-dim); margin-bottom: 6px; }
.form-item input, .form-item select {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); outline: none; font-size: var(--text-md);
}
.form-item input:focus { border-color: var(--primary); }
.form-row { display: flex; gap: 10px; }
.form-row .form-item { flex: 1; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 180px; }

/* ---------- Plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.plan-card {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; position: relative;
}
.plan-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 10px 24px rgba(245,158,11,.18); }
.plan-card .plan-name { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.plan-card .plan-price { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-card .plan-price .unit { font-size: var(--text-sm); font-weight: 400; }
.plan-card .plan-points { font-size: var(--text-sm); color: var(--text-dim); margin: 10px 0 16px; }
.plan-card .btns { display: flex; flex-direction: column; gap: 8px; }
.member-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Invite link ---------- */
.invite-link-box { display: flex; gap: 10px; flex-wrap: wrap; }
.invite-link-box .link-text {
  flex: 1; min-width: 200px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: var(--text-sm); color: var(--primary-2);
  word-break: break-all; user-select: all;
}

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px); padding: 16px;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 380px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px;
  max-height: 86vh; overflow-y: auto; margin: auto; /* 鐏忓繐鐫?闁款喚娲忓鐟板毉閺冩湹绻氱拠浣稿讲鐟欎椒绗栫亸浠嬪櫤鐏炲懍鑵?*/
}
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { text-align: center; font-size: 18px; margin-bottom: 20px; }
.modal-tabs { display: flex; margin-bottom: 20px; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 4px; }
.modal-tabs button {
  flex: 1; border: none; background: transparent; color: var(--text-dim);
  padding: 8px; border-radius: var(--radius-sm); font-size: var(--text-md); font-weight: 600;
}
.modal-tabs button.active { background: var(--grad); color: #fff; }
.modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: none; background: none; border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-dim); font-size: 22px; line-height: 1;
}
.modal-close:hover { background: var(--bg-soft); color: var(--text); }
.modal { position: relative; }
.modal .switch-tip { text-align: center; font-size: var(--text-sm); color: var(--text-dim); margin-top: 14px; }
.modal .switch-tip a { color: var(--primary); cursor: pointer; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: var(--text-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 90vw;
}
.toast.err { border-color: var(--danger); color: var(--danger); }
.toast.ok { border-color: var(--ok); color: var(--ok); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 24px 16px; margin-top: 30px; }
.footer-inner { width: 100%; text-align: center; color: var(--text-dim); font-size: var(--text-sm); line-height: 1.9; }
.footer-inner .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .detail-layout { grid-template-columns: 1fr; }
  .search-box { max-width: none; }
}
@media (max-width: 680px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 12px; row-gap: 8px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .main-nav a { padding: 6px 10px; white-space: nowrap; }
  .search-box { display: none; } /* 顶部搜索已迁入抽屉(三横线菜单) */
  .user-area { order: 1; margin-left: auto; }
  .logo { font-size: 17px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .container { padding: 14px 12px; }
  .page-title { font-size: 18px; }
}
@media (max-width: 420px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= v2: 鐎瑰本鏆ｇ€佃壈鍩?/ 閹惰棄鐪?/ 鎼存洟鍎撮弽?================= */
.hamburger { display: none; border: none; background: none; width: 30px; padding: 4px 0; position: relative; z-index: 5; -webkit-tap-highlight-color: transparent; }
.hamburger span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 5px 0; }

.nav-drop { position: relative; }
.nav-drop .arrow { font-size: 10px; font-style: normal; opacity: .7; }
.nav-drop > a { display: inline-block; padding: 8px 14px; border-radius: var(--radius-sm); color: var(--text-dim); font-size: var(--text-md); }
.nav-drop:hover > a, .nav-drop > a.active { color: var(--text); background: var(--card); }
.drop-panel {
  display: none; position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 150px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px; box-shadow: 0 12px 28px rgba(0,0,0,.45);
}
.nav-drop:hover .drop-panel, .nav-drop.open .drop-panel { display: block; }
.drop-panel a { display: block; padding: 8px 14px; border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--text-dim); }
.drop-panel a:hover { background: var(--bg-soft); color: var(--text); }
.drop-tip { padding: 10px 14px; font-size: var(--text-sm); color: var(--text-dim); }

.vip-entry {
  background: var(--grad); color: #fff; font-size: var(--text-sm); font-weight: 700;
  padding: 7px 16px; border-radius: var(--radius-lg); white-space: nowrap;
}
.vip-entry:hover { filter: brightness(1.15); transform: translateY(-1px); }
.vip-entry.active { box-shadow: 0 0 0 2px rgba(245,158,11,.45); }
/* APP娑撳娴囬崗銉ュ經: 閹诲繗绔熼獮鐣屼紥閺嶅嘲绱? 娑撳簼绱伴崨妯诲瘻闁筋喖鑻熼幒?*/
.app-entry {
  border: 1px solid var(--border); color: var(--text); font-size: var(--text-sm); font-weight: 600;
  padding: 6px 14px; border-radius: var(--radius-lg); white-space: nowrap;
}
.app-entry:hover { border-color: var(--primary); color: var(--primary); }
/* 缁夎濮╃粩顖氥仈闁劑娈ｉ挊?閹惰棄鐪介柌灞炬箒閸忋儱褰?, 娑?vip-entry 鐞涘奔璐熸稉鈧懛?*/
@media (max-width: 768px) { .app-entry { display: none; } }

/* ---------- 妤犮劍鐏︾仦?閺佺増宓侀崚鎷屾彧閸撳秶娈戦崡鐘辩秴) ---------- */
.v-skel { border-radius: var(--radius-sm); overflow: hidden; background: var(--card); border: 1px solid var(--border); }
.v-skel-img {
  aspect-ratio: 16 / 9; background:
    linear-gradient(100deg, rgba(255,255,255,.04) 40%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 60%) var(--bg-soft);
  background-size: 200% 100%;
}
.v-skel-line { height: 12px; margin: 10px; border-radius: var(--radius-sm); background: var(--bg-soft); }
.v-skel-line.short { width: 55%; margin-top: 0; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 閹惰棄鐪?---------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.6);
  opacity: 0; visibility: hidden;
}
.drawer-mask.show { opacity: 1; visibility: visible; }
.drawer {
  position: absolute; top: 0; left: 0; bottom: 0; width: 78%; max-width: 320px;
  background: var(--bg-soft); border-right: 1px solid var(--border);
  transform: translateX(-100%); overflow-y: auto; padding-bottom: 20px;
}
.drawer-mask.show .drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.drawer-close { border: none; background: none; color: var(--text-dim); font-size: 24px; line-height: 1; }
.drawer-user { padding: 16px; border-bottom: 1px solid var(--border); }
/* 抽屉内搜索框(从顶部迁入) */
.drawer-search { padding: 12px 16px 0; }
.drawer-search input {
  width: 100%; box-sizing: border-box; height: 36px; padding: 0 14px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: var(--radius-lg); font-size: var(--text-md); outline: none;
}
.drawer-search input:focus { border-color: var(--primary); }
.drawer-account { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.drawer-nav { padding: 10px 8px; border-bottom: 1px solid var(--border); }
.drawer-nav a { display: block; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; color: var(--text-dim); }
.drawer-nav a:hover { background: var(--card); color: var(--text); }
.drawer-nav a.active { background: var(--card); color: var(--primary); font-weight: 700; }
.drawer-sec { padding: 14px 16px 8px; font-size: var(--text-sm); color: var(--text-dim); }
.drawer-cat-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.drawer-cat-list a {
  padding: 6px 14px; border-radius: var(--radius-lg); font-size: var(--text-sm);
  background: var(--card); border: 1px solid var(--border); color: var(--text-dim);
}
.drawer-cat-list a:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 鎼存洟鍎磋箛顐ｅ祹閺?---------- */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(13,15,24,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; color: var(--text-dim); font-size: var(--text-xs); }
.tabbar a i { font-style: normal; font-size: 18px; }
.tabbar a.active { color: var(--primary); }

/* ================= v2: 妫ｆ牠銆夐崚鍡楀隘 ================= */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.home-main { min-width: 0; }
.home-side { position: sticky; top: 76px; }
.side-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.side-panel h3 { font-size: 15px; margin-bottom: 12px; }
.rank-list { display: flex; flex-direction: column; gap: 4px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: var(--radius-sm); }
.rank-item:hover { background: var(--bg-soft); }
.rank-no {
  width: 22px; height: 22px; flex: none; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--text-dim);
}
.rank-no.top1 { background: #ff5c5c; color: #fff; }
.rank-no.top2 { background: #ff9f43; color: #fff; }
.rank-no.top3 { background: #fbbf24; color: #fff; }
.rank-item .t { font-size: var(--text-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.rank-item .hot { font-size: var(--text-xs); color: var(--text-dim); flex: none; }
.side-collapse-btn { display: none; }

/* 鏉烆喗鎸?banner */
.banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 21 / 8; background: linear-gradient(135deg, #1a1e2e, #232a40);
  border: 1px solid var(--border); margin-bottom: 10px;
}
.banner-track { display: flex; height: 100%; }
.banner-slide { position: relative; min-width: 100%; height: 100%; display: block; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-slide .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 18px;
  background: linear-gradient(transparent, rgba(5,7,12,.9));
  font-size: 18px; font-weight: 700; color: #fff;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.banner-slide .badge {
  position: absolute; top: 14px; left: 14px; font-size: var(--text-sm); font-weight: 700;
  background: var(--grad); color: #fff; padding: 4px 12px; border-radius: var(--radius-lg);
}
.banner-dots { position: absolute; right: 16px; bottom: 14px; display: flex; gap: 6px; }
.banner-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); }
.banner-dots i.on { background: #fff; width: 20px; border-radius: 4px; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(10,12,20,.55); color: #fff; font-size: 16px;
}
.banner-arrow:hover { background: rgba(245,158,11,.8); }
.banner-arrow.prev { left: 10px; }
.banner-arrow.next { right: 10px; }

/* 閸掑棗灏弽鍥暯 + 濡亝绮寸悰?*/
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.sec-head h2 { font-size: 17px; }
.sec-head h2::before {
  content: ""; display: inline-block; width: 4px; height: 15px;
  background: var(--grad); border-radius: 2px; margin-right: 8px; vertical-align: -2px;
}
.sec-head .more { font-size: var(--text-sm); color: var(--text-dim); }
.sec-head .more:hover { color: var(--primary); }
.h-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 12px;
  overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity;
}
.h-scroll .video-card { scroll-snap-align: start; }
.h-scroll::-webkit-scrollbar { height: 6px; }
.h-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ================= v2: 閸掓銆冩い纰夌礄閹烘帟顢戝?閺堚偓閺?娑撴捇顣介敍?================= */
.page-desc { color: var(--text-dim); font-size: var(--text-sm); margin: -8px 0 18px; }
.rank-grid-item { position: relative; }
.rank-grid-item .rank-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 800; display: flex; align-items: center; justify-content: center;
  background: rgba(10,12,20,.75); color: #fff;
}
.rank-badge.b1 { background: #ff5c5c; }
.rank-badge.b2 { background: #ff9f43; }
.rank-badge.b3 { background: #fbbf24; color: #5a4500; }

/* 閻╃鍙ч幒銊ㄥ礃 / 鐠囷附鍎忔穱鈩冧紖 */
.related-sec { margin-top: 24px; }
.video-info-line { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--text-sm); color: var(--text-dim); margin-top: 8px; }

/* 閸忣剙鎲?閸忓厖绨?*/
.about-body { font-size: var(--text-md); line-height: 2; }
.about-body h3 { font-size: 15px; margin: 18px 0 8px; color: var(--primary); }
.about-body ul { padding-left: 20px; }
.about-body li { margin: 4px 0; color: var(--text-dim); }
.notice-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.notice-item .n-title { font-size: var(--text-md); font-weight: 600; margin-bottom: 4px; }
.notice-item .n-date { font-size: var(--text-sm); color: var(--text-dim); }
.notice-item .n-body { font-size: var(--text-sm); color: var(--text-dim); line-height: 1.8; margin-top: 6px; }

/* ---------- v2 閸濆秴绨插?---------- */
@media (max-width: 960px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .home-side { position: static; }
  .side-collapse-btn {
    display: block; width: 100%; margin-bottom: 12px;
    background: var(--card); border: 1px solid var(--border); color: var(--text-dim);
    border-radius: var(--radius-sm); padding: 10px; font-size: var(--text-sm);
  }
  .side-body.collapsed { display: none; }
}
@media (max-width: 680px) {
  .hamburger { display: block; }
  .main-nav, .vip-entry { display: none; }
  .tabbar { display: flex; }
  body { padding-bottom: 54px; }
  .banner { aspect-ratio: 16 / 9; }
  .banner-slide .cap { font-size: 15px; }
  .h-scroll { grid-auto-columns: 150px; }
}

/* ================= v4: 妫版垿浜鹃敍鍧坔annel.html + 妫ｆ牠銆夐崗銉ュ經閺夆槄绱?================= */
.channel-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.channel-chip {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 10px; font-size: var(--text-md); font-weight: 600; color: var(--text); min-height: 52px;
}
.channel-chip i { font-style: normal; font-size: 18px; }
.channel-chip:hover { transform: translateY(-2px); border-color: var(--primary); background: var(--card-hover); }

.channel-banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 18px;
  padding: 44px 32px;
  background: linear-gradient(135deg, #1a1e2e 0%, #232a40 60%), var(--grad);
  background-blend-mode: overlay;
}
.channel-banner .ch-info h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.channel-banner .ch-desc { color: var(--text-dim); font-size: var(--text-sm); }
.channel-banner.ch-ai-short { background: linear-gradient(135deg, rgba(245,158,11,.35), rgba(59,130,246,.2)), linear-gradient(135deg, #1a1e2e, #232a40); }
.channel-banner.ch-ai-comic { background: linear-gradient(135deg, rgba(52,211,153,.3), rgba(59,130,246,.18)), linear-gradient(135deg, #1a1e2e, #232a40); }
.channel-banner.ch-ai-face  { background: linear-gradient(135deg, rgba(255,92,124,.3), rgba(245,158,11,.2)), linear-gradient(135deg, #1a1e2e, #232a40); }
.channel-banner.ch-ai-magic { background: linear-gradient(135deg, rgba(251,191,36,.28), rgba(255,92,124,.18)), linear-gradient(135deg, #1a1e2e, #232a40); }

@media (max-width: 680px) {
  .channel-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .channel-chip { padding: 12px 8px; font-size: var(--text-sm); min-height: 46px; }
  .channel-banner { padding: 26px 18px; }
  .channel-banner .ch-info h1 { font-size: 19px; }
}

/* ================= v3: 缁夎濮╃粩顖欑瑩妞ょ懓宸遍崠鏍电礄375/414/680/960 閸ユ稒銆傞敍?================= */
/* iOS Safari 100vh 閸忕厧顔愰敍姝瀡h 娴兼ê鍘涢敍瀵乭 閸忔粌绨?*/
body { min-height: 100vh; min-height: 100dvh; }

/* 鐟欙附甯堕崣瀣偨閿涙艾鍙忕仦鈧悙鐟板毊閻╊喗鐖ｉ弨鎯с亣 */
.btn { min-height: 40px; }
.btn-sm { min-height: 36px; }
.cat-pill { min-height: 38px; }
.form-item input, .form-item select, .inline-form input, .inline-form select { height: 42px; }
.rank-item { min-height: 44px; }
.drawer-nav a { min-height: 48px; display: flex; align-items: center; }
.drawer-cat-list a { min-height: 44px; display: inline-flex; align-items: center; }
.banner-arrow { width: 40px; height: 40px; }
.banner-dots i { width: 10px; height: 10px; }
.banner-dots { padding: 8px; } /* 閹碘晛銇囬崷鍡欏仯閻愮懓鍤悜顓炲隘 */
.modal-tabs button { min-height: 42px; }
.tabbar a { min-height: 52px; justify-content: center; }
.drop-panel a { min-height: 44px; display: flex; align-items: center; }
.hamburger { width: 44px; height: 44px; padding: 8px 10px; }
.video-card .thumb { min-height: 84px; }

/* 鐏忓繐鐫嗗鍦崶娑撳秵瀛╅崙?*/
.modal { max-height: 88vh; max-height: 88dvh; overflow-y: auto; }

/* 闂冨弶铆閸氭垶瀛╅崙?*/
.inline-form select, .inline-form input { flex: 1; min-width: 0; }
.search-box input { min-width: 0; }
img, video { max-width: 100%; }

/* ---------- 閳?60px閿涙矮鏅堕弽蹇斿閸欑姴鎮楅崡鐘冲姬 ---------- */
@media (max-width: 960px) {
  .side-body:not(.collapsed) { margin-bottom: 18px; }
}

/* ---------- 閳?80px閿涙碍鐪介崼?+ 閹惰棄鐪?+ 鎼存洟鍎撮弽蹇庡瘜鐢啫鐪?---------- */
@media (max-width: 680px) {
  /* header 閸楁洝顢戦幒鎺戝灙閿涙碍鐪介崼?| logo | 閹兼粎鍌?| 閻劍鍩涢崠?*/
  .header-inner { flex-wrap: nowrap; height: 56px; padding: 0 10px; gap: 10px; }
  /* 妞よ埖鐖粚娲？閻ｆ瑧绮伴崗鎶芥暛閸愬懎顔? 闁偓閸戠儤瀵滈柦顔拘╅崚鑸偓灞惧灉閻ㄥ嫨鈧秹銆? 妫版垿浜鹃崚鍥ㄥ床閺夛紕鐤嗘い鍓侇儑娴滃矁顢?*/
  .user-area #logoutBtn { display: none; }
  /* 妫ｆ牠銆夐崚鍡欒缁涙盯鈧娼稉搴暥闁挸鎻╅幑閿嬫蒋闁插秴顦? 缁夎濮╃粩顖炴閽?*/
  .cat-bar { display: none; }
  .mobile-channels {
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 8px 10px; border-bottom: 1px solid var(--border);
    background: var(--bg);
  }
  .mobile-channels::-webkit-scrollbar { display: none; }
  .mobile-channels a {
    flex: none; padding: 6px 14px; border-radius: var(--radius-lg); font-size: var(--text-sm);
    color: var(--text-dim); background: var(--card); border: 1px solid var(--border);
  }
  .mobile-channels a.active { color: #fff; background: var(--grad); border-color: transparent; }
  .hamburger { order: 0; flex: none; }
  .logo { order: 1; font-size: 17px; flex: none; }
  .search-box { order: 2; flex: 1; min-width: 0; margin-left: 0; }
  .user-area { order: 3; flex: none; gap: 8px; }
  /* 閻劍鍩涢崠铏规彛閸戞垵瀵查敍姘辨瑜?闁偓閸戠儤瀵滈柦顔剧級鐏忓骏绱濇穱婵婄槈閸楁洝顢戦弨鎯х繁娑撳绱欓幎钘夌溄闁插奔绡冮張澶婄暚閺佹潙鍙嗛崣锝忕礆 */
  .user-area a.btn-ghost, .user-area button.btn-ghost { min-height: 44px; padding: 6px 12px; font-size: var(--text-sm); }
  .points-chip { font-size: var(--text-sm); padding: 4px 9px; }

  /* 鐟欙附甯堕惄顔界垼 閳?4px */
  .btn, .btn-sm { min-height: 44px; padding: 10px 18px; }
  .cat-pill { min-height: 44px; padding: 9px 18px; }
  .form-item input, .form-item select, .inline-form input, .inline-form select { height: 44px; font-size: 16px; }
  .search-box input { height: 42px; font-size: 16px; } /* 16px 闂?iOS 閼辨氨鍔嶇紓鈺傛杹 */
  .banner-arrow { width: 44px; height: 44px; }
  .drawer-close { width: 44px; height: 44px; }
  .modal-close { width: 44px; height: 44px; }
  .side-collapse-btn { min-height: 44px; }
  .notice-item .n-title { line-height: 1.5; }

  /* 缂冩垶鐗?2 閸掓绱濋崡锛勫闂傜绐?*/
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .video-card .meta { padding: 8px 10px 10px; }
  .video-card .title { font-size: var(--text-sm); min-height: 37px; }

  /* 閹绢厽鏂佹い纰夌窗video 100% 鐎规枻绱欑€圭懓娅掑鑼閺夌噦绱氶敍宀勪紕缂冣晜瀵滈柦顔炬棻閸氭垵鐖㈤崣?*/
  .pay-mask .btns { flex-direction: column; width: 100%; max-width: 300px; }
  .pay-mask .btns .btn, .pay-mask .btns a.btn { width: 100%; min-height: 46px; }
  .pay-mask .lock-ico { font-size: 34px; }
  .pay-mask .msg { font-size: var(--text-sm); }

  /* 鐠囷附鍎忔い鐢糕偓澶愭肠/缁捐儻鐭炬稉瀣閿涙氨鐡戠€硅棄褰查悙?*/
  .detail-layout .inline-form { flex-direction: row; }
  .detail-layout .inline-form select { flex: 1; min-height: 44px; }
  .detail-layout .inline-form .btn { flex: none; }

  /* 鐞涖劍鐗稿Ο顏勬倻濠婃艾濮╂穱婵堟殌閿涘苯顔愰崳銊ь洣濮濄垽銆夐棃銏㈤獓濠с垹鍤?*/
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .container { overflow-x: hidden; }

  /* 瀵湱鐛ョ拹纾嬬珶閻?12px */
  .modal-mask { padding: 12px; }
  .modal { padding: 22px 18px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-tile { padding: 12px; }
  .stat-tile .value { font-size: 18px; }
  .plan-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .plan-card { padding: 16px 12px; }
  .plan-card .plan-price { font-size: 22px; }
  .invite-link-box .link-text { font-size: var(--text-sm); }
  .h-scroll { grid-auto-columns: 46%; } /* 閹靛婧€娑撯偓鐏炲繒瀹?2 瀵姴宕遍悧?*/
}

/* ---------- 閳?14px閿涘牆鎯?375px閿涘绱版潻娑楃濮濄儳鎻ｉ崙?---------- */
@media (max-width: 414px) {
  .logo { font-size: 16px; }
  .header-inner { gap: 8px; padding: 0 8px; }
  .points-chip { font-size: var(--text-xs); padding: 4px 8px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .h-scroll { grid-auto-columns: 62%; }
  .banner { border-radius: var(--radius-sm); }
  .banner-slide .cap { padding: 30px 14px 12px; font-size: var(--text-md); }
  .banner-slide .badge { font-size: var(--text-xs); padding: 3px 10px; }
  .page-title { font-size: 17px; }
  .sec-head h2 { font-size: 15px; }
  .detail-layout .inline-form { flex-wrap: wrap; }
  .detail-layout .inline-form select { flex: 1 1 45%; }
  .drawer { width: 84%; }
}


/* ---------- 妞ょ數鐖滈崚鍡涖€?---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pg-btn { min-width: 36px; height: 34px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer; font-size: var(--text-sm); }
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-dots { color: var(--text-soft, #888); line-height: 34px; }

/* ---- 动效(2026-11-16 恢复): 与加载速度无关, 纯观感; 需要极简时删除本段即可 ---- */
a, button, .video-card, .cat-pill, .rank-item, .banner-dots i, .banner-arrow, .pg-btn { transition: .2s; }
.site-header a, .nav-drop > a, .footer-links a { transition: .2s; }
input, textarea, select { transition: border-color .2s; }
.modal { animation: pop .2s ease; }
.drawer-nav { transition: .28s ease; }
.banner-track { transition: transform .5s ease; }

/* ---- 移动端触控目标: 非主按钮的文字链/分页统一 44px 热区 ---- */
@media (max-width: 680px) {
  .mobile-channels a, .sec-head .more, .back-link, .footer-links a {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; min-width: 44px;
  }
  .logo { display: inline-flex; align-items: center; min-height: 44px; }
  .pg-btn { min-width: 44px; height: 44px; }
  .pg-dots { line-height: 44px; }
}

/* ---- 无障碍: 系统开启"减少动态效果"时关闭非必要动画(加载转圈保留) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .spinner, [class*="spinner"] {
    animation-duration: 1s !important;
    animation-iteration-count: infinite !important;
  }
}
