/* =====================================================================
   GoodIApp 前台样式 —— 结构骨架（令牌 + 组件）
   ---------------------------------------------------------------------
   契约（改动前必读）：
   1) 本文件只做视觉层，不改 class 名、不改 DOM 结构。
      .hero-carousel / .hero-video / .hero-slide / .hero-content 与
      wwwroot/js/site.js 的轮播逻辑一一对应，改名或删除即导致首页 banner 失效。
      .nav-toggle 的 display 切换被 site.js 用 getComputedStyle 探测（720px 断点），
      断点值或 display 语义不可改。
   2) 皮肤分两层：
      - 本文件：结构与组件规则，颜色 / 圆角 / 字体 / 阴影等一律走 CSS 变量；
      - wwwroot/css/themes/<name>.css：只覆盖变量（+ 极少量主题特有形态）。
      这里的 :root 默认值 = aurora（暗色影院）。任何主题文件加载失败时，
      页面仍是完整的暗色影院皮肤，不会退化成白底破相。
   3) 新增视觉属性请先加变量，不要直接写死颜色或圆角。
   ===================================================================== */

:root {
    /* ---------- 结构令牌（主题不应覆盖） ---------- */
    --max-width: 1280px;
    --gutter: 24px;
    --gap-grid: 18px;
    --card-min: 232px;
    --motion: .18s;

    /* ---------- 视觉令牌：默认 = aurora（暗色影院） ---------- */
    --bg: #07080c;
    --bg-soft: #0d1018;
    --panel: #12151f;
    --panel-2: #171b27;
    --panel-glass: rgba(7, 8, 12, .72);
    --line: rgba(255, 255, 255, .12);
    --line-soft: rgba(255, 255, 255, .07);
    --border-strong: rgba(255, 255, 255, .22);

    --text: #f2f3f7;
    --text-soft: #c9cddb;
    --muted: #9aa0b4;

    --accent: #6d5efc;
    --accent-hover: #7f72ff;
    --accent-2: #23d5ab;
    --accent-soft: rgba(109, 94, 252, .16);
    --accent-grad: linear-gradient(120deg, #6d5efc 0%, #23d5ab 100%);
    --hot: #ff3b5c;
    --hot-soft: rgba(255, 59, 92, .14);
    /* 深底上的红色文字比色块底要更亮，否则对比度不足 */
    --hot-text: #ff8095;
    --success: #2bd97c;
    --danger: #ff5470;
    --star: #ffc247;
    --warn-bg: rgba(255, 194, 71, .12);
    --warn-line: rgba(255, 194, 71, .32);
    --warn-text: #ffcf6b;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 980px;
    --radius-icon: 22%;

    --shadow: 0 24px 48px -24px rgba(109, 94, 252, .55);
    --shadow-soft: 0 8px 24px -16px rgba(0, 0, 0, .8);
    --card-lift: -3px;
    --card-glow: 0 0 0 1px var(--border-strong), 0 24px 48px -26px rgba(109, 94, 252, .7);

    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
    --display-weight: 700;
    --display-tracking: -.03em;
    --kicker-tracking: .14em;
    --kicker-transform: uppercase;

    --hero-min: 560px;
    /* 视频未就绪时的兜底底纹：没有它，视频慢或被拦时首屏就是一整块死黑 */
    --hero-fallback: radial-gradient(120% 130% at 8% 0%, rgba(109, 94, 252, .34) 0%, transparent 58%),
        radial-gradient(90% 90% at 100% 100%, rgba(35, 213, 171, .22) 0%, transparent 62%),
        #0a0c14;
    --hero-bleed: calc(50% - 50vw);
    --hero-radius: 0px;
    --hero-scrim: linear-gradient(90deg, rgba(4, 5, 9, .92) 0%, rgba(4, 5, 9, .62) 46%, rgba(4, 5, 9, .18) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(7, 8, 12, .55) 26%, rgba(7, 8, 12, 0) 62%);
    --detail-overlay: linear-gradient(180deg, rgba(7, 8, 12, .35) 0%, rgba(7, 8, 12, .96) 100%);

    --rank-color: transparent;
    --rank-stroke: var(--accent);
    --rank-stroke-w: 1.6px;
    --rank-shadow: 0 0 24px rgba(109, 94, 252, .55);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body { overflow-x: clip; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }

h1, h2, h3 {
    margin: 0 0 8px; line-height: 1.1;
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
}
h1 { font-size: 46px; }
h2 { font-size: 30px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== 顶部导航：sticky + 毛玻璃 ===== */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: var(--panel-glass);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
    border-bottom: 1px solid var(--line-soft);
}
.site-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: var(--accent-grad); opacity: .55;
}

.site-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px var(--gutter);
    display: flex; align-items: center; gap: 26px;
}

