:root {
    --bg-color: #000;
    --text-color: #fff;
    --accent-color: #4facfe;
    --danger-color: #ff4b4b;
    --glass-bg: rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* NUOVO VIDEO (Cerchio Centrale) */
.video-container {
    position: absolute;
    top: 45%; left: 50%; /* Un po' più in alto del centro esatto per lasciare spazio ai pulsanti */
    transform: translate(-50%, -50%);
    width: 80vw; /* 80% della larghezza schermo su mobile */
    height: 80vw; /* Quadrato (che diventa cerchio) */
    max-width: 350px; /* Non diventa gigante su PC */
    max-height: 350px;
    border-radius: 50%; /* La magia che fa il cerchio */
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 140, 255, 0.15); /* Glow blu soffuso */
    z-index: 1;
    background-color: #111;
}

video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}


.ui-layer {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;

}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #222 0%, #000 100%); 
}



/* HEADER */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

h1 {
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Indicatore Stato */
.status {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    background: var(--glass-bg);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: #666;
}

.status.online .dot { background-color: #00ff88; box-shadow: 0 0 8px #00ff88; }
.status.offline .dot { background-color: #ff4b4b; }

/* FOOTER CONTROLS */
.app-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* Pulsante Principale (+) */
.fab-main {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.fab-main:active { transform: scale(0.95); }
.fab-main span { font-size: 36px; }

/* Pulsante Stop (Rosso) */
.fab-secondary {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--danger-color);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 75, 75, 0.3);
}

.hidden { display: none !important; }

/* MODALE */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1px solid #333;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    width: 100%;
}
