/* Light */
:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --text-primary: #121212;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --accent: #adff14;
  --primary: #8fd400;
}

/* Dark */
[data-theme="dark"] {
  --bg: #0f0f0f;
  --surface: #161616;
  --text-primary: #ededed;
  --text-secondary: #9ca3af;
  --border: #262626;
  --accent: #adff14;
  --primary: #8fd400;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  /* 移动端禁止双击放大和默认手势 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* 禁止文本选中 */
  user-select: none;
  -webkit-user-select: none;
  /* 禁止长按菜单 */
  -webkit-touch-callout: none;
}

:where(body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 禁止下拉刷新 */
  overscroll-behavior: none;
}

body {
  min-height: 100%;
  line-height: 1.5;
  /* 统一字体设置 - 优先使用系统默认字体 */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

ul,
ol {
  list-style: none;
  padding-left: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* iOS Safari 输入框最小字号，防止点击时页面自动放大 */
input,
textarea,
[contenteditable="true"] {
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

pre,
code,
kbd,
samp {
  font: inherit;
}

hr {
  height: 0;
  border: 0;
}

input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: inherit !important;
}