*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-secondary);
}

h1, h2, h3, h4 {
    line-height: 1.3;
    color: var(--text-primary);
}

h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-md) 0;
}

button {
    font-family: inherit;
    cursor: pointer;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 懒加载图片占位 */
img.lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img.loaded {
    opacity: 1;
}
