﻿/* 中国 TGM 成绩排名 — 明暗双主题 · 信息优先 · 栅格严格（零依赖）
   主题由 <html data-theme="dark|light"> 切换（dark 默认），localStorage('tgm-theme') 持久化；
   暗色=赛道夜黑+电光青；亮色=极光靛蓝（改版前配色：#4f6ef7 靛紫渐变 + 玻璃卡片）。
   圆角统一 卡12/控件8；数据数字一律 tabular-nums。 */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============ 主题令牌 ============ */
:root {
  /* —— 暗色（默认）：赛道夜黑 + 电光青 —— */
  --primary: #38e1ff;         /* 电光青（唯一强调色） */
  --primary-dark: #67e8f9;
  --primary-deep: #eaf2ff;
  --ink: #062330;             /* 强调底上的文字 */
  --bg: #0b0e17; --bg-deep: #0e1421;
  --card: #131927; --card-solid: #151b2b; --card-hover: #182136;
  --border: #222c44; --border-strong: #2f3b5e;
  --text: #e9edf6; --text-sub: #98a2bd; --text-dim: #6b7590;
  --accent-light: rgba(56,225,255,.10); --accent-ring: rgba(56,225,255,.22);
  --success: #3ddc97; --warning: #fbbf24; --danger: #fb7185; --gold: #f5b942;
  --grad-brand: linear-gradient(135deg, #17c4e8, #38e1ff);
  --violet: var(--primary); --cyan: var(--primary); --pink: var(--danger); --amber: var(--warning);
  /* 结构令牌 */
  --page-bg: radial-gradient(900px 480px at 70% -160px, rgba(56,225,255,.06), transparent 70%), #0b0e17;
  --bar-bg: rgba(11,14,23,.92);
  --zone-bg: #0d1526;
  --scroll-thumb: #26304b; --scroll-thumb-hover: #33406e;
  --tint-bg: rgba(56,225,255,.07); --tint-bg-hover: rgba(56,225,255,.13);
  --tint-border: rgba(56,225,255,.38); --tint-border-hover: rgba(56,225,255,.65);
  --row-hover: rgba(56,225,255,.05);
  --chip-neutral-bg: rgba(255,255,255,.05); --chip-neutral-border: rgba(255,255,255,.09);
  --modal-bg: #141a2a;
  --rank-chip-bg: #212a42;
  --gold-grad: linear-gradient(135deg, #d99106, var(--gold)); --gold-ink: #241500;
  --silver-grad: linear-gradient(135deg, #9aa6bd, #c9d3e6); --silver-ink: #1c2333;
  --bronze-grad: linear-gradient(135deg, #a05e2c, #c47b3c); --bronze-ink: #251303;
  --gold-tint: rgba(245,185,66,.12); --gold-tint-ink: var(--gold); --gold-tint-border: rgba(245,185,66,.38);
  --ok-tint: rgba(61,220,151,.13); --warn-tint: rgba(251,191,36,.13); --err-tint: rgba(251,113,133,.13);
  --cover-fade: linear-gradient(180deg, rgba(11,14,23,.05) 38%, rgba(11,14,23,.62) 100%);
  --cover-filter: saturate(.92) brightness(.92);
  --option-bg: #131927;
  --selection: rgba(56,225,255,.28);
  --shadow-1: 0 2px 14px rgba(0,0,0,.22); --shadow-2: 0 22px 56px rgba(0,0,0,.55);
  --mask-bg: rgba(4,7,14,.66);
  --video-grad: linear-gradient(150deg, #16233c, #0e1524);
  --gs9-bg: rgba(56,225,255,.16); --gs9-ink: #9fe8ff;
  --accent-shadow: 0 3px 12px rgba(23,196,232,.25);
  --ease-out: cubic-bezier(.22,.61,.36,1);
}

:root[data-theme="light"] {
  /* —— 亮色：极光靛蓝（改版前配色，含极光底与玻璃卡片） —— */
  --primary: #4f6ef7; --primary-dark: #3b5bdb; --primary-deep: #22294d;
  --ink: #ffffff;
  --bg: #f4f7fe; --bg-deep: #e8edfb;
  --card: rgba(255,255,255,.85); --card-solid: #ffffff; --card-hover: #ffffff;
  --border: rgba(79,110,247,.14); --border-strong: rgba(79,110,247,.30);
  --text: #252c4a; --text-sub: #6b7395; --text-dim: #8a91b4;
  --accent-light: #eef2ff; --accent-ring: rgba(79,110,247,.16);
  --success: #16a34a; --warning: #d97706; --danger: #dc2626; --gold: #f5a623;
  --grad-brand: linear-gradient(135deg, #4f6ef7 0%, #7c6cf0 60%, #a06cf7 100%);
  --violet: #7c6cf0; --cyan: #22b8cf; --pink: #f47295; --amber: #f5a623;
  --page-bg:
    radial-gradient(1100px 700px at 88% -12%, rgba(124,108,246,.14), transparent 60%),
    radial-gradient(900px 650px at -8% 32%, rgba(79,110,247,.12), transparent 55%),
    radial-gradient(1000px 700px at 108% 88%, rgba(244,114,149,.10), transparent 55%),
    radial-gradient(800px 600px at 20% 110%, rgba(34,184,207,.08), transparent 55%),
    linear-gradient(180deg, #f8faff 0%, #f2f5ff 48%, #f7f4ff 100%);
  --bar-bg: rgba(255,255,255,.72);
  --zone-bg: #eef2ff;
  --scroll-thumb: #c3cdf2; --scroll-thumb-hover: #a9b6ea;
  --tint-bg: rgba(79,110,247,.08); --tint-bg-hover: rgba(79,110,247,.14);
  --tint-border: rgba(79,110,247,.38); --tint-border-hover: rgba(79,110,247,.62);
  --row-hover: rgba(79,110,247,.06);
  --chip-neutral-bg: rgba(107,115,149,.10); --chip-neutral-border: rgba(107,115,149,.18);
  --modal-bg: #ffffff;
  --rank-chip-bg: #e6ebfb;
  --gold-grad: linear-gradient(135deg, #f59e0b, #fbbf24); --gold-ink: #ffffff;
  --silver-grad: linear-gradient(135deg, #94a3b8, #cbd5e1); --silver-ink: #ffffff;
  --bronze-grad: linear-gradient(135deg, #b45309, #d97706); --bronze-ink: #ffffff;
  --gold-tint: rgba(245,158,11,.14); --gold-tint-ink: #92400e; --gold-tint-border: rgba(245,158,11,.4);
  --ok-tint: rgba(22,163,74,.10); --warn-tint: rgba(217,119,6,.10); --err-tint: rgba(220,38,38,.09);
  --cover-fade: linear-gradient(180deg, rgba(20,25,45,0) 55%, rgba(20,25,45,.25) 100%);
  --cover-filter: none;
  --option-bg: #ffffff;
  --selection: rgba(79,110,247,.22);
  --shadow-1: 0 2px 14px rgba(46,58,138,.08); --shadow-2: 0 22px 56px rgba(46,58,138,.20);
  --mask-bg: rgba(30,40,90,.42);
  --video-grad: linear-gradient(135deg, #3d4fd8, #7c6cf0 55%, #a06cf7);
  --gs9-bg: #dbeafe; --gs9-ink: #1d4ed8;
  --accent-shadow: 0 3px 12px rgba(79,110,247,.35);
}

html { min-height: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Noto Sans SC", sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  background: var(--page-bg);
  background-attachment: fixed;
}

::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

/* ===== 动画（克制：仅进场淡入） ===== */
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rowIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61,220,151,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(61,220,151,0); }
}

/* ===== 顶栏：站名（最高权重）+ 居中主导航 + 右上次级操作（主题切换 + 登录注册弱化） ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bar-bg);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s;
}
/* 签名元素：强调色「起跑线」（渐隐融入顶栏底色，唯一装饰） */
.topbar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--bar-bg) 62%);
}
.topbar.scrolled { box-shadow: var(--shadow-1); }
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  height: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; }
.logo-mark {
  background: var(--grad-brand); color: var(--ink);
  font-weight: 800; font-size: 12px; letter-spacing: 1px;
  padding: 4px 8px; border-radius: 7px;
  transition: filter .15s;
}
.logo:hover .logo-mark { filter: brightness(1.1); }
.logo-text { font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: .3px; }
.nav { display: flex; gap: 2px; justify-self: center; }
.nav a {
  color: var(--text-sub); text-decoration: none; font-size: 14.5px;
  padding: 7px 16px; border-radius: 8px; position: relative;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--row-hover); }
.nav a.active { color: var(--primary); font-weight: 700; }
.nav a.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--primary);
}
/* ===== 资料中心下拉（迁入顶部导航；桌面 hover 展开 + 点击通用） ===== */
.nav-item { position: relative; display: inline-flex; }
.nav-drop { cursor: pointer; user-select: none; }
.nav-drop .caret { display: inline-block; font-size: 10px; margin-left: 5px; transition: transform .18s var(--ease-out); }
.nav-item.open .nav-drop .caret { transform: rotate(180deg); }
.nav-item.open .nav-drop { color: var(--text); }
.nav-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 90;
  min-width: 316px; padding: 6px; text-align: left;
  background: var(--modal-bg); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-out), visibility .18s;
}
/* 小箭头指向导航项（与面板同底同框线） */
.nav-menu::before {
  content: ''; position: absolute; top: -5.5px; left: 50%; margin-left: -4.5px; width: 9px; height: 9px;
  background: var(--modal-bg);
  border-left: 1px solid var(--border-strong); border-top: 1px solid var(--border-strong);
  transform: rotate(45deg);
}
.nav-item.open .nav-menu,
.nav-item.has-menu:hover .nav-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: 9px; text-decoration: none;
  transition: background .15s;
}
.nav-menu-item:hover { background: var(--row-hover); }
.nav-menu-item .doc-ico { width: 34px; height: 34px; font-size: 15px; border-radius: 8px; }
.nav-menu-item .doc-name { font-size: 13px; }
.nav-menu-item .doc-desc { font-size: 11px; }
/* 右上操作组：主题切换按钮 + 登录/注册（弱化） */
.topbar-actions { display: flex; gap: 8px; align-items: center; justify-self: end; }
.userbox { display: flex; gap: 8px; align-items: center; }
.userbox .who { color: var(--text-sub); font-size: 13.5px; margin-right: 4px; }
.userbox .who b { color: var(--text); }

