:root {
    --primary-color: #00f3ff;
    /* Cyan */
    --secondary-color: #ff0055;
    /* Magenta/Red */
    --bg-dark: #050505;
    --glass-bg: rgba(0, 20, 40, 0.6);
    --glass-border: rgba(0, 243, 255, 0.3);
    --font-main: 'Orbitron', sans-serif;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--primary-color);
}

#container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* --- HUD Overlay --- */
.hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to 3D scene if needed */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

/* Header */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    background: linear-gradient(90deg, transparent, var(--glass-bg), transparent);
}

.hud-header h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--primary-color);
}

.hud-status {
    font-size: 14px;
    font-weight: bold;
    border: 1px solid var(--primary-color);
    padding: 5px 15px;
    border-radius: 4px;
    background: rgba(0, 243, 255, 0.1);
}

.blink {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Main Area */
.hud-main {
    flex-grow: 1;
    display: flex;

    .left-panel h3,
    .right-panel h3 {
        margin-top: 0;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 5px;
        font-size: 16px;
        color: #fff;
    }

    .control-item {
        display: flex;
        align-items: center;
        margin-top: 15px;
        opacity: 0.5;
        transition: all 0.3s ease;
    }

    .control-item.active {
        opacity: 1;
        text-shadow: 0 0 8px var(--primary-color);
        transform: translateX(5px);
    }

    .control-item .icon {
        font-size: 24px;
        margin-right: 10px;
    }

    .control-item .text {
        display: flex;
        flex-direction: column;
    }

    .control-item small {
        font-size: 10px;
        color: #aaa;
    }

    /* Right Panel (Video) */
    .right-panel {
        width: 340px;
        /* Fits 320px video + padding */
    }

    .video-wrapper {
        position: relative;
        width: 320px;
        height: 240px;
        background: #000;
        border: 1px solid #333;
        overflow: hidden;
    }

    .input_video {
        display: none;
        /* Hide raw video, show canvas */
    }

    .output_canvas {
        width: 100%;
        height: 100%;
        transform: scaleX(-1);
        /* Mirror effect */
    }

    .scan-line {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        width: 50px;
        height: 50px;
        animation: spin 1s linear infinite;
        margin-bottom: 20px;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }