/* 基础样式 - 重置与排版 */
@import url('https://fonts.googleapis.cn/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 16px;
scroll-behavior: smooth;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
font-family: var(--font-primary);
font-size: var(--text-base);
line-height: 1.6;
color: var(--color-text);
background-color: var(--color-white);
min-height: 100vh;
overflow-x: hidden;
}
/* 排版 */
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading);
font-weight: 600;
line-height: 1.3;
color: var(--color-text);
}
h1 {
font-size: var(--text-5xl);
font-weight: 700;
}
h2 {
font-size: var(--text-4xl);
font-weight: 600;
}
h3 {
font-size: var(--text-3xl);
}
h4 {
font-size: var(--text-2xl);
}
h5 {
font-size: var(--text-xl);
}
h6 {
font-size: var(--text-lg);
}
p {
margin-bottom: var(--space-4);
color: var(--color-text-secondary);
}
a {
color: var(--color-primary);
text-decoration: none;
transition: color var(--transition-fast);
}
a:hover {
color: var(--color-primary-dark);
}
/* 列表 */
ul, ol {
list-style: none;
}
/* 图片 */
img {
max-width: 100%;
height: auto;
display: block;
}
/* 表单元素 */
button, input, textarea, select {
font-family: inherit;
font-size: inherit;
line-height: inherit;
color: inherit;
}
button {
cursor: pointer;
border: none;
background: none;
}
input:focus, textarea:focus, select:focus {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
}
/* 选中样式 */
::selection {
background-color: var(--color-primary);
color: var(--color-white);
}
/* 滚动条 */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
background: var(--color-text-muted);
border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
background: var(--color-text-secondary);
}
/* 工具类 */
.container {
width: 100%;
max-width: var(--container-max);
margin: 0 auto;
padding: 0 var(--space-6);
}
.container-narrow {
max-width: var(--container-narrow);
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.text-center {
text-align: center;
}
.text-primary {
color: var(--color-primary);
}
.text-secondary {
color: var(--color-secondary);
}
.text-muted {
color: var(--color-text-muted);
}
/* 区块间距 */
.section {
padding: var(--space-20) 0;
}
.section-lg {
padding: var(--space-24) 0;
}
.section-sm {
padding: var(--space-12) 0;
}
/* 响应式排版 */
@media (max-width: 768px) {
h1 {
font-size: var(--text-4xl);
}
h2 {
font-size: var(--text-3xl);
}
h3 {
font-size: var(--text-2xl);
}
.container {
padding: 0 var(--space-4);
}
.section {
padding: var(--space-12) 0;
}
}