/* 全局重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* 设置根元素字体大小，方便使用rem单位 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 全局字体设置 */
body {
    font-family: "Noto Sans SC", "Source Han Sans SC", "Source Han Sans CN", "思源黑体 CN", 
                 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 1, "dlig" 1;
    background-color: #000;
    color: #fff;
}

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

/* 移除链接下划线 */
a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

/* 图片响应式处理 */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 表单元素统一样式 */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
}

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

/* 适配深色模式 */
@media (prefers-color-scheme: dark) {
    body {
        color-scheme: dark;
    }
}

/* 优化移动端点击延迟 */
html {
    touch-action: manipulation;
}

/* 禁用文本选择 */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 优化字体渲染 */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 2dppx) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* 适配不同操作系统的滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.1);
}

/* 打印样式优化 */
@media print {
    body {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* 优化表单在iOS上的显示 */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* 修复iOS点击高亮问题 */
* {
    -webkit-tap-highlight-color: transparent;
}
