/* ============================================================
   国安盾 · 全站深浅主题覆盖（2026-11-16）
   · 默认浅色（页面原样）；<html data-theme="dark"> 时本文件生效
   · 按各页面既有的 CSS 变量体系覆盖，原页面样式/HTML/JS 逐字保留
   · 顶部导航 .gdh-* 保持深蓝不动 —— 本文件不覆盖任何 .gdh- 颜色
   · 顶部切换按钮 .gdh-theme-btn 浅/深两态通用（深蓝底上的浅色图标）
   ============================================================ */

/* ---------- 顶部深浅切换按钮（深蓝底通用，不随主题变色） ---------- */
.gdh-theme-btn{
  flex:0 0 auto;width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:50%;cursor:pointer;font-family:inherit;
  border:1px solid rgba(148,180,230,.32);background:rgba(96,140,210,.12);color:#cddcf3;
  transition:background .18s,border-color .18s,color .18s,transform .18s;}
.gdh-theme-btn:hover{background:rgba(96,140,210,.26);border-color:rgba(148,180,230,.6);
  color:#fff;transform:translateY(-1px);}
.gdh-theme-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.gdh-theme-btn svg path[d^="M20.5"]{fill:currentColor;stroke:none;}
@media(max-width:720px){.gdh-theme-btn{width:32px;height:32px;}.gdh-theme-btn svg{width:16px;height:16px;}}

/* ============================================================
   深色模式：按页面变量体系集中覆盖
   ============================================================ */
html[data-theme="dark"]{
  color-scheme:dark;
  --global-bg:#0a101c;
}

/* ---------- market / acquire / app / forgot-lock（--text/--card/--bg 体系） ---------- */
html[data-theme="dark"] body{
  background:#0a101c !important;
}
html[data-theme="dark"]{
  --bg:#0d1523;--card:#111c2e;--panel2:#16223a;
  --text:#e6ecf7;--muted:#9aabc4;--line:#22304a;--line2:#2c3b57;
  --gh-line:#263550;--gh-link:#7aa2ff;--gh-head:#16223a;--gh-canvas:#0d1523;--gh-border:#22304a;
}
/* 这几个页面大量硬编码白底卡片，统一收拢 */
html[data-theme="dark"] .card,
html[data-theme="dark"] .mcard,
html[data-theme="dark"] .acard,
html[data-theme="dark"] .fcard,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .box,
html[data-theme="dark"] .surface{background:#111c2e !important;border-color:#22304a !important;color:#e6ecf7;}

/* ---------- uc.html（--bg/--card/--panel2/--panel3 体系） ---------- */
html[data-theme="dark"]{
  --bg:#0a101c;--card:#111c2e;--panel2:#16223a;--panel3:#1b2a45;
  --line:#22304a;--line2:#2c3b57;--text:#e6ecf7;--muted:#9aabc4;
}

/* ---------- docs/sdk.html（--text/--muted/--bg/--card 体系） ---------- */
html[data-theme="dark"]{
  --text:#e6ecf7;--muted:#9aabc4;--bg:#0a101c;--card:#111c2e;
  --darkline:rgba(255,255,255,.1);--dtext:#e6ecf7;--dmuted:#9aabc4;
}

/* ---------- changelog.php（--cl-* 体系） ---------- */
html[data-theme="dark"]{
  --cl-ink:#e6ecf7;--cl-ink2:#c7d4e8;--cl-body:#a9b8d0;--cl-mute:#8395b0;
  --cl-line:#22304a;--cl-line2:#1a2740;--cl-bg:#0a101c;--cl-paper:#111c2e;
  --cl-stable-bg:#122a20;--cl-stable-line:#265c45;
  --cl-beta-bg:#1a2740;--cl-beta-line:#2c3b57;
}

/* ---------- protocol.php（--ink/--muted/--line/--bg 体系） ---------- */
html[data-theme="dark"]{
  --ink:#e6ecf7;--muted:#9aabc4;--line:#22304a;--bg:#0a101c;
}

/* ---------- social.html（--bg/--surface/--ink 体系，来自 social.css） ---------- */
html[data-theme="dark"]{
  --bg:#0a101c;--surface:#111c2e;--ink:#e6ecf7;--ink2:#c7d4e8;
  --muted:#9aabc4;--line:#22304a;--line2:#2c3b57;
}

/* ---------- 通用文字/输入框深色兜底（变量体系之外的散落元素） ---------- */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{
  background:#0d1523;color:#e6ecf7;border-color:#2c3b57;}
html[data-theme="dark"] ::placeholder{color:#6f809c;}

/* ---------- 深色模式：正文默认浅色字（各页自有深色字规则在各自页内覆盖） ---------- */
html[data-theme="dark"] body{color:#c7d4e8;}
/* 主色按钮保留白字 */
html[data-theme="dark"] a[class*="btn"],
html[data-theme="dark"] .nbtn.pri{color:#fff !important;}
