/* game_stats 看板样式（light + dark 双主题）
 * 文件：/office/css/game_stats.css
 * 2026-10-25：从 game_stats.php 内联样式抽出，并接入站点统一暗黑模式（body.dark-mode + dark_mode.css/js）
 * 命名约定沿用 --lo-* 设计变量，dark_mode.css 已在 body.dark-mode 下重映射，此处仅覆盖无变量对应的色块
 */

/* ===== 顶部指标卡 ===== */
.dash-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.dash-stat { background: var(--lo-card, #fff); border: 1px solid var(--lo-border, #e5e7eb); border-radius: 10px; padding: 14px 18px; }
.dash-stat__label { font-size: 12px; color: var(--lo-muted, #6b7280); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.dash-stat__value { font-size: 28px; font-weight: 700; color: var(--lo-primary-600, #1d4ed8); }
.dash-stat__sub { font-size: 12px; color: var(--lo-muted, #6b7280); margin-top: 4px; }

/* ===== 双栏面板 ===== */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
@media (max-width: 900px) { .dash-grid-2 { grid-template-columns: 1fr; } }

/* ===== 横向占比条 ===== */
.dash-bar { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.dash-bar__label { width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--lo-text, #1f2937); }
.dash-bar__track { flex: 1; height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.dash-bar__fill { height: 100%; background: linear-gradient(90deg, #60a5fa, #2563eb); border-radius: 999px; }
.dash-bar__value { width: 90px; text-align: right; color: var(--lo-muted, #6b7280); font-variant-numeric: tabular-nums; }
.dash-empty { text-align: center; padding: 30px 20px; color: var(--lo-muted, #6b7280); font-size: 14px; }

/* ===== 通用面板容器 ===== */
.panel { background: var(--lo-card, #fff); border: 1px solid var(--lo-border, #e5e7eb); border-radius: 10px; padding: 14px 18px; }
.panel--table { padding: 0; overflow: hidden; }
.panel--trend { margin-top: 18px; padding: 16px 20px; }

/* ===== 区块标题 ===== */
.sec-title { font-size: 16px; font-weight: 600; margin: 18px 0 10px; color: var(--lo-text, #1f2937); }
.sec-title--drill { margin: 32px 0 10px; }
.sec-title--embed { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.sec-title__hint { font-size: 11px; font-weight: 500; color: var(--lo-muted, #6b7280); }
.sub-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; color: var(--lo-text, #1f2937); }
.sub-title--embed { font-size: 13px; margin: 14px 0 6px; }
.drill-link { font-size: 12px; color: var(--lo-primary-600, #1d4ed8); margin-left: 10px; font-weight: 400; }

/* ===== 游戏总览表 ===== */
.game-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.game-table th, .game-table td { padding: 10px 12px; border-bottom: 1px solid var(--lo-table-border, var(--lo-border, #e5e7eb)); text-align: left; }
.game-table th { background: var(--lo-table-zebra, #f8fafc); font-weight: 600; color: var(--lo-muted, #6b7280); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.game-table tr:hover td { background: var(--lo-row-hover-bg, #f8fafc); }
.game-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.game-table .num--time { font-size: 12px; color: var(--lo-muted, #6b7280); }
.game-table .game-link { color: var(--lo-primary-600, #1d4ed8); text-decoration: none; font-weight: 600; }
.game-table .game-link:hover { text-decoration: underline; }
.game-table tr.is-active td { background: #eff6ff; }
.game-table .no-data { font-size: 11px; color: #dc2626; margin-left: 6px; }
.game-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: #eef2ff; color: #4338ca; margin-right: 4px; }

/* ===== 筛选条 ===== */
.filter-bar { display: flex; gap: 10px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { padding: 6px 10px; border: 1px solid var(--lo-border, #e5e7eb); border-radius: 6px; font-size: 13px; background: var(--lo-input-bg, #fff); color: var(--lo-text, #1f2937); }
.filter-bar .pill { padding: 4px 12px; border-radius: 999px; background: #f1f5f9; color: var(--lo-muted, #6b7280); font-size: 12px; }
.filter-bar .pill--cur { background: #dbeafe; color: #1e40af; }
.filter-bar .btn-mini { font-size: 12px; padding: 4px 12px; }

/* ===== 近 7 天趋势图 ===== */
.trend-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.trend-head__title { font-size: 13px; font-weight: 600; color: var(--lo-text, #1f2937); }
.legend { font-size: 11px; color: var(--lo-muted, #6b7280); }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 12px; vertical-align: middle; }
.legend .dot:first-child { margin-left: 0; }
.dot--total  { background: #3b82f6; }
.dot--click  { background: #f59e0b; }
.dot--win    { background: #10b981; }
.dot--entry  { background: #8b5cf6; }
.trend-wrap { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 6px; }
.trend-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.trend-bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 120px; }
.tbar { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; }
.tbar--total  { background: #3b82f6; }
.tbar--click  { background: #f59e0b; }
.tbar--win    { background: #10b981; }
.tbar--entry  { background: #8b5cf6; }
.trend-day__label { font-size: 10px; color: var(--lo-muted, #6b7280); }

/* ===== 嵌入代码卡片（本就是深色，dark 下仅调边框） ===== */
.embed-block { margin-top: 32px; }
.embed-card { background: #0f172a; color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 8px; padding: 14px 18px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.embed-card .k { color: #93c5fd; }
.embed-card .s { color: #86efac; }

/* ===== 页脚说明 ===== */
.footer-note { margin-top: 18px; font-size: 12px; color: var(--lo-muted, #6b7280); text-align: right; }

/* ============================================================
 * 暗黑模式覆盖（body.dark-mode 由 dark_mode.js 自动切换）
 * ============================================================ */
body.dark-mode .dash-bar__track { background: rgba(148, 163, 184, 0.16); }
body.dark-mode .dash-bar__fill  { background: linear-gradient(90deg, #60a5fa, #3b82f6); }

body.dark-mode .game-tag { background: rgba(96, 165, 250, 0.14); color: #93c5fd; }
body.dark-mode .game-table tr.is-active td { background: rgba(96, 165, 250, 0.16); }
body.dark-mode .game-table .no-data { color: #f87171; }

body.dark-mode .filter-bar .pill { background: rgba(148, 163, 184, 0.14); color: #94a3b8; }
body.dark-mode .filter-bar .pill--cur { background: rgba(96, 165, 250, 0.20); color: #93c5fd; }

/* 趋势图：dark 下换更亮的色阶，保证对比度 */
body.dark-mode .dot--total, body.dark-mode .tbar--total { background: #60a5fa; }
body.dark-mode .dot--click, body.dark-mode .tbar--click { background: #fbbf24; }
body.dark-mode .dot--win,   body.dark-mode .tbar--win   { background: #34d399; }
body.dark-mode .dot--entry, body.dark-mode .tbar--entry { background: #a78bfa; }

body.dark-mode .embed-card { background: #0b1220; border-color: var(--lo-border, #334155); }