/* ===== 按钮 ===== */
.btn {
  border: none; cursor: pointer; border-radius: 8px;
  font-size: 13.5px; padding: 7px 16px; font-family: inherit;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--grad-brand); color: var(--ink); font-weight: 700; box-shadow: var(--accent-shadow); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: var(--tint-bg); color: var(--primary-dark);
  border: 1px solid var(--tint-border);
}
.btn-ghost:hover { background: var(--tint-bg-hover); border-color: var(--tint-border-hover); }
.btn-text { background: transparent; color: var(--text-sub); }
.btn-text:hover { color: var(--text); background: var(--row-hover); }
.btn-icon { padding: 6px 9px; font-size: 15px; line-height: 1; }
.btn-icon:hover { background: var(--tint-bg); transform: none; }
.btn-sm { padding: 4px 12px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 11px 32px; font-size: 14.5px; }
.btn-danger { background: var(--err-tint); color: var(--danger); }
.btn-danger:hover { background: rgba(251,113,133,.24); }
.btn-success { background: var(--ok-tint); color: var(--success); }
.btn-success:hover { background: rgba(61,220,151,.24); }

/* ===== 主区 ===== */
main { flex: 1; max-width: 1080px; width: 100%; margin: 0 auto; padding: 26px 20px 56px; position: relative; z-index: 1; }
.page { animation: pageIn .35s var(--ease-out); }
.page-head { margin-bottom: 20px; }
.page-head h1 {
  font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: .3px;
  border-left: 3px solid var(--primary); padding-left: 14px; line-height: 1.35;
}
.page-head .sub { color: var(--text-sub); font-size: 13px; margin-top: 8px; padding-left: 17px; }

/* ===== 分区标题 ===== */
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 12px; flex-wrap: wrap; }
.section-head h2 {
  font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: .4px;
  padding-left: 12px; position: relative;
}
.section-head h2::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
  border-radius: 2px; background: var(--primary);
}
.section-sub { font-size: 12px; color: var(--text-dim); }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 20px 22px; margin-bottom: 18px;
  transition: border-color .18s;
}

