/* ============================================================
   Guixu Consensus Platform :: shared theme
   归墟共识平台 · 共享主题与组件库
   与品牌官网（https://www.guixu.club/）视觉规范保持一致（深色 #0d1b2a 系 + 强调色 #a3bffa）
   ============================================================ */

:root {
  --gx-900: #0a1520;
  --gx-800: #0d1b2a;
  --gx-700: #1b263b;
  --gx-600: #415a77;
  --gx-accent: #a3bffa;
  --gx-accent-dim: rgba(163, 191, 250, .15);
  --gx-ok: #7ee0c8;
  --gx-warn: #ffb86b;
  --gx-bad: #ff8080;
  --gx-text: #e0e1dd;
  --gx-dim: rgba(224, 225, 221, .62);
  --gx-faint: rgba(224, 225, 221, .38);
  --gx-line: rgba(163, 191, 250, .16);
  --gx-line-strong: rgba(163, 191, 250, .32);
  --gx-light: #f0f2f5;
  --gx-ink: #1a1a2e;
  --gx-ink-soft: #4a4a5a;
  --gx-radius: 12px;
  --gx-radius-sm: 8px;
  --gx-font: 'Segoe UI', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --gx-mono: 'SFMono-Regular', Consolas, 'Roboto Mono', monospace;
  --gx-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --gx-glow: 0 0 24px rgba(163, 191, 250, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--gx-font);
  background: var(--gx-800);
  color: var(--gx-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gx-accent); text-decoration: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, .03); }
::-webkit-scrollbar-thumb { background: rgba(163, 191, 250, .22); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(163, 191, 250, .4); }

/* ---------- 通用文本 ---------- */
.gx-title { font-size: 1.8em; font-weight: 700; }
.gx-sub { color: var(--gx-dim); font-size: .95em; }
.gx-mono { font-family: var(--gx-mono); }
.gx-dim { color: var(--gx-dim); }
.gx-ok { color: var(--gx-ok); }
.gx-warn { color: var(--gx-warn); }
.gx-bad { color: var(--gx-bad); }
.gx-accent { color: var(--gx-accent); }

/* ---------- 按钮 ---------- */
.gx-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--gx-radius-sm);
  font-size: .88em; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .22s; font-family: var(--gx-font);
}
.gx-btn-primary { background: var(--gx-accent); color: var(--gx-800); }
.gx-btn-primary:hover { background: #8aa5e6; transform: translateY(-1px); }
.gx-btn-ghost { border-color: var(--gx-line-strong); color: var(--gx-accent); background: transparent; }
.gx-btn-ghost:hover { background: var(--gx-accent-dim); }
.gx-btn-sm { padding: 5px 12px; font-size: .8em; }
.gx-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- 卡片 ---------- */
.gx-card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius);
  padding: 22px;
}
.gx-card-hover:hover { border-color: var(--gx-line-strong); background: rgba(255, 255, 255, .06); }
.gx-card-solid { background: #fff; border: 1px solid rgba(0, 0, 0, .06); color: var(--gx-ink); }
.gx-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.gx-card-head h3 { font-size: 1.05em; font-weight: 600; }
.gx-card-head .gx-sub { font-size: .82em; }
.gx-section-title { display: flex; align-items: center; gap: 10px; font-size: 1.05em; font-weight: 600; margin-bottom: 16px; }
.gx-section-title::before { content: ''; width: 3px; height: 15px; background: var(--gx-accent); border-radius: 2px; }

/* ---------- 栅格 ---------- */
.gx-grid { display: grid; gap: 16px; }
.gx-grid-2 { grid-template-columns: repeat(2, 1fr); }
.gx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gx-grid-4 { grid-template-columns: repeat(4, 1fr); }
.gx-grid-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gx-row { display: flex; align-items: center; gap: 12px; }
.gx-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gx-wrap { flex-wrap: wrap; }
.gx-mt { margin-top: 18px; }
.gx-mt-lg { margin-top: 32px; }

/* ---------- KPI ---------- */
.gx-kpi { position: relative; overflow: hidden; }
.gx-kpi .kpi-label { font-size: .82em; color: var(--gx-dim); display: flex; align-items: center; gap: 6px; }
.gx-kpi .kpi-value { font-size: 1.95em; font-weight: 700; color: var(--gx-accent); line-height: 1.25; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.gx-kpi .kpi-unit { font-size: .5em; font-weight: 500; color: var(--gx-dim); margin-left: 3px; }
.gx-kpi .kpi-foot { font-size: .78em; color: var(--gx-faint); }
.gx-kpi::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  background: radial-gradient(circle, rgba(163, 191, 250, .12), transparent 70%); border-radius: 50%;
}

/* ---------- 标签 / 状态点 ---------- */
.gx-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px; font-size: .74em; font-weight: 600;
  background: var(--gx-accent-dim); color: var(--gx-accent); border: 1px solid var(--gx-line);
}
.gx-tag-ok { background: rgba(126, 224, 200, .12); color: var(--gx-ok); border-color: rgba(126, 224, 200, .28); }
.gx-tag-warn { background: rgba(255, 184, 107, .12); color: var(--gx-warn); border-color: rgba(255, 184, 107, .28); }
.gx-tag-bad { background: rgba(255, 128, 128, .12); color: var(--gx-bad); border-color: rgba(255, 128, 128, .28); }
.gx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gx-ok); display: inline-block; }
.gx-dot-pulse { animation: gxPulse 1.8s ease-in-out infinite; }
@keyframes gxPulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(126, 224, 200, .5); } 50% { opacity: .55; box-shadow: 0 0 0 4px rgba(126, 224, 200, 0); } }

