theme.css 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* theme.css —— 全局设计变量(唯一色值来源;组件内只引用 --fx-* 变量) */
  2. :root {
  3. --fx-violet: #6C5CE7;
  4. --fx-violet-light: #A78BFA;
  5. --fx-blue: #3B82F6;
  6. --fx-cyan: #00D2FF;
  7. --fx-bg: #F8F9FC;
  8. --fx-bg-deep: #060913;
  9. --fx-surface: #FFFFFF;
  10. --fx-surface-2: #F1F3F8;
  11. --fx-surface-glass: rgba(255, 255, 255, 0.72);
  12. --fx-text: #111528;
  13. --fx-text-2: #5B6178;
  14. --fx-text-3: #8A90A6;
  15. --fx-line: #E4E7F0;
  16. --fx-line-strong: #CDD2E0;
  17. --fx-ok: #10B981;
  18. --fx-warn: #F59E0B;
  19. --fx-bad: #EF4444;
  20. --fx-grad: linear-gradient(135deg, var(--fx-violet) 0%, var(--fx-blue) 60%, var(--fx-cyan) 100%);
  21. --fx-grad-soft: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(0, 210, 255, 0.10));
  22. --fx-radius: 16px;
  23. --fx-radius-sm: 10px;
  24. --fx-radius-pill: 999px;
  25. --fx-shadow: 0 6px 24px rgba(17, 21, 40, 0.08);
  26. --fx-shadow-lg: 0 18px 48px rgba(17, 21, 40, 0.14);
  27. --fx-glass: saturate(160%) blur(18px);
  28. --fx-font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  29. --fx-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  30. --fx-safe-t: env(safe-area-inset-top, 0px);
  31. --fx-safe-b: env(safe-area-inset-bottom, 0px);
  32. --fx-safe-l: env(safe-area-inset-left, 0px);
  33. --fx-safe-r: env(safe-area-inset-right, 0px);
  34. --fx-topbar-h: 56px;
  35. color-scheme: light;
  36. }
  37. @media (prefers-color-scheme: dark) {
  38. body { background: #000; }
  39. :root {
  40. --fx-bg: #060913;
  41. --fx-surface: #0E1326;
  42. --fx-surface-2: #151B33;
  43. --fx-surface-glass: rgba(14, 19, 38, 0.72);
  44. --fx-text: #EEF1FA;
  45. --fx-text-2: #A7AEC6;
  46. --fx-text-3: #6E7691;
  47. --fx-line: #232B47;
  48. --fx-line-strong: #354066;
  49. --fx-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  50. color-scheme: dark;
  51. }
  52. }
  53. * { box-sizing: border-box; }
  54. html, body { margin: 0; padding: 0; }
  55. html { -webkit-text-size-adjust: 100%; }
  56. body {
  57. font-family: var(--fx-font);
  58. background: #fff;
  59. color: var(--fx-text);
  60. font-size: 15px;
  61. line-height: 1.5;
  62. overscroll-behavior-y: none;
  63. -webkit-tap-highlight-color: transparent;
  64. }
  65. a { color: var(--fx-violet); }
  66. button, input, select { font-family: inherit; }
  67. .boot { padding: 48px 20px; text-align: center; color: var(--fx-text-3); }