/* ============================================================
 * 幻简 UI 焕新（v5.152）— 全站共享视觉/交互增强
 * 只加不改：所有规则为增量增强，不破坏各页面既有布局
 * ============================================================ */

/* ── 滚动条：细滑深色 ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.35); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.6); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, 0.4) transparent; }

/* ── 选中文本：品牌蓝 ── */
::selection { background: rgba(59, 130, 246, 0.35); color: #fff; }

/* ── 键盘焦点可达性：统一聚焦环 ── */
:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.85);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ── 按钮按压反馈（不影响既有 hover）── */
button, .btn, a[class*="btn"], [role="button"] {
    -webkit-tap-highlight-color: transparent;
}
button:not(:disabled):active, a[class*="btn"]:active, [role="button"]:active {
    transform: scale(0.97);
}
button:disabled { cursor: not-allowed; }

/* ── 链接/按钮过渡统一 ── */
a, button { transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1); }

/* ── 输入框聚焦光晕（仅覆盖未自定义 focus 的输入框）── */
input:not([style*="outline"]):focus,
textarea:not([style*="outline"]):focus,
select:not([style*="outline"]):focus {
    border-color: rgba(59, 130, 246, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

/* ── 图片渲染优化 ── */
img { image-rendering: auto; }

/* ── 减少动态效果偏好（无障碍）── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── 通用卡片悬浮抬升（页面加 .u-card 即用）── */
.u-card { transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.22s, border-color 0.22s; }
.u-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.45) !important;
    box-shadow: 0 14px 40px rgba(2, 6, 18, 0.55), 0 0 0 1px rgba(96, 165, 250, 0.12);
}

/* ── 通用主按钮（页面加 .u-btn-primary 即用）── */
.u-btn-primary {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 60%, #60a5fa 100%);
    background-size: 160% 160%;
    color: #fff; border: none; cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: all 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.u-btn-primary:hover:not(:disabled) {
    background-position: 90% 50%;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

/* ── 通用玻璃拟态条（页面加 .u-glass 即用）── */
.u-glass {
    background: rgba(10, 15, 28, 0.72);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border: 1px solid rgba(148, 163, 184, 0.12);
}
