/**
 * CSS 重置 - 统一浏览器默认样式
 */

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

/* HTML 和 Body */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* 强制显示滚动条占位，避免有无滚动条时布局跳变 */
    overflow-y: scroll;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                 "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", 
                 "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-normal), 
                color var(--transition-normal);
}

/* 标题 */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
}

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

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

a:hover {
    color: var(--accent-blue);
}

/* 按钮 */
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    color: inherit;
}

/* 输入框 */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast),
                background-color var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-light);
}

input:disabled, textarea:disabled, select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

/* 占位符颜色 */
input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: var(--text-tertiary);
}

input::-moz-placeholder,
textarea::-moz-placeholder {
    color: var(--text-tertiary);
}

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

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

/* 隐藏滚动条但保持功能 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}