.site-logo {
    font-family: var(--font-display);
    font-weight: 700; font-size: 20px; letter-spacing: -.02em;
    color: var(--text);
    background: var(--accent-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.site-logo:hover { color: transparent; opacity: .8; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
    position: relative;
    color: var(--text); font-weight: 500; font-size: 14px;
    padding: 6px 10px; border-radius: var(--radius-sm);
    opacity: .78; transition: color var(--motion), opacity var(--motion), background var(--motion);
}
.nav-links a::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px;
    background: var(--accent-grad); border-radius: 2px;
    transform: scaleX(0); transform-origin: left; transition: transform var(--motion);
}
.nav-links a:hover { opacity: 1; color: var(--text); background: var(--accent-soft); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
    display: none; background: transparent; color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: 18px; padding: 2px 10px; cursor: pointer;
}

.account-links { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.account-links a { color: var(--text-soft); }
.account-links a:hover { color: var(--accent-2); }
.account-links form { display: inline; margin: 0; }
.account-member-link { font-weight: 600; color: var(--text); }

.link-button {
    background: none; border: 0; color: inherit;
    font: inherit; cursor: pointer; padding: 0;
}
.link-button:hover { color: var(--accent-2); }

.lang-switch {
    display: inline-flex; background: var(--panel-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill); padding: 2px; gap: 2px;
}
.lang-switch a { padding: 3px 10px; font-size: 12px; color: var(--muted); border-radius: var(--radius-pill); }
.lang-switch a.is-current { background: var(--accent-soft); color: var(--accent-2); }

/* ===== 容器 ===== */
.site-main { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter) 88px; }
.home-content { display: flex; flex-direction: column; gap: 64px; }
.section { padding: 44px 0; }

.section-heading {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 18px; margin-bottom: 24px;
    padding-bottom: 14px; border-bottom: 1px solid var(--line-soft);
}
.section-kicker {
    margin: 0 0 8px; font-size: 11px; letter-spacing: var(--kicker-tracking);
    text-transform: var(--kicker-transform); color: var(--accent-2);
    font-weight: 700;
}
.section-subtitle { color: var(--muted); margin: 0; font-size: 15px; }
.result-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.more-link {
    color: var(--text-soft); font-size: 14px; white-space: nowrap;
    border-bottom: 1px solid var(--line); padding-bottom: 1px;
}
.more-link:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 22px; border-radius: var(--radius-pill); border: 1px solid transparent;
    font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background var(--motion), color var(--motion), border-color var(--motion),
        transform var(--motion), box-shadow var(--motion);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--accent-grad); color: #0b0d13;
    box-shadow: 0 12px 28px -16px var(--accent);
}
.btn-primary:hover { color: #0b0d13; box-shadow: 0 18px 34px -16px var(--accent); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

.empty-state {
    padding: 64px 20px; text-align: center; color: var(--muted);
    background: var(--bg-soft); border-radius: var(--radius-lg);
    border: 1px dashed var(--line);
}
.empty-state p { margin-bottom: 16px; }

/* ===== 首屏 banner：视频轮播（JS 只切 .is-active，不依赖任何动画） ===== */
.hero {
    position: relative;
    margin: 0 var(--hero-bleed);
    border-radius: var(--hero-radius);
    overflow: hidden;
    background: var(--hero-fallback);
    min-height: var(--hero-min);
    display: flex; align-items: flex-end;
}
.hero-carousel { background: var(--hero-fallback); }
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: var(--hero-scrim);
    pointer-events: none;
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 680px; color: #fff;
    display: flex; flex-direction: column; gap: 14px;
    /* 左右内边距与页面内容边界对齐：hero 是满宽出血的元素，不能用固定 padding，
       否则标题会比导航/网格更靠左（(100% - 容器宽)/2 + gutter）。 */
    padding: 56px calc((100% - min(100%, var(--max-width))) / 2 + var(--gutter)) 68px;
    margin-top: auto;
}
.hero-content h1 {
    font-size: 64px; color: #fff; margin: 0;
    text-wrap: balance;
}
.hero-description {
    color: rgba(255, 255, 255, .82); margin: 0;
    font-size: 18px; max-width: 520px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.hero-content .btn-primary { background: #fff; color: #0b0d13; box-shadow: none; }
.hero-content .btn-primary:hover { background: #fff; color: #0b0d13; opacity: .9; }
.hero-content .btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.hero-content .btn-ghost:hover { border-color: #fff; color: #fff; }

/* 文字位置：data-position 由后台轮播设置决定，JS 会把值同步到 .hero-content */
.hero-content[data-position="top-left"] { align-self: flex-start; text-align: left; margin-top: 0; }
.hero-content[data-position="top-right"] { align-self: flex-start; text-align: right; margin-left: auto; margin-top: 0; }
.hero-content[data-position="bottom-left"] { align-self: flex-end; text-align: left; }
.hero-content[data-position="bottom-right"] { align-self: flex-end; text-align: right; margin-left: auto; }
.hero-content[data-position$="right"] { align-items: flex-end; }

/* ===== 搜索 ===== */
.search-section { margin: 34px 0 4px; }
.search-box {
    display: flex; gap: 8px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: 7px 7px 7px 22px;
    box-shadow: var(--shadow-soft);
    transition: border-color var(--motion), box-shadow var(--motion);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: var(--card-glow); }
.search-box input {
    flex: 1; padding: 10px 0; border: 0; background: transparent;
    color: var(--text); font: inherit; font-size: 16px;
}
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: var(--muted); }

/* ===== 游戏卡片：左侧 App 图标 + 右侧信息（一屏信息密度优先） ===== */
.game-grid {
    display: grid; gap: var(--gap-grid);
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
}
.game-card {
    background: var(--panel); border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 14px;
    display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 13px;
    align-items: start;
    transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion),
        background var(--motion);
}
.game-card:hover {
    transform: translateY(var(--card-lift));
    box-shadow: var(--card-glow);
    border-color: var(--border-strong);
    background: var(--panel-2);
}
.game-card.is-limited-free { border-color: var(--hot-soft); }

.game-card-icon {
    position: relative; display: block;
    width: 68px; aspect-ratio: 1 / 1;
    border-radius: var(--radius-icon);
    background: var(--bg-soft);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--line-soft);
}
.game-card-icon-img { width: 100%; height: 100%; object-fit: cover; }
.game-card-icon-fallback {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    background: var(--accent-soft);
    color: var(--muted); font-size: 26px; font-weight: 700;
}
.game-card-badge {
    position: absolute; left: -4px; bottom: -4px;
    background: var(--hot); color: #fff;
    border-radius: var(--radius-pill); padding: 2px 8px;
    font-size: 10px; font-weight: 700; letter-spacing: .02em;
    box-shadow: 0 4px 10px -4px var(--hot);
}
.game-card.is-limited-free .game-card-badge { background: var(--hot); }

.game-card-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.game-card-title { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.01em; line-height: 1.3;
    /* 固定两行槽位：不同行数的标题不再让下方价格/评分错位 */
    min-height: 2.6em; }
.game-card-title a {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.game-card-title a:hover { color: var(--accent-2); }
.game-card-meta {
    margin: 0; font-size: 12.5px; color: var(--muted);
    line-height: 1.5;
    /* 单行槽位：分类多的卡片折行会让价格/评分上下错位，统一截断成一行 */
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.5em;
}
.game-card-foot {
    margin-top: auto; padding-top: 6px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    flex-wrap: wrap;
    /* 无评分卡片的底部与有评分卡片对齐 */
    min-height: 26px;
}
.game-card-price {
    font-size: 12px; font-weight: 600; color: var(--text-soft);
    background: var(--panel-2); border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill); padding: 2px 9px;
    white-space: nowrap;
}
.game-card-price.is-free { background: var(--hot-soft); border-color: transparent; color: var(--hot-text); }
.game-card-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.game-card-stars { color: var(--star); }
.game-card-rating-count { color: var(--muted); font-size: 11.5px; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    font-size: 12px; color: var(--muted);
    background: var(--panel-2); border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill); padding: 3px 11px; white-space: nowrap;
}
.chip-link:hover { border-color: var(--accent-2); color: var(--accent-2); }
.chip-link.is-current { background: var(--accent-soft); color: var(--accent-2); border-color: transparent; }

