/* --- 全局变量与主题 --- */
:root { --primary-color: #2563eb; --primary-light: rgba(37, 99, 235, 0.1); --primary-gradient: linear-gradient(135deg, #3b82f6, #2563eb); --bg-color: #f8fafc; --sidebar-bg: rgba(255, 255, 255, 0.85); --header-bg: rgba(255, 255, 255, 0.9); --text-main: #1e293b; --text-sub: #64748b; --border-color: rgba(226, 232, 240, 0.6); --shadow-sm: 0 2px 10px rgba(0,0,0,0.02); --card-bg: #f1f5f9; --slider-track: #e2e8f0; --hint-bg: #1e293b; --hint-fg: #ffffff; }
body.theme-purple { --primary-color: #7c3aed; --primary-light: rgba(124, 58, 237, 0.1); --primary-gradient: linear-gradient(135deg, #8b5cf6, #7c3aed); }
body.theme-green { --primary-color: #059669; --primary-light: rgba(5, 150, 105, 0.1); --primary-gradient: linear-gradient(135deg, #10b981, #059669); }
body.theme-orange { --primary-color: #ea580c; --primary-light: rgba(234, 88, 12, 0.1); --primary-gradient: linear-gradient(135deg, #f97316, #ea580c); }
body.theme-cyan { --primary-color: #0891b2; --primary-light: rgba(8, 145, 178, 0.1); --primary-gradient: linear-gradient(135deg, #06b6d4, #0891b2); }
/* 深色模式：body.theme-dark 类驱动（中性深灰 · 手动切换 · 不跟随系统） */
body.theme-dark { --bg-color: #121212; --sidebar-bg: rgba(22, 22, 22, 0.85); --header-bg: rgba(18, 18, 18, 0.85); --text-main: #F5F5F5; --text-sub: #A3A3A3; --border-color: rgba(255, 255, 255, 0.08); --card-bg: #1E1E1E; --slider-track: #333333; --hint-bg: #F5F5F5; --hint-fg: #121212; }
/* --- 基础重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; } *:focus { outline: none !important; box-shadow: none !important; }
/* 【多语言布局基线】确定行高 1.5（行盒=字号×1.5，与字体度量脱钩）+ 显式中文字体栈（跨平台回退可控），
中文视觉零变化，英文对齐中文基线 → 切换语言零跳动 */
body { user-select: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; line-height: 1.5; background-color: var(--bg-color); color: var(--text-main); height: 100vh; overflow: hidden; }
/* 【多语言布局基线】表单控件默认不继承 body 字体/行高（UA 样式表阻断），此处补齐继承，堵住按钮类控件垂直跳动 */
button, input, select, textarea { font-family: inherit; line-height: inherit; }
input:not(.range-slider), textarea, select, .number-input { user-select: text; }
/* --- Loading 遮罩 --- */
.global-loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.global-loading-overlay.active { opacity: 1; pointer-events: auto; }
.loading-spinner { width: 48px; height: 48px; border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 0.8s linear infinite; box-shadow: 0 0 20px color-mix(in srgb, var(--primary-color) 40%, transparent); }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
/* --- 连接页面 --- */
#page-connect { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; display: flex; justify-content: center; align-items: center; background-color: var(--bg-color); transition: opacity 0.5s; }
#page-connect.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.connect-bg-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6; z-index: 0; animation: floatBlob 20s infinite ease-in-out; }
.connect-blob-1 { width: 400px; height: 400px; background: #bfdbfe; top: -100px; left: -100px; } .connect-blob-2 { width: 300px; height: 300px; background: #e9d5ff; bottom: -50px; right: -50px; animation-delay: -5s; } .connect-blob-3 { width: 250px; height: 250px; background: #bae6fd; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; opacity: 0.4; }
@keyframes floatBlob { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -50px) scale(1.1); } 66% { transform: translate(-20px, 20px) scale(0.9); } }
.connect-content { position: relative; z-index: 10; text-align: center; padding: 40px; max-width: 900px; width: 100%; animation: fadeInUp 0.8s; display: flex; flex-direction: column; align-items: center; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.connect-title { font-size: 26px; font-weight: 600; margin-bottom: 16px; color: var(--text-main); }
.connect-desc { font-size: 14px; color: var(--text-sub); margin-top: 24px; line-height: 1.6; opacity: 0.8; }
.btn-connect { background: var(--primary-gradient); color: white; border: none; padding: 16px 48px; font-size: 16px; font-weight: 500; border-radius: 50px; cursor: pointer; box-shadow: 0 10px 25px -5px color-mix(in srgb, var(--primary-color) 40%, transparent); transition: all 0.3s; display: inline-flex; align-items: center; gap: 10px; margin-top: 80px; }
.btn-connect:hover { transform: translateY(-3px); box-shadow: 0 15px 30px -5px color-mix(in srgb, var(--primary-color) 50%, transparent); }
.btn-connect svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.5; fill: none; }
/* --- 连接页 · 无设备等待场景（一机两路：有线 / 无线，皆达电脑）--- */
.cna-scene { width: min(380px, 88vw); margin: 0 auto 30px; animation: fadeInUp 0.8s; }
.cna-scene svg { width: 100%; height: auto; display: block; overflow: visible; }
.cna-scene rect, .cna-scene path, .cna-scene line, .cna-scene circle { stroke: var(--text-sub); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cna-scene .cna-body { fill: var(--bg-color); }
.cna-scene .cna-port { fill: var(--bg-color); }
.cna-scene .cna-wave, .cna-scene .cna-dash, .cna-scene .cna-halo { stroke: var(--primary-color); }
.cna-scene .cna-mouse-led, .cna-scene .cna-led, .cna-scene .cna-pc-led { fill: var(--primary-color); stroke: none; }
.cna-scene .cna-screen { stroke-opacity: .45; }
.cna-scene .cna-glow { fill: var(--primary-color); stroke: none; opacity: .06; }
@keyframes cnaScreenGlow { 0%, 100% { opacity: .05; } 50% { opacity: .14; } }
.cna-glow { animation: cnaScreenGlow 4.2s ease-in-out infinite; }
.cna-scene .cna-link { stroke-opacity: .65; }
@keyframes cnaWave { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.cna-wave1 { animation: cnaWave 2.4s ease-in-out infinite; }
.cna-wave2 { animation: cnaWave 2.4s ease-in-out .4s infinite; }
@keyframes cnaDashFlow { to { stroke-dashoffset: -10; } }
.cna-dash { stroke-dasharray: 4 6; animation: cnaDashFlow 1.1s linear infinite; }
@keyframes cnaNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(12px); } }
@keyframes cnaNudgeRev { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-12px); } }
.cna-plug { animation: cnaNudgeRev 4.8s ease-in-out infinite; }
.cna-dongle { animation: cnaNudge 4.8s ease-in-out infinite; }
@keyframes cnaHalo { 0%, 100% { opacity: .12; } 50% { opacity: .55; } }
.cna-halo1 { animation: cnaHalo 3s ease-in-out infinite; }
.cna-halo2 { animation: cnaHalo 3s ease-in-out 1.5s infinite; }
@keyframes cnaLed { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.cna-mouse-led { animation: cnaLed 2.8s ease-in-out infinite; }
.cna-led { animation: cnaLed 2.8s ease-in-out .6s infinite; }
.cna-pc-led { animation: cnaLed 3.4s ease-in-out 1s infinite; }
@media (prefers-reduced-motion: reduce) {
.cna-scene, .cna-scene * { animation: none !important; }
.cna-wave1, .cna-wave2 { opacity: .7; }
.cna-halo1, .cna-halo2 { opacity: .4; }
}
/* --- 全局提示 toast --- */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-160%); background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 12px; padding: 13px 20px 13px 18px; font-size: 13.5px; font-weight: 500; letter-spacing: 0.2px; z-index: 2000; display: flex; align-items: center; overflow: hidden; box-shadow: 0 14px 36px -10px rgba(15,23,42,0.22), 0 3px 8px rgba(15,23,42,0.06); opacity: 0; visibility: hidden; transition: transform 0.42s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease, visibility 0s linear 0.42s; }
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary-color); }
.toast svg { display: none; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; transition: transform 0.42s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease, visibility 0s linear 0s; }
/* --- 设备卡片（连接页） --- */
.device-cards-container { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; min-height: 320px; align-items: center; width: 100%; }
.device-card-item { position: relative; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); border-radius: 40px; padding: 36px 30px 26px; width: 240px; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: all 0.4s; border: 1px solid rgba(255,255,255,1); box-shadow: 0 20px 50px rgba(0,0,0,0.03); }
body.theme-dark .device-card-item { background: rgba(30, 30, 30, 0.9); border: 1px solid rgba(255,255,255,0.08); }
.device-card-item:hover { transform: translateY(-10px); box-shadow: 0 30px 60px color-mix(in srgb, var(--primary-color) 12%, transparent); border-color: var(--primary-color); }
.device-img { width: 210px; height: 210px; object-fit: contain; margin-bottom: 10px; filter: drop-shadow(0 24px 36px rgba(0,0,0,0.16)); }
.device-mode { font-size: 14px; color: var(--text-sub); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 500; }
.device-mode svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.device-link-status { display: inline-flex; align-items: center; gap: 5px; margin-left: 2px; }
.device-link-status .device-link-dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; transition: background 0.3s, box-shadow 0.3s; flex-shrink: 0; }
.device-link-status .device-link-text { font-size: 12px; font-weight: 500; color: var(--text-sub); transition: color 0.3s; white-space: nowrap; }
.device-link-status.on .device-link-dot { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.device-link-status.on .device-link-text { color: #10b981; }
.device-link-status.off .device-link-dot { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
.device-link-status.off .device-link-text { color: #ef4444; }
.device-card-item .device-img { transition: opacity 0.3s ease, filter 0.3s ease; }
.device-card-item.link-off .device-img { opacity: 0.72; filter: saturate(0.75) drop-shadow(0 24px 36px rgba(0,0,0,0.16)); }
.device-card-item.link-off:hover .device-img { opacity: 1; filter: saturate(1) drop-shadow(0 24px 36px rgba(0,0,0,0.16)); }
.device-name { font-size: 15px; font-weight: 600; color: var(--text-main); text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-battery { position: absolute; top: 16px; right: 20px; z-index: 2; display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.2px; color: var(--text-sub); opacity: 0.8; font-variant-numeric: tabular-nums; animation: cardBatIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.card-battery[hidden] { display: none; }
@keyframes cardBatIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 0.8; transform: scale(1); } }
.card-battery-icon { position: relative; width: 18px; height: 9px; border: 1px solid currentColor; border-radius: 2px; padding: 1px; box-sizing: border-box; opacity: 0.9; }
.card-battery-icon::after { content: ''; position: absolute; right: -3px; top: 2px; width: 2px; height: 3px; background: currentColor; border-radius: 0 1px 1px 0; }
.card-battery-level { display: block; height: 100%; width: 60%; background: var(--primary-color); border-radius: 1px; transition: width 0.3s, background 0.3s; }
.card-battery-bolt { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%); fill: #fff; display: none; filter: drop-shadow(0 0 1px #10b981) drop-shadow(0 0 2px rgba(16, 185, 129, 0.8)); pointer-events: none; }
.card-battery.low { color: #ef4444; opacity: 0.9; }
.card-battery.low .card-battery-level { background: #ef4444; }
.card-battery.charging { color: #10b981; opacity: 0.9; }
.card-battery.charging .card-battery-level { background: #10b981; }
.card-battery.charging .card-battery-bolt { display: block; }
/* --- 主页布局 --- */
.app-container { display: flex; flex-direction: column; height: 100vh; opacity: 0; transition: opacity 0.5s; }
.app-container.visible { opacity: 1; }
.app-header { height: 60px; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 50; }
.logo-area { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; letter-spacing: 1px; }
.logo-icon { width: 40px; height: 40px; object-fit: contain; display: block; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.theme-btn { background: transparent; border: 1px solid var(--border-color); border-radius: 8px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-sub); transition: all 0.2s; }
.theme-btn:hover { color: var(--primary-color); border-color: var(--primary-color); background: var(--primary-light); }
.theme-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.app-body { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: 240px; background: var(--sidebar-bg); backdrop-filter: blur(12px); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 20px 6px; flex-shrink: 0; }
.sidebar-device-card { background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 12px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
.device-info-left { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.device-name-sidebar { font-size: 14px; font-weight: 500; color: var(--text-main); }
.device-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-sub); }
.status-icon { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.battery-indicator { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-main); margin-left: auto; }
.battery-icon { width: 24px; height: 12px; border: 1px solid currentColor; border-radius: 2px; position: relative; display: flex; align-items: center; justify-content: flex-start; box-sizing: border-box; padding: 1px; }
.battery-icon::after { content: ''; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0; }
.battery-level { height: 100%; background: var(--primary-color); border-radius: 1px; width: 60%; transition: width 0.3s, background 0.3s; }
.battery-indicator.low { color: #ef4444; }
.battery-indicator.low .battery-level { background: #ef4444; }
.battery-indicator.charging { color: #10b981; }
.battery-indicator.charging .battery-level { background: #10b981; }
.battery-indicator.charging #chargingIcon { display: block; }
#chargingIcon { color: #ffffff; font-size: 10px; line-height: 1; display: none; z-index: 2; position: absolute; text-shadow: 0 1px 2px rgba(0,0,0,0.4); left: 50%; top: 50%; transform: translate(-50%, -50%); }
#chargingIcon svg { width: 16px; height: 16px; fill: #fff; display: block; filter: drop-shadow(0 0 1px #10b981) drop-shadow(0 0 2px rgba(16,185,129,0.8)); }
.nav-divider { height: 1px; background: linear-gradient(90deg, var(--border-color) 0%, transparent 100%); margin: 16px 0; }
.nav-menu { display: flex; flex-direction: column; gap: 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; cursor: pointer; color: var(--text-sub); font-size: 14px; font-weight: 500; transition: all 0.2s; }
.nav-item:hover { background: var(--bg-color); color: var(--text-main); }
.nav-item.active { background: var(--primary-light); color: var(--primary-color); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 16px; background: var(--primary-color); border-radius: 0 4px 4px 0; }
.nav-icon { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.nav-menu.nav-locked .nav-item { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.main-content { flex: 1; padding: 22px 32px 32px 32px; overflow-y: auto; display: flex; flex-direction: column; max-width: 1440px; margin: 0 auto; width: 100%; }
/* --- DPI 页面样式 --- */
.dpi-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; gap: 16px; }
.dpi-seg-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* 【多语言布局基线】定宽 5em（取中英文较长者并留余量），切换语言时数字按钮组零位移；文字居中 + 左缩进 8px，与下方卡片区形成层次 */
.dpi-seg-label { font-size: 14px; font-weight: 600; color: var(--text-main); white-space: nowrap; letter-spacing: 0.2px; flex: none; width: 5em; text-align: center; margin-left: 8px; }
.dpi-seg-group { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 3px; background: color-mix(in srgb, var(--text-sub) 8%, var(--bg-color)); border-radius: 12px; box-shadow: inset 0 1px 2px rgba(15,23,42,0.05); }
.dpi-seg-btn { min-width: 40px; height: 32px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text-sub); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.dpi-seg-btn:hover:not(.active) { color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 10%, transparent); }
.dpi-seg-btn:active { transform: scale(0.94); }
.dpi-seg-btn.active { background: var(--primary-color); color: #fff; border-color: transparent; box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--primary-color) 55%, transparent), 0 1px 2px rgba(15,23,42,0.10); animation: dpiSegPop 0.26s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes dpiSegPop { 0% { transform: scale(0.86); } 100% { transform: scale(1); } }
.dpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dpi-card { background: var(--card-bg); border-radius: 16px; padding: clamp(8px, 1vw, 12px) clamp(10px, 1.2vw, 14px); border: 2px solid transparent; transition: all 0.3s ease; position: relative; cursor: pointer; }
/* 【v3 选中锚点】2px 主色边框（透明占位零位移）+ 5% 主色浅底 + 柔和投影；
标题恒默认（不加粗、不变色），状态全部由容器承载，内容只承载数据 */
.dpi-card.selected { border-color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 5%, var(--card-bg)); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--primary-color) 35%, transparent), 0 4px 12px rgba(0,0,0,0.05); }
.dpi-card:hover:not(.selected) { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-color) 75%, transparent), 0 8px 16px rgba(0,0,0,0.06); }
/* 【v3 滑条两档状态】静置休眠灰；hover（未选中）与选中均满血主色；作用域仅限 .dpi-card */
.dpi-card .range-slider { margin: 3px 0; filter: saturate(0.25); opacity: 0.85; transition: background 0.1s ease, filter 0.3s ease, opacity 0.3s ease; }
.dpi-card:hover:not(.selected) .range-slider { filter: none; opacity: 1; }
.dpi-card.selected .range-slider { filter: none; opacity: 1; }
.dpi-card .control-label-row { margin-bottom: 2px; }
.dpi-card .slider-scale { margin-top: 2px; }
.dpi-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dpi-badge { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.color-picker-trigger { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.2s; }
.color-picker-trigger:hover { transform: scale(1.1); }
/* --- 全局调色盘 v6（设计稿样式）--- */
.global-color-picker { position: fixed; z-index: 1000; width: 340px; padding: 12px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,0.18); display: none; flex-direction: column; gap: 12px; }
.cp-main-row { display: flex; gap: 12px; height: 180px; }
.cp-sb-area { position: relative; flex: 1; min-width: 0; height: 100%; border-radius: 12px; overflow: hidden; cursor: crosshair; background-color: #ff0000; background-image: linear-gradient(to top, #000, rgba(0,0,0,0)), linear-gradient(to right, #fff, rgba(255,255,255,0)); }
.cp-hue-area { position: relative; flex: none; width: 22px; height: 100%; border-radius: 11px; background: linear-gradient(to bottom, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); cursor: pointer; }
.cp-thumb { position: absolute; border-radius: 50%; background: transparent; border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.3); transform: translate(-50%, -50%); pointer-events: none; }
.cp-sb-thumb { width: 16px; height: 16px; }
.cp-hue-thumb { width: 20px; height: 20px; left: 50%; border-width: 3px; }
.cp-presets { flex: none; margin-left: 6px; display: grid; grid-template-columns: repeat(2, 24px); grid-template-rows: repeat(6, 1fr); gap: 6px 12px; align-items: center; justify-content: center; }
.cp-preset { width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cp-preset:hover { transform: scale(1.12); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.2); }
.cp-preset:active { transform: scale(0.95); }
.cp-bottom-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cp-preview-box { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.55); box-shadow: 0 2px 8px -2px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(0,0,0,0.08); transition: background 0.2s ease; }
.cp-rgb-unit { flex: none; width: 62px; min-width: 0; display: flex; align-items: center; gap: 4px; border: 1px solid var(--border-color); background: var(--bg-color); border-radius: 10px; padding: 7px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.cp-rgb-unit:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.cp-rgb-label { font-size: 12px; font-weight: 700; flex: none; }
.cp-label-r { color: #ef4444; }
.cp-label-g { color: #22c55e; }
.cp-label-b { color: #3b82f6; }
.cp-rgb-input { width: 100%; min-width: 0; flex: 1; border: none; background: transparent; color: var(--text-main); font-size: 13px; font-weight: 600; text-align: center; outline: none; appearance: none; -moz-appearance: textfield; }
.cp-rgb-input::-webkit-outer-spin-button, .cp-rgb-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cp-confirm-btn { flex: none; margin-left: auto; padding: 8px 12px; border: none; border-radius: 10px; background: var(--primary-color); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.2s, transform 0.15s; }
.cp-confirm-btn:hover { opacity: 0.85; }
.cp-confirm-btn:active { transform: scale(0.97); }
.dpi-actions { display: flex; align-items: center; gap: 8px; opacity: 0; transition: opacity 0.2s; margin-left: auto; }
.dpi-card:hover .dpi-actions { opacity: 1; }
.toggle-label { font-size: 12px; color: var(--text-sub); cursor: pointer; }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 24px; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; z-index: 2; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.toggle-slider::after { content: 'OFF'; position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 700; color: rgba(0,0,0,0.4); transition: all 0.3s; font-family: sans-serif; pointer-events: none; }
input:checked + .toggle-slider { background-color: var(--primary-color); }
input:checked + .toggle-slider:before { transform: translateX(24px); }
input:checked + .toggle-slider::after { content: 'ON'; left: 7px; right: auto; color: #ffffff; }
/* 初始状态同步静默：程序赋值 checked 期间禁用滑动/背景过渡，动画仅留给用户操作 */
.toggle-switch.instant .toggle-slider,
.toggle-switch.instant .toggle-slider:before,
.toggle-switch.instant .toggle-slider::after { transition: none !important; }
.dpi-control-group { margin-bottom: 0; }
.control-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.control-label { font-size: 13px; color: var(--text-sub); font-weight: 500; }
/* --- 数值步进控件（胶囊外壳 + 可点击 chevron 箭头列） --- */
.num-field { display: inline-flex; align-items: stretch; height: 32px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-color); overflow: hidden; vertical-align: middle; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.num-field:hover { border-color: color-mix(in srgb, var(--primary-color) 38%, var(--border-color)); }
.num-field:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.number-input { width: 72px; height: 100%; padding: 0 10px; border: none; border-radius: 0; background: transparent; color: var(--text-main); font-size: 14px; font-weight: 600; text-align: center; outline: none; -moz-appearance: textfield; appearance: textfield; }
.number-input::-webkit-outer-spin-button, .number-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; display: none; }
.num-spin { display: flex; flex-direction: column; width: 26px; flex: none; border-left: 1px solid var(--border-color); }
.num-spin-up, .num-spin-down { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0; border: none; background: transparent; color: var(--text-sub); cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.num-spin-up { border-bottom: 1px solid var(--border-color); }
.num-spin-up::after, .num-spin-down::after { content: ''; width: 7px; height: 7px; border: 0 solid currentColor; transition: transform 0.12s ease; }
.num-spin-up::after { border-top-width: 1.8px; border-left-width: 1.8px; transform: translateY(2px) rotate(45deg); }
.num-spin-down::after { border-bottom-width: 1.8px; border-right-width: 1.8px; transform: translateY(-2px) rotate(45deg); }
.num-spin-up:hover, .num-spin-down:hover { background: color-mix(in srgb, var(--primary-color) 8%, transparent); color: var(--primary-color); }
.num-spin-up:active { background: color-mix(in srgb, var(--primary-color) 16%, transparent); }
.num-spin-down:active { background: color-mix(in srgb, var(--primary-color) 16%, transparent); }
.num-spin-up:active::after { transform: translateY(2px) rotate(45deg) scale(0.82); }
.num-spin-down:active::after { transform: translateY(-2px) rotate(45deg) scale(0.82); }
.range-slider { -webkit-appearance: none; width: 100%; height: 4px; background: linear-gradient(to right, var(--primary-color) 50%, var(--slider-track) 50%); border-radius: 2px; outline: none; margin: 6px 0; transition: background 0.1s ease; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-color); border: 4px solid #ffffff; box-shadow: 0 2px 6px rgba(0,0,0,0.15); cursor: pointer; transition: border-width 0.25s; }
.range-slider::-webkit-slider-thumb:hover { border-width: 2px; }
.range-slider::-webkit-slider-thumb:active { border-width: 6px; }
.slider-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-sub); margin-top: 4px; position: relative; }
.slider-scale span:nth-child(2) { position: absolute; left: 50%; transform: translateX(-50%); }
.independent-controls { display: none; grid-template-columns: 1fr 1fr; gap: 12px; }
.dpi-card.independent-mode .combined-controls { display: none; }
.dpi-card.independent-mode .independent-controls { display: grid; }
/* --- 性能设置页面样式 --- */
#performance-view { position: relative; }
#performance-view::before { content: ''; position: absolute; top: -22px; left: -32px; right: -32px; height: 240px; background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--primary-color) 9%, transparent), transparent 72%); pointer-events: none; z-index: 0; }
.perf-section { position: relative; z-index: 1; background: var(--card-bg); border-radius: 18px; padding: clamp(16px, 2vw, 24px); margin-bottom: 14px; border: 1px solid var(--border-color); box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px -16px rgba(15,23,42,0.12); transition: box-shadow 0.3s ease; }
.perf-section:hover { box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 12px 32px -20px rgba(15,23,42,0.14); }
.perf-section-title { display: flex; align-items: center; gap: 8px; font-size: clamp(15px, 1.2vw, 16px); font-weight: 700; color: var(--text-main); margin-bottom: 10px; letter-spacing: 0.3px; }
.perf-section-title svg, .dynamic-polling-title svg { flex: none; width: 16px; height: 16px; stroke: var(--primary-color); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.perf-desc { font-size: 12.5px; color: var(--text-sub); margin-top: 10px; line-height: 1.6; opacity: 0.9; }
.polling-rate-grid {
display: flex; gap: 4px; flex-wrap: nowrap; align-items: stretch;
width: 100%; max-width: 720px;
border: 2px solid transparent;
border-radius: 999px;
padding: 4px;
background:
linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
linear-gradient(90deg,
color-mix(in srgb, #0eaedf 45%, var(--border-color)) 7.14%,
color-mix(in srgb, #2594f0 45%, var(--border-color)) 21.43%,
color-mix(in srgb, #2b86e7 45%, var(--border-color)) 35.71%,
color-mix(in srgb, #848c80 45%, var(--border-color)) 50%,
color-mix(in srgb, #f45c2d 45%, var(--border-color)) 64.29%,
color-mix(in srgb, #e83146 45%, var(--border-color)) 78.57%,
color-mix(in srgb, #d9294d 45%, var(--border-color)) 92.86%) border-box;
box-shadow: inset 0 2px 5px rgba(15,23,42,0.07);
}
.polling-rate-item[data-rate="125"]  { --rate-from: #06b6d4; --rate-to: #0ea5e9; }
.polling-rate-item[data-rate="250"]  { --rate-from: #0ea5e9; --rate-to: #3b82f6; }
.polling-rate-item[data-rate="500"]  { --rate-from: #1d4ed8; --rate-to: #38bdf6; }
.polling-rate-item[data-rate="1000"] { --rate-from: #0ea5e9; --rate-to: #f97316; }
.polling-rate-item[data-rate="2000"] { --rate-from: #f97316; --rate-to: #ef4444; }
.polling-rate-item[data-rate="4000"] { --rate-from: #ef4444; --rate-to: #e11d48; }
.polling-rate-item[data-rate="8000"] { --rate-from: #f43f5e; --rate-to: #be123c; }
.polling-rate-item { position: relative; flex: 1 1 0; min-width: 0; padding: 12px 0; text-align: center; white-space: nowrap; background: transparent; border: none; border-radius: 999px; cursor: pointer; font-size: clamp(13px, 1.1vw, 15px); font-weight: 600; letter-spacing: 0.2px; color: var(--text-sub); transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease; user-select: none; }
.polling-rate-item:hover:not(.disabled):not(.selected) { color: var(--text-main); background: color-mix(in srgb, var(--rate-to) 12%, var(--card-bg)); box-shadow: 0 2px 10px -4px color-mix(in srgb, var(--rate-to) 35%, transparent); transform: translateY(-1px); }
.polling-rate-item.selected { color: #fff; background: linear-gradient(135deg, var(--rate-from), var(--rate-to)); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--rate-to) 65%, transparent), 0 2px 6px -2px color-mix(in srgb, var(--rate-from) 45%, transparent); transform: translateY(-1px); }
.polling-rate-item.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.sensor-mode-card[data-mode="0"] { --tier: #14b8a6; --tier2: #0d9488; --haze: 11%; }
.sensor-mode-card[data-mode="1"] { --tier: #3b82f6; --tier2: #2563eb; --haze: 13%; }
.sensor-mode-card[data-mode="2"] { --tier: #f97316; --tier2: #ea580c; --haze: 15%; }
.sensor-mode-card[data-mode="3"] { --tier: #ef4444; --tier2: #e11d48; --haze: 17%; }
.sensor-mode-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: flex-start; }
/* --- 传感器扫描频率示意图（右侧呼吸光环：纤细圆环 + 环内柔晕，无容器无边框；
   环光/内晕强度随 val_fps 归一化增强，呼吸时长由 JS 按 --fps-breathe 注入（fps 低缓慢、fps 高急促），幅度克制近乎屏息；
   档色由 JS 从选中卡 --tier 注入，零硬编码色表） --- */
.sensor-mode-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sensor-fps-panel { flex: none; margin-left: auto; display: flex; align-items: center; justify-content: center; --fps-c: var(--text-sub); --fps-glow: 0.3; transition: opacity 0.3s ease; }
/* 光环场：布局盒子收紧至 112px（降低行高，避免卡片被垂直居中悬空），环/内晕视觉尺寸由 inset 等比缩小，辉光溢出盒子不受影响 */
.fps-aura { position: relative; width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; }
.fps-aura::before { content: ''; position: absolute; inset: 1.5%; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--fps-c) calc(28% + var(--fps-glow) * 38%), transparent); box-shadow: 0 0 calc(8px + var(--fps-glow) * 24px) color-mix(in srgb, var(--fps-c) calc(var(--fps-glow) * 38%), transparent), inset 0 0 calc(10px + var(--fps-glow) * 28px) color-mix(in srgb, var(--fps-c) calc(var(--fps-glow) * 24%), transparent); animation: fpsBreathe var(--fps-breathe, 3.5s) ease-in-out infinite; }
/* 环内柔晕：一层淡淡的光衬托数字，不喧宾夺主 */
.fps-aura::after { content: ''; position: absolute; inset: 18.5%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--fps-c) calc(12% + var(--fps-glow) * 20%), transparent) 0%, transparent 70%); animation: fpsBreathe var(--fps-breathe, 3.5s) ease-in-out infinite reverse; }
/* 满槽态：呼吸幅度微增，光环更亮，保持克制 */
.sensor-fps-panel.full .fps-aura::before,
.sensor-fps-panel.full .fps-aura::after { animation-name: fpsBreatheFull; animation-direction: normal; }
.fps-read { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fps-read b { font-size: 20px; font-weight: 800; color: var(--text-main); font-variant-numeric: tabular-nums; letter-spacing: 0.2px; text-shadow: 0 0 20px color-mix(in srgb, var(--fps-c) calc(var(--fps-glow) * 60%), transparent); }
.fps-read i { font-style: normal; font-size: 9.5px; font-weight: 700; color: color-mix(in srgb, var(--fps-c) 70%, var(--text-sub)); letter-spacing: 2.5px; }
.sensor-fps-panel.empty { opacity: 0.5; }
.sensor-fps-panel.empty .fps-aura::before, .sensor-fps-panel.empty .fps-aura::after { animation: none; }
@keyframes fpsBreathe { 0%, 100% { transform: scale(0.965); opacity: 0.72; } 50% { transform: scale(1.02); opacity: 1; } }
@keyframes fpsBreatheFull { 0%, 100% { transform: scale(0.97); opacity: 0.8; } 50% { transform: scale(1.045); opacity: 1; } }
.sensor-mode-card { position: relative; flex: none; width: 200px; min-height: 100px; background: radial-gradient(125% 100% at 100% 0%, color-mix(in srgb, var(--tier) var(--haze), transparent) 0%, transparent 60%), var(--bg-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 16px; cursor: pointer; transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; user-select: none; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
.sensor-mode-card:hover:not(.selected):not(.disabled) { border-color: color-mix(in srgb, var(--tier) 55%, transparent); transform: translateY(-3px); box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--tier) 50%, transparent), 0 2px 6px -2px color-mix(in srgb, var(--tier) 22%, transparent); }
.sensor-mode-card.selected { border-color: var(--tier); background: linear-gradient(135deg, var(--tier), var(--tier2)); box-shadow: 0 16px 36px -12px color-mix(in srgb, var(--tier2) 72%, transparent); }
.sensor-mode-card.selected:hover { box-shadow: 0 20px 42px -12px color-mix(in srgb, var(--tier2) 82%, transparent); }
.sensor-mode-card.selected[data-mode="3"] { animation: tierMaxGlow 2.6s ease-in-out infinite; }
@keyframes tierMaxGlow {
0%, 100% { box-shadow: 0 16px 36px -12px color-mix(in srgb, var(--tier2) 62%, transparent); }
50%      { box-shadow: 0 20px 46px -10px color-mix(in srgb, var(--tier2) 88%, transparent), 0 0 26px -4px color-mix(in srgb, var(--tier) 58%, transparent); }
}
.sensor-mode-card::before { content: ''; position: absolute; top: 12px; right: 12px; width: 19px; height: 19px; border-radius: 50%; background: linear-gradient(135deg, var(--tier), var(--tier2)); box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--tier2) 55%, transparent); opacity: 0; transform: scale(0.6); transition: opacity 0.12s ease-out, transform 0.12s ease-out, background 0.22s ease, box-shadow 0.22s ease; }
.sensor-mode-card:hover:not(.selected):not(.disabled)::before { opacity: 0.4; transform: scale(0.85); }
.sensor-mode-card.selected::before { opacity: 1; transform: scale(1); background: rgba(255,255,255,0.22); box-shadow: none; transition: opacity 0.18s ease-out, transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.22s ease; }
.sensor-mode-card::after { content: ''; position: absolute; top: 16px; right: 18px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; opacity: 0; transform: rotate(45deg) scale(0.6); transition: opacity 0.1s ease-out, transform 0.1s ease-out; }
.sensor-mode-card.selected::after { opacity: 1; transform: rotate(45deg) scale(1); transition: opacity 0.16s ease-out 0.1s, transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s; }
.sensor-mode-card.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.mode-name { font-size: 16px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; letter-spacing: 0.2px; transition: color 0.22s ease; }
.mode-desc { font-size: 12px; color: var(--text-sub); line-height: 1.55; margin-top: auto; opacity: 0.92; transition: color 0.22s ease; }
.sensor-mode-card.selected .mode-name { color: #fff; }
.sensor-mode-card.selected .mode-desc { color: rgba(255,255,255,0.86); }
/* 动态轮询率：轮询率卡的子区块（同一功能族）。 */
.dynamic-polling-container { position: relative; margin-top: 18px; padding-top: 18px; }
.dynamic-polling-container::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border-color) 10%, var(--border-color) 90%, transparent); }
.dynamic-polling-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dynamic-polling-title { display: flex; align-items: center; gap: 8px; font-size: clamp(15px, 1.2vw, 16px); font-weight: 700; color: var(--text-main); letter-spacing: 0.3px; }
/* 通用 radio 选项族（LOD 五档等复用；动态轮询率已换 v2 分段条） */
.dynamic-polling-options { display: flex; gap: 48px; justify-content: flex-start; margin-bottom: 14px; }
.dynamic-polling-option { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-sub); transition: color 0.2s; user-select: none; }
.dynamic-polling-option .radio-indicator { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1.5px solid #94a3b8; border-radius: 50%; box-sizing: border-box; transition: all 0.2s; position: relative; }
.dynamic-polling-option:not(.selected):not(.disabled):hover .radio-indicator { border-color: var(--primary-color); }
.dynamic-polling-option .radio-indicator::after { content: ''; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); margin-bottom: 2px; }
.dynamic-polling-option.selected { color: var(--primary-color); }
.dynamic-polling-option.selected .radio-indicator { background-color: var(--primary-color); border-color: var(--primary-color); }
.dynamic-polling-option.selected .radio-indicator::after { transform: rotate(45deg) scale(1); }
.dynamic-polling-option.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.dynamic-polling-desc { font-size: 13px; color: var(--text-sub); line-height: 1.5; }
/* --- 动态轮询率 v2：同族迷你分段条（渐变轨道 + 实底渐变胶囊选中 · radio 圆点退役 · 主/副层级）
【收敛终版】精修参数（28% 降档 / 480px 收敛 / 精修阴影）已合并回本定义块，单一事实来源 --- */
#dynamicPollingCard .dynamic-polling-header { margin-bottom: 14px; }
#dynamicPollingCard .dynamic-polling-options {
display: flex; gap: 4px; flex-wrap: nowrap; align-items: stretch;
width: 100%; max-width: 480px; margin-bottom: 12px;
border: 2px solid transparent; border-radius: 999px; padding: 3px;
background:
linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
linear-gradient(90deg,
color-mix(in srgb, #64748b 28%, var(--border-color)) 12.5%,
color-mix(in srgb, #0ea5e9 28%, var(--border-color)) 37.5%,
color-mix(in srgb, #f97316 28%, var(--border-color)) 62.5%,
color-mix(in srgb, #ef4444 28%, var(--border-color)) 87.5%) border-box;
box-shadow: inset 0 2px 5px rgba(15,23,42,0.07);
}
#dynamicPollingCard .dynamic-polling-option {
position: relative; flex: 1 1 0; min-width: 0;
display: flex; align-items: center; justify-content: center;
padding: 9px 8px; white-space: nowrap;
background: transparent; border: none; border-radius: 999px;
cursor: pointer; font-size: 13.5px; font-weight: 600; letter-spacing: 0.2px;
color: var(--text-sub);
transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease;
user-select: none;
}
#dynamicPollingCard .dynamic-polling-option .radio-indicator { display: none; }
#dynamicPollingCard .dynamic-polling-option[data-rate="off"]   { --rate-from: #64748b; --rate-to: #475569; }
#dynamicPollingCard .dynamic-polling-option[data-rate="1000"] { --rate-from: #38bdf6; --rate-to: #0ea5e9; }
#dynamicPollingCard .dynamic-polling-option[data-rate="2000"] { --rate-from: #fb923c; --rate-to: #f97316; }
#dynamicPollingCard .dynamic-polling-option[data-rate="4000"] { --rate-from: #f87171; --rate-to: #ef4444; }
#dynamicPollingCard .dynamic-polling-option:hover:not(.disabled):not(.selected) {
color: var(--text-main);
background: color-mix(in srgb, var(--rate-to) 12%, var(--card-bg));
transform: translateY(-1px);
}
#dynamicPollingCard .dynamic-polling-option.selected {
color: #fff;
background: linear-gradient(135deg, var(--rate-from), var(--rate-to));
box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--rate-to) 48%, transparent), 0 1px 4px -2px color-mix(in srgb, var(--rate-from) 35%, transparent);
transform: translateY(-1px);
}
#dynamicPollingCard .dynamic-polling-option.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
#dynamicPollingCard .dynamic-polling-desc { font-size: 12.5px; opacity: 0.9; }
/* --- 动态轮询率示意图板：双边界虚线 + 波动波形（与 LOD/虚拟偏移示意图同族）---
布局终版：高=卡高50%、中轴对齐选项行、左距24px（JS 实时驱动）；≤1280px 隐藏 */
.dyn-diagram { position: absolute; z-index: 2; width: 230px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; transition: opacity 0.3s ease, filter 0.3s ease; }
.dyn-diagram.dimmed { opacity: 0.45; filter: grayscale(0.5); }
.dyn-bound-row { display: flex; align-items: center; gap: 8px; }
.dyn-bound-row b { flex: none; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.2px; }
.dyn-bound-row i { flex: none; font-style: normal; font-size: 11px; font-weight: 500; color: var(--text-sub); }
.dyn-line { flex: 1 1 auto; min-width: 0; height: 0; border-top: 1.5px dashed; }
.dyn-top b { color: var(--dyn-top-c, var(--primary-color)); }
.dyn-top .dyn-line { border-color: color-mix(in srgb, var(--text-sub) 55%, transparent); }
.dyn-bottom b { color: var(--dyn-bottom-c, var(--text-sub)); }
.dyn-bottom .dyn-line { border-color: color-mix(in srgb, var(--text-sub) 45%, transparent); }
.dyn-svg { flex: 1 1 auto; min-height: 0; width: 100%; overflow: visible; }
.dyn-wave { stroke: var(--primary-color); stroke-width: 1.5; stroke-linecap: round; fill: none; }
@media (max-width: 1280px) { .dyn-diagram { display: none; } }
/* --- 高级设置页面样式 --- */
#advanced-view { position: relative; }
#advanced-view::before { content: ''; position: absolute; top: -22px; left: -32px; right: -32px; height: 240px; background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--primary-color) 9%, transparent), transparent 72%); pointer-events: none; z-index: 0; }
.advanced-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1024px) { .advanced-grid { grid-template-columns: 1fr; } }
.advanced-col { display: flex; flex-direction: column; gap: 14px; }
.adv-card { background: var(--card-bg); border-radius: 16px; padding: clamp(12px, 1.5vw, 16px); border: 1px solid var(--border-color); }
.adv-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0; }
.adv-card-title { font-size: 15px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.adv-card-desc { font-size: 13px; color: var(--text-sub); line-height: 1.5; margin-bottom: 0; }
.lod-control { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.lod-control .range-slider { flex: 1; margin: 0; min-width: 100px; }
.lod-control .number-input { width: 72px; flex-shrink: 0; text-align: center; }
.lod-control .unit-text { width: 36px; text-align: left; font-size: 13px; color: var(--text-sub); flex-shrink: 0; }
.lod2-row { display: flex; align-items: flex-start; gap: 16px; margin-top: 12px; }
.lod2-slider-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lod2-track-wrap { position: relative; height: 24px; margin-bottom: 9px; }
.lod2-track-wrap .range-slider { position: absolute; top: 50%; left: 0; width: 100%; margin: 0; transform: translateY(-50%); z-index: 1; }
.lod2-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-sub); padding: 0 2px; }
.lod2-input-col { height: 24px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lod2-input-col .unit-text { min-width: 0; text-align: left; font-size: 13px; color: var(--text-sub); flex-shrink: 0; }
/* --- LOD 功能示意图：侧视鼠标 + 离地高度测量杆 + 表面虚线基准 --- */
#advLodCard1, #advLodCard2 { position: relative; }
#advLodCard1 .dynamic-polling-options { margin-right: calc(172px - clamp(12px, 1.5vw, 16px)); flex-wrap: wrap; gap: 12px 24px; }
#advLodCard2 .lod2-row { margin-right: calc(172px - clamp(12px, 1.5vw, 16px)); }
.lod-diagram { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 140px; height: 80px; pointer-events: none; }
.lod-svg { width: 100%; height: 100%; overflow: visible; }
.lod-ground { stroke: var(--text-sub); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .35; }
.lod-mouse-body { fill: var(--bg-color); stroke: var(--text-sub); stroke-width: 1.8; stroke-linejoin: round; transition: stroke .3s; }
.lod-wheel { fill: none; stroke: var(--text-sub); stroke-width: 1.4; opacity: .8; }
.lod-mouse-seam { fill: none; stroke: var(--text-sub); stroke-width: 1.1; opacity: .4; }
.lod-measure-line { stroke: var(--primary-color); stroke-width: 2; stroke-linecap: round; opacity: .9; }
.lod-measure-cap { fill: var(--primary-color); opacity: .9; }
.virtual-sensor-card.disabled .virtual-sensor-content, .virtual-sensor-card.disabled .mouse-diagram { opacity: 0.4; pointer-events: none; }
#advRotationCard.disabled .rotation-layout { opacity: 0.4; pointer-events: none; }
.virtual-sensor-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.virtual-sensor-card .adv-card-header { margin-bottom: 10px; }
.virtual-sensor-card .adv-card-title { margin-bottom: 0; }
.virtual-sensor-card .adv-card-desc { max-width: calc(100% - 140px); margin-bottom: 32px; }
.virtual-sensor-content { display: flex; gap: 16px; align-items: flex-start; flex-wrap: nowrap; max-width: calc(100% - 96px + clamp(12px, 1.5vw, 16px)); margin-bottom: 0; }
.virtual-slider-container { flex: 1; min-width: 0; }
.virtual-slider-track-wrapper { position: relative; height: 24px; margin-bottom: 9px; }
.virtual-slider-track-wrapper .range-slider { position: absolute; top: 50%; left: 0; width: 100%; margin: 0; transform: translateY(-50%); z-index: 1; }
.virtual-input-container { display: flex; align-items: center; gap: 12px; flex-shrink: 0; height: 24px; }
.virtual-input-container .unit-text { font-size: 13px; color: var(--text-sub); flex-shrink: 0; }
.virtual-slider-scale { position: relative; display: flex; justify-content: space-between; font-size: 11px; color: var(--text-sub); margin-top: 0; padding: 0 2px; }
.virtual-scale-center-mark { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; font-size: 11px; color: var(--text-sub); }
.virtual-scale-center-line { width: 0; height: 8px; border-left: 1px solid var(--text-sub); opacity: 0.5; margin-bottom: 0; }
.mouse-diagram { position: absolute; right: 16px; bottom: 5px; width: 64px; height: 114px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mouse-svg { width: 100%; height: 100%; overflow: visible; }
/* 双示意图墨线统一屏幕像素描边，消除 viewBox 缩放差导致的物理增粗 */
.lod-svg *, .mouse-svg *, .rotation-mouse-svg *, .dyn-svg * { vector-effect: non-scaling-stroke; }
.vs-body { fill: var(--bg-color); stroke: var(--text-sub); stroke-width: 1.8; opacity: .9; transition: stroke .3s; }
.vs-wheel { fill: var(--bg-color); stroke: var(--text-sub); stroke-width: 1.4; opacity: .8; }
.vs-axis { stroke: var(--primary-color); stroke-width: 1.5; stroke-dasharray: 2 5; opacity: .35; }
.vs-core { fill: var(--primary-color); }
.vs-halo { fill: none; stroke: var(--primary-color); stroke-width: 1.5; opacity: .85; filter: drop-shadow(0 0 4px var(--primary-color)); }
.vs-ripple { fill: none; stroke: var(--primary-color); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: vsRipple 2.8s ease-out infinite; }
.vs-r2 { animation-delay: 1.4s; }
@keyframes vsRipple { 0% { transform: scale(.5); opacity: .5; } 100% { transform: scale(1.6); opacity: 0; } }
.vs-zero-ring { fill: none; stroke: var(--text-sub); stroke-width: 1; stroke-dasharray: 2 3; opacity: .55; }
.vs-zero-dot { fill: var(--text-sub); opacity: .55; }
.virtual-sensor-card.disabled .vs-ripple { animation: none; opacity: 0; }
.virtual-sensor-card.disabled .vs-halo { filter: none; }
/* --- 传感器旋转 v7 终版 --- */
.rotation-layout { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.rotation-left { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 26px; }
.rotation-dial-box { position: relative; flex: 1 1 auto; min-width: 0; }
.rotation-svg { width: 100%; height: auto; display: block; overflow: visible; cursor: pointer; touch-action: none; }
.rotation-readout { position: absolute; left: 50%; top: 51.4%; transform: translate(-50%, -50%); font-size: 20px; font-weight: 700; color: var(--text-main); line-height: 1; font-variant-numeric: tabular-nums; text-align: center; pointer-events: none; }
.rotation-num-wrapper { position: relative; display: inline-block; }
.rotation-num { display: inline-block; width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.rotation-sign { position: absolute; right: 100%; margin-right: 2px; }
.rotation-sign.hidden { visibility: hidden; }
.rotation-degree { position: absolute; left: 100%; top: 1px; margin-left: 2px; font-size: 12px; font-weight: 500; }
.rotation-btn-lg { width: 44px; height: 44px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--border-color); box-shadow: 0 4px 12px rgba(0,0,0,0.05); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; color: var(--text-main); flex-shrink: 0; }
.rotation-btn-lg:hover { background: var(--bg-color); border-color: var(--primary-color); color: var(--primary-color); transform: translateY(-2px); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary-color) 15%, transparent); }
.rotation-btn-lg:active { transform: translateY(0); }
.rotation-btn-lg svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.rotation-right { position: relative; flex: none; width: 170px; transform: translateX(18px); }
.rotation-mouse-svg { width: 100%; height: auto; display: block; overflow: visible; }
.rm-body { fill: var(--bg-color); stroke: var(--text-sub); stroke-width: 1.8; transition: stroke .3s; }
.rm-seam { stroke: var(--text-sub); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: .5; }
.rm-wheel { fill: var(--bg-color); stroke: var(--text-sub); stroke-width: 1.4; opacity: .8; }
.rotation-track { stroke: var(--slider-track); stroke-width: 6; transition: stroke .3s; }
.rotation-progress { stroke: var(--primary-color); stroke-width: 6; opacity: 0; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--primary-color) 55%, transparent)); transition: opacity .25s ease; }
.rot-tick { stroke: var(--border-color); stroke-width: 1; stroke-linecap: round; }
.rot-tick.major { stroke: var(--text-sub); stroke-width: 1.2; }
.rot-tick.zero { stroke: var(--text-main); stroke-width: 1.6; }
.rot-label { fill: var(--text-sub); font-size: 9.5px; font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; }
.rotation-knob { fill: var(--primary-color); stroke: #ffffff; stroke-width: 3px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); cursor: pointer; transition: stroke-width 0.25s; }
.rotation-knob:hover { stroke-width: 1.2px; cursor: pointer; }
.rotation-knob:active { stroke-width: 4.5px; cursor: pointer; }
/* --- 改键设置页面样式 --- */
#remap-view { margin-top: -16px; width: 100%; }
.remap-top { --rm-left-col: 150px; --rm-gap: 16px; --rm-side: 120px; --rm-stage-min: 300px; --rm-stage-max: 400px; display: grid; grid-template-columns: var(--rm-left-col) 1fr; gap: var(--rm-gap); align-items: start; }
.remap-btn-list { display: flex; flex-direction: column; gap: 7px; margin-top: 38px; }
.remap-btn { position: relative; padding: 9px 10px; background: var(--card-bg); border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-main); text-align: center; transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; user-select: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remap-btn::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0); width: 3px; height: 60%; border-radius: 0 3px 3px 0; background: var(--primary-color); transition: transform 0.2s cubic-bezier(0.2,0.9,0.3,1.3); }
.remap-btn:hover { transform: translateX(2px); border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); box-shadow: 0 3px 10px -4px color-mix(in srgb, var(--primary-color) 30%, transparent); }
.remap-btn:hover::before { transform: translateY(-50%) scaleY(0.6); }
.remap-btn.selected { background: var(--primary-light); color: var(--primary-color); font-weight: 600; }
.remap-btn.selected::before { transform: translateY(-50%) scaleY(1); }
.remap-mouse-map { position: relative; width: 100%; display: flex; justify-content: center; align-items: flex-start; overflow: visible; }
.remap-mouse-stage { position: relative; flex: none; width: clamp(var(--rm-stage-min), calc(100% - 2 * var(--rm-side)), var(--rm-stage-max)); aspect-ratio: 1 / 1; transform: translateY(0); }
.remap-mouse-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.10)); }
.remap-marker { position: absolute; transform: translate(-50%, -50%); cursor: pointer; z-index: 10; }
.remap-marker-dot { position: absolute; top: 0; left: 0; width: 9px; height: 9px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--primary-color); border: 2px solid #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 25%, transparent); transition: all 0.2s; }
.remap-marker.active .remap-marker-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--primary-color); opacity: 0; animation: markerPulse 1.8s ease-out infinite; }
@keyframes markerPulse { 0% { transform: scale(0.7); opacity: 0.55; } 100% { transform: scale(2.4); opacity: 0; } }
.remap-marker-line { position: absolute; top: 0; height: 1px; background: var(--border-color); transform: translateY(-50%); transition: background 0.2s; }
.remap-marker-label { position: absolute; top: 0; transform: translateY(-50%); box-sizing: border-box; text-align: center; padding: 3px 9px; background: color-mix(in srgb, var(--card-bg) 72%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-color); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-main); white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: all 0.2s; }
.remap-marker:hover .remap-marker-dot { transform: translate(-50%, -50%) scale(1.2); }
.remap-marker:hover .remap-marker-label { border-color: color-mix(in srgb, var(--primary-color) 45%, transparent); box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--primary-color) 30%, transparent); transform: translateY(calc(-50% - 1px)); }
.remap-marker:hover .remap-marker-line { background: color-mix(in srgb, var(--primary-color) 55%, transparent); }
.remap-marker.active .remap-marker-dot { background: #fff; border-color: var(--primary-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 30%, transparent); }
.remap-marker.active .remap-marker-line { background: var(--primary-color); }
.remap-marker.active .remap-marker-label { background: var(--primary-color); color: #fff; border-color: var(--primary-color); box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--primary-color) 50%, transparent); }
.remap-tabs { display: flex; gap: 8px; margin-top: 0; }
.remap-tab { width: 96px; padding: 7px 0; text-align: center; border-radius: 18px; cursor: pointer; background: var(--card-bg); color: var(--text-sub); font-size: 13.5px; font-weight: 500; transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; user-select: none; white-space: nowrap; }
.remap-tab:hover { color: var(--text-main); transform: translateY(-1px); box-shadow: 0 3px 8px -4px rgba(0,0,0,0.12); }
.remap-tab.active { background: var(--primary-light); color: var(--primary-color); font-weight: 600; }
.remap-panels { --remap-panel-h: 278px; --remap-left-w: 268px; margin-top: 16px; }
.remap-panel { background: transparent; border: none; padding: 0; }
#remapPanelNormal { --rf-chip: 106px; --rf-gap: 8px; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px; min-height: var(--remap-panel-h); display: flex; flex-direction: column; justify-content: space-between; }
/* --- 改键常规：分组外框 + 左标签列 + 等宽芯片（收敛终版） --- */
.remap-func-group { display: flex; align-items: center; gap: 16px; padding: 6px 12px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; width: min(calc(8 * var(--rf-chip) + 7 * var(--rf-gap) + 126px), 100%); }
.remap-func-group + .remap-func-group { margin-top: 8px; }
.remap-func-group-label { position: relative; flex: none; width: 84px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-sub); letter-spacing: 0.2px; line-height: 1.3; }
.remap-func-group-label svg { flex: none; width: 15px; height: 15px; stroke: var(--primary-color); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.remap-func-group-label::after { content: ''; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 1px; height: 20px; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--primary-color) 30%, var(--border-color)), transparent); }
.remap-func-group .remap-func-grid { flex: 1; min-width: 0; margin-bottom: 0; }
.remap-func-grid { display: flex; flex-wrap: wrap; gap: var(--rf-gap, 8px); margin-bottom: 10px; }
.remap-func-grid:last-child { margin-bottom: 0; }
.remap-func { flex: 0 0 var(--rf-chip, 106px); padding: 5px 6px; background: var(--primary-light); border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 400; color: var(--text-main); text-align: center; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.remap-func:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary-color) 50%, transparent); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary-color) 35%, transparent); }
.remap-func:active { transform: translateY(0) scale(0.97); }
.remap-func.selected { background: var(--primary-color); color: #fff; font-weight: 600; box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--primary-color) 50%, transparent); }
.remap-kb-wrap { display: flex; gap: 14px; align-items: stretch; min-height: var(--remap-panel-h); }
.remap-combo { width: var(--remap-left-w); flex-shrink: 0; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 10px 10px; display: flex; flex-direction: column; }
.remap-combo-title { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 0; letter-spacing: 0.2px; }
.remap-combo-slots { display: flex; align-items: center; gap: 6px; margin-top: auto; margin-bottom: 0; }
.remap-combo-slot { flex: 1 1 0; min-width: 0; height: 40px; padding: 0; border: 1px solid var(--border-color); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-main); background: var(--card-bg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; -webkit-appearance: none; appearance: none; transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; }
.remap-combo-slot:not(.empty):hover { border-color: color-mix(in srgb, var(--primary-color) 45%, transparent); box-shadow: 0 2px 8px -3px color-mix(in srgb, var(--primary-color) 30%, transparent); }
.remap-combo-slot.empty { color: var(--text-sub); font-weight: 400; border-style: dashed; }
.remap-combo-slot.empty:hover { border-color: color-mix(in srgb, var(--primary-color) 45%, transparent); }
.remap-combo-slot.active, .remap-combo-slot.active:hover { border-color: var(--primary-color); border-style: solid; color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg)); animation: comboSlotPulse 2.4s ease-in-out infinite; }
.remap-combo-slot.pop { animation: comboSlotPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.remap-combo-slot.active.pop { animation: comboSlotPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4), comboSlotPulse 2.4s ease-in-out infinite; }
@keyframes comboSlotPulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 16%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary-color) 7%, transparent); } }
@keyframes comboSlotPop { 0% { transform: scale(0.82); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.remap-combo-plus { flex: 0 0 22px; text-align: center; color: var(--text-sub); font-size: 14px; font-weight: 600; line-height: 1; }
.remap-combo-hint { font-size: 12px; color: var(--text-sub); line-height: 1.6; margin-top: auto; }
.remap-apply-btn { position: relative; overflow: hidden; padding: 9px 14px; border: 1px solid transparent; border-radius: 12px; background: var(--primary-light); color: var(--primary-color); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease; }
.remap-apply-btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary-color) 50%, transparent); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary-color) 35%, transparent); }
.remap-apply-btn:active { transform: translateY(0) scale(0.97); }
.remap-apply-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.remap-apply-btn:disabled:hover { transform: none; box-shadow: none; border-color: transparent; }
.remap-bind-row { display: flex; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-color); }
.remap-bind-row .remap-apply-btn { flex: 1; height: 36px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; letter-spacing: 0.3px; }
.remap-keyboard { flex: 1; min-width: 0; --key-w: 34px; --key-g: 3px; --kb-zone-gap: 16px; display: flex; flex-direction: column; justify-content: center; overflow-x: auto; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-sub) 35%, transparent) transparent; border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; background: var(--bg-color); }
.remap-keyboard::-webkit-scrollbar { height: 6px; }
.remap-keyboard::-webkit-scrollbar-track { background: transparent; }
.remap-keyboard::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-sub) 30%, transparent); border-radius: 3px; transition: background 0.2s ease; }
.remap-keyboard::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--primary-color) 45%, transparent); }
/* --- 键盘三区并排：主键区 / 编辑功能区 / 小键盘区 --- */
.remap-kb-zones { display: flex; align-items: flex-start; gap: var(--kb-zone-gap); margin: auto; }
.remap-kb-zone-main { display: flex; flex-direction: column; }
.remap-kb-zone-grid { display: grid; grid-template-rows: repeat(6, var(--key-w)); gap: var(--key-g); }
.remap-kb-zone-edit { grid-template-columns: repeat(3, calc(var(--key-w) * 1.2)); }
.remap-kb-zone-numpad { grid-template-columns: repeat(4, var(--key-w)); }
.remap-kb-zone-grid .remap-key { height: auto; }
.remap-kb-row { display: flex; gap: var(--key-g); margin-bottom: var(--key-g); }
.remap-kb-row:last-child { margin-bottom: 0; }
.remap-key { height: var(--key-w); border-radius: 7px; background: var(--primary-light); color: var(--text-main); font-size: 12px; font-weight: 400; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; transition: all 0.15s; box-sizing: border-box; padding: 0 2px; text-align: center; line-height: 1.1; flex: 0 0 auto; white-space: nowrap; }
.remap-key:hover { background: color-mix(in srgb, var(--primary-color) 22%, transparent); }
.remap-key:active { transform: scale(0.94); }
.remap-key.sp { background: transparent; cursor: default; pointer-events: none; }
.remap-key.sp:hover { background: transparent; }
.remap-macro-wrap { --macro-editor-h: 258px; display: flex; gap: 14px; align-items: stretch; min-height: var(--remap-panel-h); }
.remap-macro-list { width: var(--remap-left-w); flex-shrink: 0; height: calc(var(--macro-editor-h) + 20px); background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.remap-macro-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 30px; margin-bottom: 8px; }
.remap-macro-toolbar-left { display: flex; align-items: center; gap: 8px; }
.remap-macro-toolbtn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--card-bg); color: var(--text-main); font-size: 12px; font-weight: 600; cursor: pointer; transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; white-space: nowrap; }
.remap-macro-toolbtn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.remap-macro-toolbtn:hover { border-color: color-mix(in srgb, var(--primary-color) 45%, transparent); color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 7%, var(--card-bg)); transform: translateY(-1px); box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--primary-color) 40%, transparent); }
.remap-macro-toolbtn:active { transform: translateY(0) scale(0.97); }
.remap-macro-items { flex: none; height: 160px; min-height: 0; display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-sub) 35%, transparent) transparent; }
.remap-macro-items::-webkit-scrollbar { width: 6px; }
.remap-macro-items::-webkit-scrollbar-track { background: transparent; }
.remap-macro-items::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-sub) 30%, transparent); border-radius: 3px; transition: background 0.2s ease; }
.remap-macro-items::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--primary-color) 45%, transparent); }
.remap-macro-empty { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-sub); font-size: 13px; user-select: none; pointer-events: none; }
.remap-macro-empty svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.remap-macro-empty span { letter-spacing: 0.2px; }
.remap-macro-item { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; flex: none; padding: 0 6px 0 12px; border-radius: 10px; background: var(--card-bg); color: var(--text-main); font-size: 13px; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease; user-select: none; }
.remap-macro-item:hover { background: color-mix(in srgb, var(--primary-color) 7%, var(--card-bg)); transform: translateX(2px); }
.remap-macro-item.selected { background: var(--primary-gradient); color: #fff; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary-color) 55%, transparent); }
.remap-macro-item.selected:hover { background: var(--primary-gradient); }
.remap-macro-item-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; letter-spacing: 0.2px; }
.remap-macro-item-actions { display: flex; align-items: center; gap: 0; margin-left: auto; flex: none; }
.remap-macro-ico { width: 22px; height: 22px; padding: 0; border: none; border-radius: 7px; background: transparent; color: var(--text-sub); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.remap-macro-ico svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.remap-macro-ico:hover { background: color-mix(in srgb, var(--primary-color) 12%, transparent); color: var(--primary-color); }
.remap-macro-item.selected .remap-macro-ico { color: rgba(255, 255, 255, 0.85); }
.remap-macro-item.selected .remap-macro-ico:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.remap-macro-item.editing, .remap-macro-item.editing.selected { padding: 0 6px; cursor: default; background: var(--card-bg); box-shadow: none; }
.remap-macro-item.editing .remap-macro-rename-input, .remap-macro-item.editing.selected .remap-macro-rename-input { background: var(--bg-color); }
.remap-macro-rename-input { flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--primary-color) 60%, var(--border-color)); border-radius: 8px; background: var(--bg-color); color: var(--text-main); font-size: 13px; font-weight: 600; outline: none; }
.remap-macro-item.selected .remap-macro-rename-input { background: rgba(255, 255, 255, 0.96); }
.remap-macro-list .remap-bind-row { padding-top: 12px; }
.remap-macro-list .remap-apply-btn { padding: 0 14px; height: 36px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; letter-spacing: 0.3px; }
.remap-macro-editor { flex: 1; min-width: 0; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.remap-macro-empty-editor { flex: none; height: var(--macro-editor-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; }
.remap-macro-empty-ico { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--primary-color) 8%, transparent); color: var(--primary-color); pointer-events: none; }
.remap-macro-empty-ico svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.remap-macro-empty-text { font-size: 13px; color: var(--text-sub); line-height: 1.6; max-width: 220px; }
/* --- 录制专注模式 --- */
.macro-focus-backdrop { position: fixed; inset: 0; z-index: 850; background: radial-gradient(130% 100% at 50% 22%, rgba(15, 23, 42, 0.36) 0%, rgba(15, 23, 42, 0.52) 55%, rgba(15, 23, 42, 0.68) 100%); backdrop-filter: blur(8px) saturate(1.1); -webkit-backdrop-filter: blur(8px) saturate(1.1); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s ease, visibility 0s linear 0.2s; }
.macro-focus-backdrop.visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s cubic-bezier(0.33, 1, 0.68, 1) 0.02s, visibility 0s linear 0s; }
.remap-macro-editor { position: relative; }
.remap-macro-editor::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 36px 90px -24px rgba(2, 6, 23, 0.55), 0 12px 32px -16px rgba(2, 6, 23, 0.4); opacity: 0; transition: opacity 0.36s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none; }
.remap-macro-editor.is-focus { position: fixed; top: var(--focus-top); left: var(--focus-left); width: var(--focus-w); height: var(--focus-h); z-index: 900; }
.remap-macro-editor.is-focus::after { opacity: 1; }
.remap-macro-editor.is-focus .macro-editor-card { animation: focusSettle 0.38s cubic-bezier(0.25, 1, 0.5, 1) both; }
@keyframes focusSettle { from { opacity: 0.7; } to { opacity: 1; } }
.remap-macro-editor.is-focus .macro-record-panel { height: auto; }
.remap-macro-editor.is-recording .macro-mode-group { pointer-events: none; opacity: 0.4; }
/* --- 宏编辑器右栏 --- */
.macro-editor-card { flex: 1; display: flex; align-items: stretch; min-height: 0; }
.macro-settings-panel { flex: none; width: 300px; padding: 0 20px 0 16px; display: flex; flex-direction: column; gap: 12px; }
.macro-divider { width: 1px; background: var(--border-color); flex-shrink: 0; }
.macro-record-panel { flex: 1; min-width: 0; height: var(--macro-editor-h); padding: 0 14px 0 20px; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.macro-record-body { display: flex; gap: 20px; flex: 1; min-height: 0; }
.macro-record-controls { width: 66px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.macro-record-controls .macro-btn { flex-direction: column; height: auto; padding: 8px 4px; gap: 4px; width: 100%; white-space: normal; line-height: 1.2; font-size: 11px; }
.macro-record-controls .macro-btn > svg { width: 16px; height: 16px; flex-shrink: 0; }
.macro-record-controls .macro-rec-labels { font-size: 11px; }
.macro-record-controls [data-act="clear"] { margin-top: 12px; }
.macro-btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.macro-btn-expand { background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); }
.macro-btn-expand:hover { background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg)); border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); transform: translateY(-1px); }
.macro-btn-expand.active { background: var(--primary-light); color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 45%, transparent); }
.macro-expand-icon { display: inline-grid; justify-items: center; align-items: center; width: 14px; height: 14px; flex-shrink: 0; }
.macro-expand-icon > * { grid-area: 1 / 1; }
.macro-expand-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: opacity 0.15s ease; }
.macro-expand-icon .icon-collapse { opacity: 0; }
.macro-btn-expand.active .icon-expand { opacity: 0; }
.macro-btn-expand.active .icon-collapse { opacity: 1; }
.macro-expand-labels { display: inline-grid; justify-items: center; }
.macro-expand-labels > span { grid-area: 1 / 1; white-space: nowrap; }
.macro-expand-label-close { visibility: hidden; }
.macro-btn-expand.active .macro-expand-label-open { visibility: hidden; }
.macro-btn-expand.active .macro-expand-label-close { visibility: visible; }
.macro-mode-group { display: flex; flex-direction: column; gap: 10px; }
.macro-mode-item { display: flex; align-items: center; height: 52px; padding: 0 14px; background: var(--card-bg); border: 1px solid transparent; border-radius: 10px; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; user-select: none; }
.macro-mode-item:hover { background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg)); }
.macro-mode-item.active { border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); }
.macro-radio { width: 18px; height: 18px; border: 1.5px solid color-mix(in srgb, var(--text-sub) 70%, transparent); border-radius: 50%; margin-right: 10px; position: relative; flex-shrink: 0; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.macro-mode-item:hover .macro-radio { border-color: color-mix(in srgb, var(--primary-color) 55%, var(--text-sub)); }
.macro-radio::after { content: ''; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); transform: translate(-50%, -50%) scale(0); transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.macro-radio.checked { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.macro-radio.checked::after { transform: translate(-50%, -50%) scale(1); }
.macro-mode-label { font-size: 14px; color: var(--text-main); }
.macro-mode-item .num-field { margin-left: auto; }
.macro-toggle-row { display: flex; align-items: center; height: 52px; padding: 0 14px; background: var(--card-bg); border-radius: 10px; }
.macro-toggle-label { font-size: 14px; color: var(--text-main); }
.macro-toggle-row .toggle-switch { margin-left: auto; }
.macro-btn { height: 30px; padding: 0 14px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 5px; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.macro-btn:active { transform: translateY(0) scale(0.97); }
.macro-btn-record { background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); }
.macro-btn-record:hover { background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg)); border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); transform: translateY(-1px); }
.macro-btn-record.active { background: #ef4444; color: #fff; border-color: #ef4444; }
.macro-btn-record.active:hover { background: #dc2626; border-color: #dc2626; }
.macro-rec-icon { display: inline-grid; justify-items: center; align-items: center; width: 14px; height: 14px; flex-shrink: 0; }
.macro-rec-icon > * { grid-area: 1 / 1; }
.macro-rec-icon .icon-play { width: 14px; height: 14px; transition: opacity 0.15s ease; }
.macro-rec-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0; transition: opacity 0.15s ease; }
.macro-btn-record.active .icon-play { opacity: 0; }
.macro-btn-record.active .macro-rec-dot { opacity: 1; animation: macroRecPulse 1.2s ease-in-out infinite; }
@keyframes macroRecPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.macro-rec-labels { display: inline-grid; justify-items: center; }
.macro-rec-labels > span { grid-area: 1 / 1; white-space: nowrap; }
.macro-rec-label-stop { visibility: hidden; }
.macro-btn-record.active .macro-rec-label-start { visibility: hidden; }
.macro-btn-record.active .macro-rec-label-stop { visibility: visible; }
.macro-btn-secondary { background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); }
.macro-btn-secondary:hover { background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg)); border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); transform: translateY(-1px); }
.macro-btn[data-act="clear"]:hover { background: color-mix(in srgb, #ef4444 10%, var(--card-bg)); border-color: color-mix(in srgb, #ef4444 45%, transparent); color: #ef4444; transform: translateY(-1px); box-shadow: 0 4px 12px -4px color-mix(in srgb, #ef4444 35%, transparent); }
.macro-btn[data-act="clear"]:active { background: color-mix(in srgb, #ef4444 16%, var(--card-bg)); }
.macro-btn-dark { background: var(--primary-color); color: #fff; }
.macro-btn-dark:hover { background: color-mix(in srgb, var(--primary-color) 85%, #000); transform: translateY(-1px); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary-color) 50%, transparent); }
.macro-key-log-list { width: 100%; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; padding: 2px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-sub) 35%, transparent) transparent; }
.macro-key-log-list::-webkit-scrollbar { width: 6px; }
.macro-key-log-list::-webkit-scrollbar-track { background: transparent; }
.macro-key-log-list::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-sub) 30%, transparent); border-radius: 3px; transition: background 0.2s ease; }
.macro-key-log-list::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--primary-color) 45%, transparent); }
.macro-key-log-placeholder { color: var(--text-sub); font-size: 13px; padding: 32px 0; margin: auto 0; text-align: center; user-select: none; opacity: 0.8; }
.macro-key-log-list.recording,
.macro-key-log-list.capturing { cursor: crosshair; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary-color) 35%, transparent); border-radius: 10px; }
.macro-key-log-list.recording .macro-record-card,
.macro-key-log-list.capturing .macro-record-card { pointer-events: none; }
.macro-key-log-list.recording { animation: macroListBreathe 2.2s ease-in-out infinite; }
@keyframes macroListBreathe {
0%, 100% {
box-shadow:
inset 0 0 0 1.5px color-mix(in srgb, var(--primary-color) 35%, transparent),
0 0 0 0 color-mix(in srgb, var(--primary-color) 28%, transparent);
}
50% {
box-shadow:
inset 0 0 0 1.5px color-mix(in srgb, var(--primary-color) 35%, transparent),
0 0 0 8px color-mix(in srgb, var(--primary-color) 10%, transparent);
}
}
@media (prefers-reduced-motion: reduce) { .macro-key-log-list.recording { animation: none; } }
.macro-record-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 4px 12px; display: flex; align-items: center; gap: 10px; transition: box-shadow 0.2s ease, opacity 0.15s ease, transform 0.15s ease, border-color 0.2s ease; cursor: default; position: relative; touch-action: none; width: 100%; min-width: 0; max-width: 480px; flex-shrink: 0; }
.macro-record-card:hover { box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--primary-color) 25%, rgba(15,23,42,0.12)); border-color: color-mix(in srgb, var(--primary-color) 35%, transparent); transform: translateY(-1px); }
.macro-record-card.is-dragging { opacity: 0.9; box-shadow: 0 12px 28px -6px rgba(15,23,42,0.28); z-index: 1000; pointer-events: none; position: fixed; transition: none; cursor: grabbing; }
body.macro-dragging, body.macro-dragging * { cursor: grabbing !important; }
.macro-drag-icon { width: 14px; height: 14px; box-sizing: content-box; padding: 8px 8px; margin: -8px -2px; color: var(--text-sub); flex-shrink: 0; cursor: grab; touch-action: none; opacity: 0.6; transition: opacity 0.15s ease; }
.macro-record-card:hover .macro-drag-icon { opacity: 1; }
.macro-drag-icon:active { cursor: grabbing; }
.macro-key-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; max-width: 110px; height: 36px; padding: 0 8px; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-main); font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace; font-size: 13px; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; cursor: pointer; transition: all 0.15s ease; }
.macro-key-tag:hover { background: color-mix(in srgb, var(--primary-color) 8%, var(--bg-color)); border-color: color-mix(in srgb, var(--primary-color) 45%, transparent); color: var(--primary-color); }
.macro-key-tag.empty { border-style: dashed; border-color: var(--text-sub); color: var(--text-sub); background: transparent; font-weight: 500; font-style: italic; }
.macro-key-tag.empty:hover { border-color: var(--primary-color); color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 6%, transparent); }
.macro-key-tag.capturing {
background: var(--primary-light);
border-color: var(--primary-color);
color: var(--primary-color);
font-style: normal;
animation: macroKeyCapturePulse 1.4s ease-in-out infinite;
}
.macro-state-btn-group { display: flex; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; flex-shrink: 0; height: 36px; }
.macro-state-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; border: none; background: var(--bg-color); color: var(--text-sub); cursor: pointer; transition: all 0.15s ease; line-height: 1; white-space: nowrap; height: 100%; }
.macro-state-btn:first-child { border-right: 1px solid var(--border-color); }
.macro-state-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.macro-state-btn.active-down { background: var(--primary-color); color: #fff; }
.macro-state-btn.active-down svg { stroke: #fff; }
.macro-state-btn.active-up { background: var(--primary-color); color: #fff; }
.macro-state-btn.active-up svg { stroke: #fff; }
.macro-wait-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-sub); opacity: 0.7; }
.macro-time-input-wrap { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-color); height: 36px; padding: 0 5px; gap: 3px; flex-shrink: 0; transition: border-color 0.2s ease; margin-right: 30px; }
.macro-time-input-wrap:focus-within { border-color: var(--primary-color); }
.macro-time-input-wrap input { width: 44px; border: none; background: transparent; font-size: 13px; font-weight: 600; text-align: right; outline: none; color: var(--text-main); -moz-appearance: textfield; }
.macro-time-input-wrap input::-webkit-outer-spin-button, .macro-time-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.macro-time-unit { font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.macro-insert-btn { width: 26px; height: 26px; border: none; background: transparent; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-sub); transition: all 0.15s ease; flex-shrink: 0; margin-left: auto; }
.macro-insert-btn:hover { background: color-mix(in srgb, var(--primary-color) 12%, transparent); color: var(--primary-color); }
.macro-insert-btn svg { width: 16px; height: 16px; }
.macro-delete-btn { width: 26px; height: 26px; border: none; background: transparent; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-sub); transition: all 0.15s ease; flex-shrink: 0; margin-right: 2px; }
.macro-delete-btn:hover { background: color-mix(in srgb, #ef4444 12%, transparent); color: #ef4444; }
.macro-delete-btn svg { width: 16px; height: 16px; }
.macro-inline-hint {
position: fixed; z-index: 1200;
transform: translateX(-50%);
white-space: nowrap;
background: var(--hint-bg); color: var(--hint-fg);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
font-size: 12px; font-weight: 600; letter-spacing: 0.2px;
padding: 6px 12px; border-radius: 8px;
box-shadow: 0 8px 22px -6px rgba(0,0,0,0.4);
pointer-events: none;
animation: macroHintIn 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.macro-inline-hint::after {
content: ''; position: absolute; left: 50%; top: 100%;
transform: translateX(-50%);
border: 5px solid transparent; border-top-color: var(--hint-bg);
}
.macro-inline-hint.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--hint-bg); }
@keyframes macroKeyCapturePulse {
0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 40%, transparent); }
50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary-color) 15%, transparent); }
}
@keyframes macroHintIn {
from { opacity: 0; transform: translateX(-50%) translateY(5px); }
to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* --- 改键：左键保护确认弹窗 --- */
.remap-modal-mask { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(6px); opacity: 0; animation: rmMaskIn 0.22s ease forwards; }
@keyframes rmMaskIn { from { opacity: 0; } to { opacity: 1; } }
.remap-modal { position: relative; width: min(420px, calc(100% - 48px)); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 28px 26px 22px; box-shadow: 0 24px 60px -12px rgba(0,0,0,0.35); text-align: center; transform: translateY(10px) scale(0.94); opacity: 0; animation: rmModalIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; }
@keyframes rmModalIn { to { transform: translateY(0) scale(1); opacity: 1; } }
.remap-modal-icon { position: relative; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 8px 20px -4px rgba(245,158,11,0.5); }
.remap-modal-icon::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; background: rgba(245,158,11,0.25); animation: rmIconPulse 1.8s ease-in-out infinite; }
@keyframes rmIconPulse { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.18); opacity: 0; } }
.remap-modal-icon svg { position: relative; z-index: 1; width: 26px; height: 26px; stroke: #fff; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.remap-modal-title { font-size: 18px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; letter-spacing: 0.3px; }
.remap-modal-body { font-size: 13.5px; line-height: 1.6; color: var(--text-sub); margin-bottom: 22px; }
.remap-modal-actions { display: flex; gap: 12px; }
.remap-modal-btn { flex: 1; padding: 11px 0; border-radius: 11px; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s; }
.remap-modal-btn:active { transform: translateY(1px) scale(0.98); }
.remap-modal-btn.ghost { background: transparent; border: 1px solid var(--border-color); color: var(--text-sub); }
.remap-modal-btn.ghost:hover { color: var(--text-main); border-color: color-mix(in srgb, var(--text-sub) 60%, transparent); background: var(--bg-color); }
.remap-modal-btn.primary { background: var(--primary-gradient); border: none; color: #fff; box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--primary-color) 60%, transparent); }
.remap-modal-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -6px color-mix(in srgb, var(--primary-color) 70%, transparent); }
/* --- 灯光设置页面样式 --- */
.light-card { background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 14px; padding: clamp(12px, 1.4vw, 16px); margin-bottom: 0; transition: opacity .25s ease, filter .25s ease; }
.light-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.light-card-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text-main); letter-spacing: 0.2px; }
.light-card-title svg { flex: none; width: 15px; height: 15px; stroke: var(--primary-color); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* --- 鼠标灯光主面板 --- */
.light-mouse-panel { position: relative; overflow: hidden; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: clamp(12px, 1.4vw, 16px); box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px -16px rgba(15,23,42,0.12); transition: box-shadow .3s ease; }
.light-mouse-panel:hover { box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 14px 34px -18px rgba(15,23,42,0.16); }
.light-mouse-panel::before { content: ''; position: absolute; top: -55%; right: -6%; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 12%, transparent) 0%, transparent 70%); pointer-events: none; z-index: 0; }
.light-mouse-head { position: relative; z-index: 1; display: flex; align-items: center; margin-bottom: 12px; }
.light-head-title { font-size: 17px; font-weight: 700; color: var(--text-main); letter-spacing: 0.3px; line-height: 1.2; }
.light-layout { display: flex; gap: 16px; align-items: stretch; position: relative; }
.light-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 12px; margin-right: 336px; }
.light-aside { position: absolute; top: 0; right: 0; bottom: 0; width: 320px; display: flex; flex-direction: column; gap: 12px; }
.light-effect-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@property --lx-color { syntax: '<color>'; inherits: true; initial-value: #2563eb; }
.light-mini-stage { flex: 1 1 auto; width: 100%; min-height: 196px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 16px; background: linear-gradient(160deg, #0c1322 0%, #080d18 100%); border: 1px solid color-mix(in srgb, var(--lx-color, #2563eb) 26%, rgba(255,255,255,0.07)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 32px -18px rgba(0,0,0,0.55); transition: border-color .4s ease, background .4s ease; --lx-bright: 1; --lx-color: #2563eb; --lx-dur: 1.7s; }
.light-mini-mouse { height: 55%; width: auto; aspect-ratio: 120 / 172; max-width: 74%; overflow: visible; display: block; transition: height .3s ease; }
.light-mini-name { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; color: rgba(255,255,255,0.7); max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 8px color-mix(in srgb, var(--lx-color) 55%, transparent); }
.lm-glow-wrap { opacity: var(--lx-bright); transition: opacity .4s ease; }
.lm-ambient { fill: none; stroke: currentColor; color: var(--lx-color); opacity: .4; will-change: opacity; }
[data-fx="breath"] .lm-ambient,
[data-fx="dpibreath"] .lm-ambient { animation: lmAmbient var(--lx-dur) ease-in-out infinite; }
@keyframes lmAmbient { 0%,100% { opacity: .26; } 50% { opacity: .55; } }
[data-fx="off"] .lm-glow-wrap { opacity: 0; }
.lm-glow-pulse { fill: none; stroke: currentColor; stroke-width: 3; color: var(--lx-color); transition: color .4s ease; }
[data-fx="on"] .lm-glow-pulse { filter: drop-shadow(0 0 5px currentColor) drop-shadow(0 0 11px currentColor); }
[data-fx="breath"] .lm-glow-pulse,
[data-fx="dpibreath"] .lm-glow-pulse { filter: drop-shadow(0 0 7px currentColor) drop-shadow(0 0 15px currentColor); animation: lmBreath var(--lx-dur) ease-in-out infinite; }
.light-mini-stage[data-fx="neon"] { animation: lmNeonCycle 3.4s linear infinite; transition: none; }
[data-fx="neon"] .lm-glow-pulse { filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px currentColor); transition: none; }
@keyframes lmBreath { 0%,100% { opacity: .32; } 50% { opacity: 1; } }
@keyframes lmNeonCycle {
0% { --lx-color: #ef4444; }
33.3% { --lx-color: #22c55e; }
66.6% { --lx-color: #3b82f6; }
100% { --lx-color: #ef4444; }
}
.lm-body { fill: rgba(255,255,255,0.02); stroke: rgba(255,255,255,0.16); stroke-width: 1.6; }
[data-fx="off"] .lm-body { stroke: rgba(255,255,255,0.10); }
.lm-seam { stroke: rgba(255,255,255,0.14); stroke-width: 1.4; stroke-dasharray: 3 3; }
.lm-wheel { fill: rgba(255,255,255,0.10); stroke: rgba(255,255,255,0.22); stroke-width: 1.2; }
.light-color-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg-color); border: 1px solid var(--border-color); cursor: pointer; position: relative; top: 0; transition: top .2s ease, border-color .2s ease; outline: none; }
.light-color-tile:hover { top: -2px; border-color: color-mix(in srgb, var(--primary-color) 42%, transparent); }
.light-color-tile:focus-visible { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.light-color-swatch { width: 46px; height: 46px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.55); box-shadow: 0 4px 14px -4px rgba(0,0,0,0.32), inset 0 0 0 1px rgba(0,0,0,0.06); flex-shrink: 0; transition: background .25s ease, box-shadow .25s ease; }
.light-color-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.light-color-hex { font-size: 14px; font-weight: 700; color: var(--text-main); letter-spacing: 0.5px; font-variant-numeric: tabular-nums; }
.light-color-rgb { display: flex; gap: 8px; font-size: 11px; font-weight: 700; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.light-color-rgb i { font-style: normal; }
.light-color-rgb i:nth-of-type(1) { color: #ef4444; }
.light-color-rgb i:nth-of-type(2) { color: #22c55e; }
.light-color-rgb i:nth-of-type(3) { color: #3b82f6; }
.light-color-rgb b { font-weight: 700; color: var(--text-main); }
.light-color-pick-hint { flex-shrink: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: color-mix(in srgb, var(--primary-color) 10%, transparent); color: var(--primary-color); transition: background .2s ease, transform .15s ease; }
.light-color-tile:hover .light-color-pick-hint { background: var(--primary-gradient); color: #fff; transform: scale(1.06); }
.light-color-pick-hint svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.light-color-hint { font-size: 12px; color: var(--text-sub); line-height: 1.5; display: none; padding: 0 2px; }
.light-effect-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 13px 6px; border-radius: 14px; background: var(--bg-color); border: 1px solid var(--border-color); cursor: pointer; color: var(--text-sub); transition: transform .2s cubic-bezier(.22,1,.36,1), border-color .25s ease, box-shadow .25s ease, color .25s ease, background .25s ease; user-select: none; }
.light-effect-card:hover { transform: translateY(-2px); color: var(--text-main); border-color: color-mix(in srgb, var(--primary-color) 38%, var(--border-color)); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--primary-color) 30%, transparent); }
.light-effect-card.active { color: var(--text-main); background: #ffffff; border-color: color-mix(in srgb, var(--primary-color) 55%, var(--border-color)); box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--primary-color) 42%, transparent), 0 1px 2px rgba(15,23,42,0.05); transform: translateY(-1px); }
body.theme-dark .light-effect-card.active { background: color-mix(in srgb, #ffffff 7%, var(--card-bg)); }
.light-effect-card::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 58%; height: 2.5px; border-radius: 2.5px 2.5px 0 0; background: var(--primary-color); transform: translateX(-50%) scaleX(0); transform-origin: center bottom; opacity: 0; transition: transform .34s cubic-bezier(.34,1.56,.64,1), opacity .25s ease; }
.light-effect-card.active::after { transform: translateX(-50%) scaleX(1); opacity: 1; }
.light-fx-ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; transition: color .25s ease; }
.light-fx-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.light-effect-card.active[data-fx="on"] .light-fx-ico,
.light-effect-card.active[data-fx="breath"] .light-fx-ico { color: var(--fx-live, var(--primary-color)); }
.light-effect-card.active[data-fx="neon"] .light-fx-ico { color: #ef4444; }
.light-effect-card.active[data-fx="dpibreath"] .light-fx-ico { color: var(--fx-dpi, var(--primary-color)); }
.light-effect-card.active[data-fx="off"] .light-fx-ico { color: var(--text-sub); opacity: .5; }
.light-effect-card.active .light-fx-name { font-weight: 700; }
.light-effect-card[data-fx="on"].active .light-fx-ico svg { filter: drop-shadow(0 0 4px currentColor); }
.light-effect-card[data-fx="breath"].active .light-fx-ico svg { animation: fxIcoBreath 2.6s ease-in-out infinite; }
.light-fx-ico .breath-core, .light-fx-ico .breath-halo { transform-box: fill-box; transform-origin: center; }
.light-effect-card[data-fx="breath"].active .breath-core { animation: fxIcoBreathCore 2.6s ease-in-out infinite; }
.light-effect-card[data-fx="breath"].active .breath-halo { animation: fxIcoBreathHalo 2.6s ease-in-out infinite; }
.light-effect-card[data-fx="neon"].active .light-fx-ico svg { animation: fxIcoNeon 3.4s linear infinite; }
.light-effect-card[data-fx="dpibreath"].active .light-fx-ico svg { animation: fxIcoDpiBreath 2.4s ease-in-out infinite; }
.light-effect-card.active[data-fx="flow"] .light-fx-ico svg .dongle-flow-path { stroke: url(#dongleFlowGrad); }
@keyframes fxIcoBreath { 0%, 100% { filter: drop-shadow(0 0 1px currentColor); } 50% { filter: drop-shadow(0 0 5px currentColor); } }
@keyframes fxIcoBreathCore { 0%, 100% { transform: scale(.7); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
@keyframes fxIcoBreathHalo { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes fxIcoNeon {
0% { color: #ef4444; filter: drop-shadow(0 0 3px #ef4444); }
33.3% { color: #22c55e; filter: drop-shadow(0 0 3px #22c55e); }
66.6% { color: #3b82f6; filter: drop-shadow(0 0 3px #3b82f6); }
100% { color: #ef4444; filter: drop-shadow(0 0 3px #ef4444); }
}
@keyframes fxIcoDpiBreath { 0%, 100% { opacity: .5; transform: scale(.92); filter: drop-shadow(0 0 1px currentColor); } 50% { opacity: 1; transform: scale(1.08); filter: drop-shadow(0 0 5px currentColor); } }
@media (prefers-reduced-motion: reduce) {
.light-effect-card.active:not([data-fx="off"]) .light-fx-ico svg { animation: none !important; filter: drop-shadow(0 0 3px currentColor); }
.light-effect-card.active .breath-core, .light-effect-card.active .breath-halo { animation: none !important; }
.light-effect-card::after { transition: none; }
.light-mini-stage[data-fx="neon"] { animation: none !important; --lx-color: #ef4444 !important; }
}
.light-fx-name { font-size: 12px; font-weight: 600; letter-spacing: 0.2px; }
.light-slider-row { display: flex; align-items: center; gap: 14px; }
.light-slider-row .range-slider { flex: 1; margin: 0; }
.light-slider-row .unit-text { font-size: 13px; color: var(--text-sub); flex-shrink: 0; }
.light-speed-grid { display: flex; gap: 8px; }
.light-speed-chip { flex: 1 1 0; min-width: 0; padding: 11px 4px; border-radius: 12px; background: var(--bg-color); border: 1px solid var(--border-color); color: var(--text-sub); font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; user-select: none; white-space: nowrap; transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease; }
.light-speed-chip:hover { transform: translateY(-2px); color: var(--text-main); border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); }
.light-speed-chip.active { color: #fff; background: var(--primary-gradient); border-color: transparent; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--primary-color) 70%, transparent); }
#lightDongleView { position: relative; margin-top: 22px; padding-top: 22px; }
#lightDongleView::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border-color) 10%, var(--border-color) 90%, transparent); }
.light-dongle-card { position: relative; overflow: hidden; margin-top: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: clamp(12px, 1.4vw, 16px); box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px -16px rgba(15,23,42,0.12); transition: box-shadow .3s ease; }
.light-dongle-card:hover { box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 14px 34px -18px rgba(15,23,42,0.16); }
.light-dongle-card::before { content: ''; position: absolute; top: -55%; right: -6%; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 11%, transparent) 0%, transparent 70%); pointer-events: none; z-index: 0; }
.light-dongle-head { position: relative; z-index: 1; display: flex; align-items: center; margin-bottom: 12px; }
.light-dongle-title { font-size: 16px; font-weight: 700; color: var(--text-main); letter-spacing: 0.3px; }
.light-dongle-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) calc(320px - clamp(12px, 1.4vw, 16px)); grid-template-rows: auto auto auto; gap: 15px calc(16px + clamp(14px, 1.6vw, 18px)); align-items: center; }
.light-dongle-row-fx { grid-column: 1 / -1; grid-row: 1; display: flex; flex-direction: row; align-items: center; gap: 14px; min-width: 0; }
.light-dongle-cell { display: flex; flex-direction: row; align-items: center; gap: 14px; min-width: 0; }
.light-dongle-cell-bright { grid-column: 1; grid-row: 2; }
.light-dongle-cell-speed { grid-column: 1; grid-row: 3; }
.light-dongle-cell-color { grid-column: 2; grid-row: 2 / 4; flex-direction: column; align-items: stretch; align-self: stretch; justify-content: flex-end; }
.light-dongle-section-label { flex: 0 0 auto; min-width: 90px; margin-bottom: 0; white-space: nowrap; text-align: left; font-size: 13px; font-weight: 600; color: var(--text-sub); letter-spacing: 0.2px; line-height: 1.4; }
.light-dongle-effect-grid, .light-dongle-slider-row, .light-dongle-speed-grid { flex: 1 1 auto; min-width: 0; }
.light-dongle-effect-grid { gap: 8px; }
.light-dongle-effect-grid .light-effect-card { flex-direction: row; justify-content: center; align-items: center; gap: 7px; padding: 9px 10px; }
.light-dongle-effect-grid .light-fx-ico { width: 18px; height: 18px; }
.light-dongle-effect-grid .light-fx-ico svg { width: 18px; height: 18px; }
.light-dongle-effect-grid .light-fx-name { font-size: 13px; }
.light-dongle-speed-grid { gap: 8px; }
.light-dongle-speed-grid .light-speed-chip { padding: 8px 6px; font-size: 13px; }
.light-dongle-color-tile { flex: 0 0 auto; margin-left: clamp(12px, 1.4vw, 16px); }
.light-dongle-color-tile .light-color-swatch { width: 44px; height: 44px; border-radius: 11px; }
.light-dongle-color-tile .light-color-pick-hint { width: 30px; height: 30px; }
/* --- 断连提示 v2 --- */
.device-disconnect-box {
width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
padding: 26px 26px 22px; position: relative; overflow: hidden;
background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px;
box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 16px 40px -20px rgba(15,23,42,0.12);
animation: ddbGlowFade 3.8s ease-out 1;
}
.device-disconnect-box[hidden] { display: none; }
.device-disconnect-box::after { content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, color-mix(in srgb, #ef4444 65%, transparent), transparent); z-index: 1; }
.device-disconnect-box > * { position: relative; z-index: 1; }
@keyframes ddbGlowFade {
0% { box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 16px 40px -20px rgba(15,23,42,0.12), 0 0 0 3px rgba(239,68,68,0.22), 0 0 28px rgba(239,68,68,0.16); }
100% { box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 16px 40px -20px rgba(15,23,42,0.12), 0 0 0 0 rgba(239,68,68,0), 0 0 0 rgba(239,68,68,0); }
}
.device-disconnect-box .ddb-scene { animation: ddbIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.device-disconnect-box .ddb-title { animation: ddbIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both; }
.device-disconnect-box .ddb-desc { animation: ddbIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both; }
.device-disconnect-box .ddb-steps { animation: ddbIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both; }
@keyframes ddbIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ddb-scene { width: 240px; height: 79px; margin-bottom: 14px; }
.ddb-scene svg { width: 100%; height: 100%; overflow: visible; animation: ddbFloat 6s ease-in-out infinite; }
@keyframes ddbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.ddb-mouse rect, .ddb-mouse line, .ddb-dongle rect { stroke: var(--text-sub); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ddb-led { fill: var(--text-sub); opacity: 0.25; }
.ddb-dash { stroke: color-mix(in srgb, #ef4444 35%, var(--text-sub)); stroke-width: 1.6; stroke-dasharray: 7 5; opacity: 0.55; animation: ddbLineBreath 4.8s ease-in-out infinite; }
.ddb-scan { fill: #f87171; opacity: 0; filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.6)); animation: ddbScan 4.2s ease-in-out infinite; }
@keyframes ddbScan {
0% { transform: translateX(0); opacity: 0; }
10% { opacity: 0.9; }
45% { transform: translateX(-44px); opacity: 0.9; }
55% { transform: translateX(-50px); opacity: 0; }
100% { transform: translateX(-50px); opacity: 0; }
}
.ddb-scan2 { fill: #f87171; opacity: 0; filter: blur(2px); animation: ddbScan 4.2s ease-in-out 0.22s infinite; }
.ddb-emit { stroke: color-mix(in srgb, #ef4444 65%, var(--text-sub)); stroke-width: 1.4; stroke-linecap: round; fill: none; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ddbEmit 4.2s ease-out infinite; }
@keyframes ddbEmit {
0% { transform: scale(0.6); opacity: 0; }
6% { opacity: 0.7; }
22% { transform: scale(1.15); opacity: 0; }
100% { transform: scale(1.15); opacity: 0; }
}
@keyframes ddbLineBreath { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.65; } }
.ddb-led2 { fill: color-mix(in srgb, #ef4444 80%, var(--text-sub)); animation: ddbScanLed 4.2s ease-in-out infinite; }
@keyframes ddbScanLed {
0%, 100% { opacity: 0.25; }
6% { opacity: 1; }
12% { opacity: 0.3; }
18% { opacity: 1; }
30% { opacity: 0.25; }
}
@media (prefers-reduced-motion: reduce) {
.ddb-title-dot, .device-disconnect-box, .ddb-scene svg, .ddb-mouse, .ddb-scan, .ddb-scan2, .ddb-emit, .ddb-led2, .ddb-dash { animation: none; }
.ddb-scan, .ddb-scan2, .ddb-emit { opacity: 0; }
}
.ddb-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--text-main); letter-spacing: 0.4px; margin-bottom: 14px; }
.ddb-title-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); animation: ddbDot 1.6s ease-in-out infinite; flex-shrink: 0; }
@keyframes ddbDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .ddb-title-dot { animation: none; } .device-disconnect-box { animation: none; } }
.ddb-desc { font-size: 12.5px; color: var(--text-sub); line-height: 1.7; margin-bottom: 12px; width: 100%; text-align: left; padding-top: 14px; background: linear-gradient(90deg, transparent, var(--border-color) 15%, var(--border-color) 85%, transparent) top / 100% 1px no-repeat; }
.ddb-steps { list-style: none; width: 100%; text-align: left; display: flex; flex-direction: column; margin-bottom: 0; }
.ddb-steps li { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.ddb-steps li:last-child { padding-bottom: 0; }
.ddb-steps li:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 2px; width: 1px; background: linear-gradient(to bottom, var(--border-color), transparent); }
.ddb-step-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--primary-color) 10%, transparent); color: var(--primary-color); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; transition: transform 0.2s ease, background 0.2s ease; }
.ddb-steps li:hover .ddb-step-num { transform: scale(1.12); background: color-mix(in srgb, var(--primary-color) 18%, transparent); }
.ddb-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ddb-step-body strong { font-size: 13px; font-weight: 600; color: var(--text-main); }
.ddb-step-body span { font-size: 12px; color: var(--text-sub); line-height: 1.6; }
/* --- 设备设置页面样式 --- */
.device-layout { display: flex; gap: 64px; align-items: flex-start; padding: 0 32px; }
.device-side { flex: none; width: 420px; margin-top: 26px; display: flex; justify-content: center; }
.device-mouse-img { width: 100%; max-width: 420px; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15)); }
.device-cards { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.device-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: clamp(16px, 2vw, 24px); }
.device-action-btn:disabled { opacity: 0.45; filter: grayscale(0.4); cursor: not-allowed; pointer-events: none; }
.device-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.device-card-title { font-size: 15px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.device-card-desc { font-size: 13px; color: var(--text-sub); line-height: 1.5; }
.device-ver-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.device-ver-chips { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.device-ver-chip { font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace; font-size: 12.5px; font-weight: 700; letter-spacing: .3px; color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 8%, var(--card-bg)); border: 1px solid color-mix(in srgb, var(--primary-color) 20%, var(--border-color)); border-radius: 8px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.device-action-btn { flex: none; width: 120px; height: 40px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-color); color: var(--text-main); font-size: 13px; font-weight: 600; letter-spacing: 0.2px; cursor: pointer; outline: none; box-shadow: 0 1px 2px rgba(15,23,42,0.04); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
.device-action-btn:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--primary-color) 25%, transparent), 0 1px 2px rgba(15,23,42,0.05); }
.device-select-wrap { position: relative; flex: none; }
/* --- 外观选择自定义气泡下拉（与配对接收器下拉同族，尺寸按设备卡收敛） --- */
.appearance-dd { position: relative; width: 120px; }
.appearance-dd-trigger { position: relative; width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0 30px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-color); color: var(--text-main); font-size: 13px; font-weight: 600; letter-spacing: 0.2px; cursor: pointer; outline: none; box-shadow: 0 1px 2px rgba(15,23,42,0.04); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; text-align: center; }
.appearance-dd-trigger:hover:not(:disabled) { border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color)); box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--primary-color) 25%, transparent), 0 1px 2px rgba(15,23,42,0.05); }
.appearance-dd-trigger:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.appearance-dd.open .appearance-dd-trigger { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light), 0 4px 12px -6px color-mix(in srgb, var(--primary-color) 25%, transparent); }
.appearance-dd-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appearance-dd-caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); flex: none; width: 16px; height: 16px; stroke: var(--text-sub); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.appearance-dd.open .appearance-dd-caret { transform: translateY(-50%) rotate(180deg); }
.appearance-dd-pop { position: absolute; top: calc(100% + 4px); right: 0; width: 100%; z-index: 20; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 18px 44px -12px rgba(15,23,42,0.26), 0 4px 12px rgba(15,23,42,0.07); padding: 6px; max-height: 188px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-sub) 35%, transparent) transparent; transform-origin: top center; animation: pairPopIn .24s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
.appearance-dd-pop::-webkit-scrollbar { width: 6px; }
.appearance-dd-pop::-webkit-scrollbar-track { background: transparent; }
.appearance-dd-pop::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-sub) 30%, transparent); border-radius: 3px; }
.appearance-dd-pop[hidden] { display: none; }
.appearance-dd-option { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-main); cursor: pointer; transition: background .15s ease, color .15s ease; }
.appearance-dd-option + .appearance-dd-option { margin-top: 2px; }
.appearance-dd-option:hover { background: color-mix(in srgb, var(--primary-color) 8%, transparent); color: var(--primary-color); }
.appearance-dd-option.selected { background: var(--primary-light); color: var(--primary-color); font-weight: 600; }
.appearance-dd-option-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appearance-dd-check { flex: none; width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); transition: opacity .15s ease, transform .2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.appearance-dd-option.selected .appearance-dd-check { opacity: 1; transform: scale(1); }
.device-ghost-btn { flex: none; padding: 10px 16px; border: 1px solid color-mix(in srgb, var(--text-sub) 38%, transparent); border-radius: 10px; background: transparent; color: var(--text-main); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
.device-ghost-btn:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }
.device-ghost-btn.attention { border-color: var(--primary-color); color: var(--primary-color); animation: pairAuthPulse 1.2s ease-in-out 2; }
@keyframes pairAuthPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 0%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary-color) 18%, transparent); } }
.pair-dd-trigger:disabled, .pair-controls .device-ghost-btn:disabled, .pair-main-btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.pair-modal-mask { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(6px); }
.pair-modal-mask[hidden] { display: none; }
.pair-modal { width: min(720px, calc(100% - 48px)); max-height: calc(100vh - 96px); overflow-y: auto; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: clamp(24px, 3vw, 32px); box-shadow: 0 24px 60px -12px rgba(0,0,0,0.35); animation: rmModalIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.pair-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.pair-page-head .device-card-title { margin-bottom: 0; font-size: 16px; }
.pair-page-head .device-card-desc { margin-bottom: 0; }
.pair-stage-chip { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary-color) 10%, transparent); color: var(--primary-color); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.pair-stage-chip .pair-stage-num { opacity: .7; font-variant-numeric: tabular-nums; }
.pair-stage-anim { display: flex; justify-content: center; margin: 2px 0 6px; }
.pair-stage-anim svg { width: 180px; height: 76px; overflow: visible; }
.pair-stage-anim .psa-mouse rect, .pair-stage-anim .psa-mouse line, .pair-stage-anim .psa-dongle rect { stroke: var(--text-sub); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s ease; }
.pair-stage-anim .psa-led, .pair-stage-anim .psa-led2 { fill: var(--text-sub); stroke: none; opacity: .5; transition: fill .25s ease, opacity .25s ease; }
.psa-dash { stroke: var(--text-sub); stroke-width: 1.2; stroke-dasharray: 7 5; opacity: .55; animation: psaDash 1.2s linear infinite, psaBreath 2s ease-in-out infinite; }
@keyframes psaDash { to { stroke-dashoffset: -10; } }
@keyframes psaBreath { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
.psa-waves .psa-wave { stroke: var(--primary-color); stroke-width: 1.4; fill: none; stroke-linecap: round; opacity: 0; animation: psaWave 1.5s ease-out infinite; }
.psa-waves .psa-w2 { animation-delay: .25s; }
.psa-waves .psa-w3 { animation-delay: .5s; }
@keyframes psaWave { 0% { opacity: 0; } 30% { opacity: .9; } 70%, 100% { opacity: 0; } }
.psa-link { stroke: #10b981; stroke-width: 1.6; stroke-linecap: round; opacity: 0; transition: opacity .3s ease; }
.pair-stage-anim[data-stage="1"] .psa-waves, .pair-stage-anim[data-stage="1"] .psa-link { display: none; }
.pair-stage-anim[data-stage="2"] .psa-dash { display: none; }
.pair-stage-anim.pairing .psa-wave { animation-duration: .8s; stroke: var(--pair-color, #10b981); }
.pair-stage-anim.pairing .psa-led, .pair-stage-anim.pairing .psa-led2 { fill: var(--pair-color, #10b981); opacity: 1; animation: psaLedBlink .4s steps(2, jump-none) infinite; }
@keyframes psaLedBlink { 0% { opacity: 1; } 100% { opacity: .15; } }
.pair-stage-anim.done .psa-waves { display: none; }
.pair-stage-anim.done .psa-link { opacity: 1; stroke: var(--pair-color, #10b981); }
.pair-stage-anim.done .psa-mouse rect, .pair-stage-anim.done .psa-mouse line, .pair-stage-anim.done .psa-dongle rect { stroke: var(--pair-color, #10b981); }
.pair-stage-anim.done .psa-led, .pair-stage-anim.done .psa-led2 { fill: var(--pair-color, #10b981); opacity: 1; animation: none; }
@media (prefers-reduced-motion: reduce) {
.psa-dash, .psa-waves .psa-wave, .pair-stage-anim.pairing .psa-led, .pair-stage-anim.pairing .psa-led2 { animation: none; }
.psa-waves .psa-wave { opacity: .7; }
}
.pair-steps { list-style: none; margin: 14px 0 24px; display: flex; flex-direction: column; gap: 8px; counter-reset: pair-step; }
.pair-steps[hidden] { display: none; }
.pair-steps li { position: relative; padding-left: 32px; font-size: 15px; color: var(--text-sub); line-height: 1.6; counter-increment: pair-step; }
.pair-steps li::before { content: counter(pair-step); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--primary-color) 10%, transparent); color: var(--primary-color); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.pair-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pair-controls .device-ghost-btn { height: 44px; padding: 0 18px; }
.pair-select-field { flex: none; display: flex; flex-direction: row; align-items: center; gap: 12px; }
.pair-select-label { flex: none; font-size: 14px; font-weight: 600; color: var(--text-main); letter-spacing: 0.2px; line-height: 1.4; white-space: nowrap; }
.pair-dd { position: relative; width: 340px; }
.pair-dd-trigger { width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-color); color: var(--text-main); font-size: 14px; font-weight: 600; letter-spacing: 0.2px; cursor: pointer; outline: none; box-shadow: 0 1px 2px rgba(15,23,42,0.04); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; text-align: left; }
.pair-dd-trigger:hover { border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color)); box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--primary-color) 25%, transparent), 0 1px 2px rgba(15,23,42,0.05); }
.pair-dd-trigger:focus-visible { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.pair-dd.open .pair-dd-trigger { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light), 0 4px 14px -6px color-mix(in srgb, var(--primary-color) 25%, transparent); }
.pair-dd-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair-dd-text.placeholder { color: var(--text-sub); font-weight: 500; }
.pair-dd-caret { flex: none; width: 16px; height: 16px; stroke: var(--text-sub); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.pair-dd.open .pair-dd-caret { transform: rotate(180deg); }
.pair-dd-pop { position: absolute; top: calc(100% + 4px); left: 0; width: 100%; z-index: 20; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 18px 44px -12px rgba(15,23,42,0.26), 0 4px 12px rgba(15,23,42,0.07); padding: 8px; max-height: 146px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-sub) 35%, transparent) transparent; transform-origin: top center; animation: pairPopIn .24s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
.pair-dd-pop::-webkit-scrollbar { width: 6px; }
.pair-dd-pop::-webkit-scrollbar-track { background: transparent; }
.pair-dd-pop::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-sub) 30%, transparent); border-radius: 3px; }
.pair-dd-pop::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--primary-color) 45%, transparent); }
@keyframes pairPopIn { from { opacity: 0; transform: scale(0.94) translateY(-8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.pair-dd-pop[hidden] { display: none; }
.pair-dd-empty { padding: 20px 12px; text-align: center; font-size: 13px; color: var(--text-sub); user-select: none; }
.pair-dd-option { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--text-main); cursor: pointer; transition: background .15s ease, color .15s ease; }
.pair-dd-option + .pair-dd-option { margin-top: 4px; }
.pair-dd-option:hover { background: color-mix(in srgb, var(--primary-color) 8%, transparent); color: var(--primary-color); }
.pair-dd-option.selected { background: var(--primary-light); color: var(--primary-color); font-weight: 600; }
.pair-dd-option-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair-dd-check { flex: none; width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); transition: opacity .15s ease, transform .2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pair-dd-option.selected .pair-dd-check { opacity: 1; transform: scale(1); }
.pair-footer { margin-top: 20px; }
.pair-main-btn { width: 100%; padding: 13px 0; border: none; border-radius: 12px; background: var(--primary-gradient); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0.3px; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--primary-color) 55%, transparent); }
.pair-main-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--primary-color) 65%, transparent); }
.pair-main-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }
.pair-status { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.pair-status[hidden] { display: none; }
.pair-status.busy { background: color-mix(in srgb, var(--primary-color) 8%, transparent); color: var(--primary-color); }
.pair-status.ok { background: color-mix(in srgb, #10b981 10%, transparent); color: #059669; }
.pair-status.warn { background: color-mix(in srgb, #f59e0b 12%, transparent); color: #b45309; }
.pair-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pair-status.busy .pair-status-dot { animation: blinkDot 1s infinite; }
.pair-status-text { line-height: 1.5; }
.pair-countdown { margin-left: auto; font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
body.theme-dark .pair-status.ok { color: #34d399; }
body.theme-dark .pair-status.warn { color: #fbbf24; }
@keyframes blinkDot { 0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); } }
/* --- 响应式适配断点 --- */
@media (max-width: 1280px) {
.dpi-grid { grid-template-columns: 1fr; }
.advanced-grid { grid-template-columns: 1fr; }
.remap-top { grid-template-columns: 1fr; }
.remap-btn-list { flex-direction: row; flex-wrap: wrap; margin-top: 0; margin-bottom: 16px; }
.remap-btn { flex: 1 1 auto; min-width: 120px; }
.remap-mouse-stage { width: 100%; max-width: 400px; margin: 0 auto; }
.remap-keyboard { --key-w: 30px; }
.remap-key { font-size: 11px; }
}
@media (max-width: 1024px) {
.light-layout { flex-direction: column; }
.light-main { margin-right: 0; }
.light-aside { position: static; order: -1; width: 100%; }
.light-mini-stage { min-height: 260px; }
.light-mini-mouse { height: 160px; }
.light-effect-grid { grid-template-columns: repeat(3, 1fr); }
.light-dongle-grid { grid-template-columns: 1fr; }
.light-dongle-row-fx { grid-column: 1; grid-row: auto; }
.light-dongle-cell-bright { grid-column: 1; grid-row: auto; }
.light-dongle-cell-speed { grid-column: 1; grid-row: auto; }
.light-dongle-cell-color { grid-column: 1; grid-row: auto; justify-content: flex-start; }
.light-dongle-color-tile { flex: 0 0 auto; margin-left: 0; }
.device-layout { flex-direction: column; }
.device-side { width: 100%; }
.device-mouse-img { max-width: 260px; }
}
@media (max-width: 768px) {
.sidebar { width: 200px; padding: 16px 12px; }
.main-content { padding: 16px; }
.polling-rate-grid { flex-wrap: wrap; }
.polling-rate-item { min-width: calc(33.333% - 4px); }
#dynamicPollingCard .dynamic-polling-options { flex-wrap: wrap; }
#dynamicPollingCard .dynamic-polling-option { min-width: calc(50% - 5px); }
.sensor-mode-card { width: 100%; }
.remap-kb-wrap { flex-direction: column; }
.remap-combo { width: 100%; }
.remap-func { flex: 0 0 calc(25% - 6px); }
.light-effect-grid { grid-template-columns: repeat(2, 1fr); }
.pair-modal { padding: 16px; }
.pair-select-field { width: 100%; }
.pair-select-field .pair-dd { width: auto; flex: 1 1 auto; min-width: 0; }
.settings-pop { right: 16px; top: 64px; }
}
/* --- 固件版本卡状态行 --- */
.fw-status-box { margin-top: 12px; min-height: 40px; display: flex; align-items: center; }
.fw-status-box.latest { color: #10b981; }
.fw-status-latest-text { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.fw-status-latest-text svg { flex: none; width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.fw-new-badge { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--primary-gradient); padding: 3px 8px; border-radius: 999px; margin-right: 10px; }
.fw-upgrade-summary { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 500; color: var(--primary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.remap-modal-icon.fw { background: var(--primary-gradient); box-shadow: 0 8px 20px -4px color-mix(in srgb, var(--primary-color) 50%, transparent); }
.remap-modal-icon.fw::after { background: color-mix(in srgb, var(--primary-color) 25%, transparent); }
/* --- 固件升级按钮：主色强调 + 呼吸光晕 + 弹性交互 --- */
.fw-upgrade-btn { background: var(--primary-gradient); border-color: transparent; color: #fff; animation: fwBtnBreath 2.4s ease-in-out infinite; transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1), filter .2s ease; }
.fw-upgrade-btn:hover:not(:disabled) { background: var(--primary-gradient); color: #fff; border-color: transparent; transform: translateY(-1.5px) scale(1.02); filter: brightness(1.06); }
.fw-upgrade-btn:active:not(:disabled) { transform: translateY(0) scale(0.98); filter: brightness(0.98); transition-duration: .08s; }
.fw-upgrade-btn:disabled { animation: none; }
@keyframes fwBtnBreath {
0%   { box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary-color) 45%, transparent), 0 0 0 0 color-mix(in srgb, var(--primary-color) 35%, transparent); }
70%  { box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary-color) 45%, transparent), 0 0 0 9px color-mix(in srgb, var(--primary-color) 0%, transparent); }
100% { box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary-color) 45%, transparent), 0 0 0 0 color-mix(in srgb, var(--primary-color) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .fw-upgrade-btn { animation: none; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary-color) 45%, transparent); } }
/* --- 固件升级弹窗 --- */
.remap-modal.fw-dialog { width: min(600px, calc(100% - 48px)); text-align: left; padding: 24px 24px 22px; }
.fw-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.fw-dlg-title { font-size: 17px; font-weight: 700; color: var(--text-main); }
.fw-dlg-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-sub); text-align: right; }
.fw-dlg-lock svg { flex: none; width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fw-row { padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-color); }
.fw-row + .fw-row { margin-top: 10px; }
.fw-row-main { display: flex; align-items: center; gap: 12px; }
.fw-row-name { flex: none; width: 52px; font-size: 14px; font-weight: 600; color: var(--text-main); }
.fw-row-ver { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fw-row-ver .old { color: var(--text-sub); font-weight: 500; }
.fw-row-ver i { font-style: normal; color: var(--text-sub); opacity: .6; }
.fw-row-ver .new { color: var(--primary-color); }
.fw-chip { flex: none; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.st-latest, .st-done { color: #059669; background: color-mix(in srgb, #10b981 12%, transparent); }
.st-pending { color: var(--primary-color); background: var(--primary-light); }
.st-up, .st-verify { color: var(--primary-color); background: var(--primary-light); }
.st-wait { color: #b45309; background: color-mix(in srgb, #f59e0b 14%, transparent); animation: fwWaitPulse 1.6s ease-in-out infinite; }
.st-failed { color: #ef4444; background: color-mix(in srgb, #ef4444 12%, transparent); }
@keyframes fwWaitPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.fw-row-sub { margin-top: 10px; height: 34px; }
.fw-progress { display: flex; align-items: center; gap: 10px; height: 100%; }
.fw-progress-track { flex: 1 1 auto; height: 6px; border-radius: 3px; background: var(--slider-track); overflow: hidden; }
.fw-progress-bar { height: 100%; border-radius: 3px; background: var(--primary-gradient); transition: width .12s ease; }
.fw-progress-num { flex: none; width: 38px; text-align: right; font-size: 11px; font-weight: 700; color: var(--primary-color); font-variant-numeric: tabular-nums; }
.fw-wait-strip { display: flex; align-items: center; gap: 8px; height: 34px; box-sizing: border-box; padding: 0 12px; border: 1px dashed color-mix(in srgb, #f59e0b 55%, transparent); border-radius: 10px; background: color-mix(in srgb, #f59e0b 7%, transparent); color: #b45309; font-size: 12.5px; font-weight: 500; animation: fwWaitPulse 1.8s ease-in-out infinite; }
.fw-wait-strip svg { flex: none; width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fw-dlg-note { margin-top: 14px; display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.6; color: var(--text-sub); }
.fw-dlg-note svg { flex: none; width: 14px; height: 14px; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fw-dlg-note.warn { color: #b45309; }
.fw-dlg-note.ok { color: #059669; }
.fw-dlg-foot { margin-top: 18px; display: flex; justify-content: flex-end; gap: 12px; }
.fw-dlg-foot .remap-modal-btn { flex: none; width: 120px; padding: 10px 0; }
body.theme-dark .st-wait,
body.theme-dark .fw-wait-strip,
body.theme-dark .fw-dlg-note.warn { color: #fbbf24; }
.fw-wait-text { flex: 1 1 auto; min-width: 0; }
.fw-auth-btn { flex: none; margin-left: 10px; height: 26px; padding: 0 12px; border: 1px solid color-mix(in srgb, #f59e0b 60%, transparent); border-radius: 8px; background: transparent; color: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.fw-auth-btn:hover { background: color-mix(in srgb, #f59e0b 12%, transparent); }
.fw-dlg-foot .remap-modal-btn:disabled { opacity: .45; cursor: not-allowed; }
.fw-sub-cap { height: 100%; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--text-sub); opacity: .9; }
.fw-sub-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; }
.fw-sub-dot.d-pending { background: var(--primary-color); }
.fw-sub-dot.d-ok { background: #10b981; }
.fw-sub-dot.d-fail { background: #ef4444; }
.fw-progress-track { box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06); }
/* --- 深色模式微调 v2（中性化收尾）--- */
body.theme-dark .toggle-slider { background-color: #3a3a3d; }
body.theme-dark .toggle-slider::after { color: rgba(255, 255, 255, 0.45); }
body.theme-dark input:checked + .toggle-slider { background-color: var(--primary-color); }
body.theme-dark .global-loading-overlay { background: rgba(0, 0, 0, 0.62); }
body.theme-dark .remap-modal-mask,
body.theme-dark .pair-modal-mask { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
body.theme-dark .macro-focus-backdrop { background: radial-gradient(130% 100% at 50% 22%, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.66) 55%, rgba(0,0,0,0.8) 100%); }
body.theme-dark .connect-bg-blob { opacity: 0.22; }
body.theme-dark .num-field { background: #17171a; }
/* 深色：分段轨道凹槽化（修复深色下轨道与卡底同色、控件容器感消失） */
body.theme-dark .dpi-seg-group { background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35); }
/* --- 界面设置浮层（齿轮锚定 · 遮罩轻暗 · 右上角 X · 三行：语言/主题模式/主题色）--- */
.settings-pop-mask { position: fixed; inset: 0; z-index: 1600; background: rgba(15, 23, 42, 0.35); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.24s ease, visibility 0s linear 0.24s; }
body.theme-dark .settings-pop-mask { background: rgba(0, 0, 0, 0.45); }
.settings-pop-mask.visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.24s ease, visibility 0s linear 0s; }
.settings-pop { position: fixed; top: 68px; right: 24px; z-index: 1601; width: 400px; max-width: calc(100vw - 32px); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px 20px 8px; box-shadow: 0 24px 60px -12px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.08); transform-origin: top right; opacity: 0; visibility: hidden; pointer-events: none; transform: scale(0.94) translateY(-8px); transition: opacity 0.24s cubic-bezier(0.2,0.9,0.3,1.1), transform 0.24s cubic-bezier(0.2,0.9,0.3,1.1), visibility 0s linear 0.24s; }
.settings-pop.visible { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1) translateY(0); transition: opacity 0.24s cubic-bezier(0.2,0.9,0.3,1.1), transform 0.24s cubic-bezier(0.2,0.9,0.3,1.1), visibility 0s linear 0s; }
.settings-pop-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); margin-bottom: 2px; }
.settings-pop-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text-main); letter-spacing: 0.3px; }
.settings-pop-title svg { flex: none; width: 16px; height: 16px; stroke: var(--primary-color); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-pop-close { width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; color: var(--text-sub); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.settings-pop-close:hover { background: color-mix(in srgb, var(--primary-color) 10%, transparent); color: var(--primary-color); }
.settings-pop-close:active { transform: scale(0.92); }
.settings-pop-close svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.settings-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.settings-item-title { font-size: 14px; font-weight: 600; color: var(--text-main); }
.settings-pop .settings-item { padding: 13px 0; }
.settings-pop .settings-item + .settings-item { border-top: 1px solid var(--border-color); }
.settings-pop .settings-item:last-child { padding-bottom: 14px; }
.theme-btn.active { color: var(--primary-color); border-color: var(--primary-color); background: var(--primary-light); }
/* 语言下拉：并入外观/配对气泡族，240px 右列 · 值左对齐 · 36px 等高 */
.settings-dd { width: 240px; }
.settings-dd .appearance-dd-trigger { justify-content: flex-start; text-align: left; padding: 0 30px 0 14px; height: 36px; }
/* 主题模式分段：240px 锁宽 · 双按钮等分 · 36px 等高 · 双语言恒定 */
.settings-pop .dpi-seg-group { width: 240px; flex-wrap: nowrap; }
.settings-pop .dpi-seg-btn { flex: 1 1 0; min-width: 0; height: 36px; padding: 0 8px; font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.settings-pop .dpi-seg-btn svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 主题色圆点色卡：240px 居中组 · gap20 · 选中白勾+1.15 微放大（弹性曲线） */
.accent-group { width: 240px; display: flex; align-items: center; justify-content: center; gap: 20px; }
.accent-dot { position: relative; width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer; background: var(--dot); transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.accent-dot:hover { transform: scale(1.08); }
.accent-dot:active { transform: scale(0.95); }
.accent-dot::after { content: ''; position: absolute; top: 50%; left: 50%; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translate(-50%, -60%) rotate(-45deg) scale(0); transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.accent-dot.active { transform: scale(1.15); }
.accent-dot.active:hover { transform: scale(1.15); }
.accent-dot.active::after { transform: translate(-50%, -60%) rotate(-45deg) scale(1); }
/* --- 灯光禁用态统一收敛 --- */
.light-card.light-disabled,
.light-color-tile.light-disabled,
.light-dongle-cell.light-disabled { opacity: 0.42; filter: grayscale(0.3); pointer-events: none; }
/* === style.css END === */