/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Roboto', sans-serif;
}

body {
    background-color: #0d1117; /* Dark background behind video */
    color: #ffffff;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    /* Ensure the browser body is exactly 1280x720 or responsive */
}

/* Single Fullscreen Video Container */
.video-container {
    width: 100%;
    height: 100%;
    background-color: #000;
    position: relative;
}

.participant-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* If multiple streams join (e.g. admins), hide them and only show the first one or active speaker */
.participant-video-container:not(:first-child) {
    display: none;
}

.participant-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* cover ensures no black bars for the main funeral camera */
}

/* Glassmorphism Lower Third */
.glass-overlay {
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: max-content;
    max-width: 800px;
    background: rgba(20, 24, 39, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    overflow: hidden;
    z-index: 1000;
    
    /* Animation defaults */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.glass-overlay.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* The subtle glowing edge at the top */
.glow-edge {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.overlay-content {
    padding: 16px 24px;
}

.overlay-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Pulsing Red Dot for Live AI */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.overlay-text {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 400;
    color: #f8fafc;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
