/* base.css — 变量、重置、滚动条、排版 */
/* ==========================================================================
   GitHub 风格设计系统
   ========================================================================== */

:root {
  --canvas: #0d1117;
  --canvas-subtle: #161b22;
  --canvas-inset: #010409;
  --canvas-overlay: #1c2128;
  --border: #30363d;
  --border-muted: #21262d;
  --fg: #e6edf3;
  --fg-muted: #8b949e;
  --fg-subtle: #6e7681;
  --accent: #2f81f7;
  --accent-fg: #58a6ff;
  --accent-subtle: rgba(56, 139, 253, 0.15);
  --success: #3fb950;
  --success-emphasis: #238636;
  --success-subtle: rgba(46, 160, 67, 0.15);
  --danger: #f85149;
  --danger-subtle: rgba(248, 81, 73, 0.14);
  --attention: #d29922;
  --attention-subtle: rgba(210, 153, 34, 0.15);
  --done: #a371f7;
  --done-subtle: rgba(163, 113, 247, 0.15);
  --shadow: 0 8px 24px rgba(1, 4, 9, 0.6);
  --radius: 6px;
  --sidebar: 264px;
}

[data-theme="light"] {
  --canvas: #ffffff;
  --canvas-subtle: #f6f8fa;
  --canvas-inset: #f6f8fa;
  --canvas-overlay: #ffffff;
  --border: #d0d7de;
  --border-muted: #e4e8ec;
  --fg: #1f2328;
  --fg-muted: #656d76;
  --fg-subtle: #8b949e;
  --accent: #0969da;
  --accent-fg: #0969da;
  --accent-subtle: rgba(9, 105, 218, 0.1);
  --success: #1a7f37;
  --success-emphasis: #1f883d;
  --success-subtle: rgba(26, 127, 55, 0.1);
  --danger: #cf222e;
  --danger-subtle: rgba(207, 34, 46, 0.1);
  --attention: #9a6700;
  --attention-subtle: rgba(154, 103, 0, 0.1);
  --done: #8250df;
  --done-subtle: rgba(130, 80, 223, 0.1);
  --shadow: 0 8px 24px rgba(140, 149, 159, 0.3);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }

a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

::selection { background: rgba(56, 139, 253, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; border: 2px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--fg-subtle); }

.boot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 100vh; color: var(--fg-muted); font-size: 14px;
}

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
