app.css 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /* 使用系统字体栈,避免依赖外部CDN */
  2. @tailwind base;
  3. @tailwind components;
  4. @tailwind utilities;
  5. @layer base {
  6. :root {
  7. /* 使用系统字体:PingFang SC (macOS), 苹方-简 (iOS), 微软雅黑 (Windows), 文泉驿微米黑 (Linux) */
  8. --font-sans: 'PingFang SC', 'PingFang SC Regular', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  9. }
  10. body {
  11. @apply bg-slate-50 text-slate-900 font-sans antialiased;
  12. }
  13. /* 平滑滚动 */
  14. html {
  15. scroll-behavior: smooth;
  16. }
  17. /* 自定义滚动条 */
  18. ::-webkit-scrollbar {
  19. @apply w-2 h-2;
  20. }
  21. ::-webkit-scrollbar-track {
  22. @apply bg-slate-100 rounded-lg;
  23. }
  24. ::-webkit-scrollbar-thumb {
  25. @apply bg-slate-300 rounded-lg hover:bg-slate-400 transition-colors duration-200;
  26. }
  27. ::-webkit-scrollbar-thumb:hover {
  28. @apply bg-slate-400;
  29. }
  30. }
  31. @layer components {
  32. /* Filament 登录页面定制 */
  33. .fi-logo {
  34. display: none !important;
  35. }
  36. .fi-logo::after {
  37. content: '数学知识图谱管理系统' !important;
  38. display: inline-block !important;
  39. font-size: 1.25rem !important;
  40. font-weight: 600 !important;
  41. color: #0ea5e9 !important;
  42. }
  43. /* 玻璃态面板 */
  44. .glass-panel {
  45. @apply rounded-2xl border border-white/20 bg-white/70 shadow-lg backdrop-blur-md transition-all duration-300 hover:shadow-xl dark:border-white/10 dark:bg-slate-900/60;
  46. }
  47. /* 卡片组件 */
  48. .metric-card {
  49. @apply rounded-xl border border-slate-200/80 bg-white/90 px-6 py-5 shadow-sm transition-all duration-300 hover:shadow-md hover:scale-[1.02] dark:border-slate-700/80 dark:bg-slate-900/50;
  50. }
  51. /* 渐变背景 */
  52. .gradient-bg {
  53. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  54. }
  55. .gradient-bg-light {
  56. background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  57. }
  58. /* 现代化按钮 */
  59. .btn-modern {
  60. @apply relative inline-flex items-center justify-center px-6 py-3 text-sm font-medium text-white bg-primary-600 rounded-lg shadow-md transition-all duration-300 hover:bg-primary-700 hover:shadow-lg hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 active:scale-95;
  61. }
  62. .btn-modern-outline {
  63. @apply relative inline-flex items-center justify-center px-6 py-3 text-sm font-medium text-primary-600 bg-transparent border border-primary-600 rounded-lg shadow-sm transition-all duration-300 hover:bg-primary-50 hover:shadow-md hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 active:scale-95;
  64. }
  65. /* 输入框样式 */
  66. .input-modern {
  67. @apply w-full px-4 py-3 text-sm border border-slate-300 rounded-lg transition-all duration-200 focus:border-primary-500 focus:ring-2 focus:ring-primary-200 focus:outline-none hover:border-slate-400 dark:bg-slate-800 dark:border-slate-600 dark:text-slate-100 dark:hover:border-slate-500;
  68. }
  69. /* 表格样式增强 */
  70. .table-modern {
  71. @apply w-full border-collapse overflow-hidden rounded-lg shadow-sm border border-slate-200 dark:border-slate-700;
  72. }
  73. .table-modern thead th {
  74. @apply px-6 py-4 text-left text-xs font-semibold text-slate-600 uppercase tracking-wider bg-slate-50/50 dark:bg-slate-800/50 dark:text-slate-300;
  75. }
  76. .table-modern tbody tr {
  77. @apply transition-colors duration-200 hover:bg-slate-50/70 dark:hover:bg-slate-800/50;
  78. }
  79. .table-modern tbody td {
  80. @apply px-6 py-4 text-sm text-slate-900 border-t border-slate-200 dark:border-slate-700 dark:text-slate-100;
  81. }
  82. /* 导航栏样式 */
  83. .navbar-modern {
  84. @apply backdrop-blur-md bg-white/80 shadow-sm border-b border-slate-200/50 dark:bg-slate-900/80 dark:border-slate-700/50;
  85. }
  86. /* 侧边栏样式 */
  87. .sidebar-modern {
  88. @apply bg-white border-r border-slate-200 dark:bg-slate-900 dark:border-slate-700;
  89. }
  90. /* 页面标题 */
  91. .page-title {
  92. @apply text-3xl font-bold text-slate-900 mb-2 dark:text-white;
  93. }
  94. .page-subtitle {
  95. @apply text-sm text-slate-600 dark:text-slate-400;
  96. }
  97. /* 状态指示器 */
  98. .status-online {
  99. @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-400;
  100. }
  101. .status-offline {
  102. @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900/50 dark:text-red-400;
  103. }
  104. .status-pending {
  105. @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-400;
  106. }
  107. /* 加载动画 */
  108. .loading-spinner {
  109. @apply inline-block w-4 h-4 border-2 border-slate-300 border-t-primary-600 rounded-full animate-spin;
  110. }
  111. /* 动画效果 */
  112. .animate-fade-in {
  113. @apply animate-fadeIn;
  114. }
  115. .animate-slide-up {
  116. @apply animate-slideUp;
  117. }
  118. /* 毛玻璃效果 */
  119. .frosted-glass {
  120. @apply bg-white/10 backdrop-blur-lg border border-white/20 shadow-xl;
  121. }
  122. .frosted-glass-dark {
  123. @apply bg-slate-900/10 backdrop-blur-lg border border-slate-700/20 shadow-xl;
  124. }
  125. /* 悬停效果 */
  126. .hover-lift {
  127. @apply transition-transform duration-300 hover:-translate-y-1 hover:shadow-lg;
  128. }
  129. /* 统计卡片特殊样式 */
  130. .stat-card {
  131. @apply relative overflow-hidden rounded-xl border border-slate-200 bg-gradient-to-br from-white to-slate-50 p-6 shadow-sm transition-all duration-300 hover:shadow-md hover:border-primary-200 dark:border-slate-700 dark:from-slate-800 dark:to-slate-900 dark:hover:border-primary-800;
  132. }
  133. .stat-card::before {
  134. content: '';
  135. @apply absolute inset-0 bg-gradient-to-br from-primary-500/10 to-transparent opacity-0 transition-opacity duration-300;
  136. }
  137. .stat-card:hover::before {
  138. @apply opacity-100;
  139. }
  140. /* 徽章样式 */
  141. .badge-modern {
  142. @apply inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium transition-colors duration-200;
  143. }
  144. .badge-primary {
  145. @apply bg-primary-100 text-primary-800 dark:bg-primary-900/50 dark:text-primary-300;
  146. }
  147. .badge-secondary {
  148. @apply bg-secondary-100 text-secondary-800 dark:bg-secondary-900/50 dark:text-secondary-300;
  149. }
  150. .badge-success {
  151. @apply bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-400;
  152. }
  153. .badge-warning {
  154. @apply bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-400;
  155. }
  156. .badge-error {
  157. @apply bg-red-100 text-red-800 dark:bg-red-900/50 dark:text-red-400;
  158. }
  159. /* 分割线 */
  160. .divider-modern {
  161. @apply my-6 border-0 border-t border-slate-200 dark:border-slate-700;
  162. }
  163. }
  164. @layer utilities {
  165. /* 文字渐变 */
  166. .text-gradient {
  167. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  168. -webkit-background-clip: text;
  169. -webkit-text-fill-color: transparent;
  170. background-clip: text;
  171. }
  172. /* 隐藏滚动条 */
  173. .no-scrollbar {
  174. -ms-overflow-style: none;
  175. scrollbar-width: none;
  176. }
  177. .no-scrollbar::-webkit-scrollbar {
  178. display: none;
  179. }
  180. /* 混合模式 */
  181. .mix-blend-multiply {
  182. mix-blend-mode: multiply;
  183. }
  184. .mix-blend-screen {
  185. mix-blend-mode: screen;
  186. }
  187. }