/* 全局样式重置 */ * { margin: 0; padding: 0; box-sizing: border-box; } /* 根元素样式 */ :root { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.5; font-weight: 400; /* 自定义颜色变量 */ --primary-color: #ff6b6b; --secondary-color: #ee5a24; --accent-color: #6c5ce7; --success-color: #28a745; --warning-color: #ffc107; --danger-color: #dc3545; --info-color: #17a2b8; --dark-color: #343a40; --light-color: #f8f9fa; --white-color: #ffffff; --text-color: #495057; --text-light: #6c757d; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* 全局元素样式 */ html, body { margin: 0; padding: 0; width: 100%; height: 100%; color: var(--text-color); background-color: var(--light-color); } #app { width: 100%; min-height: 100vh; } /* 标题样式 */ h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.2; color: var(--dark-color); } /* 链接样式 */ a { color: var(--accent-color); text-decoration: none; transition: color 0.3s ease; } a:hover { color: var(--primary-color); text-decoration: underline; } /* 按钮基础样式重置 */ button { font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; transition: all 0.3s ease; } button:focus { outline: none; } /* 输入框基础样式 */ input, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } /* 表格样式重置 */ table { border-collapse: collapse; width: 100%; } /* 滚动条样式 */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #a1a1a1; } /* 工具类 */ .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 3rem; } .mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 3rem; } /* 响应式断点 */ @media (max-width: 768px) { :root { font-size: 14px; } } @media (max-width: 480px) { :root { font-size: 13px; } }