/* ===== 公告：导航下通栏提示条 + 点击展开面板 ===== */
.announce-zone { position: relative; background: var(--zone-bg); border-bottom: 1px solid var(--border); z-index: 40; }
.announce-inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.announce-bar {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 0; background: none; border: none; cursor: pointer; font-family: inherit;
}
.announce-bar:hover .ab-title { color: var(--text); }
.ab-badge {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: var(--ink); background: var(--primary); border-radius: 5px; padding: 2.5px 9px;
}
.ab-title {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; color: var(--text-sub); text-align: left; transition: color .15s;
}
.ab-meta { flex: none; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ab-caret { flex: none; font-size: 11px; color: var(--text-dim); transition: transform .18s var(--ease-out), color .15s; }
.announce-bar.open .ab-caret { transform: rotate(180deg); color: var(--primary); }
.announce-panel-wrap { position: relative; }
.announce-panel {
  position: absolute; top: 6px; left: 0; right: 0; z-index: 60;
  max-height: 420px; overflow-y: auto; scrollbar-width: thin;
  padding: 6px 18px; margin-bottom: 0;
  box-shadow: var(--shadow-2);
}
.announce-item { border-bottom: 1px solid var(--row-hover); animation: riseIn .3s var(--ease-out) both; }
.announce-item:last-child { border-bottom: none; }
.announce-head { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 12px 2px; user-select: none; }
.announce-head:hover .announce-title { color: var(--primary-dark); }
.announce-title {
  font-weight: 600; font-size: 13.5px; color: var(--text);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.announce-time { font-size: 12px; color: var(--text-dim); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.announce-body {
  max-height: 0; overflow: hidden; transition: max-height .3s var(--ease-out);
  color: var(--text-sub); font-size: 13.5px; line-height: 1.75; white-space: pre-wrap;
  padding: 0 4px; word-break: break-word;
}
.announce-item.open .announce-body {
  max-height: 1200px; padding: 2px 4px 14px;
  display: flex; gap: 18px; align-items: flex-start;
}
.announce-text { flex: 1 1 auto; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.announce-imgs { flex: 0 0 240px; width: 240px; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
.announce-imgs img {
  width: 100%; height: auto; object-fit: contain; border-radius: 9px;
  border: 1px solid var(--border-strong); cursor: zoom-in; display: block;
  background: var(--bg-deep); transition: transform .15s var(--ease-out);
}
.announce-imgs img:hover { transform: scale(1.02); }
.announce-imgs img.img-mini { width: 58px; height: 58px; object-fit: cover; flex: 0 0 auto; }
@media (max-width: 640px) {
  .announce-item.open .announce-body { flex-direction: column; gap: 12px; }
  .announce-imgs { flex-basis: auto; width: 100%; }
}

/* ===== 游戏版本：4 张等宽功能卡（首要分流入口；封面等比完整显示） ===== */
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.game-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; position: relative; overflow: hidden; min-width: 0;
  transition: transform .18s var(--ease-out), border-color .18s, background .18s;
  animation: riseIn .45s var(--ease-out) both;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--tint-border-hover);
  background: var(--card-hover);
}
.game-cover {
  position: relative; overflow: hidden; background: var(--bg-deep); flex: none;
  border-radius: 11px 11px 0 0;
}
.game-cover img {
  width: 100%; height: auto; display: block;           /* 等比完整显示，不裁切 */
  filter: var(--cover-filter);
  transition: transform .3s var(--ease-out);
}
.game-cover::after { content: ''; position: absolute; inset: 0; background: var(--cover-fade); }
.game-card:hover .game-cover img { transform: scale(1.045); }
.game-card-body { display: flex; flex-direction: column; gap: 7px; padding: 12px 15px 12px; flex: 1; }
/* 版本名：专属代表色 + 左侧同色竖条锚点，拉开与下方说明的层级 */
.game-tag {
  display: flex; align-items: center; gap: 11px;
  font-size: 19px; font-weight: 800; line-height: 1.2;
  color: var(--tag-color, var(--text)); letter-spacing: .3px;
}
.game-tag::before {
  content: ''; width: 4px; height: 18px; border-radius: 2px;
  background: var(--tag-color, var(--primary)); flex: none;
}
/* 四作专属代表色（明暗主题各自取高对比值） */
.gc-TGM1  { --tag-color: #38e1ff; }
.gc-TGM2P { --tag-color: #fbbf24; }
.gc-TGM3  { --tag-color: #fb7185; }
.gc-TGM4  { --tag-color: #a78bfa; }
:root[data-theme="light"] .gc-TGM1  { --tag-color: #0e7490; }
:root[data-theme="light"] .gc-TGM2P { --tag-color: #b45309; }
:root[data-theme="light"] .gc-TGM3  { --tag-color: #dc2626; }
:root[data-theme="light"] .gc-TGM4  { --tag-color: #6d28d9; }
.game-sub {
  font-size: 11px; color: var(--text-sub); letter-spacing: .6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 规则小胶囊：主色文字 + 同色淡底 + 同色描边，对比度提升不再发虚 */
.game-note {
  font-size: 11px; font-weight: 600; color: var(--note-ink);
  background: var(--note-bg); border: 1px solid var(--note-border);
  border-radius: 6px; padding: 2px 8px; width: fit-content; white-space: nowrap;
}
.gc-TGM1  { --note-ink: var(--tag-color); --note-bg: rgba(56,225,255,.10);  --note-border: rgba(56,225,255,.42); }
.gc-TGM2P { --note-ink: var(--tag-color); --note-bg: rgba(251,191,36,.12);  --note-border: rgba(251,191,36,.46); }
.gc-TGM3  { --note-ink: var(--tag-color); --note-bg: rgba(251,113,133,.13); --note-border: rgba(251,113,133,.46); }
.gc-TGM4  { --note-ink: var(--tag-color); --note-bg: rgba(167,139,250,.14); --note-border: rgba(167,139,250,.5); }
:root[data-theme="light"] .gc-TGM1  { --note-bg: rgba(14,116,144,.10);  --note-border: rgba(14,116,144,.35); }
:root[data-theme="light"] .gc-TGM2P { --note-bg: rgba(180,83,9,.12);   --note-border: rgba(180,83,9,.38); }
:root[data-theme="light"] .gc-TGM3  { --note-bg: rgba(220,38,38,.10);   --note-border: rgba(220,38,38,.35); }
:root[data-theme="light"] .gc-TGM4  { --note-bg: rgba(109,40,217,.11);  --note-border: rgba(109,40,217,.38); }
.game-count {
  font-size: 12px; color: var(--text-sub); font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--border); padding-top: 9px; margin-top: auto;
}

/* ===== 直播间漂浮气球（全页浮层：全视口随机落位漂浮，点击进入；<1000 收为右下角停靠列） ===== */
.live-float { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
.live-float.docked {
  inset: auto; right: 10px; bottom: 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none;
}
.live-balloon { position: absolute; width: 64px; pointer-events: auto; text-decoration: none; }
.live-float.docked .live-balloon { position: static; }
/* 漂浮动画层（随机周期/相位由 JS 注入） */
.lb-float { display: block; animation: lbBob 5s ease-in-out infinite alternate; will-change: transform; }
@keyframes lbBob {
  from { transform: translateY(-11px) rotate(-2.2deg); }
  to   { transform: translateY(11px) rotate(2.2deg); }
}
/* 悬停/聚焦缩放层（与浮动层分离，动画不冲突） */
.lb-card { display: flex; flex-direction: column; align-items: center; gap: 5px; transition: transform .2s var(--ease-out); }
.live-balloon:hover .lb-card, .live-balloon:focus-visible .lb-card { transform: scale(1.12); }
.lb-av {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid var(--border-strong); box-shadow: var(--shadow-1);
  display: block; background: var(--bg-deep);
}
.lb-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.lb-av .live-dot {
  position: absolute; right: -1px; bottom: 3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--success); border: 2px solid var(--card-solid);
  animation: livePulse 1.8s ease-in-out infinite;
}
/* 名牌“气球”：小三角连接头像 */
.lb-tag {
  position: relative; display: flex; flex-direction: column; align-items: center;
  background: var(--card-solid); border: 1px solid var(--border);
  border-radius: 12px; padding: 3px 12px 4px; box-shadow: var(--shadow-1); max-width: 112px;
}
.lb-tag::before {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px; background: var(--card-solid);
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
}
.lb-tag b {
  max-width: 96px; font-size: 12px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-tag i { font-style: normal; font-size: 10px; color: var(--primary-dark); }
/* 窄屏停靠：横向紧凑球（头像+名牌并排），不遮挡内容 */
.live-float.docked .lb-card { flex-direction: row; gap: 8px; }
.live-float.docked .lb-av { width: 42px; height: 42px; }
.live-float.docked .lb-tag { max-width: 150px; }
.live-float.docked .lb-tag::before { display: none; }
/* 开播中的气球：头像红色发光边框 + 呼吸光圈 + 名牌「已开播」徽标（区别于未开播的安静状态） */
.live-balloon.on-air .lb-av {
  border-color: var(--danger);
  box-shadow: 0 0 0 0 rgba(251, 113, 133, .55), var(--shadow-1);
  animation: onAirRing 1.6s ease-out infinite;
}
@keyframes onAirRing {
  0%   { box-shadow: 0 0 0 0 rgba(251, 113, 133, .55), 0 0 14px rgba(251, 113, 133, .30), var(--shadow-1); }
  70%  { box-shadow: 0 0 0 11px rgba(251, 113, 133, 0), 0 0 14px rgba(251, 113, 133, .30), var(--shadow-1); }
  100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0), 0 0 14px rgba(251, 113, 133, .30), var(--shadow-1); }
}
.live-balloon.on-air .lb-av .live-dot { background: var(--danger); border-color: var(--card-solid); }
.live-balloon.on-air .lb-tag { border-color: var(--danger); }
.lb-onair {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 2px; padding: 0 7px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  color: var(--danger); background: var(--err-tint);
  border: 1px solid var(--danger); line-height: 16px;
  animation: onAirBlink 1.6s ease-in-out infinite;
}
.lb-onair::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--danger); }
@keyframes onAirBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* ===== 社区动态漂浮气泡（宽屏 ≥1200：最新动态随机漂浮；窄屏回中栏气泡流 .post-wall） ===== */
.post-float { position: fixed; inset: 0; z-index: 44; pointer-events: none; }
.pf-bubble { position: absolute; width: 232px; pointer-events: auto; }
/* 漂浮动画层（随机周期/相位由 JS 注入）：比直播气球摆动更轻，正文可读 */
.pf-float { display: block; animation: pfBob 6s ease-in-out infinite alternate; will-change: transform; }
@keyframes pfBob {
  from { transform: translateY(-8px) rotate(-1.1deg); }
  to   { transform: translateY(8px) rotate(1.1deg); }
}
/* 纵向组合层：正文气泡 → 尖尖（底部左侧）→ 头像 → 名牌，整体左对齐对准尖尖 */
.pf-stack {
  display: flex; flex-direction: column; align-items: flex-start;
  transition: transform .2s var(--ease-out);
}
.pf-bubble:hover .pf-stack { transform: scale(1.04); }
/* 正文气泡（内容在上，尖尖在底部左侧指向下方头像） */
.pf-card {
  position: relative; width: 100%; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-1);
  transition: border-color .15s;
}
.pf-bubble:hover .pf-card { border-color: var(--tint-border-hover); }
/* 尖尖在卡片底部左侧（约 20px 处），头像/名牌随之左侧对齐 */
.pf-card::after {
  content: ''; position: absolute; bottom: -5px; left: 20px;
  width: 9px; height: 9px; background: var(--card);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transform: translateX(0) rotate(45deg);
}
.pf-body {
  font-size: 12px; line-height: 1.55; color: var(--text-sub);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; white-space: pre-wrap; word-break: break-word;
}
.pf-imgs { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.pf-imgs img {
  width: 46px; height: 46px; border-radius: 7px; border: 1px solid var(--border);
  object-fit: cover; display: block; cursor: zoom-in;
}
/* 头像：尖尖（卡片底部左侧）正下方，中心与尖尖精确对齐（点击进空间） */
.pf-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--border-strong); display: block; background: var(--bg-deep);
  box-shadow: var(--shadow-1); margin-top: 7px;
  transition: transform .15s var(--ease-out);
}
.pf-avatar:hover { transform: scale(1.1); }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 名牌（头像之下）：名字（进空间）+ 时间，胶囊样式与直播名牌同族 */
.pf-tag {
  display: flex; align-items: baseline; gap: 7px;
  margin-top: 5px; padding: 3px 11px 4px; max-width: 100%; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-1);
}
.pf-name {
  font-weight: 700; font-size: 12px; color: var(--text); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 0 1 auto; min-width: 0;
}
.pf-name:hover { color: var(--primary-dark); text-decoration: underline; }
.pf-time { font-size: 10px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }

/* ===== 社区看板：中栏 3 卡（最新成绩 / 上传榜 / 大师总榜，内容完整显示） ===== */
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.board-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; min-width: 0;
  margin-bottom: 0; animation: riseIn .45s var(--ease-out) both;
  transition: border-color .15s;
}
.board-card:hover { border-color: var(--border-strong); }
.board-title {
  font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: .3px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}
.board-list { list-style: none; }
.board-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--row-hover);
  transition: background .12s; animation: riseIn .3s var(--ease-out) both;
}
.board-item:hover { background: var(--row-hover); }
.board-item:last-child { border-bottom: none; }
.board-rank {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rank-chip-bg); color: var(--text-sub);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.board-item.board-top1 .board-rank { background: var(--gold-grad); color: var(--gold-ink); }
.board-item.board-top2 .board-rank { background: var(--silver-grad); color: var(--silver-ink); }
.board-item.board-top3 .board-rank { background: var(--bronze-grad); color: var(--bronze-ink); }
.board-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; gap: 1.5px; }
.board-name { font-weight: 600; font-size: 13px; color: var(--text); }
.board-mid:hover .board-name { color: var(--primary-dark); }
.board-sub {
  font-size: 11px; color: var(--text-sub);
  display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden;
}
.board-sub .bs-text { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-sub .bs-badge { flex: none; display: inline-flex; align-items: center; }
.board-right {
  flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.board-item.board-top1 .board-right { color: var(--gold-tint-ink); }
.board-empty { justify-content: center; color: var(--text-dim); font-size: 12.5px; padding: 26px 0; }
.board-title .board-note {
  margin-left: 8px; font-size: 10.5px; font-weight: 600; color: var(--primary-dark);
  background: var(--tint-bg); border-radius: 999px; padding: 1.5px 8px; vertical-align: 1.5px;
}

/* 看板行样式（列表见 .board-item） */

/* ===== 首页主体三栏：左=优秀视频（媒体） · 中=看板+动态（核心） · 右=最新视频（媒体） ===== */
.home-main { display: flex; flex-direction: column; }
.home-mid { order: -1; }      /* 窄屏：核心数据/动态先行 */
.home-left, .home-mid, .home-right { min-width: 0; }
@media (min-width: 1200px) {
  .home-main {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(0, 2.6fr) minmax(230px, 1fr);
    gap: 26px; align-items: start;
  }
  .home-mid { order: 0; }
  /* 右栏限高：底部与社区看板三卡对齐（JS 设 max-height），列表内部滚动看全部 */
  .home-right { display: flex; flex-direction: column; }
  .home-right .video-col { flex: 1; min-height: 0; overflow-y: auto; padding-right: 5px; }
  .home-right .video-col .video-item { flex: none; }   /* 防 flex 压扁卡：保持 16:9 自然高，超出滚动 */
  .home-right .video-col::-webkit-scrollbar { width: 6px; }
  .home-right .video-col::-webkit-scrollbar-thumb { border: none; }
  /* 左/右栏数据为空时整栏隐藏，栅格同步降栏（否则空轨会把中栏挤进窄列） */
  .home-main.no-left { grid-template-columns: minmax(0, 2.6fr) minmax(230px, 1fr); }
  .home-main.no-right { grid-template-columns: minmax(230px, 1fr) minmax(0, 2.6fr); }
  .home-main.no-left.no-right { grid-template-columns: minmax(0, 1fr); }
}

/* 左栏模块一：优秀视频（竖向媒体列表） */
.video-col { display: flex; flex-direction: column; gap: 12px; }
.video-item {
  position: relative; display: block; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  background: var(--video-grad);
  text-decoration: none; animation: riseIn .4s var(--ease-out) both;
  transition: border-color .15s;
}
.video-item:hover { border-color: var(--tint-border-hover); }
.video-item .v-cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s var(--ease-out);
}
.video-item:hover .v-cover { transform: scale(1.04); }
.v-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,18,0) 42%, rgba(8,11,18,.9) 100%); }
.v-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(9,13,22,.6); border: 1px solid rgba(255,255,255,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; padding-left: 3px;
  transition: transform .18s var(--ease-out), background .15s, color .15s;
}
.video-item:hover .v-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--primary); color: var(--ink); border-color: transparent;
}
.v-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; z-index: 1; }
.v-title {
  font-weight: 700; font-size: 14px; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v-note { font-size: 11.5px; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 右栏最新视频卡：段位图标小号白化（叠在封面渐变上） */
.v-grade { display: inline-flex; align-items: center; margin-left: 6px; }
.v-grade .gb { display: inline-flex; align-items: center; }
.v-grade .gb img { height: 16px; width: auto; filter: none; }
.v-grade .gb-text { font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); }

/* ===== 知识库入口元素（资料中心，现于顶部导航下拉 .nav-menu-item 内使用） ===== */
.doc-ico {
  flex: none; width: 38px; height: 38px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: var(--tint-bg); border: 1px solid var(--tint-border);
}
.doc-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.doc-desc { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 社区动态：头像 + 气泡流（左右交错 · 轻浮动，阅读性优先） ===== */
.post-wall { display: flex; flex-direction: column; gap: 14px; }
.pb-item {
  display: flex; gap: 10px; align-items: flex-start;
  animation: pbFloat 6.5s ease-in-out var(--d, 0s) infinite alternate;
}
.pb-item.pb-r { flex-direction: row-reverse; }
@keyframes pbFloat { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
.pb-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--border-strong); display: block; background: var(--bg-deep);
  transition: transform .15s var(--ease-out);
}
.pb-avatar:hover { transform: scale(1.08); }
.pb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-bubble {
  position: relative; max-width: min(560px, 84%);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 9px 13px 10px; box-shadow: var(--shadow-1);
  transition: border-color .15s;
}
.pb-item:hover .pb-bubble { border-color: var(--tint-border-hover); }
/* 气泡尾巴：指向头像（奇偶换向） */
.pb-bubble::before {
  content: ''; position: absolute; top: 15px; left: -5px; width: 9px; height: 9px;
  background: var(--card); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.pb-item.pb-r .pb-bubble::before {
  left: auto; right: -5px;
  border-left: none; border-bottom: none;
  border-right: 1px solid var(--border); border-top: 1px solid var(--border);
}
.pb-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 3px; flex-wrap: wrap; }
.pb-name { font-weight: 700; font-size: 13px; color: var(--text); text-decoration: none; }
.pb-name:hover { color: var(--primary-dark); text-decoration: underline; }
.pb-time { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pb-body {
  font-size: 13.5px; line-height: 1.65; color: var(--text-sub);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; white-space: pre-wrap; word-break: break-word;
}
.pb-imgs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pb-imgs img {
  width: 108px; height: 108px; border-radius: 10px; border: 1px solid var(--border);
  cursor: zoom-in; object-fit: cover; background: var(--bg-deep);
  transition: transform .15s var(--ease-out);
}
.pb-imgs img:hover { transform: scale(1.04); }

/* ===== 排行榜导航卡 ===== */
.nav-card { padding: 14px 16px; }
.game-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.game-tab {
  text-decoration: none; color: var(--text-sub); font-weight: 600; font-size: 14px;
  padding: 7px 20px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--bg-deep); transition: color .15s, border-color .15s, background .15s;
  letter-spacing: .5px;
}
.game-tab:hover { color: var(--primary-dark); border-color: var(--tint-border-hover); background: var(--tint-bg); }
.game-tab.active {
  color: var(--ink); background: var(--grad-brand);
  border-color: transparent; font-weight: 700;
  animation: popIn .25s var(--ease-out);
}
.chip-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.chip-row.hidden { display: none; }
.chip-label {
  flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--text-sub);
  background: var(--bg-deep); border: 1px solid var(--border); padding: 3px 10px; border-radius: 7px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  text-decoration: none; color: var(--text-sub); font-size: 13px; font-weight: 600;
  padding: 4px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: transparent; transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--primary-dark); border-color: var(--tint-border-hover); background: var(--tint-bg); }
