/* ============================================
   reset.css - 现代 CSS 重置
   Normalize + Box-sizing + Smooth Scroll
   ============================================ */

/* ---- Box-sizing 全局重置 ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ---- 移除默认 margin 和 padding ---- */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
}

/* ---- HTML 根元素 ---- */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.15;
  tab-size: 4;
}

/* ---- Body ---- */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* ---- HTML5 语义化元素 ---- */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section {
  display: block;
}

/* ---- Summary 元素 ---- */
summary {
  display: list-item;
  cursor: pointer;
}

/* ---- 列表 ---- */
ol,
ul {
  list-style: none;
}

/* ---- 引用 ---- */
blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

/* ---- 表格 ---- */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ---- 链接 ---- */
a {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
}

a:active,
a:hover {
  outline-width: 0;
}

/* ---- 图片与媒体 ---- */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  border-style: none;
}

/* ---- 表单元素 ---- */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  padding: 0;
  color: inherit;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

/* ---- 按钮 ---- */
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
  border: none;
  background: none;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/* ---- 输入框 ---- */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/* ---- 文本域 ---- */
textarea {
  overflow: auto;
  resize: vertical;
}

/* ---- Fieldset / Legend ---- */
fieldset {
  min-width: 0;
}

legend {
  color: inherit;
  display: table;
  max-width: 100%;
  white-space: normal;
}

/* ---- 强调与修饰 ---- */
b,
strong {
  font-weight: bolder;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* ---- 代码元素 ---- */
code,
kbd,
samp,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1em;
}

/* ---- 其他元素 ---- */
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--border-color, #E8ECF1);
  margin: 0;
}

abbr[title] {
  border-bottom: none;
  text-decoration: underline dotted;
}

/* ---- 隐藏元素 ---- */
[hidden] {
  display: none !important;
}

template {
  display: none;
}

/* ---- 焦点可见 (无障碍) ---- */
:focus-visible {
  outline: 2px solid var(--primary-cyan, #00B4D8);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---- 选中文本样式 ---- */
::selection {
  background-color: rgba(0, 119, 182, 0.15);
  color: var(--text-primary, #333333);
}

::-moz-selection {
  background-color: rgba(0, 119, 182, 0.15);
  color: var(--text-primary, #333333);
}

/* ---- 滚动条样式 (Webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100, #F5F7FA);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400, #CED4DA);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500, #ADB5BD);
}

/* ---- Placeholder 样式 ---- */
::placeholder {
  color: var(--text-muted, #999999);
  opacity: 1;
}

:-ms-input-placeholder {
  color: var(--text-muted, #999999);
}

::-ms-input-placeholder {
  color: var(--text-muted, #999999);
}
