/* public/assets/css/hardware/webcam-test.css */
.cam-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #ec4899; --p-primary-hover: #db2777; --p-success: #10b981; --p-danger: #ef4444; --p-text: #0f172a; --p-text-muted: #64748b; width: 100%; max-width: 1200px; 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; }
.cam-wrapper *, .cam-wrapper *::before, .cam-wrapper *::after { box-sizing: border-box; }

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

.cam-workspace { display: flex; flex-direction: column; gap: 20px; }
.cam-layout { display: flex; gap: 24px; align-items: stretch; }
@media (max-width: 900px) { .cam-layout { flex-direction: column; } }

/* Viewport HUD Panel */
.cam-viewport-panel { flex: 1.5; background: #020617; border-radius: 16px; padding: 16px; border: 1px solid #334155; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 5px 20px rgba(0,0,0,0.5); }
.cam-viewfinder { position: relative; width: 100%; aspect-ratio: 16/9; background: #0f172a; overflow: hidden; display: flex; align-items: center; justify-content: center; }

/* 赛博朋克 HUD 边角 */
.cam-hud-corner { position: absolute; width: 30px; height: 30px; border: 3px solid var(--p-primary); z-index: 10; opacity: 0.8; }
.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.cam-video { width: 100%; height: 100%; object-fit: contain; z-index: 5; background: #000; }
.cam-overlay { position: absolute; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.cam-overlay-icon { font-size: 3rem; filter: grayscale(1) opacity(0.5); }
.cam-overlay-text { color: #64748b; font-size: 1.1rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }

/* HUD 探针 UI */
.cam-rec-indicator { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 8px; font-family: monospace; font-size: 1rem; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.8); background: rgba(0,0,0,0.5); padding: 4px 12px; border-radius: 4px; }
.cam-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--p-danger); box-shadow: 0 0 8px var(--p-danger); animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.cam-res-watermark { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 10; font-family: monospace; font-size: 1.2rem; font-weight: 800; color: rgba(255,255,255,0.7); text-shadow: 0 2px 4px rgba(0,0,0,0.8); letter-spacing: 2px; }

/* Control Panel */
.cam-control-panel { flex: 1; background: #f8fafc; border-radius: 16px; border: 1px solid var(--p-border); padding: 24px; display: flex; flex-direction: column; }
.cam-panel-title { font-size: 1.05rem; font-weight: 800; color: var(--p-text); margin-bottom: 16px; border-bottom: 2px solid var(--p-border); padding-bottom: 8px; }

.cam-form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.cam-label { font-size: 0.9rem; font-weight: 700; color: #475569; }
.cam-select { width: 100%; padding: 12px 14px; border: 2px solid #cbd5e1; border-radius: 10px; font-size: 0.95rem; font-weight: 700; color: #1e293b; background: #fff; outline: none; cursor: pointer; transition: 0.2s; }
.cam-select:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15); }
.cam-select:disabled { background: #e2e8f0; cursor: not-allowed; }

.cam-btn-primary, .cam-btn-danger { width: 100%; padding: 16px; border-radius: 12px; font-weight: 800; font-size: 1.1rem; cursor: pointer; border: none; transition: 0.2s; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cam-btn-primary { background: var(--p-primary); box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3); }
.cam-btn-primary:hover { background: var(--p-primary-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4); }
.cam-btn-danger { background: var(--p-danger); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); }
.cam-btn-danger:hover { background: #dc2626; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4); }

.cam-data-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cam-data-box { background: #ffffff; border: 1px solid var(--p-border); padding: 16px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.cam-data-label { font-size: 0.9rem; font-weight: 700; color: #64748b; }
.cam-data-val { font-size: 1.2rem; font-weight: 800; color: #1e293b; }
.cam-data-val.code { font-family: monospace; }
.cam-data-val.highlight { color: var(--p-primary); }

.cam-hint-card { background: #fef2f2; border-left: 4px solid #ef4444; padding: 16px; border-radius: 0 10px 10px 0; font-size: 0.9rem; color: #7f1d1d; line-height: 1.6; margin-top: 10px; }

/* Dark Mode */
[data-theme="dark"] .cam-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .cam-title, [data-theme="dark"] .cam-panel-title, [data-theme="dark"] .cam-data-val { color: #f8fafc; }
[data-theme="dark"] .cam-subtitle, [data-theme="dark"] .cam-label { color: #94a3b8; }
[data-theme="dark"] .cam-control-panel { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .cam-data-box { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .cam-select { background: #1e293b; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .cam-select:disabled { background: #0f172a; }
[data-theme="dark"] .cam-hint-card { background: rgba(239, 68, 68, 0.1); border-left-color: #ef4444; color: #fca5a5; }