/* 现代CSS重置 - 基于Andy Bell的Modern CSS Reset */

/* Box sizing规则 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 移除默认margin和padding */
* {
  margin: 0;
  padding: 0;
}

/* 设置核心body默认值 */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: var(--color-text-primary, #1A1A1A);
  background-color: var(--bg-white, #FFFFFF);
}

/* 使媒体元素默认为块级 */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 移除表单元素的默认样式 */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* 避免文本溢出 */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 创建根层叠上下文 */
#root,
#__next {
  isolation: isolate;
}

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

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

/* 按钮样式重置 */
button {
  cursor: pointer;
  background: none;
  border: none;
}

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

/* 隐藏属性 */
[hidden] {
  display: none !important;
}

/* 焦点样式 */
:focus-visible {
  outline: 2px solid var(--color-accent, #C8A96E);
  outline-offset: 2px;
}

/* 选择文本样式 */
::selection {
  background-color: var(--color-accent, #C8A96E);
  color: var(--color-neutral-100, #FFFFFF);
}