.chip.active {
  color: var(--ink); background: var(--grad-brand); border-color: transparent; font-weight: 700;
  animation: popIn .22s var(--ease-out);
}
.table-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.table-caption { font-weight: 700; font-size: 14px; color: var(--text); }
.search-box-sm { width: 240px; }
.search-box-sm input { padding: 7px 12px; font-size: 13px; }
.empty-hint {
  text-align: center; color: var(--text-sub); padding: 46px 0; font-size: 14px;
  background: var(--bg-deep); border: 1.5px dashed var(--border-strong); border-radius: 12px;
  animation: fadeIn .3s;
}

/* ===== 筛选与输入控件 ===== */
.filter-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filter-item { display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.filter-item label { font-size: 12px; color: var(--text-sub); font-weight: 600; }
.filter-grow { flex: 1; min-width: 200px; }
.search-box input {
  width: 100%; padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; outline: none; font-family: inherit;
  background: var(--bg-deep); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-ring); }

select, input[type="text"], input[type="password"], input[type="email"],
input[type="date"], input[type="number"], textarea {
  padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; outline: none; background: var(--bg-deep); color: var(--text);
  font-family: inherit; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-ring); }
select:disabled { background: var(--bg-deep); color: var(--text-dim); cursor: not-allowed; }
::placeholder { color: var(--text-dim); opacity: 1; }
select option { background: var(--option-bg); color: var(--text); }

