/* 
   Reset CSS - 重置浏览器默认样式
   这将确保所有浏览器有一致的起点
*/

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* 移除表单元素的默认样式 */
input, textarea, select, button {
  appearance: none;
  border-radius: 0;
  border: none;
  background: none;
}

/* 确保可访问性 - 保留焦点样式 */
:focus {
  outline: 3px solid rgba(0, 122, 255, 0.5);
  outline-offset: 2px;
}

/* 对于使用键盘导航的用户隐藏焦点轮廓，但鼠标点击时显示 */
:focus:not(:focus-visible) {
  outline: none;
}

/* 对屏幕阅读器隐藏内容 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