/* ===== 筛选 ===== */
.filter-bar {
    background: var(--panel); border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 26px;
    display: flex; flex-direction: column; gap: 18px;
}
.filter-search input {
    width: 100%; padding: 12px 18px; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font: inherit;
    transition: border-color var(--motion), box-shadow var(--motion);
}
.filter-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 9px; }
.filter-title {
    font-size: 11px; color: var(--muted); font-weight: 700;
    letter-spacing: var(--kicker-tracking); text-transform: var(--kicker-transform);
}
.filter-options { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-option {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); border-radius: var(--radius-pill);
    padding: 4px 13px; font-size: 13px; color: var(--text-soft);
    cursor: pointer; transition: .15s; background: transparent;
}
.filter-option:hover { border-color: var(--accent-2); color: var(--accent-2); }
.filter-option input { display: none; }
.filter-option.is-active {
    border-color: transparent; color: #0b0d13; background: var(--accent-grad); font-weight: 600;
}
.filter-actions { display: flex; gap: 10px; margin-left: auto; }
.sort-select {
    padding: 9px 14px; border-radius: var(--radius-sm); font: inherit; font-size: 14px;
    border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.sort-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===== 分段切换 ===== */
.tabs {
    display: inline-flex; gap: 2px; margin-bottom: 24px; flex-wrap: wrap;
    background: var(--panel-2); border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill); padding: 3px;
}
.tab {
    padding: 7px 18px; border-radius: var(--radius-pill);
    color: var(--muted); font-size: 14px; transition: .15s;
}
.tab:hover { color: var(--text); }
.tab.is-current { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 40px 0 0; flex-wrap: wrap; }
.pager-link {
    padding: 8px 18px; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: var(--panel); font-size: 14px;
    transition: border-color var(--motion), color var(--motion);
}
.pager-link:hover { border-color: var(--accent-2); color: var(--accent-2); }
.pager-link.is-current { border-color: transparent; background: var(--accent-grad); color: #0b0d13; font-weight: 700; }
.pager-current { color: var(--muted); font-size: 13px; }

/* ===== 榜单名次 ===== */
.rank-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: var(--gap-grid);
    /* 与游戏网格同密度：5 个榜位正好铺满一行，不出现「4 + 1」的空洞尾行 */
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
}
.rank-item {
    position: relative;
    /* 名次占左侧独立一列：不压图标、不被容器裁切 */
    padding-left: 34px;
}
.rank-no {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 3;
    font-family: var(--font-display);
    font-size: 36px; font-weight: 800; line-height: 1;
    color: var(--rank-color);
    -webkit-text-stroke: var(--rank-stroke-w) var(--rank-stroke);
    text-shadow: var(--rank-shadow);
    pointer-events: none;
}
/* 榜单卡片：图标更大，名称占两行 */
.rank-item .game-card { grid-template-columns: 64px minmax(0, 1fr); padding: 13px; }
.rank-item .game-card-icon { width: 64px; }

