/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */

:root {
  /* Color Palette - Light Theme */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-subtle-hover: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.85);

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

  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #3b82f6;

  /* Primary Brand */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --primary-text: #1d4ed8;

  /* Morpheme Accent Colors */
  /* Root (词根): Emerald / Teal */
  --color-root: #0d9488;
  --color-root-hover: #0f766e;
  --color-root-bg: #f0fdfa;
  --color-root-border: #99f6e4;
  --color-root-text: #0f766e;
  --color-root-glow: rgba(13, 148, 136, 0.15);

  /* Prefix (前缀): Amber / Warm Orange */
  --color-prefix: #d97706;
  --color-prefix-hover: #b45309;
  --color-prefix-bg: #fffbeb;
  --color-prefix-border: #fde68a;
  --color-prefix-text: #b45309;
  --color-prefix-glow: rgba(217, 119, 6, 0.15);

  /* Suffix (后缀): Violet / Purple */
  --color-suffix: #7c3aed;
  --color-suffix-hover: #6d28d9;
  --color-suffix-bg: #f5f3ff;
  --color-suffix-border: #ddd6fe;
  --color-suffix-text: #6d28d9;
  --color-suffix-glow: rgba(124, 58, 237, 0.15);

  /* Base Word / Infix / Other */
  --color-base: #3b82f6;
  --color-base-bg: #eff6ff;
  --color-base-border: #bfdbfe;
  --color-base-text: #1d4ed8;

  /* CEFR Badges */
  --cefr-a1: #10b981;
  --cefr-a2: #059669;
  --cefr-b1: #0284c7;
  --cefr-b2: #2563eb;
  --cefr-c1: #7c3aed;
  --cefr-c2: #db2777;

  /* Exam Badges */
  --exam-zk: #10b981;
  --exam-gk: #0284c7;
  --exam-cet4: #6366f1;
  --exam-cet6: #8b5cf6;
  --exam-ky: #ec4899;
  --exam-toefl: #f59e0b;
  --exam-ielts: #ef4444;
  --exam-gre: #831843;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Spacing & Sizes - Compact & Comfortable */
  --header-height: 52px;
  --sidebar-width: 220px;
  --bottom-nav-height: 54px;
  --container-max: 1400px;

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-indices */
  --z-base: 1;
  --z-sticky: 100;
  --z-header: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;
}