/* ===== 表格 ===== */
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
.rank-table thead th {
  background: var(--bg-deep); color: var(--text-sub); font-weight: 700; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--border); letter-spacing: .3px;
}
.rank-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--row-hover); }
.rank-table tbody tr:last-child td { border-bottom: none; }
.rank-table tbody tr { animation: rowIn .3s var(--ease-out) both; transition: background .12s; }
.rank-table tbody tr:hover { background: var(--row-hover); }
.col-rank { width: 56px; text-align: center; }
.rank-1 .col-rank, .rank-top3 .col-rank { font-weight: 800; }
.badge-rank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; border-radius: 7px; font-weight: 700; font-size: 12.5px;
  background: var(--rank-chip-bg); color: var(--text-sub); font-variant-numeric: tabular-nums;
}
tr.rank-1 .badge-rank { background: var(--gold-grad); color: var(--gold-ink); }
tr.rank-2 .badge-rank { background: var(--silver-grad); color: var(--silver-ink); }
tr.rank-3 .badge-rank { background: var(--bronze-grad); color: var(--bronze-ink); }

/* ===== 段位分布金字塔（排行页：当前模式每玩家最高段位计数；高段位在上、低段位在下） ===== */
.gp-card { padding: 13px 16px 11px; }
.gp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gp-stat { font-size: 12px; color: var(--text-sub); margin-left: auto; font-variant-numeric: tabular-nums; }
.gp-fold { font-size: 12px; color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.gp-fold:hover { color: var(--primary); }
.gp-card.folded .gp-scroll { display: none; }
.gp-scroll { max-height: 420px; overflow-y: auto; }
.gp-row {
  display: grid; grid-template-columns: 64px 1fr 88px; align-items: center;
  gap: 10px; padding: 2.5px 0; animation: rowIn .24s var(--ease-out) both;
}
.gp-label {
  font-size: 12.5px; font-weight: 700; color: var(--text-sub);
  text-align: right; white-space: nowrap; overflow: visible;
  font-variant-numeric: tabular-nums;
}
.gp-row.gp-mid .gp-label { color: var(--primary-dark); }
.gp-row.gp-top .gp-label { color: var(--gold); }
.gp-bar-wrap {
  height: 16px; border-radius: 4px; background: var(--chip-neutral-bg);
  border: 1px solid var(--chip-neutral-border); overflow: hidden; min-width: 0;
}
.gp-bar { display: block; height: 100%; border-radius: 3px; background: var(--tint-border); }
.gp-row.gp-mid .gp-bar { background: var(--grad-brand); box-shadow: var(--accent-shadow); }
.gp-row.gp-top .gp-bar { background: var(--gold-grad); box-shadow: 0 0 10px rgba(245, 185, 66, .35); }
.gp-count { font-size: 12px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.gp-gap {
  text-align: center; color: var(--text-dim); font-size: 11px; letter-spacing: 1.5px;
  padding: 1px 0; user-select: none;
}
.gp-foot { font-size: 11px; color: var(--text-dim); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 7px; }
@media (max-width: 720px) {
  .gp-row { grid-template-columns: 52px 1fr 64px; gap: 8px; }
  .gp-count { font-size: 11px; }
}

.grade-tag {
  display: inline-block; padding: 2px 10px; border-radius: 7px;
  background: var(--tint-bg); color: var(--primary-dark);
  font-weight: 700; font-size: 12.5px;
}
.grade-gm { background: var(--gold-grad); color: var(--gold-ink); }
.grade-s9 { background: var(--gs9-bg); color: var(--gs9-ink); }

/* ===== 段位图标（游戏内素材） ===== */
.grade-tag.grade-ico { background: none; padding: 0; border-radius: 0; display: inline-flex; align-items: center; }
.grade-tag .gb { display: inline-flex; align-items: center; }
.grade-tag .gb img {
  height: 26px; width: auto; display: block;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
  transition: transform .15s var(--ease-out);
}
tr:hover .grade-tag .gb img { transform: scale(1.08); }
.grade-tag.grade-ico-big .gb img { height: 30px; }
.gb-text { font-weight: 700; font-size: 12.5px; color: var(--text); }
.grade-gm .gb-text { color: var(--gold-ink); }
.gb-words { gap: 3px; }
.gb-words img { height: 18px; }
.grade-tag .gb-words img { height: 20px; }
.board-sub .gb img { height: 15px; filter: none; }
.board-sub .gb-words img { height: 13px; }
.board-sub .gb-text { font-size: 11.5px; }
.space-grade .gb img { height: 24px; }
.space-grade .gb-words img { height: 16px; }

.audit-tag { display: inline-block; padding: 2px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.audit-wait    { background: var(--warn-tint); color: var(--warning); }
.audit-pass    { background: var(--ok-tint); color: var(--success); }
.audit-reject  { background: var(--err-tint); color: var(--danger); }
.audit-pending { background: var(--warn-tint); color: var(--warning); }
td .player-name { font-weight: 700; color: var(--text); text-decoration: none; }
td a.player-name:hover { color: var(--primary-dark); text-decoration: underline; }
td .tgm-id { color: var(--text-dim); font-size: 12px; }

/* 佐证列 */
.evi { display: inline-flex; gap: 6px; align-items: center; }
.evi a, .evi button.linklike {
  color: var(--primary-dark); text-decoration: none; font-size: 12.5px;
  background: var(--tint-bg);
  border-radius: 7px; padding: 3px 8px; border: none; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.evi a:hover, .evi button.linklike:hover { background: var(--tint-bg-hover); }
.evi-thumbs { display: inline-flex; gap: 6px; align-items: center; }
.evi-thumb {
  position: relative; width: 48px; height: 48px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--border-strong); cursor: zoom-in; padding: 0; background: var(--bg-deep);
  box-shadow: var(--shadow-1);
  transition: transform .15s var(--ease-out), border-color .15s;
}
.evi-thumb:hover { transform: translateY(-2px); border-color: var(--tint-border-hover); }
.evi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evi-badge {
  position: absolute; right: 2px; bottom: 2px;
  background: rgba(9,13,22,.78); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 5px; padding: 1px 4px; line-height: 1.2; pointer-events: none;
}
.evi-video {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 48px; height: 48px; border-radius: 9px; text-decoration: none;
  background: var(--grad-brand);
  color: var(--ink); border: 1px solid rgba(255,255,255,.28);
  box-shadow: var(--accent-shadow);
  transition: transform .15s var(--ease-out), filter .15s;
}
.evi-video:hover { transform: translateY(-2px); filter: brightness(1.08); }
.evi-video .v-ico { font-size: 15px; line-height: 1; padding-left: 2px; }
.evi-video .v-txt { font-size: 9px; font-weight: 700; letter-spacing: 1px; opacity: .8; }
.evi-none { color: var(--text-dim); font-size: 12px; opacity: .65; }
.empty { text-align: center; color: var(--text-dim); padding: 40px 0; font-size: 14px; }

/* ===== 后台批量操作 / 复选框列 ===== */
.admin-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-toolbar select, .admin-toolbar input[type="text"] { width: auto; min-width: 120px; }
.admin-toolbar .batch-del-btn { margin-left: auto; white-space: nowrap; }
.col-check { width: 34px; text-align: center; }
.col-check input[type="checkbox"], td.col-check input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; vertical-align: middle;
}
td.col-check input[type="checkbox"]:hover { transform: scale(1.15); }
.cell-content { max-width: 280px; white-space: normal !important; word-break: break-word; line-height: 1.6; }

/* ===== 表单 ===== */
.form-card { max-width: 860px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item label { font-size: 13px; font-weight: 600; color: var(--text-sub); }
.form-item label i { color: var(--danger); font-style: normal; }
.form-item label i.lock { color: var(--warning); font-size: 11px; font-weight: 400; }
.form-item-full { grid-column: 1 / -1; }

.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1 1 auto; padding-right: 44px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; background: transparent; cursor: pointer;
  font-size: 17px; line-height: 1; border-radius: 7px; opacity: .55; padding: 0;
  transition: opacity .15s, background .15s;
}
.pw-eye:hover { opacity: 1; background: var(--tint-bg); }

.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1 1 auto; min-width: 0; letter-spacing: 4px; }
.btn-code {
  flex: 0 0 auto; padding: 0 16px; font-size: 13px; white-space: nowrap;
  background: var(--tint-bg); color: var(--primary-dark);
  border: 1px solid var(--tint-border); border-radius: 8px; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.btn-code:hover:not(:disabled) { background: var(--tint-bg-hover); border-color: var(--tint-border-hover); }
.btn-code:disabled { opacity: .5; cursor: not-allowed; }

/* TGM4 NORMAL 「分子 of 分母」双下拉段位 */
.grade-split { display: flex; align-items: center; gap: 8px; }
.grade-split select { flex: 1; min-width: 0; }
.grade-split-sep { flex-shrink: 0; font-size: 12px; font-style: italic; font-weight: 700; color: var(--text-dim); }

.group-label { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .4px; color: var(--text); }
.group-label::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }
.group-label:hover { color: var(--primary-dark); }
.group-count {
  margin-left: 10px; font-size: 11px; font-weight: 500; color: var(--text-sub);
  background: var(--tint-bg); border-radius: 999px; padding: 2px 9px;
}
.mode-tag {
  display: inline-block; padding: 2px 9px; border-radius: 7px;
  background: var(--tint-bg); color: var(--primary-dark);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.rank-table.single-mode .col-mode { display: none; }
.rank-table.grouped .col-mode { display: none; }
.rank-table tbody tr.group-row td {
  padding: 8px 14px; background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.rank-table tbody tr.group-row:hover { background: var(--bg-deep); }

.field-note { font-size: 11.5px; color: var(--text-dim); font-weight: 400; }
.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 16px; }
.submit-msg { font-size: 13.5px; }
.submit-msg.ok { color: var(--success); }
.submit-msg.err { color: var(--danger); }
.file-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.file-preview .fp {
  position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border-strong);
  animation: popIn .25s var(--ease-out);
}
.file-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-preview .fp-del {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  background: rgba(9,13,22,.72); color: #fff; border: none; border-radius: 6px;
  cursor: pointer; font-size: 13px; line-height: 1;
}
input[type="file"] { font-size: 13px; color: var(--text-sub); }
input[type="file"]::file-selector-button {
  border: 1px solid var(--border-strong); background: var(--bg-deep); color: var(--text);
  border-radius: 8px; padding: 7px 14px; margin-right: 10px; cursor: pointer; font-family: inherit;
  transition: border-color .15s, color .15s;
}
input[type="file"]::file-selector-button:hover { border-color: var(--primary); color: var(--primary-dark); }

/* ===== 审核卡片（后台） ===== */
.audit-card { border-left: 4px solid var(--warning); }
.audit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.audit-title { font-weight: 700; color: var(--text); }
.audit-info { color: var(--text-sub); font-size: 13.5px; line-height: 1.9; }
.audit-info b { color: var(--text); }
.audit-actions { margin-top: 14px; display: flex; gap: 10px; }
.audit-shots { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.audit-shots img {
  width: 130px; height: 100px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border-strong); cursor: zoom-in;
}

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: var(--mask-bg); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .2s;
}
.modal {
  background: var(--modal-bg); border-radius: 14px; padding: 30px 32px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-2); position: relative;
  border: 1px solid var(--border-strong);
  animation: popIn .28s var(--ease-out);
}
.modal h2 { font-size: 19px; font-weight: 800; margin-bottom: 20px; color: var(--text); }
.modal .form-item { margin-bottom: 14px; }
.modal-close {
  position: absolute; top: 14px; right: 16px; border: none; background: none;
  font-size: 22px; color: var(--text-sub); cursor: pointer;
  transition: transform .18s, color .15s;
}
.modal-close:hover { transform: rotate(90deg); color: var(--danger); }
.modal-msg { font-size: 13px; color: var(--danger); min-height: 18px; margin-top: 10px; }
.modal-switch { font-size: 13px; color: var(--text-sub); margin-top: 6px; }
.modal-switch a { color: var(--primary-dark); }

