/* ==========================================================================
   资讯门户 CMS - 前台样式
   ========================================================================== */

:root {
    --brand: #2b6cff;
    --brand-dark: #1c4fd6;
    --brand-soft: #eef3ff;
    --accent: #ff5a1f;
    --text: #1f2329;
    --text-sub: #5b6472;
    --text-mute: #8b93a1;
    --line: #e8ebf0;
    --bg: #f5f7fb;
    --white: #fff;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(24, 39, 75, .06);
    --shadow-hover: 0 8px 24px rgba(24, 39, 75, .12);
    --container: 1200px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; transition: color .18s; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; border: 0; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

.skip-link a {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--brand); color: #fff; padding: 8px 14px;
}
.skip-link a:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- 头部 */
.site-header { background: var(--white); box-shadow: var(--shadow); position: relative; z-index: 20; }

.topbar { background: #1f2329; color: #cfd6e4; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar-slogan { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.header-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo img { max-height: 46px; }
.logo-text {
    font-size: 26px; font-weight: 800; letter-spacing: .5px;
    background: linear-gradient(120deg, var(--brand), #7c4dff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo.has-img .logo-text { font-size: 21px; }

.header-search { display: flex; flex: 0 1 380px; border: 2px solid var(--brand); border-radius: 999px; overflow: hidden; background: var(--white); }
.header-search input {
    flex: 1; border: 0; padding: 9px 16px; font-size: 14px; outline: none; background: transparent; color: var(--text);
}
.header-search button {
    border: 0; background: var(--brand); color: #fff; padding: 0 22px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.header-search button:hover { background: var(--brand-dark); }

.main-nav { border-top: 1px solid var(--line); }
.main-nav .container { display: flex; align-items: center; }
.nav-list { display: flex; flex-wrap: wrap; }
.nav-list li a {
    display: block; padding: 12px 20px; font-size: 16px; font-weight: 600; color: var(--text); position: relative;
}
.nav-list li a::after {
    content: ""; position: absolute; left: 20px; right: 20px; bottom: 6px; height: 2px;
    background: var(--brand); transform: scaleX(0); transition: transform .2s;
}
.nav-list li a:hover::after, .nav-list li.active a::after { transform: scaleX(1); }
.nav-list li.active a { color: var(--brand); }
.nav-toggle { display: none; }

/* ---------------------------------------------------------------- 主体 */
.site-main { padding: 20px 16px 40px; }

.section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.section-title { font-size: 20px; position: relative; padding-left: 12px; }
.section-title::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, var(--brand), #7c4dff); }
.section-more { font-size: 13px; color: var(--text-mute); white-space: nowrap; }
a.section-more:hover { color: var(--brand); }

/* ---------------------------------------------------------------- 首页首屏 */
.home-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.home-slider-wrap { min-width: 0; }

.slider {
    position: relative; border-radius: var(--radius); overflow: hidden; background: #202431;
    height: var(--slider-height, 420px); box-shadow: var(--shadow);
}
.slider-track { position: absolute; inset: 0; }
.slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    transition: opacity .5s ease, visibility .5s;
    display: block; color: #fff;
}
.slide.active { opacity: 1; visibility: visible; }
.slide-img, .slide .thumb-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .78)); }
.slide-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 26px 30px; display: block; }
.slide-cat { display: inline-block; background: var(--brand); font-size: 12px; padding: 2px 10px; border-radius: 4px; margin-bottom: 8px; }
.slide-title { display: block; font-size: 22px; font-weight: 700; color: #fff; line-height: 1.4; }
.slide:hover .slide-title { color: #fff; text-decoration: underline; }
.slide-desc { display: block; font-size: 13px; color: rgba(255, 255, 255, .82); margin-top: 6px; }

.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 54px; border: 0;
    background: rgba(0, 0, 0, .32); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
    opacity: 0; transition: opacity .2s, background .2s;
}
.slider:hover .slider-arrow { opacity: 1; }
.slider-arrow:hover { background: rgba(0, 0, 0, .6); }
.slider-arrow.prev { left: 0; border-radius: 0 6px 6px 0; }
.slider-arrow.next { right: 0; border-radius: 6px 0 0 6px; }
.slider-dots { position: absolute; right: 20px; bottom: 16px; display: flex; gap: 8px; }
.slider-dots button {
    width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .5); cursor: pointer; transition: all .2s;
}
.slider-dots button.active { background: #fff; width: 22px; border-radius: 5px; }
.slider-empty {
    height: var(--slider-height, 420px); display: flex; align-items: center; justify-content: center;
    background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--text-mute); font-size: 14px; padding: 20px; text-align: center;
}

