/* ============================================
   CSS Reset - 全局样式重置
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 去除列表样式 */
ul, ol {
  list-style: none;
}

/* 链接基础样式 */
a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

/* 图片基础样式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 表格基础样式 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 输入框基础样式 */
input, textarea, select, button {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* 标题样式重置 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
}

/* 段落样式 */
p {
  line-height: var(--leading-normal);
}

/* 选中文字样式 */
::selection {
  background: var(--color-primary);
  color: var(--text-inverse);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.5);
}

/* 隐藏元素 */
.hidden {
  display: none !important;
}

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