/* ===== 页脚 ===== */
.footer { border-top: 1px solid var(--border); padding: 18px 20px 26px; position: relative; z-index: 1; }
.footer p { text-align: center; color: var(--text-dim); font-size: 12px; line-height: 1.8; }
.footer a { color: var(--text-dim); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ===== 管理后台：直播间列表 ===== */
.live-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 10px;
}
.live-row .live-av {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none;
  border: 2px solid var(--border-strong);
}
.live-row .live-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-mid { flex: 1; min-width: 0; }
.live-nm { font-weight: 700; font-size: 14px; color: var(--text); }
.live-sub2 { font-size: 12px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.live-onair-badge {
  display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: var(--danger);
  background: var(--err-tint); border: 1px solid var(--danger);
}
.live-acts { display: flex; gap: 8px; flex: none; }

.hidden { display: none !important; }

/* 图片放大层 */
.lightbox {
  position: fixed; inset: 0; background: var(--mask-bg); z-index: 200;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 30px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .18s;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; animation: popIn .28s var(--ease-out); box-shadow: var(--shadow-2); }

/* ===== 个人空间 ===== */
.avatar-sm {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-strong); box-shadow: var(--shadow-1); background: var(--bg-deep);
}
.avatar-lg {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border-strong); box-shadow: var(--shadow-1);
  background: var(--bg-deep); display: block;
}
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar-edit {
  position: absolute; bottom: -2px; right: -2px;
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--card-solid);
  background: var(--grad-brand); color: var(--ink); cursor: pointer; font-size: 13px;
  line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: filter .15s;
}
.avatar-edit:hover { filter: brightness(1.12); }
.avatar-pick {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px dashed var(--border-strong); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep); overflow: hidden; position: relative;
  transition: border-color .15s, transform .15s;
}
.avatar-pick:hover { border-color: var(--primary); transform: scale(1.04); }
.avatar-pick img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick .avatar-pick-hint { font-size: 24px; color: var(--text-dim); font-weight: 300; }
.avatar-pick.has-img .avatar-pick-hint { display: none; }

