/* 复制自 ui-next/src/styles/tokens.css（「极夜」令牌）。官网单独部署，所以留一份副本；那边改了配色时同步过来。 */
/*
 * 「极夜」设计令牌。三套配色只换色板层，语义层和组件只引用语义令牌。
 * 冰川 glacier（默认）/ 星云 nebula / 鎏金 gilded，挂在 <html data-palette>。
 */

:root {
  /* —— 字体 —— */
  --font-sans: "Inter Variable", "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --font-num: "Inter Variable", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 26px;
  --text-3xl: 34px;

  /* —— 间距（4 的倍数） —— */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* —— 圆角 —— */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* —— 外壳尺寸 —— */
  --topbar-h: 52px;
  --rail-w: 68px;
  --rail-w-open: 208px;
  --dock-w: 304px;
  --dock-w-closed: 56px;

  /* —— 动效：时长与曲线（JS 侧同名常量在 src/lib/motion.ts） —— */
  --dur-1: 120ms;  /* 悬停、按下 */
  --dur-2: 200ms;  /* 控件状态 */
  --dur-3: 320ms;  /* 面板、抽屉 */
  --dur-4: 520ms;  /* 页面、转场 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* —— 状态色（三套配色共用，亮度按深底调过） —— */
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.14);
  --warn: #f5b544;
  --warn-soft: rgba(245, 181, 68, 0.14);
  --danger: #ff5d6c;
  --danger-soft: rgba(255, 93, 108, 0.14);
  --live: #ff7a45; /* 游戏中 */
  --live-soft: rgba(255, 122, 69, 0.14);
}

/* ——————————————— 色板：冰川（石墨＋冰蓝） ——————————————— */
:root,
[data-palette="glacier"] {
  --bg-0: #06080b;
  --bg-1: #0b0e13;
  --bg-2: #11151c;
  --surface: rgba(20, 25, 33, 0.58);
  --surface-strong: rgba(24, 30, 40, 0.82);
  --surface-hover: rgba(34, 42, 55, 0.62);
  --surface-solid: #141922;

  --text-1: #e9eef5;
  --text-2: #a3adbb;
  --text-3: #848e9d;
  --text-on-accent: #04111e;

  --accent: #7cc4ff;
  --accent-strong: #4ea8ff;
  --accent-2: #9be7ff;
  --accent-soft: rgba(124, 196, 255, 0.14);
  --accent-glow: rgba(78, 168, 255, 0.45);
  --accent-grad: linear-gradient(135deg, #9be7ff 0%, #4ea8ff 100%);

  --mesh-1: rgba(78, 168, 255, 0.20);
  --mesh-2: rgba(99, 130, 190, 0.16);
  --mesh-3: rgba(155, 231, 255, 0.08);

  --particle: 155, 205, 255;
  --hole-hot: 205, 234, 255;
  --hole-cool: 58, 134, 255;
  --hole-far: 58, 134, 255;
  --geometry: 124, 196, 255;
}

/* ——————————————— 色板：星云（深空＋青紫） ——————————————— */
[data-palette="nebula"] {
  --bg-0: #05060f;
  --bg-1: #0a0b19;
  --bg-2: #101224;
  --surface: rgba(20, 21, 42, 0.56);
  --surface-strong: rgba(24, 25, 50, 0.84);
  --surface-hover: rgba(36, 36, 70, 0.62);
  --surface-solid: #14152b;

  --text-1: #ecebff;
  --text-2: #a9a8c9;
  --text-3: #8988ab;
  --text-on-accent: #0b0620;

  --accent: #8b9cff;
  --accent-strong: #7c6cff;
  --accent-2: #4fe3f0;
  --accent-soft: rgba(139, 156, 255, 0.15);
  --accent-glow: rgba(124, 108, 255, 0.5);
  --accent-grad: linear-gradient(135deg, #4fe3f0 0%, #8b7bff 55%, #c47bff 100%);

  --mesh-1: rgba(124, 108, 255, 0.24);
  --mesh-2: rgba(79, 227, 240, 0.14);
  --mesh-3: rgba(196, 123, 255, 0.12);

  --particle: 170, 175, 255;
  --hole-hot: 238, 200, 255;
  --hole-cool: 120, 86, 255;
  --hole-far: 72, 226, 196;
  --geometry: 139, 156, 255;
}

/* ——————————————— 色板：鎏金（黑＋香槟金） ——————————————— */
[data-palette="gilded"] {
  --bg-0: #080706;
  --bg-1: #0d0c0a;
  --bg-2: #14120f;
  --surface: rgba(30, 27, 22, 0.58);
  --surface-strong: rgba(34, 31, 25, 0.84);
  --surface-hover: rgba(48, 43, 34, 0.62);
  --surface-solid: #1a1814;

  --text-1: #f2ede4;
  --text-2: #b4ab9b;
  --text-3: #938a7a;
  --text-on-accent: #1b1306;

  --accent: #dcbf86;
  --accent-strong: #c9a25c;
  --accent-2: #f3e2b8;
  --accent-soft: rgba(220, 191, 134, 0.14);
  --accent-glow: rgba(201, 162, 92, 0.42);
  --accent-grad: linear-gradient(135deg, #f6e7c1 0%, #d4b06e 60%, #a8823f 100%);

  --mesh-1: rgba(201, 162, 92, 0.16);
  --mesh-2: rgba(120, 96, 60, 0.16);
  --mesh-3: rgba(246, 231, 193, 0.06);

  --particle: 236, 214, 170;
  --hole-hot: 255, 234, 184;
  --hole-cool: 214, 126, 38;
  --hole-far: 255, 92, 66;
  --geometry: 220, 191, 134;
}

/* —— 语义层：边框、阴影、玻璃 —— */
:root {
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --line-highlight: rgba(255, 255, 255, 0.16);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-3: 0 4px 8px rgba(0, 0, 0, 0.35), 0 32px 80px -24px rgba(0, 0, 0, 0.85);

  --glass-blur: 18px;
  --glass-sat: 150%;
}

/* 精简 / 关闭档：去掉毛玻璃，换成更不透明的面，省 GPU */
[data-motion="lite"],
[data-motion="off"] {
  --glass-blur: 0px;
  --surface: var(--surface-strong);
}
