/* ========================================
   爱袁在线 - 样式重置
   ======================================== */

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

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

/* HTML5 显示优化 */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}

/*  body 设置 */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* 标题 */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* 段落 */
p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

/* 链接 */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

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

/* 表单元素 */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background-color: var(--bg-light);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

/* 代码 */
code, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

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

/* 清除浮动 */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

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

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* 选中文本 */
::selection {
  background-color: rgba(255, 107, 53, 0.2);
  color: var(--text-primary);
}