/* ---------- 表格 ---------- */
.gx-table { width: 100%; border-collapse: collapse; font-size: .86em; }
.gx-table th {
  text-align: left; padding: 10px 12px; color: var(--gx-dim); font-weight: 600;
  font-size: .92em; border-bottom: 1px solid var(--gx-line); white-space: nowrap;
}
.gx-table td { padding: 11px 12px; border-bottom: 1px solid rgba(163, 191, 250, .07); white-space: nowrap; }
.gx-table tbody tr:hover { background: rgba(163, 191, 250, .05); }
.gx-table tbody tr:last-child td { border-bottom: none; }
.gx-table-scroll { overflow-x: auto; }

/* ---------- 进度条 ---------- */
.gx-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.gx-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--gx-accent); transition: width .6s ease; }
.gx-bar-ok > i { background: var(--gx-ok); }
.gx-bar-warn > i { background: var(--gx-warn); }

/* ---------- 开关 ---------- */
.gx-switch { position: relative; width: 46px; height: 24px; border-radius: 12px; background: rgba(255, 255, 255, .12); cursor: pointer; transition: background .25s; flex: 0 0 auto; border: none; }
.gx-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s; }
.gx-switch.on { background: var(--gx-accent); }
.gx-switch.on::after { transform: translateX(22px); }

/* ---------- 滑块 ---------- */
.gx-range { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); outline: none; }
.gx-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--gx-accent); cursor: pointer; box-shadow: 0 0 0 4px rgba(163, 191, 250, .18);
}
.gx-range::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--gx-accent); cursor: pointer; }

/* ---------- 应用外壳（侧边栏 + 主区） ---------- */
.gx-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: var(--gx-800); }
.gx-side {
  background: linear-gradient(180deg, #0b1724, #0d1b2a);
  border-right: 1px solid var(--gx-line); padding: 22px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.gx-side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 20px; border-bottom: 1px solid var(--gx-line); margin-bottom: 14px; }
.gx-side .brand .mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--gx-accent), var(--gx-600)); display: grid; place-items: center; color: var(--gx-800); font-weight: 800; font-size: .95em; }
.gx-side .brand b { font-size: 1em; letter-spacing: .5px; }
.gx-side .brand small { display: block; font-size: .7em; color: var(--gx-faint); font-weight: 400; letter-spacing: 1px; }
.gx-side .nav-label { font-size: .7em; color: var(--gx-faint); letter-spacing: 1.4px; padding: 12px 10px 5px; text-transform: uppercase; }
.gx-side a.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--gx-radius-sm);
  color: var(--gx-dim); font-size: .88em; transition: all .2s; border: 1px solid transparent;
}
.gx-side a.nav-item:hover { background: rgba(163, 191, 250, .07); color: var(--gx-text); }
.gx-side a.nav-item.active { background: var(--gx-accent-dim); color: var(--gx-accent); border-color: var(--gx-line); font-weight: 600; }
.gx-side .side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--gx-line); font-size: .75em; color: var(--gx-faint); }

.gx-main { padding: 24px 28px 48px; min-width: 0; }
.gx-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--gx-line); flex-wrap: wrap;
}
.gx-crumb { font-size: .8em; color: var(--gx-faint); }

/* ---------- 世界地图容器 ---------- */
.gx-map-wrap { position: relative; width: 100%; border-radius: var(--gx-radius); overflow: hidden; background: radial-gradient(ellipse at 50% 40%, rgba(65, 90, 119, .28), transparent 72%); border: 1px solid var(--gx-line); }
.gx-map-wrap canvas { display: block; width: 100%; height: auto; }
.gx-map-legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px; font-size: .72em; color: var(--gx-dim); flex-wrap: wrap; }
.gx-map-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* ---------- 手机模拟框 ---------- */
.gx-phone {
  width: 390px; max-width: 100%; height: 800px; background: #050d16;
  border-radius: 42px; border: 10px solid #16232f; box-shadow: 0 24px 60px rgba(0, 0, 0, .5), var(--gx-glow);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.gx-phone .notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 132px; height: 26px; background: #16232f; border-radius: 0 0 16px 16px; z-index: 20;
}
.gx-phone .status-bar { display: flex; justify-content: space-between; padding: 12px 24px 6px; font-size: .72em; color: var(--gx-dim); flex-shrink: 0; }
.gx-phone .phone-body { flex: 1; overflow-y: auto; padding: 6px 18px 14px; }
.gx-phone .phone-tabbar {
  display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--gx-line);
  background: rgba(10, 21, 32, .96); padding: 8px 0 14px; flex-shrink: 0;
}
.gx-phone .phone-tabbar button {
  background: none; border: none; color: var(--gx-faint); font-size: .68em; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--gx-font); transition: color .2s;
}
.gx-phone .phone-tabbar button.active { color: var(--gx-accent); }
.gx-phone .phone-tabbar .tab-ico { font-size: 1.35em; line-height: 1; }