/* ===== 开发者目录 ===== */
.company-list {
    list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.company-item a {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; background: var(--panel);
    border: 1px solid var(--line-soft); border-radius: var(--radius);
    transition: .18s;
}
.company-item a:hover { border-color: var(--accent-2); background: var(--panel-2); color: var(--text); }
.company-logo-wrap {
    position: relative; flex: 0 0 38px; width: 38px; height: 38px;
    border-radius: var(--radius-sm); background: var(--bg-soft); overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--line-soft);
}
.company-logo-wrap-lg { flex: 0 0 76px; width: 76px; height: 76px; border-radius: var(--radius); }
.company-logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.company-logo-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 15px; font-weight: 700; text-transform: uppercase;
}
.company-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-head { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }

/* ===== 首页年份探索 ===== */
.year-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.year-chip {
    display: inline-flex; align-items: baseline; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius);
    border: 1px solid var(--line-soft); background: var(--panel);
    color: var(--text); font-weight: 600; transition: .18s;
}
.year-chip:hover {
    border-color: var(--accent-2); color: var(--text);
    background: var(--panel-2); box-shadow: var(--card-glow);
}
.year-chip-label { font-size: 17px; font-family: var(--font-display); letter-spacing: -.02em; }
.year-chip-count { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ===== 分类目录 ===== */
.category-grid {
    list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.category-card a {
    display: flex; flex-direction: column; gap: 4px;
    padding: 18px 20px; background: var(--panel);
    border: 1px solid var(--line-soft); border-radius: var(--radius);
    transition: .18s;
}
.category-card a:hover {
    border-color: var(--accent-2); color: var(--text);
    box-shadow: var(--card-glow); transform: translateY(-2px);
}
.category-name { font-size: 16px; font-weight: 600; }
.category-count { font-size: 13px; color: var(--muted); }

/* ===== 促销页 ===== */
.deal-card { position: relative; }
.deal-badge { background: var(--hot); }
.deal-changed { font-size: 12px; color: var(--muted); }
.price-original {
    font-size: 12px; color: var(--muted);
    text-decoration: line-through; margin-left: 8px;
}

/* ===== 上架日历 ===== */
.calendar-block { padding: 30px 0; border-top: 1px solid var(--line-soft); }
.calendar-month { margin-bottom: 30px; }
.calendar-month-title {
    margin: 0 0 16px; font-size: 18px; font-weight: 700; color: var(--text);
    font-family: var(--font-display); letter-spacing: -.02em;
}
.month-picker {
    display: flex; gap: 8px; flex-wrap: wrap;
    max-height: 168px; overflow-y: auto;
    padding: 14px; margin-bottom: 26px;
    background: var(--bg-soft); border-radius: var(--radius);
    border: 1px solid var(--line-soft);
}
.month-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: var(--panel);
    color: var(--muted); font-size: 13px;
}
.month-chip:hover { border-color: var(--accent-2); color: var(--accent-2); }
.month-chip.is-current { border-color: transparent; background: var(--accent-soft); color: var(--accent-2); }
.month-chip-count { font-size: 11px; opacity: .8; }

/* ===== 面包屑 ===== */
.breadcrumb {
    display: flex; align-items: center; gap: 8px; margin: 22px 0 18px;
    font-size: 13px; color: var(--muted); flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-2); }
