* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% -10%, rgba(99, 102, 241, 0.10), transparent 40%),
        radial-gradient(circle at 88% 110%, rgba(139, 92, 246, 0.10), transparent 45%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand);
    text-decoration: none;
}
a:hover { color: var(--accent); }

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.10);
    color: #C7D2FE;
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.hidden { display: none !important; }
.muted-text {
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.7;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 999px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

button {
    font: inherit;
    cursor: pointer;
}

input, select, textarea {
    font: inherit;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 9px 12px;
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 13px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted-soft); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}
textarea {
    resize: vertical;
    min-height: 60px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.6;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }

/* 全局进度条（顶部细条），组件用 .progress-bar 控制宽度 */
#global-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: width 0.2s ease, opacity 0.3s ease;
    z-index: var(--z-toast);
    pointer-events: none;
}
#global-progress.active { opacity: 1; }
#global-progress.done { opacity: 0; width: 100% !important; }
