:root {
    --bg-color: #09090b;       /* 极深灰背景，非纯黑，更有质感 */
    --surface-color: #18181b;  /* 模块背景色 */
    --surface-hover: #27272a;  /* 悬停色 */
    --primary-color: #38bdf8;  /* 提亮的主色调 (天蓝) */
    --text-primary: #f4f4f5;   /* 主要文字 (亮白) */
    --text-secondary: #a1a1aa; /* 次要文字 (灰) */
    --border-color: #3f3f46;   /* 边框色 */
    --glass-bg: rgba(24, 24, 27, 0.85); /* 磨砂背景 */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --radius-md: 12px;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    line-height: 1.5;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #52525b; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #71717a; }

/* 基础组件重置 */
button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }

input[type="text"], input[type="password"], input[type="search"] {
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus { border-color: var(--primary-color); }

/* 滑块样式优化 */
input[type="range"] {
    -webkit-appearance: none;
    background: transparent;
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
    width: 100%;
}
input[type="range"]::-webkit-slider-runnable-track {
    background: #3f3f46;
    height: 4px;
    border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    margin-top: -4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* 通用工具类 */
.hidden { display: none !important; }
.desktop-only { display: none; }
@media (min-width: 1024px) { .desktop-only { display: block; } }

/* 加载动画 */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
