.camrec-soft-wrapper {
    /* Biến CSS độc lập */
    --neo-border: 3px solid #111111;
    --neo-shadow: 6px 6px 0px #111111;
    --neo-shadow-active: 2px 2px 0px #111111;
    
    --bg-main: #f8f9fa;
    --clr-yellow: #ffbe0b;
    --clr-red: #ff006e;
    --clr-cyan: #3a86ff;
    --clr-white: #ffffff;
    --clr-green: #06d6a0;
    --clr-text: #111111;

    max-width: 950px; 
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--clr-text);
    background: var(--bg-main);
    padding: 20px;
    border: var(--neo-border);
    border-radius: 16px;
    box-shadow: 8px 8px 0px #111111;
}

.camrec-soft-wrapper * { box-sizing: border-box; }

.camrec-soft-header {
    background: #111; padding: 20px; color: #fff;
    border: var(--neo-border); border-radius: 12px;
    text-align: center; margin-bottom: 25px; box-shadow: var(--neo-shadow);
}
.camrec-soft-header h2 { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 900; color: var(--clr-yellow); text-transform: uppercase;}
.camrec-soft-header p { margin: 0; font-weight: 600; font-size: 0.95rem; color: #eee; line-height: 1.5;}

.camrec-body { padding: 0; }

/* BỐ CỤC 2 CỘT */
.camrec-main-layout { display: flex; flex-direction: column; gap: 20px; }
.camrec-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 768px) { .camrec-main-layout { flex-direction: row; align-items: stretch; } }

/* CARDS */
.camrec-card {
    padding: 20px; border: var(--neo-border); 
    border-radius: 12px; box-shadow: var(--neo-shadow); height: 100%; display: flex; flex-direction: column;
}
.camrec-bg-yellow { background: var(--clr-yellow); }
.camrec-bg-white { background: var(--clr-white); }
.camrec-card-title { margin: 0 0 15px 0; font-size: 1.2rem; font-weight: 900; border-bottom: 2px dashed #111; padding-bottom: 10px; }

/* KHUNG VIDEO */
.camrec-video-container {
    position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000;
    border: var(--neo-border); border-radius: 8px; overflow: hidden; box-shadow: 4px 4px 0px rgba(0,0,0,0.5); margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
}
.camrec-video-el { width: 100%; height: 100%; object-fit: cover; background: #111; }
.camrec-video-el[style*="transform"] { transform: scaleX(-1); } /* Dùng cho hiệu ứng gương preview */

/* OVERLAY (TRẠNG THÁI & TIMER) */
.camrec-overlay { position: absolute; top: 15px; left: 15px; right: 15px; display: flex; justify-content: space-between; pointer-events: none; }
.camrec-badge { background: #fff; color: #111; padding: 4px 10px; font-weight: 900; font-size: 0.85rem; border: 2px solid #111; border-radius: 6px; box-shadow: 2px 2px 0px #111; text-transform: uppercase; }

.camrec-timer { background: rgba(0,0,0,0.7); color: #fff; padding: 4px 12px; border: 2px solid #fff; border-radius: 6px; font-weight: 900; font-family: monospace; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; box-shadow: 2px 2px 0px #111; }
.camrec-rec-dot { width: 12px; height: 12px; background: var(--clr-red); border-radius: 50%; border: 2px solid #fff; animation: camrecPulse 1s infinite; }
@keyframes camrecPulse { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

.camrec-empty-state { text-align: center; color: #888; font-weight: 800; font-size: 1rem; position: absolute; }

/* BUTTONS */
.camrec-controls { display: flex; flex-direction: column; gap: 10px; flex: 1; justify-content: flex-end; }
.camrec-rec-actions { display: flex; width: 100%; }

.camrec-btn {
    width: 100%; padding: 15px; border: 3px solid #111; border-radius: 8px;
    font-size: 1.1rem; font-weight: 900; cursor: pointer; box-shadow: 4px 4px 0px #111;
    transition: 0.15s; text-transform: uppercase; display: flex; align-items: center; justify-content: center;
}
.camrec-btn:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: var(--neo-shadow-active); }
.camrec-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(1); box-shadow: none; transform: none; background: #ddd !important; }

.camrec-btn-power { background: #111; color: var(--clr-yellow); }
.camrec-btn-start { background: var(--clr-red); color: #fff; box-shadow: 4px 4px 0px #111; }
.camrec-btn-stop { background: #111; color: var(--clr-red); border-color: #111; box-shadow: 4px 4px 0px rgba(0,0,0,0.5); }
.camrec-btn-download { background: var(--clr-cyan); color: #fff; }

.camrec-error-msg { margin-top: 15px; padding: 10px; background: var(--clr-red); color: #fff; font-weight: 800; font-size: 0.9rem; border: 2px solid #111; border-radius: 8px; text-align: center; }
.camrec-note-box { margin-top: 15px; font-size: 0.85rem; font-weight: 600; color: #111; background: rgba(255,255,255,0.5); padding: 10px; border: 2px dashed #111; border-radius: 8px; }