/* ---------- 桌面窗口模拟框 ---------- */
.gx-window {
  width: 100%; max-width: 1180px; margin: auto; background: var(--gx-800);
  border-radius: 14px; border: 1px solid var(--gx-line-strong); overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .55), var(--gx-glow);
}
.gx-window-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0b1724; border-bottom: 1px solid var(--gx-line); }
.gx-window-bar .lights { display: flex; gap: 7px; }
.gx-window-bar .lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.gx-window-bar .win-title { font-size: .8em; color: var(--gx-dim); margin-left: 6px; }
.gx-window-body { display: grid; grid-template-columns: 216px 1fr; min-height: 620px; }

/* ---------- 平台端顶部导航 ---------- */
.gx-nav { position: sticky; top: 0; z-index: 100; background: rgba(13, 27, 42, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gx-line); }
.gx-nav .nav-inner { max-width: 1360px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; height: 58px; }
.gx-nav .nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .5px; color: var(--gx-text); flex: 0 0 auto; }
.gx-nav .nav-brand .mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--gx-accent), var(--gx-600)); display: grid; place-items: center; color: var(--gx-800); font-weight: 800; font-size: .85em; }
.gx-nav .nav-links { display: flex; gap: 3px; list-style: none; align-items: center; overflow-x: auto; }
.gx-nav .nav-links a { color: var(--gx-dim); font-size: .87em; padding: 7px 13px; border-radius: 8px; transition: all .2s; white-space: nowrap; display: block; }
.gx-nav .nav-links a:hover { color: var(--gx-text); background: rgba(163, 191, 250, .07); }
.gx-nav .nav-links a.active { color: var(--gx-accent); background: var(--gx-accent-dim); font-weight: 600; }
@media (max-width: 1080px) { .gx-nav .nav-links { display: none; } }

/* ---------- 页面容器 ---------- */
.gx-page { max-width: 1360px; margin: 0 auto; padding: 26px 24px 60px; }
.gx-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.gx-page-head h1 { font-size: 1.55em; font-weight: 700; }
.gx-page-head p { color: var(--gx-dim); font-size: .9em; margin-top: 5px; }
.gx-live-badge { display: inline-flex; align-items: center; gap: 7px; font-size: .78em; color: var(--gx-ok); background: rgba(126, 224, 200, .1); border: 1px solid rgba(126, 224, 200, .25); padding: 5px 12px; border-radius: 20px; }

/* ---------- 筛选按钮组 ---------- */
.gx-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.gx-filters button {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--gx-line); color: var(--gx-dim);
  padding: 6px 15px; border-radius: 20px; font-size: .8em; cursor: pointer; font-family: var(--gx-font); transition: all .2s;
}
.gx-filters button:hover { color: var(--gx-text); border-color: var(--gx-line-strong); }
.gx-filters button.active { background: var(--gx-accent-dim); border-color: var(--gx-line-strong); color: var(--gx-accent); font-weight: 600; }

/* ---------- 输入框 ---------- */
.gx-input {
  background: rgba(255, 255, 255, .05); border: 1px solid var(--gx-line); border-radius: var(--gx-radius-sm);
  padding: 7px 14px; color: var(--gx-text); font-family: var(--gx-font); font-size: .85em; outline: none; transition: border-color .2s;
}
.gx-input:focus { border-color: var(--gx-line-strong); }
.gx-input::placeholder { color: var(--gx-faint); }

/* ---------- 固定表头滚动区 ---------- */
.gx-tbl-scroll { max-height: 470px; overflow-y: auto; }
.gx-tbl-scroll thead th { position: sticky; top: 0; background: #0f1e2e; z-index: 2; }

/* ---------- 底部信息 ---------- */
.gx-foot { text-align: center; color: var(--gx-faint); font-size: .78em; padding: 26px 20px; border-top: 1px solid var(--gx-line); }

/* ---------- 动效 ---------- */
@keyframes gxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes gxFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gx-fade { animation: gxFadeIn .5s ease both; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .gx-shell { grid-template-columns: 1fr; }
  .gx-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .gx-side .nav-label, .gx-side .side-foot { display: none; }
  .gx-side .brand { border: none; padding-bottom: 0; margin-bottom: 0; }
  .gx-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gx-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gx-window-body { grid-template-columns: 1fr; }
  .gx-main { padding: 18px 16px 40px; }
}
@media (max-width: 560px) {
  .gx-grid-2, .gx-grid-3, .gx-grid-4 { grid-template-columns: 1fr; }
  .gx-title { font-size: 1.4em; }
}
