body { 
    background: #121212; 
    color: #fff; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; 
    padding: 20px;
}

h1 { 
    text-align: center; 
    margin-bottom: 30px; 
    color: #4CAF50; 
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* A Grade que organiza as câmeras */
.grid { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 20px; 
}

/* O Estilo de cada "Caixinha" de câmera */
.cam-box {
    position: relative;
    width: 480px;
    background: #000;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.cam-box:hover {
    border-color: #4CAF50;
    transform: scale(1.01);
}

.cam-header {
    background: #222;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

video { 
    width: 100%; 
    height: auto; 
    display: block; 
    background: #000;
    min-height: 270px; /* Evita 'pulo' na tela ao carregar */
}

.loading-overlay {
    position: absolute;
    top: 40px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 14px;
    color: #aaa;
    font-family: monospace;
}