/* public/assets/css/hardware/cpu-test.css */
.cpu-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #f97316; --p-primary-hover: #ea580c; --p-danger: #ef4444; --p-danger-hover: #dc2626; --p-success: #10b981; --p-success-hover: #059669; --p-text: #0f172a; --p-text-muted: #64748b; width: 100%; max-width: 1100px; margin: 0 auto; background: var(--p-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cpu-wrapper *, .cpu-wrapper *::before, .cpu-wrapper *::after { box-sizing: border-box; }

.cpu-header { text-align: center; margin-bottom: 24px; border-bottom: 1px solid var(--p-border); padding-bottom: 24px; }
.cpu-title { font-size: 1.7rem; font-weight: 800; color: var(--p-text); margin: 0 0 10px 0; }
.cpu-subtitle { font-size: 0.95rem; color: var(--p-text-muted); max-width: 800px; margin: 0 auto; line-height: 1.6; }

.cpu-layout { display: flex; gap: 24px; align-items: stretch; }
@media (max-width: 850px) { .cpu-layout { flex-direction: column; } }

/* Left: System Panel */
.cpu-sys-panel { flex: 1; background: #0f172a; border-radius: 16px; border: 2px solid #1e293b; padding: 24px; display: flex; flex-direction: column; gap: 20px; box-shadow: inset 0 5px 20px rgba(0,0,0,0.5); }
.cpu-panel-title { font-size: 1.05rem; font-weight: 800; color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #334155; padding-bottom: 12px; font-family: monospace; }

.cpu-pressure-monitor { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1e293b; border-radius: 12px; border: 2px solid #334155; padding: 20px; text-align: center; transition: 0.3s; }
.cpu-pressure-status { font-size: 2.2rem; font-weight: 900; font-family: 'Consolas', monospace; color: #94a3b8; letter-spacing: 1px; transition: color 0.3s; }
.cpu-pressure-desc { margin-top: 10px; font-size: 0.9rem; color: #cbd5e1; line-height: 1.5; }

/* 压力状态颜色映射 (Nominal, Fair, Serious, Critical) */
.state-nominal { border-color: #10b981 !important; box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.1); }
.state-nominal .cpu-pressure-status { color: #10b981; }
.state-fair { border-color: #f59e0b !important; box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.1); }
.state-fair .cpu-pressure-status { color: #f59e0b; }
.state-serious { border-color: #f97316 !important; box-shadow: inset 0 0 20px rgba(249, 115, 22, 0.1); }
.state-serious .cpu-pressure-status { color: #f97316; }
.state-critical { border-color: #ef4444 !important; box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.2); animation: pulseAlert 1s infinite; }
.state-critical .cpu-pressure-status { color: #ef4444; }
@keyframes pulseAlert { 0%, 100% { background: #1e293b; } 50% { background: rgba(239, 68, 68, 0.15); } }

.cpu-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cpu-info-item { background: #1e293b; border-radius: 8px; padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; border: 1px solid #334155; }
.cpu-info-label { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; font-weight: 700; }
.cpu-info-val { font-size: 1.4rem; font-weight: 900; font-family: monospace; color: #f8fafc; }
.cpu-info-val.highlight { color: var(--p-primary); }

.cpu-err-board { background: rgba(239, 68, 68, 0.1); border-left: 4px solid #ef4444; padding: 12px; color: #fca5a5; font-size: 0.85rem; line-height: 1.5; }

/* Right: Burn-in Panel */
.cpu-burn-panel { flex: 1.2; background: #f8fafc; border-radius: 16px; border: 1px solid var(--p-border); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.cpu-burn-panel .cpu-panel-title { color: var(--p-text); border-bottom-color: var(--p-border); }

.cpu-controls { display: flex; flex-direction: column; gap: 20px; background: #ffffff; padding: 20px; border-radius: 12px; border: 1px solid var(--p-border); box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.cpu-slider-group { display: flex; flex-direction: column; gap: 12px; }
.cpu-label { font-size: 0.95rem; font-weight: 800; color: #1e293b; }
.cpu-label span { color: var(--p-primary); font-family: monospace; font-size: 1.2rem; }
.cpu-slider { width: 100%; accent-color: var(--p-danger); cursor: pointer; }

.cpu-action-row { display: flex; gap: 16px; }
.cpu-btn-danger, .cpu-btn-success { flex: 1; padding: 16px; border-radius: 12px; font-weight: 900; font-size: 1.15rem; cursor: pointer; border: none; transition: 0.2s; color: #ffffff; display: flex; align-items: center; justify-content: center; gap: 8px; letter-spacing: 1px; }
.cpu-btn-danger { background: var(--p-danger); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
.cpu-btn-danger:hover { background: var(--p-danger-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5); }
.cpu-btn-success { background: var(--p-success); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); }
.cpu-btn-success:hover { background: var(--p-success-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5); }

/* Thread Matrix */
.cpu-thread-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 10px; margin-top: 10px; padding: 16px; background: #0f172a; border-radius: 12px; border: 2px solid #1e293b; min-height: 150px; align-content: flex-start; }
.thread-core { background: #334155; border: 2px solid #475569; border-radius: 6px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-family: monospace; font-size: 0.85rem; font-weight: 800; color: #94a3b8; transition: 0.2s; }
.thread-core.active { background: #7f1d1d; border-color: #ef4444; color: #fca5a5; box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); animation: coreBurn 0.5s infinite alternate; }
@keyframes coreBurn { from { filter: brightness(1); } to { filter: brightness(1.3); } }

.cpu-thread-legend { display: flex; gap: 16px; justify-content: flex-end; padding-right: 8px; font-size: 0.85rem; font-weight: 700; color: #64748b; }
.cpu-legend-item { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.idle { background: #334155; border: 1px solid #475569; }
.dot.running { background: #ef4444; box-shadow: 0 0 5px #ef4444; }

.cpu-safety-card { background: #f0fdf4; border-left: 4px solid #10b981; padding: 16px; border-radius: 0 10px 10px 0; font-size: 0.9rem; color: #166534; line-height: 1.6; margin-top: 24px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }

/* Dark Mode */
[data-theme="dark"] .cpu-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .cpu-title, [data-theme="dark"] .cpu-panel-title, [data-theme="dark"] .cpu-label { color: #f8fafc; }
[data-theme="dark"] .cpu-subtitle { color: #94a3b8; }
[data-theme="dark"] .cpu-burn-panel, [data-theme="dark"] .cpu-controls { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .cpu-safety-card { background: rgba(16, 185, 129, 0.1); border-left-color: #10b981; color: #6ee7b7; }