/* ==========================================================================
   设计令牌（Design Tokens）
   --------------------------------------------------------------------------
   想换整体风格？只改这个文件即可：
     · 配色     → --accent-* / --bg-* / --text-*
     · 圆角     → --radius-*
     · 间距节奏 → --space-*
     · 动效     → --ease / --dur-*
   ========================================================================== */

:root {
  color-scheme: dark;

  /* ---- 背景层次 ---- */
  --bg: #06060b;
  --bg-soft: #0a0a12;
  --bg-elev: #101019;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.11);
  --surface-solid: #12121c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* ---- 文字 ---- */
  --text: #f4f5fa;
  --text-2: #b9bccd;
  --text-3: #7d8199;
  --text-invert: #08080d;

  /* ---- 品牌色（可用 data-accent 切换）---- */
  --accent: #8b5cff;
  --accent-2: #22d3ee;
  --accent-3: #ff5c9d;
  --accent-soft: rgba(139, 92, 255, 0.16);
  --grad-brand: linear-gradient(120deg, var(--accent), var(--accent-2) 52%, var(--accent-3));
  --grad-text: linear-gradient(100deg, #fff 10%, var(--accent-2) 48%, var(--accent-3) 88%);

  /* ---- 语义色 ---- */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --info: #38bdf8;

  /* ---- 圆角 ---- */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

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

  /* ---- 阴影 ---- */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow: 0 18px 48px -24px rgba(0, 0, 0, 0.85);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 0.95);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 60px -30px var(--accent);

  /* ---- 动效 ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 140ms;
  --dur-2: 260ms;
  --dur-3: 480ms;

  /* ---- 尺寸 ---- */
  --header-h: 68px;
  --container: 1180px;
  --composer-w: 720px;

  /* ---- 字体 ---- */
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    Roboto, Helvetica, Arial, sans-serif;
  --font-display: "SF Pro Display", "Inter", -apple-system, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

/* 亮色主题：给不习惯深色的访客一个开关（右上角切换） */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(255, 255, 255, 0.92);
  --surface-3: rgba(15, 18, 40, 0.06);
  --surface-solid: #ffffff;
  --border: rgba(16, 20, 48, 0.09);
  --border-strong: rgba(16, 20, 48, 0.18);
  --text: #111327;
  --text-2: #454a63;
  --text-3: #767c96;
  --text-invert: #ffffff;
  --accent-soft: rgba(139, 92, 255, 0.12);
  --grad-text: linear-gradient(100deg, #1a1c33 10%, var(--accent) 55%, var(--accent-3) 95%);
  --shadow-sm: 0 2px 8px rgba(20, 24, 60, 0.08);
  --shadow: 0 18px 44px -26px rgba(20, 24, 60, 0.35);
  --shadow-lg: 0 40px 90px -44px rgba(20, 24, 60, 0.4);
}

/* ---- 主题色预设：<html data-accent="sunset"> ---- */
[data-accent="sunset"] {
  --accent: #ff8a4c;
  --accent-2: #ff5c9d;
  --accent-3: #ffd166;
  --accent-soft: rgba(255, 138, 76, 0.16);
}
[data-accent="ocean"] {
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --accent-3: #22d3ee;
  --accent-soft: rgba(56, 189, 248, 0.16);
}
[data-accent="forest"] {
  --accent: #34d399;
  --accent-2: #22d3ee;
  --accent-3: #a3e635;
  --accent-soft: rgba(52, 211, 153, 0.16);
}
[data-accent="mono"] {
  --accent: #e5e7eb;
  --accent-2: #9ca3af;
  --accent-3: #6b7280;
  --accent-soft: rgba(229, 231, 235, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 0ms;
    --dur-2: 0ms;
    --dur-3: 0ms;
  }
}
