/* css/style.css */

* { box-sizing: border-box; outline: none; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) rgba(0,0,0,0.1); }

:root {
    --bg-grad: linear-gradient(180deg, #3b6ba5 0%, #1a2a40 100%);
    --text-color: #ffffff;
    --panel-bg: rgba(255, 255, 255, 0.1);
    --accent-color: #64b5f6;
    --log-bg: #1e1e1e; 
    
    --mouse-body: #4066a0; --mouse-stroke: #2a4a78; --mouse-wheel: #2c2c2c; 
    --wheel-lines: rgba(255,255,255,0.3); --logo-color: #2a4a78;
    --highlight-hover: rgba(100, 181, 246, 0.3); --click-flash: rgba(255, 255, 255, 0.5); 
    
    --status-ok: #00e676; --status-warn: #ffc107; --status-err: #ff5252;
}

body.theme-black { --bg-grad: linear-gradient(180deg, #1a1a1a 0%, #000000 100%); --mouse-body: #2c2c2c; --mouse-stroke: #000000; --mouse-wheel: #080808; --wheel-lines: rgba(255,255,255,0.15); --logo-color: #111; --click-flash: rgba(255, 255, 255, 0.25); --highlight-hover: rgba(255, 255, 255, 0.1); --accent-color: #9e9e9e; }
body.theme-red { --bg-grad: linear-gradient(180deg, #8e0e00 0%, #1f1c18 100%); --mouse-body: #ef5350; --mouse-stroke: #b71c1c; --mouse-wheel: #3e0000; --logo-color: #b71c1c; --accent-color: #ff5252; --highlight-hover: rgba(255, 82, 82, 0.3); }
body.theme-green { --bg-grad: linear-gradient(180deg, #134e5e 0%, #002200 100%); --mouse-body: #66bb6a; --mouse-stroke: #1b5e20; --mouse-wheel: #003300; --logo-color: #1b5e20; --accent-color: #69f0ae; --highlight-hover: rgba(105, 240, 174, 0.3); }
body.theme-purple { --bg-grad: linear-gradient(180deg, #6a1b9a 0%, #210030 100%); --mouse-body: #ab47bc; --mouse-stroke: #4a148c; --mouse-wheel: #240046; --logo-color: #4a148c; --accent-color: #e040fb; --highlight-hover: rgba(224, 64, 251, 0.3); }

body { 
    font-family: 'Segoe UI', 'Microsoft JhengHei', 'Microsoft YaHei', sans-serif;
    background: var(--bg-grad); color: var(--text-color);
    margin: 0; display: flex; height: 100vh; overflow: hidden; 
    user-select: none; transition: background 0.5s;
    font-size: 16px; /* [修改] 基礎字體放大至 16px */
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

.sidebar {
    width: 300px; /* [修改] 側邊欄加寬 */
    background: var(--panel-bg); padding: 30px;
    border-right: 1px solid rgba(255,255,255,0.1); 
    display: flex; flex-direction: column; 
    backdrop-filter: blur(20px); z-index: 20; flex-shrink: 0; 
    overflow-y: auto;
}
.app-logo { font-size: 2rem; margin-bottom: 30px; font-weight: bold; letter-spacing: 1.5px; } /* [修改] Logo 更大 */
.sidebar-bottom-group { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 15px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.1); }
.version-tag { text-align: right; font-size: 12px; color: rgba(255,255,255,0.4); font-family: 'Consolas', monospace; }

.device-info-card { background: rgba(0, 0, 0, 0.25); border-radius: 14px; padding: 20px; margin-bottom: 30px; border: 1px solid rgba(255, 255, 255, 0.05); }
.info-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 15px; color: #eee; } /* [修改] 資訊文字放大 */
.status-indicator { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 12px; height: 12px; background: #666; border-radius: 50%; transition: 0.3s; }
.status-dot.connected { background: var(--status-ok); box-shadow: 0 0 8px var(--status-ok); animation: breathe 2s infinite; }
@keyframes breathe { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
.battery-wrapper { display: flex; align-items: center; gap: 8px; font-weight: bold; }
.battery-icon { width: 32px; height: 16px; border: 1px solid #ddd; border-radius: 3px; position: relative; padding: 2px; }
.battery-icon::after { content: ''; position: absolute; right: -4px; top: 4px; width: 3px; height: 6px; background: #ddd; }
.battery-fill { width: 0%; height: 100%; background: var(--status-ok); transition: width 0.5s; }

button, .menu-item { font-family: inherit; border: none; cursor: pointer; user-select: none; }
#btn-connect { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); color: white; padding: 8px 16px; border-radius: 6px; font-size: 13px; transition: 0.2s; }
#btn-connect:hover { background: var(--accent-color); color: #000; border-color: var(--accent-color); }
.menu-group { display: flex; flex-direction: column; gap: 10px; }
.menu-item { padding: 16px; border-radius: 10px; opacity: 0.85; font-weight: 500; transition: 0.2s; background: transparent; text-align: left; color: var(--text-color); font-size: 1.1rem; display: flex; align-items: center; gap: 12px; } /* [修改] 選單加大 */
.menu-item:hover { background: rgba(255,255,255,0.1); opacity: 1; }
.menu-item.active { background: rgba(255,255,255,0.2); color: #fff; font-weight: bold; opacity: 1; border-left: 5px solid var(--accent-color); }
.menu-item.danger:hover { background: rgba(255, 82, 82, 0.2); color: #ff5252; opacity: 1; }

.theme-selector { margin-bottom: 8px; }
.color-dots { display: flex; gap: 12px; margin-top: 12px;}
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); transition: 0.2s; cursor: pointer;}
.color-dot:hover { transform: scale(1.1); }
.color-dot.active { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.5); }
.dot-blue { background: #3b6ba5; } .dot-black { background: #222; } .dot-red { background: #b71c1c; } .dot-green { background: #1b5e20; } .dot-purple { background: #4a148c; }

.main-area { flex: 1; position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.view-section { display: none; width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
.view-section.active { display: flex; justify-content: center; align-items: center; flex-direction: column; }
.view-section.perf-section { gap: 25px; align-content: center; } 

/* --- Dashboard 佈局設定 --- */
.layout-container {
    display: flex; width: 100%; height: 100%;
    align-items: center; justify-content: space-evenly;
}
.assign-column {
    display: flex; flex-direction: column; gap: 25px; width: 260px; z-index: 10; /* [修改] 欄位加寬 */
}
.left-col { align-items: flex-end; }
.right-col { align-items: flex-start; }
.mouse-stage { position: relative; width: 360px; display: flex; justify-content: center; } /* [修改] 中央區加寬 */

/* 按鍵卡片 - 大幅優化 */
.assign-card {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px; padding: 18px 24px;
    width: 100%; cursor: pointer;
    transition: all 0.2s; position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
}
.left-col .assign-card { text-align: right; border-right: 5px solid transparent; }
.right-col .assign-card { text-align: left; border-left: 5px solid transparent; }

.assign-card:hover, .assign-card.hover { background: rgba(255,255,255,0.15); transform: scale(1.03); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.left-col .assign-card:hover, .left-col .assign-card.hover { border-right-color: var(--accent-color); }
.right-col .assign-card:hover, .right-col .assign-card.hover { border-left-color: var(--accent-color); }

.assign-card.disabled { opacity: 0.5; pointer-events: none; }

.card-label { font-size: 14px; color: #ccc; margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }
.card-value { font-size: 22px; color: var(--accent-color); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 10px rgba(0,0,0,0.5); } /* [修改] 數值字體加大至 22px */

/* SVG */
.mouse-svg { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,0.5)); transition: filter 0.5s; }
.mouse-shape { fill: var(--mouse-body); stroke: var(--mouse-stroke); transition: fill 0.5s, stroke 0.5s; }
.mouse-wheel { fill: var(--mouse-wheel); transition: fill 0.5s; }
.wheel-lines line { stroke: var(--wheel-lines); transition: stroke 0.5s; }
.mouse-logo { fill: var(--logo-color); transition: fill 0.5s; }
.effect-layer { fill: var(--click-flash); opacity: 0; pointer-events: none; mix-blend-mode: overlay; transition: opacity 0.1s; }
.effect-layer.active { opacity: 1; }
.hotspot { cursor: pointer; fill: transparent; transition: fill 0.2s; }
.hotspot:hover { fill: var(--highlight-hover); }

.side-btn { fill: var(--mouse-stroke); stroke: rgba(0,0,0,0.3); stroke-width: 1; }
body.theme-black .side-btn { fill: #111; }
body.theme-red .side-btn { fill: #8e0e00; }
body.theme-green .side-btn { fill: #003300; }
body.theme-purple .side-btn { fill: #240046; }

/* [修改] Popover Menu 樣式 - 深色主題 */
.popover { 
    position: fixed; 
    background: #1e1e1e; /* 深色背景 */
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px; 
    width: 240px; 
    display: none; 
    z-index: 1000; 
    max-height: 400px; 
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6); 
}
.popover-header { 
    padding: 14px; 
    background: rgba(255,255,255,0.05); 
    font-weight: bold; 
    font-size: 1.1rem; 
    border-radius: 10px 10px 0 0; 
    color: var(--accent-color); /* 標題跟隨主題色 */
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.menu-category { 
    padding: 8px 12px; 
    background: rgba(0,0,0,0.3); /* 深色分類標題 */
    font-weight: bold; 
    font-size: 12px; 
    color: #888; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    margin-top: 0; 
    text-transform: uppercase;
    letter-spacing: 1px;
}
.option { 
    padding: 12px 14px; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    font-size: 15px; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: 0.2s;
}
.option:hover { 
    background: rgba(255,255,255,0.1); 
    color: #fff; 
    padding-left: 18px; /* 滑動效果 */
} 
.option.selected { 
    font-weight: bold; 
    color: var(--accent-color); /* 選中項目跟隨主題色 */
    background: rgba(255,255,255,0.05);
}
.check { display:none; } 
.option.selected .check { display:block; }

/* Panel Box */
.panel-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px; padding: 35px; width: 100%;
    backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    transition: transform 0.2s;
}
.panel-box:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.3); }
.panel-box h3 { margin-top: 0; color: var(--accent-color); font-size: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; margin-bottom: 25px; }

.dpi-display { text-align: center; margin-bottom: 10px; }
#dpi-number-input {
    background: transparent; border: none; border-bottom: 2px solid rgba(255,255,255,0.1);
    color: #fff; font-size: 3rem; font-weight: bold; width: 180px; text-align: center;
    font-family: inherit; transition: border-color 0.2s; text-shadow: 0 0 20px var(--accent-color);
}
#dpi-number-input:focus { outline: none; border-bottom: 2px solid var(--accent-color); }
#dpi-number-input::-webkit-outer-spin-button, #dpi-number-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#dpi-number-input { -moz-appearance: textfield; }

.dpi-presets { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 25px; padding: 0 5px; }
.dpi-btn {
    flex: 1; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa; padding: 16px 0; border-radius: 8px; font-size: 20px; font-family: 'Consolas', monospace; font-weight: 800;
    transition: all 0.2s;
}
.dpi-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; transform: translateY(-3px); }
.dpi-btn.active { background: var(--accent-color); color: #000; font-weight: 900; border-color: var(--accent-color); box-shadow: 0 0 15px var(--accent-color); }

.dpi-custom-btn { border: 1px solid var(--accent-color); color: #ffffff; font-weight: bold; box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); }
.dpi-custom-btn:hover { background: rgba(100, 181, 246, 0.2); color: #fff; transform: translateY(-3px); box-shadow: 0 0 15px var(--accent-color); }
.dpi-custom-btn.active { background-color: var(--accent-color) !important; color: #000000 !important; border-color: var(--accent-color); box-shadow: 0 0 20px var(--accent-color); }

.slider-container { position: relative; padding: 10px 0; }
input[type=range] { -webkit-appearance: none; width: 100%; height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--accent-color); cursor: pointer; transition: 0.2s; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.slider-labels { display: flex; justify-content: space-between; font-size: 14px; color: #888; margin-top: 10px; font-weight: bold; }

/* [修改] 雙欄按鈕網格 */
.rate-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    margin-bottom: 20px; 
}

.rate-mini-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); color: #aaa;
    padding: 16px 0; border-radius: 8px; font-size: 22px; font-weight: 800; 
    transition: all 0.2s; display: flex; justify-content: center; align-items: baseline; gap: 4px;
    font-family: 'Consolas', monospace;
}
.rate-mini-btn:hover { background: rgba(255,255,255,0.15); color: #fff; transform: translateY(-2px); }
.rate-mini-btn.active { background: var(--accent-color); color: #000; border-color: var(--accent-color); box-shadow: 0 0 20px var(--accent-color); opacity: 1; }
.rate-mini-btn.disabled { opacity: 0.2; pointer-events: none; filter: grayscale(100%); }

.rate-unit { font-size: 12px; font-weight: 600; opacity: 0.7; }
.rate-mini-btn.active .rate-unit { opacity: 1; color: #000; }

/* Grid for Options in Modal */
.option-grid {
    display: grid;
    gap: 12px;
    width: 100%;
    margin-top: 5px;
}
.option-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.option-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* [修改] Modal 內的大按鈕樣式 */
.rate-big-btn { 
    flex: 1; 
    padding: 15px 0; 
    background: rgba(255,255,255,0.05); 
    color: #aaa; 
    border: 1px solid rgba(255,255,255,0.15); 
    border-radius: 8px; 
    font-weight: 700; 
    transition: all 0.2s; 
    font-size: 15px; 
    cursor: pointer;
}
.rate-big-btn:hover { 
    background: rgba(255,255,255,0.15); 
    color: #fff; 
    transform: translateY(-2px); 
    border-color: rgba(255,255,255,0.3);
}
.rate-big-btn.active { 
    background: var(--accent-color); 
    color: #000; 
    box-shadow: 0 0 15px var(--accent-color); 
    border-color: var(--accent-color); 
}

.hint-text { font-size: 14px; color: #aaa; margin-top: 15px; text-align: center; }

#toast-container {
    position: fixed; bottom: 50px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9); color: #fff;
    padding: 16px 32px; border-radius: 50px; font-size: 16px;
    opacity: 0; transition: opacity 0.3s, transform 0.3s;
    z-index: 9999; pointer-events: none; white-space: nowrap;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.2); font-weight: 600;
}
#toast-container.show { opacity: 1; transform: translateX(-50%) translateY(-15px); }

/* Advanced Options Row Layout Fix */
.advanced-options { display: flex; flex-direction: column; gap: 20px; text-align: left; padding: 20px 30px; }

.adv-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; /* [關鍵] 垂直置中 */
    padding-bottom: 20px; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
}

/* [關鍵] 針對文字區域優化 */
.adv-row > div:first-child {
    flex: 1; 
    padding-right: 20px; 
    min-width: 0; 
}

.adv-row:last-child { border-bottom: none; }
.adv-label { font-size: 16px; font-weight: bold; color: #eee; }
.adv-desc { 
    font-size: 13px; 
    color: #999; 
    margin-top: 5px; 
    line-height: 1.4; /* 增加行高 */
}

/* [關鍵] Switch 開關樣式 */
.switch { 
    position: relative; 
    display: inline-block; 
    width: 54px; 
    height: 30px; 
    flex-shrink: 0; /* [關鍵] 禁止被擠壓 */
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #555; border-radius: 30px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 4px; bottom: 4px; background-color: white; border-radius: 50%; transition: .4s; }
input:checked + .slider { background-color: var(--status-ok); } 
input:checked + .slider:before { transform: translateX(24px); }

.btn-advanced {
    width: 100%; margin-top: 25px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2);
    color: #ddd; padding: 16px; border-radius: 10px; font-size: 15px; cursor: pointer; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.2s;
}
.btn-advanced:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

#debug-console { 
    width: 340px; height: 100vh; background: var(--log-bg); 
    border-left: 1px solid rgba(255, 255, 255, 0.2); 
    display: flex; flex-direction: column; font-family: 'Consolas', monospace; 
    z-index: 30; flex-shrink: 0; box-shadow: -5px 0 20px rgba(0,0,0,0.3);
}
.debug-header { padding: 18px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; }
.debug-label { font-size: 15px; color: #aaa; letter-spacing: 1px; font-weight: bold; }
#debug-list { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; scroll-behavior: smooth; }
.log-entry { margin-bottom: 10px; padding: 10px 12px; border-radius: 6px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 14px; line-height: 1.5; animation: fadeIn 0.2s; cursor: pointer; transition: background-color 0.2s; user-select: text; }
.log-entry:hover { background-color: rgba(255, 255, 255, 0.1); }
@keyframes fadeIn { from { opacity:0; transform:translateX(5px); } to { opacity:1; transform:translateX(0); } }
.log-header { display: flex; justify-content: space-between; margin-bottom: 5px; }
.log-time { color: #888; font-size: 12px; }
.log-delay { color: #e0e0e0; font-weight: bold; font-size: 11px; background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px;}
.log-content { color: var(--accent-color); font-weight: bold; font-size: 15px;}
.macro-text { color: var(--accent-color); font-weight: bold; font-size: 15px; }
.log-detail { color: #ccc; word-break: break-all; }
#clear-btn { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 13px; padding: 6px 14px; border-radius: 6px; transition: 0.2s; }
#clear-btn:hover { background: var(--accent-color); color: #000; border-color: var(--accent-color); }

#macro-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal-content { background: #1e1e1e; border: 1px solid #333; border-radius: 16px; padding: 40px; width: 500px; max-width: 90%; text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,0.6); animation: popIn 0.2s; }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 22px; font-weight: bold; color: #fff; margin-bottom: 25px; }
.macro-display { background: #111; border: 1px solid #333; border-radius: 10px; height: 160px; margin-bottom: 30px; padding: 20px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.key-badge { background: #333; color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 14px; border: 1px solid #555; display: inline-flex; align-items: center;}
.macro-placeholder { color: #666; width: 100%; text-align: center; margin-top: 50px; font-size: 16px; }
.modal-actions { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.btn-record, .btn-save, .btn-small { padding: 14px 28px; border-radius: 8px; cursor: pointer; font-weight: bold; border: none; color: white; transition: filter 0.2s; font-size: 15px; }
.btn-record { background: #d32f2f; }
.btn-record.recording { background: #ff5252; box-shadow: 0 0 15px #ff5252; animation: pulse 1s infinite; }
.btn-save { background: var(--status-ok); color: #000; }
.btn-small { background: transparent; border: 1px solid rgba(255,255,255,0.3); }
.btn-record:hover, .btn-save:hover, .btn-small:hover { filter: brightness(1.2); }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

.full-width-panel {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 25px;
    display: flex; flex-direction: column; gap: 20px;
}

.panel-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; margin-bottom: 12px; }
.panel-header h3 { border: none; padding: 0; margin: 0; font-size: 1.6rem; }
.dpi-display-tag { 
    font-size: 80px; 
    font-weight: bold; color: var(--accent-color); font-family: 'Consolas', monospace; 
    text-shadow: 0 0 30px rgba(100, 181, 246, 0.4); 
}

.dpi-visual-track {
    position: relative; width: 100%; height: 16px; background: rgba(0,0,0,0.3); border-radius: 8px; margin: 30px 0;
}
.dpi-visual-track input[type=range] {
    position: absolute; top: -7px; left: 0; width: 100%; height: 30px; opacity: 0; cursor: pointer; z-index: 2; margin: 0;
}
.dpi-fill-bar {
    position: absolute; top: 0; left: 0; height: 100%; width: 50%;
    background: linear-gradient(90deg, var(--accent-color), #fff);
    border-radius: 8px; pointer-events: none; 
    transition: none; /* [修改] 移除 transition 以解決拉桿延遲 */
    box-shadow: 0 0 20px var(--accent-color);
}
.dpi-fill-bar::after {
    content: ''; position: absolute; right: -14px; top: -7px; width: 30px; height: 30px;
    background: #fff; border-radius: 50%; box-shadow: 0 0 10px rgba(0,0,0,0.6);
    border: 4px solid var(--accent-color);
}

.perf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%; max-width: 1200px;
}

.perf-card {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
    padding: 30px;
}
.perf-card.action-card { cursor: pointer; }
.perf-card.action-card:hover { transform: translateY(-5px); border-color: var(--accent-color); background: rgba(255,255,255,0.08); }

.card-top-row { display: flex; justify-content: space-between; width: 100%; margin-bottom: 20px; }
.card-icon { font-size: 32px; }
.edit-icon { font-size: 18px; opacity: 0.5; }
.perf-card h4 { margin: 0 0 25px 0; font-size: 16px; opacity: 0.9; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }

.card-status-text { 
    text-align: right; margin-top: auto; 
    font-size: 42px; 
    font-weight: 800; color: #fff; opacity: 0.3; 
}

.status-tags { display: flex; flex-direction: column; gap: 15px; width: 100%; }
.stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 8px; }
.stat-row:last-child { border-bottom: none; }
.stat-val { font-weight: bold; color: var(--accent-color); font-size: 16px; }

.stat-dot { width: 12px; height: 12px; border-radius: 50%; background: #444; box-shadow: inset 0 0 3px #000; transition: 0.3s; }
.stat-dot.on { background: var(--status-ok); box-shadow: 0 0 10px var(--status-ok); }

.stat-tag-group { display: flex; gap: 10px; margin-top: 10px; }
.mini-tag { font-size: 12px; padding: 5px 10px; border-radius: 5px; font-weight: bold; letter-spacing: 0.8px; }
.tag-eco { background: rgba(76, 175, 80, 0.2); color: #66bb6a; border: 1px solid #66bb6a; }
.tag-corded { background: rgba(255, 235, 59, 0.2); color: #ffee58; border: 1px solid #ffee58; }

@media (max-width: 900px) {
    .perf-grid { grid-template-columns: 1fr; }
    .layout-container { flex-direction: column; gap: 30px; }
    .assign-column { width: 100%; }
}

#update-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 5000; 
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(10px);
}

.update-box {
    border: 1px solid #ff5252;
    box-shadow: 0 0 50px rgba(255, 82, 82, 0.2);
    width: 480px;
}

.update-icon { font-size: 48px; margin-bottom: 15px; animation: pulse 2s infinite; }
.update-warn { color: #ff5252; font-weight: bold; margin-bottom: 25px; line-height: 1.6; font-size: 15px; }

.version-compare {
    display: flex; justify-content: center; align-items: center; gap: 20px;
    background: rgba(255,255,255,0.05); padding: 15px; border-radius: 10px; margin-bottom: 20px;
    font-family: 'Consolas', monospace; font-size: 16px;
}
.version-compare .arrow { color: #666; font-weight: bold; }

.safety-checklist { font-size: 14px; color: #ddd; }
.check-item { display: flex; align-items: center; }

.progress-container {
    width: 100%; height: 12px; background: #333; border-radius: 6px; overflow: hidden; margin-bottom: 12px;
    box-shadow: inset 0 0 5px #000;
}
.progress-bar {
    width: 0%; height: 100%; background: var(--status-ok);
    transition: width 0.3s linear;
    box-shadow: 0 0 10px var(--status-ok);
}

.progress-text { font-size: 14px; color: #888; margin-bottom: 25px; font-family: 'Consolas', monospace; }

.btn-tiny {
    background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #aaa;
    padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; transition: 0.2s;
}
.btn-tiny:hover { border-color: var(--accent-color); color: var(--accent-color); background: rgba(100,181,246,0.1); }

.btn-save.disabled {
    opacity: 0.5; cursor: not-allowed; filter: grayscale(1);
    pointer-events: none;
}