/* ============================================================
   短剧站模板 · 样式表
   目录：template/darkdrama/style.css
   ============================================================ */

/* ---------- 1. 变量 ---------- */
:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --bg: #0a0c11;
    --bg-2: #0f1219;
    --surface: #151924;
    --surface-2: #1b2030;
    --border: #252b3b;
    --text: #e9ecf5;
    --text-2: #9aa4bb;
    --text-3: #6b7590;
    --brand: #ff4d67;
    --brand-2: #ff8a3d;
    --radius: 14px;
    --radius-lg: 18px;
    --max: 1240px;
    --shadow: 0 12px 36px rgba(0, 0, 0, .45);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 520px at 12% -8%, rgba(255, 77, 103, .10), transparent 62%),
        radial-gradient(900px 480px at 88% -12%, rgba(255, 138, 61, .08), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font: 400 15px/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

::selection { background: rgba(255, 77, 103, .35); color: #fff; }

.sr-only, .skip-link {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
    position: fixed; left: 16px; top: 12px; width: auto; height: auto;
    clip: auto; margin: 0; padding: 10px 16px; z-index: 999;
    background: var(--brand); color: #fff; border-radius: 10px; font-size: 14px;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 3. 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 11px;
    border: 1px solid transparent; font-size: 14px; font-weight: 600;
    line-height: 1; white-space: nowrap; cursor: pointer;
    transition: transform .18s ease, filter .18s ease, border-color .18s ease, background .18s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 8px 22px rgba(255, 77, 103, .26);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: #fff; }
.btn-app { background: rgba(255, 77, 103, .12); color: var(--brand); border-color: rgba(255, 77, 103, .35); }
.btn-app:hover { background: rgba(255, 77, 103, .2); color: #fff; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 13px; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- 4. 头部 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 12, 17, .82);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }

.logo {
    display: flex; align-items: center; gap: 9px;
    font-weight: 800; font-size: 17px; letter-spacing: .4px; flex: 0 0 auto;
}
.logo img { width: 30px; height: 30px; border-radius: 9px; }
.logo span {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.main-nav {
    display: flex; align-items: center; gap: 4px;
    flex: 1 1 auto; min-width: 0;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
    padding: 8px 12px; border-radius: 9px; white-space: nowrap;
    font-size: 14px; font-weight: 500; color: var(--text-2); transition: .18s;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.header-actions { flex: 0 0 auto; }

.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 38px; padding: 0 9px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text-2); }

/* ---------- 5. 主体 ---------- */
.site-main { padding: 20px 0 56px; min-height: 60vh; }

/* ---------- 6. 面包屑 ---------- */
.breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-3); margin: 4px 0 18px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--text-3); opacity: .6; }
.breadcrumb [aria-current] { color: var(--text-2); max-width: 220px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 7. 首页 Hero ---------- */
.hero { margin: 6px 0 36px; }

.hero-title {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
    margin: 0 0 18px; font-weight: 800;
}
.hero-title-main {
    font-size: 24px; letter-spacing: .5px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title-sub { font-size: 13px; font-weight: 400; color: var(--text-3); }

.hero-grid {
    display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px;
}

.hero-feature {
    position: relative; display: block; overflow: hidden;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    aspect-ratio: 16 / 9; min-height: 260px; background: var(--surface);
}
.hero-feature-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform .5s ease;
}
.hero-feature:hover .hero-feature-img { transform: scale(1.04); }
.hero-feature-mask {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 16, .05) 0%, rgba(8, 10, 16, .35) 45%, rgba(8, 10, 16, .94) 100%);
}
.hero-feature-body {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.hero-chip {
    display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
    border-radius: 8px; font-size: 12px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.hero-feature-name { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.hero-feature-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-2); }
.hero-feature-body .btn { margin-top: 4px; }

.hero-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hero-item {
    position: relative; display: block; overflow: hidden;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface); min-height: 118px;
}
.hero-item img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform .45s ease;
}
.hero-item:hover img { transform: scale(1.06); }
.hero-item-mask {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 16, 0) 30%, rgba(8, 10, 16, .9) 100%);
}
.hero-item-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; }
.hero-item-name {
    font-size: 13px; font-weight: 700; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-item-meta { display: block; margin-top: 4px; font-size: 11px; color: var(--text-2); }

/* ---------- 8. 区块 ---------- */
.section { margin: 0 0 40px; }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.section-title { font-size: 18px; font-weight: 800; letter-spacing: .3px; display: flex; align-items: baseline; gap: 8px; }
.section-title small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.section-more, .section-link { font-size: 13px; color: var(--text-3); }
.section-link:hover { color: var(--brand); }

/* ---------- 9. 网格 & 卡片 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 18px 12px;
}

.card { transition: transform .22s ease; }
.card:hover { transform: translateY(-3px); }
.card-link { display: block; }

.card-thumb {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface-2);
}
.card-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent 45%, rgba(6, 8, 12, .8) 100%);
}
.card-play {
    position: absolute; z-index: 3; top: 50%; left: 50%;
    width: 44px; height: 44px; margin: -22px 0 0 -22px;
    border-radius: 50%; opacity: 0; transform: scale(.8);
    transition: opacity .22s ease, transform .22s ease;
    background: rgba(255, 255, 255, .93)
        url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2312141c'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E")
        center / 17px 17px no-repeat;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}
.card:hover .card-play { opacity: 1; transform: scale(1); }

.card-badge {
    position: absolute; z-index: 3; right: 8px; bottom: 8px;
    height: 20px; padding: 0 7px; border-radius: 6px;
    font-size: 11px; font-weight: 600; line-height: 20px; color: #fff;
    background: rgba(10, 12, 17, .78); backdrop-filter: blur(4px);
}

.card-body { padding: 9px 2px 0; }
.card-title {
    font-size: 14px; font-weight: 600; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word;
}
.card:hover .card-title { color: #fff; }
.card-meta {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 6px; font-size: 12px; color: var(--text-3);
}
.card-cat { color: var(--text-2); }

/* ---------- 10. 页面标题 ---------- */
.page-head { margin: 0 0 22px; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.page-sub { margin-top: 8px; font-size: 13px; color: var(--text-3); }

/* ---------- 11. 分类胶囊 ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chips--compact { margin: 0 0 22px; }
.cat-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: 10px;
    font-size: 13px; font-weight: 500; color: var(--text-2);
    background: var(--surface); border: 1px solid var(--border); transition: .18s;
}
.cat-chip em { font-style: normal; font-size: 11px; color: var(--text-3); }
.cat-chip:hover { color: #fff; border-color: var(--brand); }
.cat-chip.is-active {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.cat-chip.is-active em { color: rgba(255, 255, 255, .8); }

/* ---------- 12. 详情页 ---------- */
.detail-hero {
    display: grid; grid-template-columns: 210px minmax(0, 1fr);
    gap: 26px; margin: 0 0 36px;
    padding: 22px; border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--surface) 0%, rgba(21, 25, 36, .35) 100%);
    border: 1px solid var(--border);
}
.detail-cover {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); background: var(--surface-2);
    aspect-ratio: 3 / 4;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover-badge {
    position: absolute; left: 8px; top: 8px; z-index: 2;
    height: 22px; padding: 0 9px; border-radius: 7px;
    font-size: 11px; font-weight: 700; line-height: 22px; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.detail-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-title { font-size: 26px; font-weight: 800; letter-spacing: .3px; word-break: break-word; }

.detail-meta {
    display: flex; flex-wrap: wrap; gap: 10px 22px;
    font-size: 13px;
}
.detail-meta li { display: flex; align-items: baseline; gap: 8px; }
.detail-meta li > span { color: var(--text-3); }
.detail-meta li > b { font-weight: 600; color: var(--text); }
.detail-meta li > a { color: var(--brand); }
.detail-meta li > a:hover { text-decoration: underline; }

.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* ---------- 13. 选集 ---------- */
.ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
    max-height: 460px;
    overflow-y: auto;
    padding: 2px 8px 2px 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.ep-grid::-webkit-scrollbar { width: 6px; }
.ep-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.ep-btn {
    display: flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 8px; border-radius: 10px;
    font-size: 13px; font-weight: 500; color: var(--text-2);
    background: var(--surface-2); border: 1px solid var(--border);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: .18s;
}
.ep-btn:hover { color: #fff; border-color: var(--brand); background: #1f2536; }
.ep-btn.is-current {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 6px 18px rgba(255, 77, 103, .28);
}

/* ---------- 14. 播放页 ---------- */
.play-h1 { font-size: 22px; font-weight: 800; margin: 0 0 16px; letter-spacing: .3px; word-break: break-word; }

.player-box {
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); background: var(--surface);
    margin: 0 0 32px;
}
.player-frame {
    position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px;
    background: #05070b; overflow: hidden;
}
.player-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; filter: blur(2px) brightness(.5); transform: scale(1.06);
}
.player-veil {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(10, 12, 17, .25), rgba(5, 7, 11, .88) 78%);
}
.player-overlay {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; text-align: center; padding: 20px;
}
.player-state {
    display: inline-flex; align-items: center; height: 24px; padding: 0 12px;
    border-radius: 8px; font-size: 12px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.player-epname { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.player-views { font-size: 12px; color: var(--text-2); }

.player-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 14px; padding: 16px 20px; border-top: 1px solid var(--border);
    background: var(--surface);
}
.player-bar-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.player-bar-name { font-size: 15px; font-weight: 700; }
.player-bar-name:hover { color: var(--brand); }
.player-bar-sub { font-size: 12px; color: var(--text-3); }
.player-nav { display: flex; gap: 10px; }

/* ---------- 15. 分页 ---------- */
.pager-wrap { margin: 34px 0 6px; display: flex; justify-content: center; }
.pager-wrap ul,
.pager-wrap ol,
.pager-wrap .pagination,
.pager-wrap .pager {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; list-style: none; margin: 0; padding: 0;
}
.pager-wrap li { display: inline-flex; }
.pager-wrap a,
.pager-wrap span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    border-radius: 10px; font-size: 14px; color: var(--text-2);
    background: var(--surface); border: 1px solid var(--border);
    transition: .18s;
}
.pager-wrap a:hover { color: #fff; border-color: var(--brand); }
.pager-wrap .current,
.pager-wrap .active,
.pager-wrap strong,
.pager-wrap [aria-current="page"] {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

/* ---------- 16. 空状态 ---------- */
.empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 64px 20px; text-align: center;
    border: 1px dashed var(--border); border-radius: var(--radius-lg);
    background: rgba(21, 25, 36, .4);
}
.empty-icon {
    width: 56px; height: 56px; border-radius: 50%;
    border: 2px solid var(--border);
    background:
        linear-gradient(135deg, rgba(255, 77, 103, .12), rgba(255, 138, 61, .12));
    position: relative;
}
.empty-icon::after {
    content: ""; position: absolute; inset: 0; margin: auto;
    width: 0; height: 0;
    border-left: 11px solid var(--text-3);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    transform: translateX(2px);
}
.empty-title { font-size: 16px; font-weight: 700; }
.empty-text { font-size: 13px; color: var(--text-3); }
.empty .btn { margin-top: 8px; }
.empty-inline { padding: 28px; text-align: center; font-size: 14px; color: var(--text-3); }

/* ---------- 17. 下载页 ---------- */
.app-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px; align-items: center;
    padding: 32px; margin: 0 0 40px;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    background:
        radial-gradient(520px 260px at 8% 0%, rgba(255, 77, 103, .16), transparent 70%),
        linear-gradient(180deg, var(--surface) 0%, rgba(21, 25, 36, .4) 100%);
}
.app-title { font-size: 28px; font-weight: 800; letter-spacing: .4px; }
.app-sub { margin-top: 12px; font-size: 14px; color: var(--text-2); max-width: 520px; }
.app-features { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.app-features li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.app-features i {
    flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
    background: rgba(255, 77, 103, .16);
    position: relative;
}
.app-features i::after {
    content: ""; position: absolute; left: 6px; top: 4px;
    width: 4px; height: 8px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: rotate(40deg);
}
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.app-note { margin-top: 14px; font-size: 12px; color: var(--text-3); }

.app-mock { display: flex; justify-content: center; }
.app-mock-screen {
    width: 200px; height: 380px; padding: 16px 14px;
    border-radius: 26px; border: 1px solid var(--border);
    background: linear-gradient(180deg, #141822, #0c0f16);
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 10px;
}
.app-mock-bar { height: 8px; width: 52px; border-radius: 4px; background: var(--surface-2); }
.app-mock-thumb {
    flex: 1 1 auto; border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 77, 103, .28), rgba(255, 138, 61, .18));
}
.app-mock-line { height: 8px; border-radius: 4px; background: var(--surface-2); }
.app-mock-line.short { width: 60%; }
.app-mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.app-mock-grid span { height: 46px; border-radius: 8px; background: var(--surface-2); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li {
    display: flex; gap: 14px; padding: 18px;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface);
}
.step-num {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.steps b { display: block; font-size: 14px; margin-bottom: 4px; }
.steps p { font-size: 13px; color: var(--text-3); }

/* ---------- 18. 页脚 ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(10, 12, 17, .6);
    padding: 38px 0 30px;
}
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-desc { font-size: 13px; color: var(--text-3); max-width: 620px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-2); }
.footer-links a:hover { color: var(--brand); }
.footer-copy { font-size: 12px; color: var(--text-3); line-height: 1.7; }

/* ---------- 19. 返回顶部 ---------- */
.to-top {
    position: fixed; right: 18px; bottom: 22px; z-index: 90;
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2);
    background: var(--surface-2); border: 1px solid var(--border);
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: .22s; cursor: pointer;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: #fff; border-color: var(--brand); }

/* ---------- 20. 响应式 ---------- */
@media (min-width: 768px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 16px; }
    .card-title { font-size: 15px; }
}