.space-head { display: flex; gap: 20px; align-items: center; }
.space-name { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.space-userinfo { display: flex; flex-direction: column; gap: 4px; }
.space-pw-btn { margin-left: auto; flex-shrink: 0; }

/* 发帖框 */
.post-editor textarea, #pe-content {
  width: 100%; min-height: 84px; resize: vertical;
  border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 10px 12px; font-family: inherit; font-size: 14px; color: var(--text);
  outline: none; line-height: 1.6; background: var(--bg-deep);
}
.post-editor textarea:focus, #pe-content:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-ring); }
.post-editor-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

/* 帖子卡片（空间页） */
.post-card { padding: 18px 20px; animation: riseIn .4s var(--ease-out) both; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head .avatar-sm { border: 1px solid var(--border-strong); }
.post-author { font-weight: 700; color: var(--text); font-size: 14.5px; }
.post-time { color: var(--text-dim); font-size: 12px; margin-left: auto; }
.post-content { font-size: 14.5px; line-height: 1.7; color: var(--text-sub); white-space: pre-wrap; word-break: break-word; }
.post-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.post-imgs img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border); cursor: zoom-in; background: var(--bg-deep);
  transition: transform .2s var(--ease-out);
}
.post-imgs img:hover { transform: scale(1.03); }
.post-actions { display: flex; gap: 8px; margin-top: 12px; }
.post-empty { text-align: center; color: var(--text-dim); padding: 36px 0; font-size: 14px; }

