/* ===== 基础主题变量（前台 + 后台共用） ===== */
:root {
    --bg: #0e1014;
    --bg-soft: #161a21;
    --bg-card: #171b22;
    --border: #232833;
    --text: #e8eaed;
    --text-dim: #9aa1ac;
    --text-faint: #6b727d;
    --accent: #4a9eff;
    --accent-2: #7c5cff;
    --danger: #ff5c5c;
    --radius: 14px;
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ===== 顶部导航 ===== */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(14, 16, 20, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1240px; margin: 0 auto;
    display: flex; align-items: center; gap: 18px;
    padding: 0 20px; height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: 9px; cursor: pointer; flex-shrink: 0; }
.logo-icon {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; font-weight: 800; font-size: 17px;
    display: grid; place-items: center;
}
.logo-text { font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-link {
    padding: 7px 13px; border-radius: 8px; font-size: 14px;
    color: var(--text-dim); transition: .2s; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-soft); }
.nav-link.active { color: #fff; background: rgba(74, 158, 255, .15); }
.nav-search {
    margin-left: auto; display: flex; align-items: center; gap: 8px;
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: 20px; padding: 7px 14px; color: var(--text-dim);
}
.nav-search input {
    background: transparent; border: none; outline: none;
    color: var(--text); font-size: 14px; width: 200px;
}
.nav-search input::placeholder { color: var(--text-faint); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; }

/* ===== 公告条 ===== */
.announce-bar {
    display: flex; align-items: center; gap: 10px;
    background: rgba(124, 92, 255, .08);
    border-bottom: 1px solid var(--border);
    padding: 9px 20px; color: var(--text-dim); font-size: 13px;
    overflow: hidden;
}
.announce-tag {
    flex-shrink: 0; background: var(--accent-2); color: #fff;
    font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600;
}
.announce-text { flex: 1; min-width: 0; }
.announce-close {
    flex-shrink: 0; cursor: pointer; color: var(--text-faint);
    font-size: 18px; line-height: 1; padding: 0 4px;
}

/* ===== 主内容 ===== */
.main-content { max-width: 1240px; margin: 0 auto; padding: 28px 20px 60px; }

/* Hero */
.hero {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px;
    align-items: stretch; margin-bottom: 30px;
}
.hero-left { padding: 8px 0; }
.hero-badge {
    display: inline-block; background: rgba(74, 158, 255, .12);
    color: var(--accent); font-size: 12px; font-weight: 600;
    padding: 5px 12px; border-radius: 20px; margin-bottom: 14px;
}
.hero-left h1 { font-size: 34px; font-weight: 900; line-height: 1.25; margin-bottom: 12px; }
.hero-left p { color: var(--text-dim); font-size: 15px; max-width: 520px; }
.hero-meta { display: flex; gap: 28px; margin-top: 22px; }
.hero-stat { display: flex; flex-direction: column; }
.stat-num { font-size: 26px; font-weight: 800; color: #fff; }
.stat-label { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

.hero-right { display: flex; }
.hero-card-mini {
    flex: 1; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 18px;
}
.mini-tag {
    display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent);
    background: rgba(74, 158, 255, .12); padding: 3px 10px; border-radius: 6px; margin-bottom: 12px;
}
.mini-list { display: flex; flex-direction: column; gap: 11px; }
.mini-item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.mini-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.mini-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.mini-date { color: var(--text-faint); font-size: 11px; flex-shrink: 0; }

/* 筛选栏 */
.filter-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.filter-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tag {
    background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim);
    padding: 7px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: .2s;
}
.filter-tag:hover { color: var(--text); }
.filter-tag.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.sort-wrap select {
    background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 8px 12px; font-size: 13px; outline: none; cursor: pointer;
}

/* 游戏卡片网格 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}
.game-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; cursor: pointer;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    display: flex; flex-direction: column;
}
.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(74, 158, 255, .5);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
.card-cover {
    position: relative; aspect-ratio: 460 / 215;
    background: linear-gradient(135deg, #1d2230, #14171e);
    overflow: hidden;
}
.card-cover > img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-size: 52px; font-weight: 900; color: rgba(255, 255, 255, .12);
}
.card-pinned {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 6px;
}
.card-views {
    position: absolute; bottom: 8px; right: 8px; z-index: 2;
    display: flex; align-items: center; gap: 4px;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px;
    padding: 3px 7px; border-radius: 6px; backdrop-filter: blur(2px);
}
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title {
    font-size: 15px; font-weight: 700; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 41px;
}
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-faint); }
.card-cat { color: var(--accent); font-weight: 600; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tag {
    font-size: 11px; color: var(--text-dim); background: var(--bg-soft);
    border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px;
}
.card-tag.vm { color: #ffb86b; border-color: rgba(255, 184, 107, .3); }
.card-tag.dlc { color: #b388ff; border-color: rgba(179, 136, 255, .3); }
.card-foot {
    margin-top: auto; display: flex; align-items: center; justify-content: space-between;
    padding-top: 10px; border-top: 1px solid var(--border);
}
.card-size { font-size: 13px; color: var(--text); font-weight: 600; }
.card-size small { color: var(--text-faint); font-weight: 400; margin-left: 4px; }
.card-dl-btn {
    background: rgba(74, 158, 255, .14); color: var(--accent);
    font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px;
}

/* 空状态 */
.no-result {
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; padding: 70px 20px; color: var(--text-faint); text-align: center;
}
.no-result p { font-size: 15px; }

/* 返回顶部 */
.back-to-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 90;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--accent); color: #fff; border: none; cursor: pointer;
    display: grid; place-items: center; opacity: 0; pointer-events: none;
    box-shadow: 0 8px 22px rgba(74, 158, 255, .45); transition: opacity .3s, transform .2s;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== 页脚 ===== */
.footer { border-top: 1px solid var(--border); background: #0b0d11; }
.footer-content {
    max-width: 1240px; margin: 0 auto; padding: 36px 20px;
    display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 30px;
}
.footer-logo { font-weight: 800; font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-logo .logo-icon { width: 28px; height: 28px; font-size: 14px; }
.footer-desc { color: var(--text-dim); font-size: 13px; }
.footer-section h3 { font-size: 14px; margin-bottom: 12px; color: var(--text); }
.footer-section a { display: block; color: var(--text-dim); font-size: 13px; padding: 4px 0; transition: .2s; }
.footer-section a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border); text-align: center;
    padding: 16px; font-size: 12px; color: var(--text-faint);
}

/* ===== 下载弹窗（截图样式：白底） ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.download-modal {
    background: #fff; border: none; border-radius: 16px;
    max-width: 460px; width: 100%; color: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.download-modal .modal-header {
    background: #fff; border-bottom: 1px solid #f0f0f0;
    padding: 18px 20px; display: flex; align-items: center; justify-content: space-between;
}
.download-modal .modal-header h2 { font-size: 17px; font-weight: 700; color: #222; }
.download-modal .modal-close { background: none; border: none; color: #999; font-size: 24px; cursor: pointer; line-height: 1; }
.download-modal .modal-close:hover { color: #333; }
.download-modal .modal-body { padding: 16px 20px 24px; }

.download-notice {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fff9db; border: 1px solid #ffeaa7;
    border-radius: 10px; padding: 12px 14px; font-size: 12px; color: #7a6a2e;
    margin-bottom: 18px; line-height: 1.55;
}
.notice-icon {
    width: 18px; height: 18px; border-radius: 50%; background: #f1c40f;
    color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
    flex-shrink: 0; margin-top: 1px; font-style: normal;
}

.drive-list { display: flex; flex-direction: column; gap: 14px; }
.drive-item {
    background: #f8f9fb; border: 1px solid #e8eaed;
    border-radius: 12px; overflow: hidden;
}
.drive-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none;
}
.drive-brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.drive-logo {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.drive-logo.baidu { background: linear-gradient(135deg, #ff6a6a, #e84141); }
.drive-logo.quark { background: linear-gradient(135deg, #3b6eff, #1e4ad1); }
.drive-logo.xunlei { background: linear-gradient(135deg, #3b9eff, #2b7fe0); }
.drive-logo.aliyun { background: linear-gradient(135deg, #ff8a2b, #ff6a00); }
.drive-logo.lanzou { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.drive-name-code { flex: 1; min-width: 0; }
.drive-title { font-size: 15px; font-weight: 700; color: #222; }
.drive-code-light { font-size: 12px; color: #999; margin-top: 2px; }
.drive-code-light b { color: #666; font-weight: 600; font-family: monospace; }

.toggle-qr-btn {
    background: #3b6eff; color: #fff; border: none;
    border-radius: 16px; padding: 5px 13px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: opacity .2s; flex-shrink: 0; white-space: nowrap;
}
.toggle-qr-btn:hover { opacity: .85; }
.toggle-qr-btn.outline { background: transparent; color: #3b6eff; border: 1px solid #3b6eff; }
.toggle-qr-btn.outline:hover { background: rgba(59, 110, 255, .06); }

.drive-qr-wrap {
    display: none; flex-direction: column; align-items: center; gap: 8px;
    padding: 14px 16px 18px; background: #fff; border-top: 1px solid #eef0f4;
}
.drive-item.expanded .drive-qr-wrap { display: flex; }
.drive-qr { background: #fff; padding: 6px; border-radius: 8px; }
.drive-qr-wrap canvas, .drive-qr-wrap img { display: block; border-radius: 6px; }
.drive-qr-hint { font-size: 12px; color: #999; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .nav-links {
        position: absolute; top: 60px; left: 0; right: 0;
        background: var(--bg-card); border-bottom: 1px solid var(--border);
        flex-direction: column; padding: 10px 20px; gap: 4px;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; margin-left: auto; }
    .nav-search { display: none; }
    .hero-left h1 { font-size: 26px; }
    .hero-meta { gap: 20px; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .footer-content { grid-template-columns: 1fr; }
}

/* ===== 详情页 ===== */
.nav-back {
    margin-left: auto; font-size: 13px; color: var(--text-dim);
    background: var(--bg-soft); border: 1px solid var(--border);
    padding: 6px 14px; border-radius: 20px; transition: .2s;
}
.nav-back:hover { color: var(--text); border-color: var(--accent); }

.breadcrumb { font-size: 13px; color: var(--text-faint); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .bc-sep { color: var(--text-faint); }
.breadcrumb .bc-current { color: var(--text); max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.detail-main { min-width: 0; }

.detail-head {
    display: flex; gap: 22px; align-items: flex-start;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; margin-bottom: 22px;
}
.detail-cover {
    width: 300px; flex-shrink: 0; aspect-ratio: 460 / 215; object-fit: cover;
    border-radius: 12px; background: linear-gradient(135deg, #1d2230, #14171e);
}
.detail-cover-empty {
    display: grid; place-items: center; font-size: 64px; font-weight: 900;
    color: rgba(255, 255, 255, .12);
}
.detail-head-info { flex: 1; min-width: 0; padding-top: 4px; }
.detail-title { font-size: 26px; font-weight: 900; line-height: 1.3; margin-bottom: 14px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.d-badge {
    font-size: 12px; color: var(--text-dim); background: var(--bg-soft);
    border: 1px solid var(--border); padding: 4px 11px; border-radius: 8px;
}

.detail-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px;
}
.ds-h2 {
    font-size: 17px; font-weight: 800; margin-bottom: 14px;
    padding-left: 11px; border-left: 3px solid var(--accent); line-height: 1.2;
}
.detail-desc { color: var(--text-dim); font-size: 14.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.detail-desc:empty::before { content: '暂无详细介绍'; color: var(--text-faint); }

.shot-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shot-gallery a { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #11141a; }
.shot-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.shot-gallery a:hover img { transform: scale(1.04); }

.ver-table { display: flex; flex-direction: column; gap: 2px; }
.ver-row { display: flex; gap: 16px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.ver-row:last-child { border-bottom: none; }
.ver-k { color: var(--text-faint); width: 90px; flex-shrink: 0; }
.ver-v { color: var(--text); }

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spec-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.spec-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.spec-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.spec-list li { font-size: 13px; color: var(--text-dim); padding-left: 14px; position: relative; }
.spec-list li::before { content: '·'; position: absolute; left: 2px; color: var(--text-faint); }

/* 侧边下载卡 */
.detail-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 18px; }
.dl-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
}
.dl-card-title { font-size: 14px; font-weight: 800; margin-bottom: 14px; }
.dl-main-btn {
    width: 100%; background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; border: none; border-radius: 10px; padding: 13px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: opacity .2s; box-shadow: 0 8px 20px rgba(74, 158, 255, .3);
}
.dl-main-btn:hover { opacity: .9; }
.dl-sub { font-size: 12px; color: var(--text-faint); text-align: center; margin: 10px 0 14px; }
.dl-links { display: flex; flex-direction: column; gap: 10px; }
.dl-link-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
}
.dl-link-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.dl-link-name { font-size: 14px; font-weight: 600; }
.dl-link-code { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.dl-link-btn {
    background: rgba(74, 158, 255, .14); color: var(--accent); border: 1px solid rgba(74, 158, 255, .3);
    border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0;
}
.dl-link-btn:hover { background: rgba(74, 158, 255, .24); }
.dl-empty { font-size: 13px; color: var(--text-faint); text-align: center; padding: 8px; }

.side-tags { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.side-h { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text-dim); }

.detail-loading, .detail-error { padding: 80px 20px; text-align: center; color: var(--text-faint); }
.detail-error h2 { font-size: 18px; color: var(--text-dim); margin-bottom: 18px; font-weight: 700; }
.detail-back-link {
    display: inline-block; background: var(--accent); color: #fff;
    padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
}

@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side { position: static; order: -1; }
    .detail-head { flex-direction: column; }
    .detail-cover { width: 100%; max-width: 420px; }
    .spec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .detail-title { font-size: 21px; }
}
