/**
 * Reset CSS
 * 现代浏览器样式重置，确保跨浏览器一致性
 */

/* ========================================
   盒模型重置
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ========================================
   HTML & Body 基础设置
   ======================================== */
html {
  /* 设置根字体大小，便于使用 rem 单位 */
  font-size: 16px;
  /* 平滑滚动 */
  scroll-behavior: smooth;
  /* 文本渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 文本大小调整 */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  /* 行高设置 */
  line-height: 1.5;
  /* 字体渲染优化 */
  text-rendering: optimizeLegibility;
  /* 最小高度 */
  min-height: 100vh;
  /* 思源黑体 */
  font-family: 'Source Han Sans CN', sans-serif;
}
img {
  pointer-events: none; /* 禁止点击、拖拽 */
  user-select: none;    /* 禁止选中 */
  -webkit-user-drag: none; /* 禁止拖拽（webkit内核） */
}

/* ========================================
   标题重置
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* ========================================
   列表重置
   ======================================== */
ul, ol {
  list-style: none;
}

/* ========================================
   链接重置
   ======================================== */
a {
  text-decoration: none;
  color: inherit;
}

/* ========================================
   图片和媒体重置
   ======================================== */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 防止图片被拖拽 */
img {
  user-select: none;
  -webkit-user-drag: none;
}

/* ========================================
   表单元素重置
   ======================================== */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

/* 移除输入框的默认样式 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}



/* 移除搜索框的清除按钮 */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

/* 按钮重置 */
button {
  cursor: pointer;
  /* 移除移动端点击高亮 */
  -webkit-tap-highlight-color: transparent;
}

/* 禁用状态的按钮 */
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========================================
   表格重置
   ======================================== */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========================================
   引用重置
   ======================================== */
blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

/* ========================================
   代码元素重置
   ======================================== */
code,
kbd,
pre,
samp {
  font-family: monospace;
  font-size: 1em;
}

/* ========================================
   隐藏元素
   ======================================== */
[hidden] {
  display: none !important;
}

/* ========================================
   可访问性增强
   ======================================== */
/* 移除动画（如果用户偏好减少动画） */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 焦点可见性 */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