/* ===== 空间页成就墙 ===== */
.ach-card { margin-top: 14px; }
#space-ach-grid { padding: 4px 6px 10px; }
.ach-cat { font-size: 12px; font-weight: 700; color: var(--primary-dark); margin: 12px 0 6px; }
.ach-cat:first-child { margin-top: 2px; }
.ach-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ach-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  background: var(--chip-neutral-bg); color: var(--text-dim);
  border: 1px solid var(--chip-neutral-border); cursor: default;
  transition: transform .15s, border-color .15s;
}
.ach-item.on {
  background: var(--gold-tint); color: var(--gold-tint-ink); font-weight: 700;
  border: 1px solid var(--gold-tint-border);
}
.ach-item:hover { transform: translateY(-2px); }
.ach-item i { font-style: normal; font-size: 13px; }

/* ===== 榜单历史记录 ===== */
.history-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--text-sub); cursor: pointer; user-select: none; white-space: nowrap;
}
.history-toggle input { accent-color: var(--primary); cursor: pointer; }
.badge-hist { background: var(--chip-neutral-bg) !important; color: var(--text-dim) !important; font-size: 10.5px; padding: 2px 8px; }
.row-hist { opacity: .5; }
.row-hist:hover { opacity: .8; }

/* ===== 进站公告弹窗 ===== */
.ann-modal { max-width: 440px; }
.ann-head { font-size: 12px; font-weight: 700; color: var(--primary-dark); letter-spacing: 2px; margin-bottom: 6px; }
.ann-title { margin-bottom: 4px !important; }
.ann-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.ann-content { font-size: 14px; line-height: 1.75; color: var(--text-sub); white-space: pre-wrap; max-height: 42vh; overflow-y: auto; }
.ann-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.ann-imgs img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--border-strong); }
.ann-modal .form-actions { margin-top: 14px; }

/* ===== 动画降级（无障碍） ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 响应式：PC 优先，栅格降档 ===== */
@media (max-width: 960px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .board-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { display: flex; flex-wrap: wrap; height: auto; padding: 9px 14px; gap: 8px; }
  .nav { order: 3; width: 100%; justify-self: stretch; justify-content: flex-start; gap: 0; overflow-x: auto; }
  .nav a { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  /* 手机端：nav 横向滚动会裁剪 absolute 菜单，资料中心下拉改 fixed 全宽面板（top 由 JS 定位） */
  .nav-item { flex: none; }
  .nav-menu { position: fixed; left: 12px; right: 12px; top: 0; min-width: 0; transform: translateY(8px); }
  .nav-menu::before { display: none; }
  .nav-item.open .nav-menu,
  .nav-item.has-menu:hover .nav-menu { transform: translateY(0); }
  .topbar-actions { margin-left: auto; }
  main { padding: 18px 14px 44px; }
  .announce-inner { padding: 0 14px; }
  .ab-meta { display: none; }              /* 手机端公告条只留标题 */
  .form-grid { grid-template-columns: 1fr; }
  .filter-item { min-width: 100%; }
  .space-head { flex-direction: column; text-align: center; align-items: center; }
  .space-pw-btn { margin-left: 0; }
  .post-imgs { grid-template-columns: repeat(3, 1fr); }
  .game-grid { grid-template-columns: 1fr; }
  .board-grid { grid-template-columns: 1fr; }
  .pb-bubble { max-width: 78%; }
  .search-box-sm { width: 100%; }
  .section-head { margin: 20px 0 10px; }
  .home-left { margin-top: 22px; }          /* 窄屏顺序：看板+动态在前，视频/资料随后 */
  .home-right { margin-top: 0; }
}

/* 宽屏两档：内容区随屏放宽 */
@media (min-width: 1200px) {
  main { max-width: 1280px; }
  .topbar-inner { max-width: 1280px; }
  .announce-inner { max-width: 1280px; }
  .rank-table td, .rank-table th { padding: 11px 16px; }
  .form-card { max-width: 1060px; }
  .form-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
}
@media (min-width: 1500px) {
  main { max-width: 1400px; }
  .topbar-inner { max-width: 1400px; }
  .announce-inner { max-width: 1400px; }
}

/* ===== 亮色专属微调：还原改版前玻璃卡片质感、悬浮面板提高不透明度 ===== */
[data-theme="light"] .card { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
[data-theme="light"] .announce-panel { background: rgba(255,255,255,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
