/* ============================================================
   Design Tokens — 个人设计系统的基础变量
   所有组件都基于这些变量，改一处全局生效
   ============================================================ */

:root {
  /* ── Color Palette ────────────────────────────────────── */
  /* 主色：靛蓝紫，现代感强，适合 SaaS / 产品页 */
  --color-primary:       #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark:  #4f46e5;
  --color-primary-ghost: rgba(99, 102, 241, 0.08);

  /* 辅助色：青色，用于成功/积极状态 */
  --color-secondary:       #06b6d4;
  --color-secondary-light: #22d3ee;
  --color-secondary-dark:  #0891b2;

  /* 语义色 */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger:  #ef4444;
  --color-info:    #3b82f6;

  /* 中性色 — 冷灰色系 */
  --color-bg:        #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-muted:  #f1f5f9;
  --color-surface:   #ffffff;
  --color-border:    #e2e8f0;
  --color-border-hover: #cbd5e1;

  --color-text:        #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted:  #94a3b8;
  --color-text-inverse: #ffffff;

  /* ── Typography ───────────────────────────────────────── */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-display: 'Inter', var(--font-sans);

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */

  --leading-tight:  1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ── Spacing ──────────────────────────────────────────── */
  --space-0:   0;
  --space-1:   0.25rem;   /* 4px */
  --space-2:   0.5rem;    /* 8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */

  /* ── Border Radius ────────────────────────────────────── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ── Shadows ──────────────────────────────────────────── */
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:   0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:   0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl:   0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

  /* ── Transitions ──────────────────────────────────────── */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:      cubic-bezier(0.4, 0, 1, 1);
  --ease-out:     cubic-bezier(0, 0, 0.2, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;

  /* ── Breakpoints (for reference) ──────────────────────── */
  /* sm: 640px | md: 768px | lg: 1024px | xl: 1280px | 2xl: 1536px */

  /* ── Z-Index Scale ────────────────────────────────────── */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
}

/* ── Dark Mode (ready to use) ──────────────────────────── */
[data-theme="dark"] {
  --color-bg:        #0f172a;
  --color-bg-subtle: #1e293b;
  --color-bg-muted:  #334155;
  --color-surface:   #1e293b;
  --color-border:    #334155;
  --color-border-hover: #475569;

  --color-text:        #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted:  #64748b;

  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:   0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg:   0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl:   0 20px 25px rgba(0, 0, 0, 0.3);
}
