/* ─────────────────────────────────────────────────────────────
   夜叉 · default theme tokens
   色系取自 u.sb：白卡片 + 浅灰底 + 黑字 + 细描边，几乎不用彩色。
   规则：组件样式只允许引用 token，不允许写死颜色 / 圆角 / 间距。
   ───────────────────────────────────────────────────────────── */

:root,
[data-theme="light"] {
  /* 底色与表面 */
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-surface-2: #fafbfc;
  --color-surface-hover: #f2f4f7;
  --color-border: #ebedf0;
  --color-border-strong: #dcdfe4;

  /* 文字 */
  --color-text: #111111;
  --color-text-secondary: #5a6068;
  --color-text-muted: #8a8f98;
  --color-text-inverse: #ffffff;

  /* 强调色：默认就是黑，靠粗细和间距做层级 */
  --color-accent: #111111;
  --color-accent-hover: #000000;
  --color-accent-contrast: #ffffff;

  /* 状态色：只在必要处出现，不做大面积铺色 */
  --color-success: #1a7f47;
  --color-warning: #9a6a00;
  --color-danger: #b42318;
  --color-info: #1f5f99;

  /* 队标（阵营战等） */
  --color-team-blue: #2563eb;
  --color-team-red: #dc2626;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 26px;
  --text-3xl: 34px;

  --leading-tight: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* 间距 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* 投影：只做极轻的浮起感 */
  --shadow-card: 0 1px 2px rgba(17, 17, 17, 0.04), 0 1px 1px rgba(17, 17, 17, 0.03);
  --shadow-pop: 0 8px 24px rgba(17, 17, 17, 0.08);
  --shadow-focus: 0 0 0 3px rgba(17, 17, 17, 0.12);

  /* 布局 */
  --content-width: 1200px;
  --sidebar-width: 280px;
  --gutter: var(--space-6);
  --row-gap: var(--space-3);

  /* 动效 */
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
}

[data-theme="dark"] {
  --color-bg: #0f1115;
  --color-surface: #16181d;
  --color-surface-2: #1b1e24;
  --color-surface-hover: #22262d;
  --color-border: #262a31;
  --color-border-strong: #333944;

  --color-text: #e8eaed;
  --color-text-secondary: #a8adb5;
  --color-text-muted: #6e747d;
  --color-text-inverse: #0f1115;

  --color-accent: #e8eaed;
  --color-accent-hover: #ffffff;
  --color-accent-contrast: #0f1115;

  --color-success: #4ade80;
  --color-warning: #fbbf24;
  --color-danger: #f87171;
  --color-info: #60a5fa;

  --shadow-card: none;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-focus: 0 0 0 3px rgba(232, 234, 237, 0.18);
}

/* 字号密度档位：只改根字号，组件按 rem 走 */
[data-density="compact"] { font-size: 14px; }
[data-density="normal"] { font-size: 15px; }
[data-density="comfortable"] { font-size: 16px; }

/* 宽度档位 */
[data-width="narrow"] { --content-width: 1000px; }
[data-width="default"] { --content-width: 1200px; }
[data-width="full"] { --content-width: 100%; }

/* RTL 就绪：只用逻辑属性，不写 left/right */
html[dir="rtl"] {
  --font-sans: "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif;
}