@media (min-width: 1100px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (max-width: 960px) {
    .nav-toggle { display: flex; }
    .header-actions .btn-app { display: none; }

    .main-nav {
        position: fixed; left: 0; right: 0; top: 64px; z-index: 99;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding: 14px 16px 20px;
        background: var(--bg-2);
        border-bottom: 1px solid var(--border);
        max-height: calc(100vh - 64px); overflow-y: auto;
        transform: translateY(-12px);
        opacity: 0; visibility: hidden;
        transition: transform .22s ease, opacity .22s ease, visibility .22s;
        box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
    }
    .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
    .main-nav a { padding: 12px 12px; font-size: 15px; }

    .hero-grid { grid-template-columns: 1fr; }
    .hero-feature { aspect-ratio: 16 / 10; min-height: 0; }
    .detail-hero { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 16px; }
    .detail-title { font-size: 20px; }
    .app-hero { grid-template-columns: 1fr; padding: 24px; }
    .app-mock { display: none; }
}

@media (max-width: 640px) {
    .container { padding: 0 14px; }
    .site-main { padding: 14px 0 44px; }

    .logo span { font-size: 16px; }

    .hero-title-main { font-size: 20px; }
    .hero-title-sub { font-size: 12px; }
    .hero-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hero-item { min-height: 104px; }
    .hero-feature-name { font-size: 18px; }
    .hero-feature-body { padding: 16px; }

    .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 10px; }
    .card-title { font-size: 13px; }

    .detail-hero { grid-template-columns: 1fr; }
    .detail-cover { width: 46%; max-width: 180px; }
    .detail-title { font-size: 19px; }
    .detail-meta { gap: 8px 16px; font-size: 12px; }
    .detail-actions .btn { flex: 1 1 auto; }

    .play-h1 { font-size: 17px; }
    .player-epname { font-size: 18px; }
    .player-bar { padding: 14px; }
    .player-nav { width: 100%; }
    .player-nav .btn { flex: 1 1 0; }

    .ep-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); max-height: 340px; }

    .app-title { font-size: 22px; }
    .app-actions .btn { flex: 1 1 auto; }

    .section-title { font-size: 16px; }
    .page-title { font-size: 20px; }
    .to-top { right: 12px; bottom: 14px; width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}


