﻿/* 1. 使用更理性的盒模型 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. 移除默认边距 */
* {
    margin: 0;
    padding: 0;
}

/* 3. 允许根字号大小由浏览器决定，但使用 rem 单位 */
html:focus-within {
    scroll-behavior: smooth;
}

/* 4. 设置 body 默认行高和无衬线字体 */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 5. 让没有 href 的链接看起来像普通文本 */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* 6. 让图片、视频等媒体元素更友好 */
img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

/* 7. 继承字体样式至表单元素 */
input,
button,
textarea,
select {
    font: inherit;
}

/* 8. 移除所有动画（针对偏好减少动效的用户） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
