* {
    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: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #4a5568;
    font-size: 2rem;
    font-weight: 600;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e53e3e;
    transition: background-color 0.3s ease;
}

.status-dot.connected {
    background: #38a169;
}

.status-text {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.video-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16/9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.video-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.control-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.control-btn.active {
    background: #e53e3e;
    color: white;
}

.control-btn.active .icon {
    filter: brightness(0) invert(1);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #718096;
}

.placeholder-content {
    text-align: center;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.placeholder-content p {
    font-size: 1rem;
    font-weight: 500;
}

.connection-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.connection-section h3,
.room-info h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.room-details {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.room-details p {
    margin-bottom: 8px;
    color: #4a5568;
}

.room-details strong {
    color: #2d3748;
}

.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left-color: #48bb78;
}

.notification.error {
    border-left-color: #f56565;
}

.notification.warning {
    border-left-color: #ed8936;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .video-container {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .video-controls {
        bottom: 5px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
    }
    
    .connection-panel {
        padding: 15px;
    }
}