.breadcrumb-sep { opacity: .5; }

/* ===== 游戏详情 ===== */
.detail-hero {
    position: relative; margin: 26px 0 34px;
    border-radius: var(--radius-lg);
    overflow: hidden; min-height: 340px;
    display: flex; align-items: flex-end;
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
}
.detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: saturate(1.1); }
.detail-hero::after {
    content: ""; position: absolute; inset: 0;
    background: var(--detail-overlay);
}
.detail-head {
    position: relative; z-index: 2; padding: 40px 38px;
    display: flex; gap: 30px; align-items: flex-end; width: 100%;
}
.detail-head-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.detail-title { font-size: 44px; margin: 0; }
.detail-kicker { margin: 0; font-size: 14px; color: var(--accent-2); font-weight: 600; }
.detail-meta {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    color: var(--muted); font-size: 14px;
}
.detail-rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text); }
.detail-rating-count { color: var(--muted); font-weight: 400; }
.lang-notice {
    margin: 8px 0 0; padding: 6px 12px; display: inline-block;
    font-size: 13px; color: var(--warn-text);
    background: var(--warn-bg); border: 1px solid var(--warn-line);
    border-radius: var(--radius-sm);
}
.detail-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.app-icon-wrap {
    position: relative; flex: 0 0 156px; width: 156px; height: 156px;
    border-radius: 34px; overflow: hidden; background: var(--panel);
    box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.app-icon { width: 156px; height: 156px; object-fit: cover; border-radius: 34px; }
.app-icon-fallback {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    color: var(--muted); font-size: 48px; font-weight: 700;
}
.price-pill {
    display: inline-flex; align-items: center;
    padding: 6px 16px; border-radius: var(--radius-pill);
    background: var(--panel-2); border: 1px solid var(--line-soft);
    color: var(--text); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.price-pill.is-free { background: var(--hot-soft); border-color: transparent; color: var(--hot-text); }
.app-download { padding: 13px 28px; font-size: 16px; }
.app-download-lg { padding: 15px 32px; font-size: 17px; }

.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 36px; }
.detail-main { min-width: 0; }
.detail-text { color: var(--text-soft); white-space: pre-line; font-size: 15px; line-height: 1.8; }
.detail-empty { color: var(--muted); }
.detail-side { display: flex; flex-direction: column; gap: 18px; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; }
.meta-list {
    background: var(--panel); border: 1px solid var(--line-soft);
    border-radius: var(--radius); padding: 16px 18px;
}
.meta-row {
    display: flex; justify-content: space-between; gap: 14px;
    padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.meta-row:last-child { border-bottom: 0; }
.meta-row span { color: var(--muted); }
.meta-row strong { font-weight: 500; text-align: right; }
.meta-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.meta-links a { color: var(--accent-2); }
.meta-links a:hover { color: var(--accent-hover); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select {
    padding: 8px 12px; border-radius: var(--radius-sm); font: inherit;
    border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.store-links { display: flex; flex-direction: column; gap: 8px; }

.shot-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shot-item {
    border-radius: var(--radius); border: 1px solid var(--line-soft);
    width: 100%; background: var(--bg-soft);
}

/* ===== 价格历史 ===== */
.price-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.price-history-item {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 2px; border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.price-history-item:last-child { border-bottom: 0; }
.price-history-date { color: var(--muted); }
.price-history-value { font-weight: 600; }
.price-history-value.is-free { color: var(--hot-text); }

/* ===== 静态内容页 / 登录注册表单 ===== */
.content-page {
    max-width: 800px; margin: 44px auto; background: var(--panel);
    border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
    padding: 38px 40px;
}
.content-page h1 { margin-bottom: 20px; }
.content-page h2 { font-size: 21px; margin-top: 28px; }
.content-page p, .content-page li { color: var(--text-soft); }
.content-page a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

.auth-page { display: flex; justify-content: center; padding: 64px 0; }
.auth-card {
    width: 100%; max-width: 420px; background: var(--panel);
    border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
    padding: 32px 34px; display: flex; flex-direction: column; gap: 10px;
}
.auth-card-small { max-width: 380px; }
.auth-card h1 { font-size: 27px; }
.auth-intro { color: var(--muted); font-size: 14px; }
.auth-card label { font-size: 13px; color: var(--muted); }
.auth-card input, .auth-card select, .auth-card textarea {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font: inherit;
}
.auth-card input:focus, .auth-card select:focus, .auth-card textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-submit {
    margin-top: 8px; padding: 13px; border: 0; border-radius: var(--radius-pill);
    background: var(--accent-grad); color: #0b0d13;
    cursor: pointer; font: inherit; font-size: 16px; font-weight: 700;
    transition: box-shadow var(--motion), transform var(--motion);
}
.auth-submit:hover { box-shadow: 0 16px 32px -18px var(--accent); transform: translateY(-1px); }
.auth-error { color: var(--danger); font-size: 13px; }
.auth-success { color: var(--success); font-size: 13px; }
.auth-switch { font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--accent-2); }

/* ===== 页脚 ===== */
.site-footer {
    border-top: 1px solid var(--line-soft); background: var(--bg-soft);
    padding: 40px var(--gutter) 56px; text-align: center; color: var(--muted); font-size: 13px;
}
.site-footer::before {
    content: ""; display: block; height: 1px; max-width: var(--max-width);
    margin: -40px auto 38px; background: var(--accent-grad); opacity: .25;
}
.site-footer-links { display: flex; gap: 22px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.site-footer-links a { color: var(--text-soft); }
.site-footer-links a:hover { color: var(--accent-2); }
.footer-note { margin: 3px 0; font-size: 12px; }

/* ===== 响应式 ===== */
@media (max-width: 1080px) {
    .detail-body { grid-template-columns: 1fr; }
    h1 { font-size: 38px; }
    .hero-content h1 { font-size: 52px; }
    .hero-content { padding: 48px 40px 56px; }
}

@media (max-width: 720px) {
    /* 移动端导航 = 浮层下拉面板：菜单绝对定位脱离文档流，展开时不推挤下方内容；
       背景遮罩由 .site-nav::after 生成，点遮罩或按 Esc 收起。
       注意：.nav-toggle 的 display 切换被 site.js 用作断点判断，不可改。 */
    .site-nav { position: relative; flex-wrap: wrap; gap: 12px; padding: 10px 16px; }

    .nav-toggle { display: inline-block; margin-left: auto; }
    .nav-toggle[aria-expanded="true"] { background: var(--accent-soft); }

    .nav-links {
        display: none; position: absolute; z-index: 2;
        top: calc(100% + 8px); left: 12px; right: 12px;
        flex-direction: column; gap: 0; flex: none;
        max-height: calc(100vh - 96px); overflow-y: auto;
        padding: 6px 14px;
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    .nav-links.is-open { display: flex; }
    .nav-links a { padding: 13px 2px; font-size: 15px; border-top: 1px solid var(--line-soft); border-radius: 0; }
    .nav-links a::after { display: none; }
    .nav-links a:first-child { border-top: 0; }

    /* 背景遮罩：自导航栏下沿铺满视口；点击遮罩命中的就是 .site-nav 自身 */
    .site-nav::after {
        content: ''; position: absolute; z-index: 1;
        top: 100%; left: 0; right: 0; height: 100vh;
        background: rgba(0, 0, 0, .5);
        opacity: 0; pointer-events: none;
        transition: opacity .18s ease;
    }
    .site-nav.is-open::after { opacity: 1; pointer-events: auto; }

    .account-links { gap: 10px; }
    /* 移动端 gutter 与安全边距统一成 16px：hero 文案、导航 logo、网格左边界才会同一条竖线 */
    :root { --gutter: 16px; }
    .site-main { padding: 0 16px 64px; }
    h1 { font-size: 30px; }

    .hero { min-height: 72vh; border-radius: 0; margin-inline: -16px; }
    .hero-content { padding: 32px var(--gutter) 40px; gap: 12px; max-width: none; }
    .hero-content h1 { font-size: 36px; }
    .hero-description { font-size: 15px; }

    .detail-hero { border-radius: var(--radius); min-height: 0; }
    .detail-head { flex-direction: column; align-items: flex-start; padding: 26px 22px; gap: 18px; }
    .app-icon-wrap, .app-icon { flex: 0 0 112px; width: 112px; height: 112px; border-radius: 26px; }
    .detail-title { font-size: 30px; }

    /* 窄屏回到竖排大图卡：图标在上、信息在下 */
    .game-grid, .rank-list { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
    .game-card, .rank-item .game-card {
        grid-template-columns: 1fr; gap: 10px; padding: 10px;
    }
    .game-card-icon, .rank-item .game-card-icon { width: 100%; border-radius: var(--radius); }
    .game-card-body { gap: 4px; }
    .game-card-title { font-size: 13.5px; }
    .game-card-title a { -webkit-line-clamp: 1; }
    .game-card-meta { font-size: 11.5px; }
    .game-card-foot { padding-top: 4px; gap: 6px; }
    .game-card-price { font-size: 11px; padding: 1px 8px; }
    .game-card-rating { font-size: 11.5px; }
    .game-card-rating-count { display: none; }
    .rank-item { padding-left: 22px; }
    .rank-no { font-size: 22px; left: 0; }

    .filter-bar { padding: 16px; border-radius: var(--radius); }
    .filter-actions { margin-left: 0; width: 100%; }
    .filter-actions .btn { flex: 1; }
    .company-head { flex-direction: column; align-items: flex-start; }
    .content-page { padding: 26px 20px; border-radius: var(--radius); margin: 24px auto; }
    .month-picker { max-height: 200px; }
    .tabs { display: flex; width: 100%; overflow-x: auto; }
    .search-box { padding-left: 16px; }
    .section { padding: 34px 0; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .game-card:hover, .category-card a:hover, .btn:hover { transform: none; }
}


/* =====================================================================
   首页分类带（六套皮肤共用一份标记，颜色/圆角由各自令牌决定）
   ===================================================================== */
.genre-strip-head {
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.genre-strip-head h2 {
    margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .02em;
}
.genre-strip-total { font-size: 12px; color: var(--muted); white-space: nowrap; }
.genre-strip-more { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.genre-strip-more:hover { color: var(--accent-2); }
.genre-strip-items { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-strip-items a {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 6px 12px; font-size: 13px; color: var(--text-soft);
    border: 1px solid var(--line-soft); border-radius: var(--radius-pill);
    transition: border-color var(--motion), color var(--motion), background var(--motion);
}
.genre-strip-items a i { font-style: normal; font-size: 11px; color: var(--muted); }
.genre-strip-items a:hover { border-color: var(--accent-2); color: var(--accent-2); }

@media (max-width: 720px) {
    .genre-strip-items { gap: 6px; }
    .genre-strip-items a { padding: 5px 10px; font-size: 12px; }
}
