global.css 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. }
  7. html, body {
  8. width: 100%;
  9. height: 100%;
  10. overflow: hidden;
  11. }
  12. body {
  13. font-family: var(--font-family);
  14. background: var(--bg-primary);
  15. color: var(--text-primary);
  16. line-height: 1.6;
  17. -webkit-font-smoothing: antialiased;
  18. -moz-osx-font-smoothing: grayscale;
  19. }
  20. #app {
  21. width: 100%;
  22. height: 100%;
  23. }
  24. /* ===== 自定义滚动条 ===== */
  25. ::-webkit-scrollbar {
  26. width: 6px;
  27. height: 6px;
  28. }
  29. ::-webkit-scrollbar-track {
  30. background: transparent;
  31. }
  32. ::-webkit-scrollbar-thumb {
  33. background: rgba(56, 189, 248, 0.2);
  34. border-radius: 3px;
  35. }
  36. ::-webkit-scrollbar-thumb:hover {
  37. background: rgba(56, 189, 248, 0.35);
  38. }
  39. /* ===== 选择高亮 ===== */
  40. ::selection {
  41. background: rgba(37, 99, 235, 0.4);
  42. color: var(--text-primary);
  43. }
  44. /* ===== 毛玻璃通用类 ===== */
  45. .glass {
  46. background: var(--bg-card);
  47. backdrop-filter: blur(16px);
  48. -webkit-backdrop-filter: blur(16px);
  49. border: 1px solid var(--border-color);
  50. }
  51. /* ===== 渐变发光边框 ===== */
  52. .glow-border {
  53. position: relative;
  54. }
  55. .glow-border::before {
  56. content: '';
  57. position: absolute;
  58. inset: 0;
  59. border-radius: inherit;
  60. padding: 1px;
  61. background: var(--gradient-card-border);
  62. -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  63. -webkit-mask-composite: xor;
  64. mask-composite: exclude;
  65. pointer-events: none;
  66. }
  67. /* ===== 渐变文字 ===== */
  68. .gradient-text {
  69. background: var(--gradient-accent);
  70. -webkit-background-clip: text;
  71. -webkit-text-fill-color: transparent;
  72. background-clip: text;
  73. }
  74. /* ===== 动画 ===== */
  75. @keyframes fadeIn {
  76. from { opacity: 0; transform: translateY(10px); }
  77. to { opacity: 1; transform: translateY(0); }
  78. }
  79. @keyframes slideInLeft {
  80. from { opacity: 0; transform: translateX(-20px); }
  81. to { opacity: 1; transform: translateX(0); }
  82. }
  83. @keyframes glow {
  84. 0%, 100% { box-shadow: 0 0 5px rgba(37, 99, 235, 0.2); }
  85. 50% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.4); }
  86. }
  87. @keyframes shimmer {
  88. 0% { background-position: -200% 0; }
  89. 100% { background-position: 200% 0; }
  90. }
  91. .fade-in {
  92. animation: fadeIn var(--transition-normal) ease forwards;
  93. }
  94. /* ===== Naive UI 深色主题覆盖 ===== */
  95. .n-button--primary-type {
  96. background: var(--gradient-accent) !important;
  97. border: none !important;
  98. }
  99. .n-card {
  100. background: var(--bg-card) !important;
  101. border-color: var(--border-color) !important;
  102. }
  103. .n-modal {
  104. background: var(--bg-secondary) !important;
  105. border: 1px solid var(--border-color) !important;
  106. }
  107. .n-input {
  108. background: var(--bg-tertiary) !important;
  109. border-color: var(--border-color) !important;
  110. color: var(--text-primary) !important;
  111. }
  112. .n-input:focus-within {
  113. border-color: var(--color-primary) !important;
  114. box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
  115. }
  116. .n-dialog {
  117. background: var(--bg-secondary) !important;
  118. border: 1px solid var(--border-color) !important;
  119. }
  120. .n-dialog__title {
  121. color: var(--text-primary) !important;
  122. }
  123. .n-dialog__content {
  124. color: var(--text-secondary) !important;
  125. }
  126. /* ===== 对话框按钮统一风格 ===== */
  127. /* 主操作(确认/保存):蓝色渐变,与页面主按钮一致 */
  128. .n-dialog .n-button--primary-type {
  129. background: var(--gradient-accent) !important;
  130. border: none !important;
  131. color: #fff !important;
  132. }
  133. .n-dialog .n-button--primary-type:hover {
  134. filter: brightness(1.1);
  135. }
  136. /* 取消/次要操作:暗色透明背景,与深色主题融合 */
  137. .n-dialog .n-button--default-type {
  138. background: rgba(56, 189, 248, 0.06) !important;
  139. border: 1px solid var(--border-color) !important;
  140. color: var(--text-secondary) !important;
  141. }
  142. .n-dialog .n-button--default-type:hover {
  143. background: rgba(56, 189, 248, 0.12) !important;
  144. border-color: var(--border-color-hover) !important;
  145. color: var(--text-primary) !important;
  146. }
  147. /* 危险操作(删除/丢弃):红色调 */
  148. .n-dialog .n-button--error-type {
  149. background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
  150. border: none !important;
  151. color: #fff !important;
  152. }
  153. .n-dialog .n-button--error-type:hover {
  154. filter: brightness(1.1);
  155. }
  156. /* 防止意外出现橙黄色 warning 按钮:强制降级为 default 样式 */
  157. .n-dialog .n-button--warning-type {
  158. background: rgba(56, 189, 248, 0.06) !important;
  159. border: 1px solid var(--border-color) !important;
  160. color: var(--text-secondary) !important;
  161. }
  162. .n-dialog .n-button--warning-type:hover {
  163. background: rgba(56, 189, 248, 0.12) !important;
  164. color: var(--text-primary) !important;
  165. }