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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.user-count {
    margin-top: 10px;
    font-size: 1rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.online-indicator {
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.screen {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

.setup-form, .waiting-content, .disconnected-content {
    background: rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
}

.preview-container {
    margin-bottom: 30px;
}

.video-preview {
    display: flex;
    gap: 25px;
    width: 100%;
    max-width: 1600px;
    height: 500px;
    margin: 0 auto;
}

@media (min-width: 1400px) {
    .video-preview {
        max-width: 1800px;
        height: 600px;
    }
}

@media (min-width: 1600px) {
    .video-preview {
        max-width: 2000px;
        height: 650px;
    }
}

.video-placeholder {
    flex: 1;
    background: #1a1a1a;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 768px) {
    .video-preview {
        flex-direction: column;
        height: 400px;
        gap: 10px;
        max-width: 100%;
    }
}

.setup-form h2 {
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 10px;
}

.btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.4);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 82, 0.6);
}

.btn.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn.secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.4;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.waiting-content h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.waiting-content p {
    margin-bottom: 30px;
    opacity: 0.8;
}

#chat {
    padding: 0;
    flex-direction: column;
}

.video-container {
    position: relative;
    width: 100%;
    height: 70vh;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid rgba(255,255,255,0.3);
    background: #1a1a1a;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.connection-status {
    font-size: 1.2rem;
    padding: 15px 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.2);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.control-btn:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.3);
}

.control-btn.primary {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-color: #4ecdc4;
}

.control-btn.danger {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    border-color: #ff6b6b;
}

.control-btn.muted,
.control-btn.disabled {
    background: rgba(255,0,0,0.6);
    border-color: rgba(255,0,0,0.8);
}

.disconnected-content h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.disconnected-content p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .setup-form, .waiting-content, .disconnected-content {
        padding: 30px 20px;
    }
    
    .video-container {
        height: 60vh;
        margin-bottom: 15px;
    }
    
    #local-video {
        width: 120px;
        height: 90px;
        bottom: 15px;
        right: 15px;
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}