/* =====================================================
   base.css — 设计变量 / 重置 / 基础排版 / 深色模式
   ===================================================== */

:root {
  /* 品牌色 */
  --primary: #6366f1;
  --primary-2: #0ea5e9;
  --primary-grad: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);

  /* 中性色 */
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, .06);
  --text: #111827;
  --text-2: #6b7280;
  --text-3: #9ca3af;

  /* 组件色 */
  --header-bg: rgba(255, 255, 255, .78);
  --input-bg: #ffffff;
  --hover-shadow: 0 12px 32px rgba(99, 102, 241, .14);
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 深色模式（html 加 .dark 时生效） */
html.dark {
  --bg: #0b1020;
  --bg-soft: #11172b;
  --card-bg: #151c33;
  --card-border: rgba(148, 163, 184, .14);
  --text: #f3f4f6;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --header-bg: rgba(11, 16, 32, .8);
  --input-bg: #1a2138;
  --hover-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .35);
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background .3s ease, color .3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; outline: none; }
ul, ol { list-style: none; }

::selection { background: rgba(99, 102, 241, .25); }

/* ---------- 通用容器 ---------- */
.container {
  width: 100%;
  max-width: 1440px;   /* 网站最大宽度 */
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 140, .3);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 120, 140, .5); background-clip: content-box; }