/* ---------- 21. 播放器 video ---------- */
.player-video {
    position: absolute; inset: 0; z-index: 3;
    width: 100%; height: 100%;
    background: #000;
    object-fit: contain;
}
.player-video:focus { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- 22. 紧凑分页（替换原有分页样式） ---------- */
.pager-wrap { margin: 34px 0 6px; display: flex; justify-content: center; }

.pager-wrap .pager {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 6px; margin: 0; padding: 0;
    list-style: none;
}

.pager-btn,
.pager-current,
.pager-ellipsis {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 11px;
    border-radius: 9px; font-size: 13px; line-height: 1;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-2);
    transition: color .18s, border-color .18s, background .18s;
}

.pager-btn:hover { color: #fff; border-color: var(--brand); }

.pager-current {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(255, 77, 103, .28);
}

.pager-ellipsis {
    min-width: 22px; padding: 0;
    background: transparent; border-color: transparent;
    color: var(--text-3);
    cursor: default;
}

.pager-prev,
.pager-next { min-width: 68px; }

.pager-btn.is-disabled {
    opacity: .4; pointer-events: none;
    color: var(--text-3);
    background: var(--surface-2);
}

@media (max-width: 640px) {
    .pager-btn, .pager-current, .pager-ellipsis { min-width: 32px; height: 32px; font-size: 12px; }
    .pager-prev, .pager-next { min-width: 58px; padding: 0 8px; }
}