:root {
    --bg: #0e1116;
    --bg2: #161b22;
    --bg3: #1f2630;
    --fg: #e6edf3;
    --muted: #8b949e;
    --accent: #58a6ff;
    --accent2: #3fb950;
    --danger: #f85149;
    --border: #30363d;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #0e1116;
    color: #e6edf3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-tap-highlight-color: transparent;
    font-size: 15px;
    line-height: 1.5;
}
body.no-pad { background: #000; }

a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
 * 超保守 CSS：不用 flexbox gap、不用 CSS grid、不用 aspect-ratio
 * 全用 float + inline-block + margin，任何浏览器都能渲染
 * ============================================================ */

/* ===== 顶栏（float 布局）===== */
.topbar {
    overflow: hidden; /* 清除 float */
    padding: 12px 18px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    position: -webkit-sticky; position: sticky; top: 0; z-index: 10;
}
.brand { float: left; font-weight: 700; font-size: 18px; color: #e6edf3; }
.brand:hover { text-decoration: none; }
.topnav { float: right; }
.topnav a { margin-left: 16px; color: #8b949e; line-height: 32px; }
.topnav a:hover { color: #e6edf3; }
.nav-tsla {
    margin-left: 6px; padding: 6px 12px; border-radius: 8px;
    background: #58a6ff; color: #04101f !important; font-weight: 600; font-size: 14px;
    line-height: 20px;
}
.nav-tsla:hover { opacity: .9; text-decoration: none; }
.nav-tsla.ghost { background: transparent; color: #e6edf3 !important; border: 1px solid #30363d; font-weight: 400; }

/* 导航栏 SVG 图标 */
.nav-icon {
    display: inline-block;
    width: 18px; height: 18px;
    vertical-align: -3px;
    margin-right: 5px;
}
.nav-icon-lg { width: 22px; height: 22px; vertical-align: -5px; margin-right: 6px; }

/* 登录验证码 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.captcha-row input {
    flex: 1;
    min-width: 0;
}
.captcha-img {
    width: 120px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #30363d;
    flex-shrink: 0;
}

/* 后台搜索行 */
.admin-search-row { margin: 10px 0 8px; }
.admin-search-form {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.admin-search-input {
    flex: 1; min-width: 180px; max-width: 320px;
    padding: 8px 12px; font-size: 14px;
    background: #161b22; border: 1px solid #30363d; border-radius: 8px;
    color: #e6edf3; box-sizing: border-box;
}
.admin-search-input:focus { outline: none; border-color: #58a6ff; }

/* A-Z 字母索引 */
.alpha-index {
    display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 14px;
}
.alpha-chip {
    display: inline-block;
    min-width: 24px; padding: 3px 6px; text-align: center;
    font-size: 12px; font-weight: 600; line-height: 16px;
    border-radius: 5px; text-decoration: none;
    background: #161b22; color: #8b949e;
    border: 1px solid #21262d;
}
.alpha-chip:hover { background: #21262d; color: #e6edf3; text-decoration: none; }
.alpha-chip.active { background: #58a6ff; color: #04101f; border-color: #58a6ff; }

/* 批量操作栏 */
.bulk-bar {
    display: flex; align-items: center; gap: 14px;
    padding: 8px 12px; margin-bottom: 8px;
    background: #161b22; border: 1px solid #21262d; border-radius: 8px;
}
.cb-label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #c9d1d9; cursor: pointer; }
.cb-label input, .col-cb input { width: 16px; height: 16px; cursor: pointer; }
.bulk-info { font-size: 13px; color: #8b949e; }
.bulk-info b { color: #58a6ff; }
.col-cb { width: 32px; text-align: center; white-space: nowrap; }
.col-cb input { vertical-align: middle; }

/* 分页 */
.pagination {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 10px; border-top: 1px solid #21262d;
}
.pg {
    display: inline-block; min-width: 32px; padding: 5px 10px;
    text-align: center; font-size: 13px; line-height: 18px;
    border-radius: 6px; text-decoration: none;
    background: #161b22; color: #c9d1d9; border: 1px solid #21262d;
}
.pg:hover { background: #21262d; color: #e6edf3; text-decoration: none; }
.pg.active { background: #58a6ff; color: #04101f; border-color: #58a6ff; font-weight: 600; }
.pg-ellipsis { color: #484f58; padding: 0 4px; }
.pg-info { margin-left: auto; font-size: 12px; color: #8b949e; }

/* 每页条数选择 */
.per-selector {
    margin-top: 10px; font-size: 13px; color: #8b949e;
    display: flex; align-items: center; gap: 6px;
}
.per-chip {
    display: inline-block; padding: 4px 12px;
    font-size: 13px; font-weight: 600; border-radius: 6px;
    text-decoration: none;
    background: #161b22; color: #8b949e; border: 1px solid #21262d;
}
.per-chip:hover { background: #21262d; color: #e6edf3; text-decoration: none; }
.per-chip.active { background: #58a6ff; color: #04101f; border-color: #58a6ff; }

/* 清除 float 的万能方法 */
.clearfix:after { content: ""; display: table; clear: both; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }
.container.no-pad { max-width: none; padding: 0; }

.sitefoot { text-align: center; color: #8b949e; font-size: 13px; padding: 24px; clear: both; }

/* ===== 游戏库容器 ===== */
.lib { max-width: 1200px; margin: 0 auto; }

/* ===== 平台切换 tabs（inline-block）===== */
.tabs { overflow: hidden; margin-bottom: 16px; }
.tab {
    display: inline-block;
    margin-right: 8px; margin-bottom: 4px;
    padding: 8px 18px; border-radius: 999px; background: #1f2630;
    color: #8b949e; border: 1px solid #30363d; font-size: 14px;
}
.tab:hover { color: #e6edf3; text-decoration: none; border-color: #58a6ff; }
.tab.active { background: #58a6ff; color: #04101f; border-color: #58a6ff; font-weight: 600; }

/* ===== 搜索框（inline-block）===== */
.search-bar { overflow: hidden; margin-bottom: 14px; }
.search-form { overflow: hidden; }
.search-input-wrap {
    display: inline-block; position: relative;
    width: 60%; max-width: 480px;
    margin-right: 10px; margin-bottom: 4px;
    vertical-align: middle;
}
.search-icon {
    position: absolute; left: 12px; top: 50%;
    margin-top: -9px;
    color: #8b949e; pointer-events: none;
}
.search-input-wrap input {
    width: 100%; padding: 10px 12px 10px 40px;
    background: #161b22; border: 1px solid #30363d; color: #e6edf3;
    border-radius: 10px; font-size: 15px; font-family: inherit;
    -webkit-box-sizing: border-box; box-sizing: border-box;
}
.search-input-wrap input:focus {
    outline: none; border-color: #58a6ff;
}
.search-input-wrap input::placeholder { color: #8b949e; }
.search-btn { display: inline-block; vertical-align: middle; margin-right: 10px; margin-bottom: 4px; white-space: nowrap; }
.search-clear { display: inline-block; vertical-align: middle; font-size: 13px; color: #8b949e; margin-bottom: 4px; }
.search-clear:hover { color: #f85149; text-decoration: none; }

/* ===== A-Z 字母索引（inline-block，不挤）===== */
.alpha-index {
    overflow: hidden;
    margin-bottom: 20px;
    padding: 10px 12px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
}
.alpha-chip {
    display: inline-block;
    min-width: 26px; height: 28px;
    padding: 0 4px;
    margin-right: 2px; margin-bottom: 4px;
    border-radius: 5px;
    background: transparent; color: #8b949e;
    font-size: 12px; font-weight: 600;
    border: 1px solid transparent;
    text-decoration: none;
    text-align: center; line-height: 28px;
    vertical-align: middle;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.alpha-chip:first-child { width: auto; padding: 0 12px; margin-right: 6px; }
.alpha-chip:hover { color: #e6edf3; text-decoration: none; background: #1f2630; }
.alpha-chip.active { background: #58a6ff; color: #04101f; }

/* ===== 游戏网格（inline-block + 百分比）===== */
.grid-info { color: #8b949e; font-size: 13px; margin-bottom: 14px; }

.grid {
    font-size: 0; /* 消除 inline-block 空白 */
    margin: 0 -9px; /* 抵消 padding */
    overflow: hidden;
}
.grid > .card {
    display: inline-block;
    vertical-align: top;
    width: 25%;
    padding: 0 9px;
    margin-bottom: 18px;
    font-size: 15px;
}

.card {
    display: block;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 14px;
    overflow: hidden;
    color: #e6edf3;
    position: relative;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover {
    border-color: #58a6ff; text-decoration: none;
    box-shadow: 0 10px 28px rgba(88,166,255,.18);
    transform: translateY(-4px);
}

/* 封面：padding-top hack（3:4比例），所有浏览器都支持 */
.cover-wrap { position: relative; overflow: hidden; }
.cover {
    width: 100%;
    padding-top: 133.33%; /* 3:4 比例 */
    background-size: cover; background-position: center;
    background-color: #1f2630;
    transition: transform .35s ease;
}
.card:hover .cover { transform: scale(1.07); }
.cover.no-cover {
    background: linear-gradient(135deg, #21304a, #3a1f3f);
    position: relative;
}
.cover.no-cover::after {
    content: "🎮"; font-size: 42px; opacity: .5;
    position: absolute; top: 50%; left: 50%;
    margin-top: -21px; margin-left: -21px;
}

/* hover 播放按钮遮罩 */
.card-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent 50%);
    text-align: center;
    opacity: 0;
    line-height: 133.33%; /* 与封面同高，让 play-icon 垂直居中 */
}
.card:hover .card-overlay { opacity: 1; }
.play-icon {
    display: inline-block;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(88,166,255,.9); color: #04101f;
    text-align: center; line-height: 44px;
    font-size: 18px; padding-left: 3px;
    vertical-align: middle;
}

/* 卡片信息区 */
.meta { padding: 10px 12px 12px; overflow: hidden; }
.meta .badge { margin-right: 4px; margin-bottom: 6px; }
.meta .title {
    display: block; font-size: 14px; font-weight: 600; line-height: 1.3;
    color: #e6edf3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meta .play-count { display: block; margin-top: 5px; font-size: 12px; color: #8b949e; }

/* 徽章 */
.badge {
    display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
    font-weight: 700; letter-spacing: .5px;
}
.badge-gba { background: #1f6feb; color: #fff; }
.badge-nes { background: #8957e5; color: #fff; }
.badge-arcade { background: #db6d28; color: #fff; }

.empty { color: #8b949e; text-align: center; padding: 40px 0; }

/* ===== 播放页 ===== */
.player { display: block; height: 100vh; }
.player-bar {
    overflow: hidden;
    padding: 10px 16px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}
.player-bar > * { margin-right: 12px; }
.player-bar > *:last-child { margin-right: 0; }
.player-bar .ptitle { font-weight: 600; }
.player-bar .back { float: left; }
#game { display: block; background: #000; height: calc(100vh - 56px); }

/* ===== 后台 ===== */
.admin { max-width: 900px; margin: 0 auto; padding: 20px; }
.admin-head { overflow: hidden; margin-bottom: 16px; }
.admin-head h1 { float: left; margin: 0; font-size: 20px; }
.admin-head .btn { float: right; }

.panel { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.panel h2 { margin-top: 0; font-size: 17px; }
.panel h2 .ico {
    font-size: 17px;
    margin-right: 6px;
    vertical-align: baseline;
}

.msg { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; font-size: 14px; }
.msg.ok { background: rgba(63,185,80,.15); color: #3fb950; border: 1px solid rgba(63,185,80,.4); }
.msg.err { background: rgba(248,81,73,.15); color: #f85149; border: 1px solid rgba(248,81,73,.4); }

/* 表单（block 布局，不用 flex）*/
.game-form label { display: block; margin-bottom: 14px; font-size: 14px; color: #8b949e; }
.game-form label > span { display: block; margin-bottom: 6px; }
.game-form input[type=text],
.game-form input[type=password],
.game-form input[type=number],
.game-form select,
.game-form textarea {
    display: block; width: 100%;
    background: #0e1116; border: 1px solid #30363d; color: #e6edf3;
    border-radius: 8px; padding: 10px; font-size: 14px; font-family: inherit;
    -webkit-box-sizing: border-box; box-sizing: border-box;
}
.game-form small { color: #8b949e; font-size: 12px; }

/* 后台面板小标题（统一字号、统一图标大小）*/
.panel h3 {
    margin: 16px 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #8b949e;
}
.panel h3 .ico {
    font-size: 14px; /* 图标跟文字一样大 */
    margin-right: 4px;
    vertical-align: baseline;
}

.switch-row { overflow: hidden; margin-bottom: 14px; font-size: 14px; color: #e6edf3; line-height: 28px; }
.switch-row input[type=checkbox] { float: left; margin: 7px 10px 0 0; }
.switch-row span { display: block; font-weight: 500; }

.form-actions { overflow: hidden; }
.form-actions .btn { float: left; margin-right: 10px; }

.btn {
    display: inline-block; padding: 9px 16px; border-radius: 8px; background: #1f2630;
    color: #e6edf3; border: 1px solid #30363d; cursor: pointer; font-size: 14px;
}
.btn:hover { border-color: #58a6ff; text-decoration: none; }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.danger { color: #f85149; border-color: rgba(248,81,73,.5); }
.btn.primary { background: #238636; border-color: #2ea043; color: #fff; }
.btn.primary:hover { background: #2ea043; border-color: #3fb950; }

/* ===== 登录 ===== */
.login-wrap { text-align: center; padding: 60px 20px; }
.login-form {
    display: inline-block; text-align: left;
    background: #161b22; border: 1px solid #30363d; border-radius: 12px;
    padding: 28px; width: 100%; max-width: 340px;
}
.login-form h1 { margin-top: 0; font-size: 20px; text-align: center; }
.login-form label { display: block; margin-bottom: 14px; font-size: 14px; color: #8b949e; }
.login-form label > span { display: block; margin-bottom: 6px; }
.login-form input { display: block; width: 100%; background: #0e1116; border: 1px solid #30363d; color: #e6edf3; border-radius: 8px; padding: 10px; font-size: 14px; }
.login-form button { display: block; width: 100%; padding: 11px; border: none; border-radius: 8px; background: #58a6ff; color: #04101f; font-weight: 700; cursor: pointer; font-size: 15px; }
.login-form .hint { color: #8b949e; font-size: 12px; text-align: center; }

/* ===== 表格 ===== */
.gtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.gtable th, .gtable td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #30363d; }
.gtable th { color: #8b949e; font-weight: 600; }
.gtable .ops .btn { margin-right: 6px; margin-bottom: 4px; }
.thumb { width: 48px; height: 64px; object-fit: cover; border-radius: 6px; background: #1f2630; }
.noimg { color: #8b949e; }

/* ===== 全屏助手 ===== */
.fs-btn {
    background: transparent; border: 1px solid #30363d; color: #e6edf3;
    border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 14px; margin-left: 8px;
}
.fs-btn:hover { border-color: #58a6ff; }

/* CSS 假全屏 */
#game.fs-fake {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important; height: 100% !important;
    z-index: 9999 !important; background: #000;
}
body.fs-active .player-bar { display: none; }

/* ===== 后台菜单布局（float）===== */
.admin-layout { overflow: hidden; min-height: calc(100vh - 56px); }
.admin-side {
    float: left; width: 220px;
    background: #161b22;
    border-right: 1px solid #30363d;
    padding: 16px 12px;
}
.side-brand { font-weight: 700; font-size: 16px; padding: 8px 10px 16px; }
.side-menu { overflow: hidden; }

/* 后台菜单项：统一图标大小 */
.menu-item {
    display: block;
    margin-bottom: 6px;
    padding: 10px 12px; border-radius: 8px; color: #8b949e;
    border: 1px solid transparent; font-size: 14px; line-height: 22px;
}
.menu-item:last-child { margin-bottom: 0; }
.menu-item:hover { color: #e6edf3; text-decoration: none; background: #1f2630; }
.menu-item.active { background: #58a6ff; color: #04101f; font-weight: 600; border-color: #58a6ff; }
.menu-item .ico {
    display: inline-block; width: 18px; height: 18px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: -4px;
}
.side-foot { padding: 12px 10px 4px; font-size: 13px; color: #8b949e; }
.side-foot > * { display: block; margin-bottom: 8px; }
.side-foot > *:last-child { margin-bottom: 0; }
.admin-main { overflow: hidden; padding: 20px; }

/* ===== 列表分类筛选（inline-block）===== */
.list-filter { overflow: hidden; margin-bottom: 14px; }
.chip {
    display: inline-block;
    margin-right: 8px; margin-bottom: 4px;
    padding: 6px 14px; border-radius: 999px; background: #1f2630;
    border: 1px solid #30363d; color: #8b949e; font-size: 13px;
}
.chip:hover { color: #e6edf3; text-decoration: none; }
.chip.active { background: #58a6ff; color: #04101f; border-color: #58a6ff; font-weight: 600; }

/* ===== 会员状态条 ===== */
.member-bar {
    overflow: hidden;
    margin-bottom: 16px; padding: 10px 14px;
    background: #161b22; border: 1px solid #30363d; border-radius: 12px;
}
.member-bar.logged { border-color: #58a6ff; }
.mb-tip { float: left; color: #8b949e; font-size: 14px; line-height: 32px; }
.mb-user { float: right; font-size: 14px; line-height: 32px; }
.mb-user b { color: #58a6ff; }

/* ===== 会员套餐页（inline-block）===== */
.member-wrap { max-width: 880px; margin: 0 auto; }
.plan-grid { font-size: 0; margin: 18px 0; }
.plan-card { display: inline-block; vertical-align: top; width: 33.33%; padding: 0 8px; margin-bottom: 16px; font-size: 15px; }
.plan-card-inner { background: #161b22; border: 1px solid #30363d; border-radius: 14px; padding: 18px; text-align: center; }
.plan-name { font-size: 16px; font-weight: 600; }
.plan-price { font-size: 28px; font-weight: 700; color: #58a6ff; margin: 8px 0; }
.plan-desc { color: #8b949e; font-size: 13px; min-height: 36px; margin-bottom: 12px; }

/* ===== 升级提示 ===== */
.upgrade { text-align: center; padding: 40px 0; }
.upgrade-card {
    display: inline-block; text-align: left;
    background: #161b22; border: 1px solid #30363d; border-radius: 16px;
    padding: 28px; max-width: 460px;
}
.upgrade-card .form-actions { text-align: center; }

/* ===== 会员徽章 ===== */
.badge-trial { background: #3a3f4b; color: #cfd6e4; }
.badge-month { background: #1f6feb; color: #fff; }
.badge-year { background: #8957e5; color: #fff; }
.badge-lifetime { background: linear-gradient(135deg,#f0a500,#ff6a00); color: #1a1205; }

/* ===== 后台会员表格 ===== */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #8b949e; }
.inline-grant { overflow: hidden; margin-bottom: 6px; }
.inline-grant > * { float: left; margin-right: 6px; margin-bottom: 4px; }
.inline-grant select { width: auto; padding: 4px 6px; }
.exp-input { width: 130px; padding: 4px 6px; font-size: 12px; }

/* ===== 多版本选择条（inline-block）===== */
.ver-select { overflow: hidden; margin: 14px 0 10px; }
.ver-label { display: inline-block; color: #8b949e; font-size: 14px; margin-right: 10px; line-height: 36px; vertical-align: middle; }
.ver-chip {
    display: inline-block; vertical-align: middle;
    margin-right: 10px; margin-bottom: 4px;
    padding: 8px 16px; border-radius: 999px; background: #1f2630;
    border: 1px solid #30363d; color: #e6edf3; font-size: 14px;
}
.ver-chip:hover { color: #e6edf3; text-decoration: none; border-color: #58a6ff; }
.ver-chip.active { background: #58a6ff; color: #04101f; border-color: #58a6ff; font-weight: 600; }

.badge-multi { background: #ff7a18; color: #1a1205; font-weight: 600; }

/* ===== 响应式（用媒体查询调整 inline-block 宽度）===== */
@media (max-width: 900px) {
    .grid > .card { width: 33.33%; }
}

@media (max-width: 720px) {
    .admin-side { float: none; width: 100%; border-right: none; border-bottom: 1px solid #30363d; }
    .admin-main { padding: 16px; }
    .grid > .card { width: 50%; }
    .plan-card { width: 100%; }
    .alpha-chip { min-width: 26px; height: 26px; padding: 0 5px; font-size: 12px; line-height: 26px; margin-right: 2px; white-space: nowrap; }
    .alpha-chip:first-child { padding: 0 8px; margin-right: 4px; }
    .search-input-wrap { width: 55%; }
    .topnav a { margin-left: 8px; }
}

@media (max-width: 480px) {
    .grid > .card { width: 50%; padding: 0 5px; margin-bottom: 10px; }
    .grid { margin: 0 -5px; }
    .alpha-index { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .alpha-chip { display: inline-block; }
    .topbar { padding: 10px 12px; }
    .brand { font-size: 16px; }
    .topnav a { font-size: 13px; }
    .container { padding: 12px; }
}

/* ===== 排行榜 ===== */
.rank-title {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0 4px;
    color: var(--text);
    text-align: center;
}
.rank-sub {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 16px;
}
.rank-tabs {
    margin-bottom: 6px;
}
.rank-plat-tabs .tab {
    font-size: 13px;
    padding: 4px 14px;
    opacity: 0.7;
}
.rank-list {
    max-width: 700px;
    margin: 0 auto;
}
.rank-item {
    display: block;
    overflow: hidden;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border, #2a2a3e);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 10px 14px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rank-item:hover {
    border-color: var(--accent, #4a9eff);
    box-shadow: 0 2px 12px rgba(74, 158, 255, 0.15);
}
.rank-item.rank-top {
    border-color: var(--accent, #4a9eff);
    background: linear-gradient(135deg, rgba(74,158,255,0.08), transparent);
}
.rank-num {
    float: left;
    width: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent, #4a9eff);
    line-height: 56px;
}
.rank-cover-wrap {
    float: left;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 12px;
    background: #111;
}
.rank-cover-wrap .cover {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.rank-cover-wrap .no-cover {
    background: #222 !important;
}
.rank-info {
    overflow: hidden;
    padding-top: 8px;
}
.rank-info .badge {
    margin-right: 6px;
}
.rank-game-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin: 4px 0;
    color: var(--text);
}
.rank-count {
    display: block;
    font-size: 12px;
    color: var(--muted);
}
.rank-play {
    float: right;
    font-size: 20px;
    color: var(--accent, #4a9eff);
    line-height: 56px;
    opacity: 0.5;
}
.rank-item:hover .rank-play {
    opacity: 1;
}

/* ===== 分类筛选 chips（深色主题）===== */
.cat-tabs {
    overflow: hidden;
    margin: 10px 0 14px;
}
.cat-tab {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 6px;
    padding: 6px 14px;
    font-size: 13px;
    color: #8b949e;
    background: #1f2630;
    border: 1px solid #30363d;
    border-radius: 999px;
    text-decoration: none;
    line-height: 18px;
}
.cat-tab:hover { color: #e6edf3; text-decoration: none; border-color: #58a6ff; }
.cat-tab.active { background: #58a6ff; color: #04101f; border-color: #58a6ff; font-weight: 600; }

/* 后台分类筛选 */
.cat-filter {
    margin-top: 6px;
}
.cat-filter .chip {
    font-size: 12px;
    padding: 3px 10px;
}

/* ===== 分类多选框 ===== */
.cat-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 14px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.cat-chip:hover {
    background: #e8e8e8;
}
.cat-chip input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
    accent-color: #4a90d9;
}
.cat-chip:has(input:checked) {
    background: #d0e3f7;
    color: #2563aa;
}

/* ===== 封面角标 ===== */
.badge-corner {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.3;
    pointer-events: none;
}
.cover-wrap .badge-multi {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    z-index: 2;
    pointer-events: none;
}

/* ===== Hero 品牌区 ===== */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 42px 20px 34px;
    margin: 0 0 26px;
    border-radius: 16px;
    border: 1px solid #30363d;
    background:
        radial-gradient(900px 260px at 50% -60%, rgba(88,166,255,.22), transparent 60%),
        radial-gradient(700px 220px at 92% 130%, rgba(63,185,80,.12), transparent 60%),
        linear-gradient(135deg, #141b27, #0e1116);
}
.hero-title {
    margin: 0 0 10px;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #58a6ff, #3fb950);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #58a6ff;
}
.hero-sub { margin: 0 0 22px; color: #8b949e; font-size: 15px; }
.hero-stats { font-size: 0; }
.hstat {
    display: inline-block;
    vertical-align: top;
    min-width: 116px;
    margin: 0 6px;
    padding: 12px 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid #30363d;
    border-radius: 12px;
}
.hstat b { display: block; font-size: 26px; font-weight: 800; color: #e6edf3; line-height: 1.1; }
.hstat span { font-size: 12px; color: #8b949e; }

/* 导航当前页高亮 */
.topnav a { padding: 4px 10px; border-radius: 8px; line-height: 24px; }
.topnav a.active { color: #e6edf3; background: #1f2630; }

@media (max-width: 720px) {
    .hero { padding: 28px 16px 24px; }
    .hero-title { font-size: 26px; }
    .hstat { min-width: 92px; padding: 10px 12px; margin: 0 4px 6px; }
    .hstat b { font-size: 22px; }
}

/* ===== 导航登录头像 + 悬停菜单 ===== */
.member-menu-wrap { display: inline-block; vertical-align: middle; margin-left: 12px; position: relative; }
.member-avatar-btn { background: none; border: none; padding: 0; cursor: pointer; line-height: 0; display: inline-block; }
.member-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #30363d; object-fit: cover; vertical-align: middle; }
.member-avatar-btn:hover .member-avatar { border-color: #58a6ff; }
.member-menu { display: none; position: absolute; right: 0; top: 44px; min-width: 210px; padding: 10px; background: #161b22; border: 1px solid #30363d; border-radius: 12px; z-index: 60; box-shadow: 0 12px 30px rgba(0,0,0,.45); text-align: left; }
.member-menu-wrap:hover .member-menu, .member-menu-wrap.open .member-menu { display: block; }
.mm-head { overflow: hidden; padding: 4px 4px 10px; margin-bottom: 8px; border-bottom: 1px solid #30363d; }
.mm-avatar { float: left; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-right: 10px; }
.mm-info { overflow: hidden; }
.mm-name { font-size: 14px; font-weight: 700; color: #e6edf3; }
.mm-plan { font-size: 12px; color: #58a6ff; margin-top: 2px; }
.mm-item { display: block; padding: 9px 10px; border-radius: 8px; color: #e6edf3; font-size: 14px; text-decoration: none; line-height: 1.2; }
.mm-item:hover { background: #1f2630; text-decoration: none; }