.home-hero { min-width: 0; }
.hero-card {
    position: relative; display: block; height: 100%; min-height: 260px; border-radius: var(--radius);
    overflow: hidden; background: linear-gradient(140deg, #17233d, #2b3f6b 60%, #4a5fa8); color: #fff; box-shadow: var(--shadow);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 20, 38, .1), rgba(12, 20, 38, .82)); }
.hero-body { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding: 24px; }
.hero-tag { display: inline-block; width: fit-content; background: var(--accent); font-size: 12px; padding: 2px 10px; border-radius: 4px; margin-bottom: 10px; }
.hero-title { display: block; font-size: 20px; font-weight: 700; line-height: 1.4; }
.hero-sub { display: block; font-size: 13px; color: rgba(255, 255, 255, .82); margin-top: 8px; }
.hero-btn { display: inline-block; margin-top: 16px; background: #fff; color: var(--brand); font-weight: 600; font-size: 13px; padding: 7px 18px; border-radius: 999px; width: fit-content; }
.hero-card:hover .hero-btn { background: var(--brand); color: #fff; }

/* ---------------------------------------------------------------- 卡片 */
.card-grid { display: grid; gap: 16px; }
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-soft); }
.card-img, .card-media .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.card-cat { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.card-body { padding: 12px 14px 14px; }
.card-title { font-size: 16px; margin-bottom: 6px; }
.card-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-mute); }

/* 占位图 */
.thumb-ph {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #dbe6ff, #cfe0ff 45%, #e7ddff);
    color: #5977b8; font-style: normal;
}
.thumb-ph em { font-style: normal; font-weight: 800; font-size: 20px; letter-spacing: 2px; opacity: .75; }
.slide .thumb-ph { background: linear-gradient(135deg, #2b3f6b, #4a5fa8); color: rgba(255, 255, 255, .8); }

/* ---------------------------------------------------------------- 栏目区块 */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
/* 侧栏没有任何内容时收成一栏，避免右侧留出 320px 空白 */
.layout-single { grid-template-columns: minmax(0, 1fr); }
.cat-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.cat-feature-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: var(--brand-soft); }
.cat-feature-img, .cat-feature-media .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.cat-feature-body h3 { font-size: 18px; margin: 10px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-feature-body p { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-items li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cat-items li:last-child { border-bottom: 0; }
.cat-thumb, .cat-items .thumb-ph { width: 110px; height: 74px; flex: 0 0 110px; border-radius: 6px; object-fit: cover; }
.cat-item-body { min-width: 0; }
.cat-item-title { font-weight: 600; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-item-body p { font-size: 12.5px; color: var(--text-mute); margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cat-item-meta { font-size: 12px; color: var(--text-mute); }

/* 文章少的栏目：整排卡片（1 篇 → 图文左右；2 篇 → 两列；3 篇 → 三列），避免右侧留空 */
.cat-cards { display: grid; gap: 18px; }
.cat-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cat-cards.single { grid-template-columns: minmax(0, 1fr); }
.cat-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: var(--brand-soft); }
.cat-card-img, .cat-card-media .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.cat-card-title { font-size: 16px; margin: 10px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-cards.single .cat-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.cat-cards.single .cat-card-title { font-size: 18px; margin-top: 0; }

/* ---------------------------------------------------------------- 侧栏 */
.layout-side { min-width: 0; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 16px; }
.widget { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.widget-title { font-size: 17px; margin-bottom: 14px; padding-left: 11px; position: relative; }
.widget-title::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; border-radius: 2px; background: var(--brand); }

.rank-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list a { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-no { flex: 0 0 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; background: #eef1f6; color: var(--text-mute); font-size: 12px; font-weight: 700; }
.rank-no.hot { background: var(--accent); color: #fff; }

.mini-list li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-time { display: block; font-size: 12px; color: var(--text-mute); margin-top: 2px; }

/* 侧栏热门游戏（图标 + 名称 + 下载量） */
.side-games li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.side-games li:last-child { border-bottom: 0; }
.side-game-media { flex: 0 0 52px; }
.side-game-img, .side-game-media .thumb-ph { display: block; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.side-game-media .thumb-ph em { font-size: 14px; }
.side-game-body { min-width: 0; }
.side-game-name { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.side-game-meta { display: block; font-size: 12px; color: var(--text-mute); margin-top: 3px; }

/* ---------------------------------------------------------------- 最新资讯（首页底部通栏） */
.latest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.latest-grid li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.latest-grid li:nth-last-child(-n + 2) { border-bottom: 0; }
.latest-thumb { flex: 0 0 118px; }
.latest-img, .latest-thumb .thumb-ph { width: 118px; height: 76px; border-radius: 6px; object-fit: cover; }
.latest-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.latest-title { font-size: 14.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-meta { font-size: 12px; color: var(--text-mute); margin-top: auto; }

/* ---------------------------------------------------------------- 面包屑 / 页面头 */
.breadcrumb { font-size: 13px; color: var(--text-mute); margin-bottom: 14px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }

.page-head { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.page-title { font-size: 24px; margin-bottom: 8px; }
.page-desc { color: var(--text-sub); font-size: 14px; margin-bottom: 6px; }
.page-count { color: var(--text-mute); font-size: 13px; margin: 0; }

.search-form { display: flex; gap: 8px; margin: 14px 0 10px; max-width: 520px; }
.search-form input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 14px; outline: none; }
.search-form input:focus { border-color: var(--brand); }
.search-form button { border: 0; background: var(--brand); color: #fff; padding: 0 24px; border-radius: 8px; cursor: pointer; font-size: 14px; }

/* ---------------------------------------------------------------- 列表 */
.list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.list-main, .list-main-full { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.list-main-full { max-width: 100%; }

.list-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.list-feature-media { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--brand-soft); }
.list-feature-img, .list-feature-media .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.list-feature-body h2 { font-size: 20px; margin-bottom: 8px; }
.list-feature-body p { color: var(--text-sub); font-size: 14px; }

.list-item { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.list-item:last-of-type { border-bottom: 0; }
.list-thumb { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--brand-soft); }
.list-thumb-img, .list-thumb .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.list-body h2 { font-size: 18px; margin-bottom: 6px; }
.list-body p { color: var(--text-sub); font-size: 13.5px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- 文章页 */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.article-main { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; min-width: 0; }
.article-title { font-size: 28px; line-height: 1.4; margin-bottom: 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-mute); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tag { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 2px 10px; border-radius: 4px; font-size: 12.5px; font-weight: 600; }
.article-summary { background: #f7f9fc; border-left: 3px solid var(--brand); padding: 12px 16px; margin: 18px 0; color: var(--text-sub); font-size: 14px; border-radius: 0 6px 6px 0; }
.article-cover { margin: 18px 0; }
.article-cover img { width: 100%; border-radius: 8px; }

.article-content { font-size: 16px; line-height: 1.9; color: #2a2f38; margin: 20px 0; word-wrap: break-word; }
.article-content h2 { font-size: 20px; margin: 28px 0 12px; padding-left: 12px; border-left: 4px solid var(--brand); }
.article-content h3 { font-size: 17px; margin: 22px 0 10px; }
.article-content p { margin: 0 0 16px; }
.article-content img { max-width: 100%; border-radius: 8px; margin: 12px auto; }
.article-content ul, .article-content ol { margin: 0 0 16px; padding-left: 22px; list-style: revert; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote { margin: 16px 0; padding: 12px 16px; background: #f7f9fc; border-left: 3px solid var(--line); color: var(--text-sub); }
.article-content a { color: var(--brand); text-decoration: underline; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 8px 10px; }
.article-content pre { background: #1f2329; color: #e6edf3; padding: 14px; border-radius: 8px; overflow-x: auto; }

.article-tags { padding: 14px 0; border-top: 1px solid var(--line); }
.article-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.article-nav a { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-nav .disabled { color: var(--text-mute); }

/* ---------------------------------------------------------------- 分页 */
.pager { margin-top: 24px; text-align: center; }
.pager ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pager a, .pager span {
    display: inline-block; min-width: 38px; padding: 7px 12px; border: 1px solid var(--line);
    border-radius: 6px; font-size: 14px; background: var(--white); color: var(--text-sub);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .active span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .disabled span { color: #c6ccd6; background: #fafbfd; }
.pager .gap span { border: 0; background: transparent; }
.pager-info { margin-top: 10px; font-size: 13px; color: var(--text-mute); }

/* ---------------------------------------------------------------- 页脚 */
.site-footer { background: #1f2329; color: #a9b3c4; margin-top: 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 28px; padding: 36px 16px 26px; }
.footer-title { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-about p { color: #97a1b3; font-size: 13.5px; line-height: 1.8; }
.footer-slogan { color: #6d7789; }
.footer-list li { padding: 5px 0; font-size: 13.5px; }
.footer-list a:hover { color: #fff; }
/* 友情链接 */
.friend-links { border-top: 1px solid #2b3038; padding: 20px 0 22px; }
.friend-links-title { font-size: 14px; color: #fff; margin-bottom: 12px; font-weight: 600; }
.friend-text-list { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.friend-text-list li a { font-size: 13.5px; color: #97a1b3; }
.friend-text-list li a:hover { color: #fff; }
.friend-logo-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.friend-logo-list li a {
    display: block; width: 120px; height: 44px; border-radius: 6px; overflow: hidden;
    background: #2b3038; display: flex; align-items: center; justify-content: center; padding: 4px 8px;
}
.friend-logo-list img { max-width: 100%; max-height: 100%; width: auto; margin: 0 auto; object-fit: contain; }

.footer-html { padding: 0 16px 16px; color: #97a1b3; font-size: 13px; border-top: 1px solid #2b3038; padding-top: 16px; }
.footer-bottom { border-top: 1px solid #2b3038; padding: 16px 0; font-size: 13px; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; }
.footer-bottom p { margin: 0; }
.footer-meta a { color: #a9b3c4; }
.footer-meta a:hover { color: #fff; }
.footer-meta .gongan { margin-left: 12px; }
.footer-runtime { color: #8b95a5; font-variant-numeric: tabular-nums; }

.back-top {
    position: fixed; right: 22px; bottom: 30px; width: 44px; height: 44px; line-height: 44px; text-align: center;
    background: var(--brand); color: #fff; border-radius: 50%; font-size: 20px; opacity: 0; visibility: hidden;
    transition: all .25s; z-index: 60;
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--brand-dark); color: #fff; }

/* ---------------------------------------------------------------- 其它 */
.empty-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 60px 20px; text-align: center; color: var(--text-mute); }
.empty-box h1 { font-size: 56px; color: var(--line); margin-bottom: 10px; }
.btn { display: inline-block; background: var(--brand); color: #fff; padding: 9px 22px; border-radius: 8px; font-size: 14px; }
.btn:hover { background: var(--brand-dark); color: #fff; }

/* ---------------------------------------------------------------- 游戏模块 */
.games-head .page-desc { margin-bottom: 12px; }

.game-filter { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-label { font-size: 13px; color: var(--text-mute); flex: 0 0 auto; margin-right: 2px; }
.chip {
    display: inline-block; padding: 4px 13px; border-radius: 999px; background: #f2f4f9;
    font-size: 13px; color: var(--text-sub); border: 1px solid transparent; transition: all .15s;
}
.chip:hover { background: var(--brand-soft); color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.game-search { display: flex; gap: 0; margin-left: auto; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.game-search input { border: 0; padding: 6px 14px; font-size: 13px; outline: none; width: 180px; }
.game-search button { border: 0; background: var(--brand); color: #fff; padding: 0 16px; font-size: 13px; cursor: pointer; }

/* 精选大卡 */
.game-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.game-feature {
    position: relative; display: block; border-radius: 10px; overflow: hidden; min-height: 190px;
    background: linear-gradient(150deg, #2b3f6b, #4a5fa8); color: #fff;
}
.game-feature-cover { position: absolute; inset: 0; display: block; }
.game-feature-img, .game-feature-cover .thumb-ph { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.game-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,32,.05) 35%, rgba(10,16,32,.85)); }
.game-feature-body { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 190px; padding: 14px; }
.game-feature-name { font-size: 17px; font-weight: 700; }
.game-feature-desc { font-size: 12.5px; color: rgba(255,255,255,.82); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-feature-meta { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.game-feature-meta .score { color: #ffd166; font-weight: 700; }

/* 游戏卡片网格 */
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game-grid.compact .game-card-desc { display: none; }

/* 首页游戏区块：每行 3 个，卡片更宽松 */
.home-games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-games-grid .game-card-media { aspect-ratio: 16 / 9; }
.home-games-grid .game-card-title { font-size: 16.5px; }

.game-card {
    background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.game-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.game-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-soft); }
.game-card-img, .game-card-media .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.game-card-media .thumb-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.game-card-badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; }
.gbadge { font-size: 11.5px; padding: 1px 7px; border-radius: 4px; color: #fff; }
.gbadge.new { background: #12a150; }
.gbadge.hot { background: var(--accent); }
.game-card-score {
    position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.62); color: #ffd166;
    font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
}
.game-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.game-card-title { font-size: 16px; margin-bottom: 6px; }
.game-card-title a { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.game-card-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.gtag { font-size: 12px; background: #f2f4f9; color: #5b6472; padding: 1px 8px; border-radius: 4px; }
.game-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.game-download-count { font-size: 12.5px; color: var(--text-mute); }

/* 游戏详情 */
.game-detail-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.game-detail-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }

.game-hero { display: flex; flex-direction: column; gap: 18px; }
.game-hero-top { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 18px; }
.game-hero-icon { width: 108px; height: 108px; border-radius: 16px; overflow: hidden; background: var(--brand-soft); flex: 0 0 108px; }
.game-detail-icon, .game-hero-icon .thumb-ph { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.game-hero-icon .thumb-ph em { font-size: 26px; }
.game-title { font-size: 26px; margin-bottom: 10px; }
.game-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.game-hero-summary { color: var(--text-sub); font-size: 14.5px; margin-bottom: 12px; }
.game-hero-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 13px; color: var(--text-mute); }
.game-score-big { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1; }
.game-score-big small { font-size: 13px; font-weight: 500; margin-left: 2px; color: var(--text-mute); }

.game-download-box { border-top: 1px solid var(--line); padding-top: 18px; }
.download-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.download-btn {
    display: inline-flex; align-items: center; gap: 12px; min-width: 210px;
    background: linear-gradient(135deg, #2b6cff, #4f8bff); color: #fff;
    padding: 12px 22px; border-radius: 10px; box-shadow: 0 6px 18px rgba(43,108,255,.25);
    transition: transform .15s, box-shadow .2s;
}
.download-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(43,108,255,.32); }
.download-btn.ios { background: linear-gradient(135deg, #1f2329, #3a4150); box-shadow: 0 6px 18px rgba(31,35,41,.25); }
.download-btn.disabled { background: #e9ecf2; color: var(--text-mute); box-shadow: none; cursor: not-allowed; }
.dl-icon { font-size: 22px; line-height: 1; }
.dl-text { display: flex; flex-direction: column; line-height: 1.35; }
.dl-text b { font-size: 16px; }
.dl-text small { font-size: 12px; opacity: .85; }
.download-hint { font-size: 12.5px; color: var(--text-mute); margin: 12px 0 0; line-height: 1.8; }

.shot-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shot-item { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: #f2f4f9; }
.shot-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.shot-item:hover img { transform: scale(1.04); }

.game-content { margin: 0; }

.info-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.info-table th, .info-table td { padding: 9px 4px; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th { color: var(--text-mute); font-weight: 400; width: 88px; white-space: nowrap; }

.side-download { display: flex; flex-direction: column; gap: 10px; }
.side-dl-btn { justify-content: center; }

.game-mini-list li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.game-mini-list li:last-child { border-bottom: 0; }
.game-mini-list a { display: flex; align-items: center; gap: 10px; }
.game-mini-icon, .game-mini-list .thumb-ph { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 9px; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.game-mini-list .thumb-ph em { font-size: 13px; }
.game-mini-body { min-width: 0; display: flex; flex-direction: column; }
.game-mini-body b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-mini-body small { font-size: 12px; color: var(--text-mute); }

@media (max-width: 1080px) {
    .game-grid, .game-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .game-detail-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .game-grid, .game-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .game-hero-top { grid-template-columns: 80px minmax(0, 1fr); }
    .game-hero-icon { width: 80px; height: 80px; flex-basis: 80px; }
    .game-title { font-size: 21px; }
    .shot-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .game-search { margin-left: 0; }
    .download-btn { min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
    .game-grid, .game-feature-grid { grid-template-columns: minmax(0, 1fr); }
    .home-games-grid { grid-template-columns: minmax(0, 1fr); }
    .shot-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
    .layout, .list-layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
    .layout-side { position: static; }
    .card-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .home-top { grid-template-columns: minmax(0, 1fr); }
    .slider { height: 300px; }
    .cat-list { grid-template-columns: minmax(0, 1fr); }
    .cat-cards.cols-3, .cat-cards.cols-2, .cat-cards.single .cat-card { grid-template-columns: minmax(0, 1fr); }
    .cat-cards.single .cat-card-title { font-size: 16px; margin-top: 10px; }
    .latest-grid { grid-template-columns: minmax(0, 1fr); }
    .latest-grid li:nth-last-child(-n + 2) { border-bottom: 1px dashed var(--line); }
    .latest-grid li:last-child { border-bottom: 0; }
    .card-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .list-feature { grid-template-columns: minmax(0, 1fr); }
    .header-main { flex-wrap: wrap; }
    .header-search { flex: 1 1 100%; }
    .nav-toggle {
        display: block; width: 100%; text-align: left; padding: 12px 4px; background: transparent; border: 0;
        font-size: 16px; font-weight: 600; color: var(--text); cursor: pointer;
    }
    .nav-list { display: none; width: 100%; }
    .nav-list.open { display: flex; }
    .nav-list li a { padding: 10px 14px; }
    .slide-title { font-size: 18px; }
    .slide-desc { display: none; }
    .article-main { padding: 18px; }
    .article-title { font-size: 22px; }
}

@media (max-width: 560px) {
    .card-grid.cols-4 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .list-item { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
    .cat-thumb, .cat-items .thumb-ph { width: 90px; flex-basis: 90px; height: 62px; }
    .footer-grid { grid-template-columns: 1fr; }
    .pager ul { gap: 6px; }
    .pager a, .pager span { min-width: 32px; padding: 6px 9px; font-size: 13px; }
}
