/* ==============================================
   CSS 清空默认样式（Normalize + Reset 结合版）
   消除浏览器默认差异，统一基础样式
   ============================================== */

/* 1. 全局重置：清除所有元素的默认内外边距、盒模型统一 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* 边框和内边距不影响元素宽高 */
}

/* 2. 块级元素重置：统一对齐方式、清除默认间距 */
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td,
hr,
button,
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  margin: 0;
  padding: 0;
}

/* 3. 列表元素：清除默认标记（圆点/数字） */
ul,
ol {
  list-style: none;
}

/* 4. 表单元素：重置默认样式（边框、背景、内边距等） */
input,
textarea,
select,
button {
  /* 清除默认边框和轮廓 */
  border: none;
  outline: none;
  /* 清除默认背景（部分浏览器会给按钮/输入框加默认背景） */
  background: transparent;
  /* 统一字体（继承父元素字体，避免表单元素字体不一致） */
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  /* 清除输入框默认内边距和边框 */
  padding: 0;
  margin: 0;
  /* 清除按钮默认外观（如 iOS 按钮圆角、安卓阴影） */
  -webkit-appearance: none;
  appearance: none;
  /* 清除按钮聚焦时的默认轮廓（后续可自定义聚焦样式） */
  -webkit-tap-highlight-color: transparent; /* 清除移动端点击高亮 */
}

/* 5. 按钮：重置默认 cursor（部分浏览器按钮默认不是 pointer） */
button {
  cursor: pointer;
}

/* 6. 文本域：清除默认 resize（可按需开启） */
textarea {
  resize: none; /* 禁止拉伸，如需拉伸可设为 vertical/horizontal */
}

/* 7. 表格：重置边框合并方式 */
table {
  border-collapse: collapse; /* 合并边框 */
  border-spacing: 0; /* 清除边框间距 */
}

/* 8. 图片/媒体元素：响应式基础样式 */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 清除 inline 元素默认空隙 */
  max-width: 100%; /* 响应式缩放，不超出父容器 */
  height: auto; /* 保持宽高比 */
  border: none; /* 清除图片默认边框（老浏览器） */
}

/* 9. 链接元素：清除默认下划线和颜色 */
a {
  text-decoration: none; /* 清除下划线 */
  color: inherit; /* 继承父元素颜色，避免默认蓝色 */
  -webkit-tap-highlight-color: transparent; /* 清除移动端点击高亮 */
}

/* 10. 标题元素：统一字体大小继承（默认 h1-h6 有固定大小） */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit; /* 清除默认加粗，按需自定义 */
}

/* 11. 清除浮动影响（可选，按需使用） */
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* 12. 清除输入框自动填充样式（可选，避免背景变灰） */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px transparent inset; /* 清除填充背景 */
  box-shadow: 0 0 0 1000px transparent inset;
  -webkit-text-fill-color: inherit; /* 保持文字颜色继承 */
  transition: background-color 5000s ease-in-out 0s; /* 延迟填充背景 */
}

/* 13. 统一 body 基础样式（可选，建议添加） */
body {
  font-family: "MicrosoftYaHei";
  font-size: 16px; /* 基础字体大小，按需调整 */
  line-height: 1.5; /* 基础行高，提升可读性 */
  color: #333; /* 基础文本颜色，按需调整 */
  background-color: #fff; /* 基础背景色，按需调整 */
  -webkit-font-smoothing: antialiased; /* 优化字体渲染（webkit 浏览器） */
  -moz-osx-font-smoothing: grayscale; /* 优化字体渲染（Firefox） */
}