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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: white;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 10px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

header h1 {
    font-size: 24px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.controls input {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.controls input:focus {
    outline: 2px solid #f5576c;
}

.controls button {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

#joinBtn {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

#joinBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(245, 87, 108, 0.4);
}

#leaveBtn {
    background: #dc3545;
    color: white;
}

#leaveBtn:hover {
    transform: scale(1.05);
}

.user-info {
    font-size: 14px;
    opacity: 0.8;
}

.video-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow-y: auto;
    min-height: 0;
}

.video-container {
    position: relative;
    background: #2a2a4a;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/9;
    min-height: 150px;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-container .user-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
}

.video-container .muted-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 14px;
}

.local-video-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 200px;
    background: #2a2a4a;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #f5576c;
    z-index: 100;
    box-shadow: 0 0 30px rgba(245, 87, 108, 0.3);
}

.local-video-container video {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.local-controls {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.8);
}

.local-controls button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s;
}

.local-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.local-controls button.active {
    background: #f5576c;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .local-video-container {
        width: 120px;
        bottom: 10px;
        right: 10px;
    }
    
    header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .controls {
        flex-wrap: wrap;
    }
}