@charset "utf-8";
/* =============================================================
 * 薄荷影视 MintVOD  |  SeaCMS V13.5 移动端优先模板
 * 视觉语言借鉴「短剧APP模板 5.0」：薄荷绿渐变 / 圆角卡片 / 轻阴影
 * 播放器使用 SeaCMS 自带 {playpage:player}，不引入任何第三方内核
 * ============================================================= */

/* ---------- 1. 主题变量 ---------- */
:root {
    --brand: #00c9a7;
    --brand-2: #00d4aa;
    --brand-soft: #e3fbf5;
    --accent: #ff6b6b;
    --accent-2: #ff0050;
    --gold: #ffb020;

    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-2: #fafbfc;
    --surface-3: #f0f3f5;
    --text: #1f2430;
    --text-2: #626b7a;
    --text-3: #9aa3af;
    --line: rgba(20, 32, 44, .08);
    --shadow: 0 2px 10px rgba(22, 40, 55, .06);
    --shadow-lg: 0 8px 26px rgba(22, 40, 55, .13);
    --header-bg: linear-gradient(115deg, #d7fff4 0%, #e9fffa 48%, #bbf5f7 100%);
    --header-text: #16332f;
    --tab-bg: rgba(255, 255, 255, .94);
    --nav-bg: rgba(255, 255, 255, .96);
    --poster-bg: linear-gradient(135deg, #dfe9ec, #eef3f5);
    --scrim: rgba(0, 0, 0, .55);
    --radius: 12px;
    --radius-sm: 8px;
    --header-h: 51px;              /* 由 app.js 实测头部高度后覆写，任何断点都不会错位 */
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* 全站流式自适应参数：间距 / 内容宽 / 卡片最小宽 都随视口连续变化 */
    --page-w: 100%;
    --gut: clamp(12px, 2.2vw, 30px);
    --card-min: clamp(96px, 27vw, 132px);
    --grid-gap: clamp(9px, 1.2vw, 18px);
    --fs-base: clamp(13.5px, .35vw + 12.6px, 15px);
}

html[data-theme="dark"] {
    --brand: #12d6b4;
    --brand-2: #19e0bd;
    --brand-soft: #12332e;
    --accent: #ff7b7b;
    --accent-2: #ff3d70;
    --bg: #10151a;
    --surface: #1a222a;
    --surface-2: #1f2831;
    --surface-3: #26313b;
    --text: #e9eff3;
    --text-2: #a4b0bb;
    --text-3: #77838f;
    --line: rgba(255, 255, 255, .09);
    --shadow: 0 2px 10px rgba(0, 0, 0, .28);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
    --header-bg: linear-gradient(115deg, #0d2a29 0%, #122b2e 48%, #102732 100%);
    --header-text: #dff8f2;
    --tab-bg: rgba(26, 34, 42, .96);
    --nav-bg: rgba(26, 34, 42, .97);
    --poster-bg: linear-gradient(135deg, #232f38, #2b3841);
    --scrim: rgba(0, 0, 0, .7);
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* overflow-x:hidden 会把 html/body 变成滚动容器，部分 Chromium 内核浏览器
   （夸克等）会因此吞掉纵向滚轮，且会破坏 position:sticky。改用 clip：
   同样裁掉横向溢出，但不创建滚动容器。老浏览器保留 hidden 作兜底。 */
html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-y: auto;
    height: auto;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: var(--fs-base);
    line-height: 1.55;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-wrap: anywhere;      /* 超长片名 / 英文 URL 不撑破容器 */
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; outline: none; border: 0; background: none; }
button { cursor: pointer; }
svg { display: block; }
/* 只对键盘导航显示焦点环；表单与搜索框的焦点态由各自的圆角高亮接管，避免出现方框 */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
/* 手机端保持无滚动条的 APP 观感；桌面端必须保留可拖动的滚动条，
   否则 Chrome / 夸克用户会以为「页面不能上下滚动」。 */
@media (max-width: 959px) {
    ::-webkit-scrollbar { width: 0; height: 0; }
}
@media (min-width: 960px) {
    html { scrollbar-width: thin; scrollbar-color: rgba(0, 201, 167, .5) transparent; }
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb {
        background: rgba(0, 201, 167, .42); border-radius: 10px;
        border: 2px solid transparent; background-clip: padding-box;
    }
    ::-webkit-scrollbar-thumb:hover { background: rgba(0, 201, 167, .75); background-clip: padding-box; }
}
html[data-theme="dark"] { scrollbar-color: rgba(18, 214, 180, .5) #10151a; }
/* 所有 flex / grid 子项默认允许收缩到 0，杜绝长内容把布局撑变形 */
.app-shell * { min-width: 0; }
/* hidden 属性必须压过 .btn / .card 等作者样式；非模板自有的圆形浮动按钮统一清理 */
[hidden], [data-mint-hidden] { display: none !important; }
/* 登录/注册入口只由系统 {seacms:member} 按登录态输出（未登录才出现），
   模板层不再放任何写死的按钮。此规则同时兜底浏览器缓存的旧模板 HTML。 */
.profile-btns a[href*="login.php"], .profile-btns a[href*="reg.php"] { display: none !important; }
/* 系统 {seacms:member} 异步输出的「会员中心」硬编码指向原生 member.php，
   模板层直接隐藏，避免点击后又跳回老会员中心（不依赖 JS 是否执行）。 */
.member-status a[href*="member.php"] { display: none !important; }

/* ---------- 3. 布局骨架 ---------- */
.app-shell { width: 100%; max-width: var(--page-w); min-height: 100vh; margin: 0 auto; background: var(--bg); position: relative; }
.app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 300;
    width: 100%; margin: 0 auto;
    padding: 8px var(--gut) 9px;
    background: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: clamp(8px, 1.1vw, 16px); width: 100%; }
.brand { display: flex; align-items: center; gap: 7px; flex-shrink: 0; font-size: clamp(16px, .5vw + 14px, 20px); font-weight: 800; letter-spacing: .3px; }
.brand-mark {
    width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), #35e2c3); color: #fff;
    box-shadow: 0 3px 9px rgba(0, 201, 167, .38);
}
.brand-mark svg { width: 17px; height: 17px; }
.header-search { flex: 1; min-width: 0; }
.header-search form {
    display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
    background: var(--surface); color: var(--text-2);
    border-radius: 20px; box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
/* 搜索框聚焦：只给胶囊本身一圈柔和的薄荷绿内描边，不再出现浏览器方形 outline */
.header-search form:focus-within {
    background: var(--surface);
    border-color: rgba(0, 201, 167, .55);
    box-shadow: 0 0 0 3px rgba(0, 201, 167, .14), var(--shadow);
}
html[data-theme="dark"] .header-search form:focus-within { border-color: rgba(18, 214, 180, .6); box-shadow: 0 0 0 3px rgba(18, 214, 180, .16), var(--shadow); }
.header-search svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--brand); transition: color .2s; }
.header-search form:focus-within svg { color: var(--brand); }
.header-search input { flex: 1; min-width: 0; width: 100%; font-size: 13px; color: var(--text); background: transparent; outline: none; border: 0; box-shadow: none; -webkit-appearance: none; appearance: none; }
.header-search input::placeholder { color: var(--text-3); }
.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626b7a' stroke-width='2.5'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center/10px no-repeat; cursor: pointer; }
html[data-theme="dark"] .header-search input::-webkit-search-cancel-button { background-color: var(--surface-3); }
.icon-btn {
    width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
    border-radius: 50%; background: var(--surface); color: var(--text-2); box-shadow: var(--shadow);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:active { transform: scale(.92); }
/* 桌面端专用元素：移动端一律隐藏，保证手机端仍是原生 APP 观感 */
.desk-links, .desk-user, .desk-channels { display: none; }

/* 分类 Tab：横向滚动 + 居中聚焦 */
.cat-tabs {
    position: sticky; top: var(--header-h); z-index: 250;
    display: flex; gap: 7px; padding: 9px var(--gut);
    background: var(--tab-bg); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; white-space: nowrap;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    flex: 0 0 auto; padding: 6px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 500; color: var(--text-2);
    background: var(--surface-2); border: 1px solid var(--line);
    transition: all .22s ease;
}
.cat-tab.active {
    color: #fff; font-weight: 700; border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 4px 12px rgba(0, 201, 167, .3);
}
.cat-tab:active { transform: scale(.95); }

/* 主体：留出固定头 + 底栏；--header-h 由 JS 实测，缩放/换分辨率都不会遮住内容 */
.app-main { padding: calc(var(--header-h) + 12px) var(--gut) calc(76px + var(--safe-bottom)); }
.app-main.has-tabs { padding-top: var(--header-h); }
.app-main.no-header { padding-top: 12px; }
.section, .panel, .rank-list, .topic-grid, .quick-grid, .filter-box, .detail-hero { max-width: 100%; }

/* 底部导航 */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-around; align-items: stretch;
    padding: 7px 4px calc(7px + var(--safe-bottom));
    background: var(--nav-bg); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: var(--text-3); font-size: 10px; transition: color .2s;
}
.nav-item svg { width: 22px; height: 22px; stroke-width: 1.9; }
.nav-item.active { color: var(--brand); font-weight: 700; }
.nav-item:active { transform: scale(.93); }

/* 播放页 / 登录页隐藏全局导航 */
.p-play .app-header, .p-play .cat-tabs, .p-play .bottom-nav,
.p-auth .cat-tabs, .p-auth .bottom-nav { display: none !important; }
.p-play .app-main { padding: 0 0 calc(24px + var(--safe-bottom)); }
.p-auth .app-main { padding-bottom: calc(30px + var(--safe-bottom)); }
.p-play #rocket, .p-auth #rocket, .p-play .pull-hint, .p-auth .pull-hint { display: none !important; }

/* ---------- 4. 通用组件 ---------- */
.section { margin-bottom: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.section-title { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 800; letter-spacing: .2px; }
.section-title::before { content: ""; width: 4px; height: 15px; border-radius: 3px; background: linear-gradient(var(--brand), var(--brand-2)); }
.section-title .sub { font-size: 11px; font-weight: 500; color: var(--text-3); }
.section-more { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 2px; }
.section-more svg { width: 13px; height: 13px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { background: var(--surface); border-radius: var(--radius); padding: 13px; box-shadow: var(--shadow); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: 22px; font-size: 13px; font-weight: 600;
    background: var(--surface-3); color: var(--text-2); transition: transform .15s, opacity .15s;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(.96); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px rgba(0, 201, 167, .3); }
.btn-accent { color: #fff; background: linear-gradient(135deg, #ff8a7a, var(--accent-2)); box-shadow: 0 4px 12px rgba(255, 0, 80, .22); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

.chip { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 600; line-height: 1.5; }
.chip-brand { background: var(--brand-soft); color: var(--brand); }
.chip-accent { background: rgba(255, 107, 107, .14); color: var(--accent); }
.chip-gold { background: rgba(255, 176, 32, .16); color: #d98b00; }
.chip-plain { background: var(--surface-3); color: var(--text-2); }

.empty { padding: 34px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty svg { width: 40px; height: 40px; margin: 0 auto 10px; opacity: .45; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.text-1 { color: var(--text); } .text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 分页 */
.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 6px; }
.pager a, .pager span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px; border-radius: 10px;
    font-size: 12px; background: var(--surface); color: var(--text-2); box-shadow: var(--shadow);
}
.pager .cur, .pager a.active { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.pager .disabled { opacity: .45; }
.load-more { text-align: center; padding: 14px 0 4px; font-size: 12px; color: var(--text-3); }
.load-more .btn { min-width: 150px; }
.spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 下拉刷新提示 */
.pull-hint {
    position: fixed; top: 0; left: 0; right: 0; z-index: 400;
    max-width: 1200px; margin: 0 auto; height: 46px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 12px; color: var(--text-2);
    background: var(--surface); border-radius: 0 0 16px 16px; box-shadow: var(--shadow);
    transform: translateY(-100%); transition: transform .2s;
}
.pull-hint.show { transform: translateY(0); }

/* Toast */
.toast {
    position: fixed; left: 50%; top: 68px; z-index: 9999;
    transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
    padding: 10px 20px; border-radius: 22px; max-width: 80vw;
    background: var(--scrim); color: #fff; font-size: 13px; font-weight: 500;
    box-shadow: var(--shadow-lg); transition: all .25s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- 5. 影片卡片网格 ---------- */
/* auto-fill 让列数随视口连续变化，不再依赖「某断点突然从 3 列跳 6 列」 */
.vod-grid, .related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--card-min)), 1fr));
    gap: var(--grid-gap);
}
.vod-card { min-width: 0; }
.vod-poster {
    position: relative; display: block; width: 100%; aspect-ratio: 2 / 3;
    border-radius: var(--radius); overflow: hidden; background: var(--poster-bg);
    box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.vod-card:hover .vod-poster { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.vod-poster img { width: 100%; height: 100%; object-fit: cover; }
.vod-poster::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, rgba(0, 0, 0, .5)); pointer-events: none; }
.vod-badge { position: absolute; top: 6px; left: 6px; z-index: 2; padding: 2px 6px; border-radius: 5px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(255, 107, 107, .92); }
.vod-badge.score { background: rgba(0, 0, 0, .5); color: #ffd76a; }
.vod-corner { position: absolute; bottom: 5px; right: 6px; z-index: 2; font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.vod-pic-text { position: absolute; bottom: 5px; left: 6px; right: 6px; z-index: 2; font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.vod-title { margin-top: 6px; font-size: 12.5px; font-weight: 600; line-height: 1.35; min-height: 2.7em; }
.vod-meta { margin-top: 2px; font-size: 10.5px; color: var(--text-3); display: flex; gap: 5px; align-items: center; }
.vod-meta .chip { font-size: 9px; padding: 1px 5px; flex-shrink: 0; white-space: nowrap; }

/* 今日推荐 / 焦点展播：尺寸随容器连续自适应，图片始终按比例填充不拉伸 */
.hero-scroller {
    display: flex; gap: var(--grid-gap); overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 2px 0 8px; scrollbar-width: none;
}
.hero-scroller::-webkit-scrollbar { display: none; }
/* 移动端每张完整占满容器，不再刻意露出下一张的边角；配合 scroll-snap 一张一张翻 */
.hero-item {
    position: relative; flex: 0 0 100%; scroll-snap-align: start;
    width: 100%; aspect-ratio: 16 / 9; min-height: 128px; max-height: clamp(150px, 30vw, 250px);
    border-radius: 14px; overflow: hidden; background: var(--poster-bg); box-shadow: var(--shadow);
}
.hero-item img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .05) 75%); }
.hero-info { position: absolute; z-index: 2; left: clamp(10px, 1.6vw, 18px); bottom: clamp(9px, 1.3vw, 16px); right: clamp(10px, 1.6vw, 18px); color: #fff; }
.hero-info h3 { font-size: clamp(14px, .5vw + 12px, 19px); font-weight: 800; margin-bottom: 3px; }
.hero-info p { font-size: clamp(10.5px, .25vw + 10px, 13px); opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-play { display: inline-flex; align-items: center; gap: 4px; margin-top: clamp(5px, .8vw, 10px); padding: clamp(4px, .5vw, 6px) clamp(10px, 1vw, 14px); border-radius: 16px; font-size: clamp(10.5px, .2vw + 10px, 12px); font-weight: 700; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.hero-play svg { width: 12px; height: 12px; }

/* 横向滑动的小卡（继续观看等） */
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .vod-card { flex: 0 0 30%; max-width: 150px; }
.hscroll .mini-row { flex: 0 0 74%; }

/* 排行榜列表 */
.rank-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: 0; }
.rank-no { width: 24px; flex-shrink: 0; text-align: center; font-size: 15px; font-weight: 800; font-style: italic; color: var(--text-3); }
.rank-item:nth-child(1) .rank-no { color: #ff4d4f; }
.rank-item:nth-child(2) .rank-no { color: #ff8c3a; }
.rank-item:nth-child(3) .rank-no { color: #f5b500; }
.rank-thumb { width: 42px; height: 58px; flex-shrink: 0; border-radius: 7px; object-fit: cover; background: var(--poster-bg); }
.rank-body { flex: 1; min-width: 0; }
.rank-body h4 { font-size: 13px; font-weight: 600; }
.rank-body p { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.rank-tail { font-size: 11px; color: var(--brand); font-weight: 600; flex-shrink: 0; }

/* 快捷入口 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-size: 11px; color: var(--text-2); }
.quick-item .qi { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; }
.quick-item svg { width: 19px; height: 19px; }
.qi.c1 { background: linear-gradient(135deg, #00c9a7, #00d4aa); }
.qi.c2 { background: linear-gradient(135deg, #ff8a7a, #ff5e7e); }
.qi.c3 { background: linear-gradient(135deg, #5aa9ff, #4facfe); }
.qi.c4 { background: linear-gradient(135deg, #b08cff, #8c7bff); }

/* ---------- 6. 筛选页 ---------- */
.filter-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 12px; margin-bottom: 12px; }
.filter-row { display: flex; align-items: flex-start; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.filter-row:last-child { border-bottom: 0; }
.filter-label { flex: 0 0 36px; font-size: 12px; font-weight: 700; color: var(--text-3); padding-top: 3px; }
.filter-items { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-items a { display: inline-block; padding: 3px 10px; border-radius: 15px; font-size: 11.5px; color: var(--text-2); background: var(--surface-3); }
.filter-items a.active { color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.filter-tips { font-size: 11px; color: var(--text-3); padding: 0 2px 8px; }

/* ---------- 7. 详情页 ---------- */
.detail-hero { position: relative; padding: 14px; overflow: hidden; background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.detail-hero::before { content: ""; position: absolute; inset: 0; background: var(--header-bg); opacity: .5; }
.detail-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(transparent, var(--surface)); }
.detail-inner { position: relative; z-index: 2; display: flex; gap: 13px; }
.detail-poster { flex: 0 0 106px; width: 106px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--poster-bg); box-shadow: var(--shadow-lg); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; padding-top: 2px; }
.detail-info h1 { font-size: 18px; font-weight: 800; line-height: 1.35; }
.detail-info h1 .note { font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 5px; }
.detail-score { display: flex; align-items: baseline; gap: 5px; margin: 6px 0 8px; }
.detail-score b { font-size: 22px; color: var(--gold); line-height: 1; }
.detail-score span { font-size: 11px; color: var(--text-3); }
.detail-lines p { font-size: 11.5px; color: var(--text-2); margin-bottom: 3px; }
.detail-lines .k { color: var(--text-3); }
.detail-actions { display: flex; gap: 8px; margin-top: 11px; }
.detail-actions .btn { flex: 1; padding: 9px 8px; font-size: 12.5px; }
.detail-actions .btn-icon { flex: 0 0 42px; padding: 0; }
.btn-icon svg { width: 17px; height: 17px; }
.is-faved { color: var(--accent) !important; }

.detail-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }
.detail-desc.folded { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.desc-toggle { display: block; margin: 6px auto 0; font-size: 12px; color: var(--brand); }

/* 选集 / 线路 */
.source-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 9px; margin-bottom: 10px; scrollbar-width: none; }
.source-tabs::-webkit-scrollbar { display: none; }
.source-tab { flex: 0 0 auto; padding: 6px 13px; border-radius: 9px; font-size: 12px; background: var(--surface-3); color: var(--text-2); }
.source-tab.active { color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 7px; }
.episode-grid > li { display: flex; min-width: 0; }
.episode-grid a, .episode-grid > a {
    flex: 1; display: flex; align-items: center; justify-content: center; min-height: 38px; min-width: 0;
    border-radius: 8px; font-size: 12px; background: var(--surface-3); color: var(--text-2);
    border: 1px solid transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px;
}
.episode-grid a:hover { border-color: var(--brand); }
.episode-grid a.active, .episode-grid a[style*="color:red"], .episode-grid a[style*="color: red"],
.episode-grid li.active a { color: #fff !important; background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important; font-weight: 700; }
.episode-grid.collapsed { max-height: 164px; overflow: hidden; }
.source-pane { display: none; }
.source-pane.active { display: block; }

/* ---------- 8. 播放页（自带播放器） ---------- */
.play-topbar {
    display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 10px;
    background: #10161b; color: #fff; position: sticky; top: 0; z-index: 320;
}
.play-topbar .back { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.play-topbar .back svg { width: 17px; height: 17px; }
.play-topbar .tt { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.play-topbar .part { font-size: 11px; color: #9fb0bb; flex-shrink: 0; }
.play-topbar .mini-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.play-topbar .mini-icon svg { width: 16px; height: 16px; }

/* 16:9 播放器容器，兼容 iframe / video / object / embed */
.player-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.player-box iframe, .player-box video, .player-box object, .player-box embed,
.player-box > div:not(.player-mask) { width: 100% !important; height: 100% !important; max-width: 100% !important; border: 0 !important; display: block; }
.player-box:fullscreen { aspect-ratio: auto; height: 100%; }
.player-box:fullscreen iframe, .player-box:fullscreen video { height: 100% !important; }
.player-tip { background: #10161b; color: #9fb0bb; font-size: 11px; padding: 7px 12px; display: flex; align-items: center; gap: 6px; }
.player-tip svg { width: 13px; height: 13px; flex-shrink: 0; }

.play-head { display: flex; align-items: flex-start; gap: 10px; padding: 13px 12px 10px; }
.play-head h1 { font-size: 16px; font-weight: 800; }
.play-head .sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.play-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 12px; }
.play-actions .btn { padding: 7px 13px; font-size: 12px; background: var(--surface); box-shadow: var(--shadow); }
.play-actions .btn.on { color: var(--accent); }
.play-actions .btn svg { width: 14px; height: 14px; }

.play-block { margin: 0 12px 14px; }
.play-block .section-head { margin-bottom: 9px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }

/* 评论容器：统一系统自带评论模块的观感 */
.comment-wrap { background: var(--surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.comment-wrap img { max-width: 100%; height: auto; }
.comment-wrap input[type="text"], .comment-wrap textarea, .comment-wrap select {
    max-width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--surface-2); color: var(--text); font-size: 13px;
}
.comment-wrap input[type="button"], .comment-wrap input[type="submit"], .comment-wrap button {
    padding: 7px 15px; border-radius: 18px; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); cursor: pointer;
}
.comment-wrap table { width: 100% !important; }
.comment-wrap a { color: var(--brand); }

/* ---------- 9. 排行榜页 / 我的页 ---------- */
.page-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.page-tab { flex: 1 1 76px; min-width: 0; text-align: center; padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface); box-shadow: var(--shadow); }
.page-tab.active { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px rgba(0, 201, 167, .28); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.profile-card {
    position: relative; overflow: hidden; padding: 20px 16px; border-radius: 16px;
    color: #fff; background: linear-gradient(125deg, #00c9a7 0%, #10cfae 45%, #33c6d6 100%);
    box-shadow: 0 10px 26px rgba(0, 201, 167, .28);
}
.profile-card::after { content: ""; position: absolute; right: -40px; top: -60px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.profile-row { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.avatar { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .22); border: 2px solid rgba(255, 255, 255, .5); }
.avatar svg { width: 28px; height: 28px; }
.profile-name { font-size: 17px; font-weight: 800; }
.profile-sub { font-size: 11.5px; opacity: .86; margin-top: 2px; }
.profile-stats { position: relative; z-index: 2; display: flex; margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .22); }
.profile-stats div { flex: 1; text-align: center; }
.profile-stats b { display: block; font-size: 18px; font-weight: 800; }
.profile-stats span { font-size: 10.5px; opacity: .85; }

.menu-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu-link { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.menu-link:last-child { border-bottom: 0; }
.menu-link .mi { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.menu-link .mi svg { width: 16px; height: 16px; }
.menu-link .mt { flex: 1; }
.menu-link .mv { font-size: 11px; color: var(--text-3); }
.menu-link .arrow { width: 14px; height: 14px; color: var(--text-3); }

/* 历史 / 收藏条目 */
.his-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.his-item:last-child { border-bottom: 0; }
.his-poster { flex: 0 0 62px; width: 62px; height: 86px; border-radius: 8px; object-fit: cover; background: var(--poster-bg); }
.his-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.his-body h4 { font-size: 13.5px; font-weight: 600; }
.his-body p { font-size: 11px; color: var(--text-3); }
.his-body .his-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.his-del { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--text-3); background: var(--surface-3); }
.his-del svg { width: 14px; height: 14px; }

/* 搜索结果（横向媒体卡） */
.result-item { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.result-item:last-child { border-bottom: 0; }
.result-poster { flex: 0 0 78px; width: 78px; height: 110px; border-radius: 9px; object-fit: cover; background: var(--poster-bg); }
.result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.result-body h4 { font-size: 14px; font-weight: 700; }
.result-body p { font-size: 11px; color: var(--text-3); }
.result-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 4px; }

/* ---------- 10. 表单 / 登录注册 / 留言 ---------- */
.auth-wrap { width: 100%; max-width: 420px; margin: 10px auto 0; }
.auth-logo { text-align: center; padding: 22px 0 18px; }
.auth-logo .brand-mark { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 10px; }
.auth-logo .brand-mark svg { width: 30px; height: 30px; }
.auth-logo h2 { font-size: 18px; font-weight: 800; }
.auth-logo p { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.auth-box { padding: 18px 16px; }
.auth-box ul, .auth-box form { width: 100%; margin: 0; padding: 0; list-style: none; }
.auth-box li { display: block; width: 100%; margin: 0 0 10px; }
.auth-box li:last-child { margin-bottom: 0; }
/* SeaCMS 原生表单里用户名框是 type="input"（非法值）+ autofocus，
   旧版按 [type=text] 匹配会漏掉它；这里改为「所有非按钮 input 一律同款」，
   并用 !important 压掉验证码框的内联 width，保证四栏完全一致。 */
.auth-box input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.auth-box textarea, .auth-box select {
    display: block; width: 100% !important; height: 42px; padding: 10px 12px;
    margin: 0; border-radius: 10px; font-size: 13.5px; line-height: 1.4;
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--line); box-shadow: none; outline: none !important;
    -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-box textarea { height: auto; min-height: 88px; resize: vertical; }
.auth-box input::placeholder, .auth-box textarea::placeholder { color: var(--text-3); opacity: 1; }
.auth-box input:hover, .auth-box textarea:hover, .auth-box select:hover { border-color: rgba(0, 201, 167, .4); }
.auth-box input:focus, .auth-box textarea:focus, .auth-box select:focus {
    background: var(--surface); border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 201, 167, .13);
}
html[data-theme="dark"] .auth-box input:focus, html[data-theme="dark"] .auth-box textarea:focus, html[data-theme="dark"] .auth-box select:focus { box-shadow: 0 0 0 3px rgba(18, 214, 180, .16); }
.auth-box input[type="submit"], .auth-box input[type="button"], .auth-box button {
    display: block; width: 100%; height: 42px; padding: 10px; margin: 0;
    border-radius: 22px; color: #fff; font-weight: 700; font-size: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 201, 167, .28); transition: transform .15s, opacity .15s;
}
.auth-box input[type="submit"]:active, .auth-box input[type="button"]:active, .auth-box button:active { transform: scale(.98); }
/* 验证码行：图片 + 输入框并排，输入框与其它栏等高 */
.auth-box li.has-captcha { display: flex; align-items: center; gap: 9px; }
.auth-box li.has-captcha img { flex: 0 0 auto; width: 94px; height: 42px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; vertical-align: middle; }
.auth-box li.has-captcha input { flex: 1; width: auto !important; }
.auth-box li.text-center { text-align: center; font-size: 12.5px; color: var(--text-3); padding-top: 4px; }
.auth-box li.text-center a, .auth-box .text-muted { color: var(--brand); }
.auth-box table { width: 100%; }
.auth-box td { padding: 3px 0; font-size: 13px; }
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; font-size: 12.5px; color: var(--brand); }
.gbook-box { padding: 14px; }
.gbook-box input[type="text"], .gbook-box textarea, .gbook-box select {
    width: 100%; padding: 10px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 13px;
}
.gbook-box input[type="submit"], .gbook-box input[type="button"], .gbook-box button {
    padding: 9px 20px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); cursor: pointer;
}

/* ---------- 10.1 会员中心（ucenter.html 容器） ---------- */
.member-status { font-size: 13px; line-height: 1.8; color: var(--text-2); min-height: 18px; }
.member-status a { color: var(--brand); margin: 0 3px; }
.member-status span { color: var(--brand); font-weight: 600; }
.profile-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-btns .btn { flex: 1; min-width: 84px; padding: 8px 6px; font-size: 12.5px; }
.uc-profile .member-status, .uc-profile .member-status span { color: rgba(255, 255, 255, .95); font-size: 11.5px; line-height: 1.65; }
.uc-profile .member-status a { color: #fff; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.ucenter-head { margin-bottom: 14px; }
.ucenter-head .section-head { margin-bottom: 12px; }
.ucenter-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; white-space: nowrap; }
.ucenter-tabs::-webkit-scrollbar { display: none; }
.uc-tab {
    flex: 1 0 auto; min-width: 84px; text-align: center; padding: 9px 14px;
    border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--text-2);
    background: var(--surface); box-shadow: var(--shadow); transition: all .2s;
}
.uc-tab.active { color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px rgba(0, 201, 167, .28); }
.ucenter-frame { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-height: 260px; }
.ucenter-frame iframe { display: block; width: 100%; min-height: 260px; border: 0; background: transparent; }
.ucenter-frame .frame-mask {
    position: absolute; inset: 0; display: grid; place-items: center; gap: 8px;
    font-size: 13px; color: var(--text-3); background: var(--surface); transition: opacity .25s;
}
.ucenter-frame .frame-mask.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.ucenter-frame .frame-mask .spinner { width: 20px; height: 20px; border-width: 3px; }
.ucenter-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; font-size: 12.5px; color: var(--brand); }
.ucenter-note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 11.5px; line-height: 1.7; color: var(--text-3); background: var(--surface-2); }

/* ---------- 11. 专题 / 资讯 ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.topic-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.topic-card .tc { padding: 9px 10px; font-size: 12.5px; font-weight: 600; }
.news-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.news-item img { width: 88px; height: 62px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--poster-bg); }
.news-item h4 { font-size: 13px; font-weight: 600; }
.news-item p { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.article-body { font-size: 14px; line-height: 1.85; color: var(--text); }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }

/* ---------- 12. 返回顶部小火箭 ---------- */
#rocket {
    position: fixed; right: 16px; bottom: calc(84px + var(--safe-bottom)); z-index: 280;
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    color: #fff; background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 5px 16px rgba(102, 126, 234, .45);
    opacity: 0; visibility: hidden; transform: translateY(14px);
    transition: opacity .25s, transform .25s, visibility .25s;
}
#rocket.show { opacity: 1; visibility: visible; transform: translateY(0); }
#rocket svg { width: 22px; height: 22px; }
#rocket .rocket-body { animation: rocket-float 2s ease-in-out infinite; }
#rocket.flying .rocket-body { animation: rocket-fly .5s ease-out; }
#rocket .ripple { position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); opacity: 0; }
#rocket .ripple.go { animation: ripple .55s ease-out forwards; }
@keyframes rocket-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes rocket-fly { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(-9px) scale(1.12); } 100% { transform: translateY(0) scale(1); } }
@keyframes ripple { 0% { transform: scale(0); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }

/* ---------- 13. 页脚 ---------- */
.site-foot { padding: 16px 12px 6px; text-align: center; font-size: 11px; color: var(--text-3); line-height: 1.8; }
.site-foot a { color: var(--brand); }

/* ---------- 14. 响应式：全流式自适应，任意分辨率都不变形 ----------
   规则：
   1) 列数由 auto-fill + --card-min 连续决定，不再「断点一到突然 3 列变 6 列」；
   2) 间距 / 字号 / 限宽用 clamp() 随视口平滑变化；
   3) 固定头部的实际高度由 app.js 实测写入 --header-h，
      CSS 只管留白，因此频道数量变化、系统缩放、浏览器字体放大都不会压住内容；
   4) 桌面端顶部导航通栏但内部限宽，主体限宽同值，超宽屏不会拉成长条。
   ------------------------------------------------------------------- */

/* 超窄屏（≤359px）继续收缩，避免 320px 机型被挤变形 */
@media (max-width: 359px) {
    :root { --gut: 10px; --card-min: 88px; --grid-gap: 8px; }
    .brand .ellipsis { max-width: 88px; }
    .quick-item { font-size: 10px; padding: 10px 2px; }
    .quick-item .qi { width: 34px; height: 34px; }
    .cat-tab { padding: 6px 11px; }
}

/* 中大屏手机 */
@media (min-width: 576px) and (max-width: 699px) {
    :root { --card-min: clamp(108px, 23vw, 138px); --gut: clamp(12px, 2.4vw, 16px); }
    .episode-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
    .hscroll .vod-card { flex-basis: 24%; }
}

/* 平板 / 小笔记本：退出手机 APP 框架，启用顶部导航 + 频道行 */
@media (min-width: 700px) {
    :root {
        --card-min: clamp(122px, 19vw, 158px);
        --gut: clamp(16px, 2.4vw, 26px);
        --grid-gap: clamp(11px, 1.4vw, 16px);
        --header-h: 92px;   /* JS 未执行时的兜底值 */
    }
    .bottom-nav, #rocket, .pull-hint { display: none !important; }
    /* 固定头部给死高度，任何浏览器（含夸克）都不会因字体/行高差异把它撑高，
       --header-h 才能与真实头部严格相等；正文再多留 16px 安全距离。 */
    .app-header { height: var(--header-h); padding: 0; box-sizing: border-box; }
    .app-main, .app-main.has-tabs, .app-main.home-main {
        padding-top: calc(var(--header-h) + 16px);
    }
    .app-main { padding-bottom: 40px; }
    .header-row {
        height: 48px; max-width: var(--page-w); margin: 0 auto;
        padding: 0 var(--gut); gap: clamp(10px, 1.4vw, 18px);
    }
    .brand { font-size: 19px; }
    .brand .ellipsis { max-width: none !important; }
    .header-search { flex: 1; max-width: 360px; margin-left: auto; }
    .header-search form { height: 36px; }
    .desk-user {
        display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
        padding: 7px 13px; border-radius: 20px; font-size: 13px; font-weight: 600;
        color: var(--text-2); background: var(--surface); box-shadow: var(--shadow);
    }
    .desk-user:hover { color: var(--brand); }
    .desk-user svg { width: 16px; height: 16px; }
    .desk-channels {
        display: flex; align-items: center; gap: clamp(14px, 2vw, 24px);
        width: 100%; height: calc(100% - 48px); padding: 0 var(--gut);
        max-width: var(--page-w); margin: 0 auto;
        border-top: 1px solid var(--line); font-size: 12.5px;
        overflow-x: auto; white-space: nowrap; scrollbar-width: none;
        overscroll-behavior-x: contain;
    }
    .desk-channels::-webkit-scrollbar { display: none; }
    .desk-ch-label { flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--text-3); }
    .desk-channels a { color: var(--text-2); }
    .desk-channels a:hover { color: var(--brand); }

    /* 桌面端不再用吸顶 Tab：固定头部一旦比 --header-h 高，Tab 就会被压在
       头部下面只露出半截（夸克截图里的「绿色半圆」）。改为静态可换行排列，
       顺带去掉顶部的横向滚动容器，滚轮始终作用于页面本身。 */
    .cat-tabs {
        position: static; top: auto; flex-wrap: wrap; overflow: visible;
        white-space: normal; background: transparent; border-bottom: 0;
        backdrop-filter: none; padding: 0 0 12px;
    }
    .cat-tab { padding: 7px 15px; }
    /* 资讯页的 Tab 带边框容器，桌面端保留内边距与卡片底色 */
    .cat-tabs.news-tabs { padding: 10px; background: var(--surface); border-radius: var(--radius); }
    /* 顶部已有频道行，首页那排 Tab 不再重复出现 */
    .home-tabs { display: none !important; }
    .hero-item { max-height: 250px; }
    .hscroll .vod-card { flex-basis: 20%; }
    .quick-grid { max-width: 640px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .quick-item { flex-direction: row; justify-content: center; gap: 9px; padding: 13px 8px; font-size: 12.5px; }
    .topic-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
    .detail-poster { flex-basis: clamp(120px, 18vw, 152px); width: clamp(120px, 18vw, 152px); }
    .detail-info h1 { font-size: clamp(20px, 1.4vw + 16px, 24px); }
    .detail-lines p { font-size: 12.5px; }
    .detail-actions .btn { font-size: 13.5px; padding: 10px; }
    .player-box { border-radius: 0; }
    .p-auth .app-main { max-width: 520px; margin-left: auto; margin-right: auto; }
    .p-play .play-block, .p-play .play-head { max-width: min(100%, 1000px); margin-left: auto; margin-right: auto; }
}

/* 桌面：双行导航 + 展播网格化 + 主体限宽
   断点取 960px 而非 1024px：1024 物理屏扣掉滚动条后实际视口约 1006px，
   仍应走完整桌面布局，否则用户会觉得「电脑上没适配」。 */
@media (min-width: 960px) {
    :root {
        --page-w: min(100%, 1440px);
        --card-min: clamp(138px, 11.5vw, 168px);
        --gut: clamp(22px, 2.2vw, 34px);
        --grid-gap: clamp(13px, 1.3vw, 20px);
        --fs-base: 14.5px;
        --header-h: 102px;  /* JS 未执行时的兜底值 */
    }
    .app-shell { box-shadow: 0 0 40px rgba(0, 0, 0, .05); }
    .app-header {
        height: var(--header-h); padding: 0; box-sizing: border-box;
        box-shadow: 0 2px 14px rgba(20, 40, 55, .06);
    }
    .header-row {
        max-width: var(--page-w); height: 62px; margin: 0 auto;
        padding: 0 var(--gut); gap: clamp(14px, 1.8vw, 28px);
    }
    .brand { font-size: 20px; }
    .header-search { max-width: 300px; }
    .header-search form { height: 38px; border-color: var(--line); }
    .icon-btn { width: 36px; height: 36px; }
    .desk-channels {
        max-width: var(--page-w); height: calc(100% - 62px);
        margin: 0 auto; padding: 0 var(--gut);
        border-top: 1px solid var(--line); font-size: 13px;
    }
    .desk-links { display: none; }

    /* 首页无吸顶 Tab，主内容在固定头部下额外留白 */
    .app-main.home-main { padding-top: calc(var(--header-h) + 16px); }
    .app-main { padding-bottom: 46px; }
    .cat-tabs { padding: 0 0 12px; gap: 9px; }
    .cat-tab { padding: 7px 16px; font-size: 13.5px; }

    .section { margin-bottom: 22px; }
    .section-head { margin-bottom: 12px; }
    .section-title { font-size: 17px; }
    /* 焦点展播在桌面端由横滑改为自适应网格，不再出现「一排小横条要横向拖」 */
    .hero-scroller {
        display: grid; overflow: visible; scroll-snap-type: none;
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 288px), 1fr));
        gap: var(--grid-gap); padding: 2px 0 4px;
    }
    .hero-item { flex: none; max-height: 232px; }
    .quick-grid { max-width: 760px; }
    .quick-item { font-size: 13px; padding: 13px 10px; }
    .quick-item .qi { width: 34px; height: 34px; border-radius: 10px; }
    .vod-title { font-size: 13.5px; }
    .vod-meta { font-size: 11px; }
    .rank-item { padding: 11px 16px; }
    .rank-body h4 { font-size: 14px; }
    .page-tab { font-size: 14px; padding: 10px; }
    .panel { padding: 18px; }
    .site-foot { padding: 28px var(--gut) 22px; margin-top: 24px; font-size: 12px; border-top: 1px solid var(--line); }

    .detail-inner { max-width: min(100%, 1080px); margin: 0 auto; }
    .detail-poster { flex-basis: 160px; width: 160px; }
    .detail-info h1 { font-size: clamp(24px, 1.6vw + 16px, 28px); }
    .detail-lines p { font-size: 13.5px; }
    .p-play .app-main { padding: 0 0 44px; }
    .p-play .player-box { max-width: min(100%, 1000px); margin: 0 auto; }
    .p-play .play-topbar, .p-play .play-head, .p-play .play-actions,
    .p-play .player-tip, .p-play .play-block { max-width: min(100%, 1000px); margin-left: auto; margin-right: auto; }
    .player-box { border-radius: 0; }
    .p-ucenter .app-main { max-width: min(100%, 1080px); margin-left: auto; margin-right: auto; }
}

/* 宽桌面：出现完整主导航 */
@media (min-width: 1200px) {
    .desk-links { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 26px); flex-shrink: 0; }
    .desk-links a { position: relative; padding: 8px 0; font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: color .2s; }
    .desk-links a:hover, .desk-links a.active { color: var(--brand); }
    .desk-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--brand); }
    .header-search { max-width: 280px; }
}

/* 超宽屏：限宽略增，两侧留白不会过分空旷 */
@media (min-width: 1700px) {
    :root { --page-w: min(100%, 1520px); --card-min: 172px; }
}

/* ---------- 15. 夜间模式微调 ---------- */
html[data-theme="dark"] .cat-tab.active,
html[data-theme="dark"] .page-tab.active,
html[data-theme="dark"] .btn-primary { box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .vod-poster img,
html[data-theme="dark"] .hero-item img { filter: brightness(.9); }
html[data-theme="dark"] .profile-card { box-shadow: 0 10px 26px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .chip-gold { color: #ffc558; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
