/* ============================================================
 * 全站深色主题（对齐设计交付 tokens.css v1.0）
 * 用法：在 index.html 里放在 app.css 之后，最后加载即覆盖
 * 回滚：删掉 index.html 里的这一行 <link> 即可（不改 app.css）
 * ============================================================ */
:root {
  /* 底 */
  --bg: #0d1026;
  --panel: #141a3a;
  --panel2: #1a2144;
  --line: rgba(255, 255, 255, .12);

  /* 字 */
  --text: #e7e9f5;
  --muted: #9aa3c7;

  /* 强调 */
  --accent: #7c5cf0;
  --accent2: #38a8f0;
  --warn: #d98a1f;
  --danger: #d64545;

  /* 沿用设计系统其余变量（若页面用到） */
  --brand1: #7c5cf0;
  --brand2: #4f6df5;
  --brand3: #38a8f0;
  --gold: #f7c948;
  --bg-deep: #0d1026;
  --bg-base: #141a3a;
  --bg-panel: #1a2144;
  --bg-glass: rgba(255, 255, 255, .06);
  --bg-glass-border: rgba(255, 255, 255, .12);
  --text-dim: #9aa3c7;
  --text-faint: #6b749a;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .35);
  --radius-card: 18px;
}

/* 页面底色与文字，避免局部写死白底 */
html, body {
  background: var(--bg) !important;
  color: var(--text);
}

/* 卡片/面板/表格统一吃变量 */
.card, .panel, .box, .modal, .table, table, .list-item, .course, .problem {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

/* 输入类 */
input, select, textarea {
  background: var(--panel2);
  color: var(--text);
  border-color: var(--line);
}

/* 次要文字 */
.muted, .small, .dim, .hint { color: var(--muted); }

/* 链接/强调按钮 */
a { color: var(--accent2); }

/* 白色斑块在深色下刺眼，统一改成面板色 */
.bg-white, .white, [style*="background:#fff"], [style*="background: #fff"] {
  background: var(--panel) !important;
}
