* {
    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;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    padding: 20px;
}

.control-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
}

.panel-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #667eea;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-field {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
}

.session-info {
    margin-top: 10px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 8px;
    font-size: 0.9em;
    display: none;
}

.session-info.active {
    display: block;
}

.settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.settings input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.select-field {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    width: 100%;
}

.video-container {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    min-height: 500px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    position: relative;
    z-index: 1;
    display: block;
    visibility: visible;
}

.no-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #888;
    z-index: 0;
    pointer-events: none;
}

.no-video[style*="display: none"] {
    display: none !important;
}

.no-video p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.hint {
    font-size: 0.9em;
    opacity: 0.7;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    color: white;
    font-weight: 600;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.status.connected {
    background: #4caf50;
}

.status.disconnected {
    background: #f44336;
}

.status.connecting {
    background: #ff9800;
}

.info-panel {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.info-panel h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-content p {
    padding: 10px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.debug-panel {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.debug-panel h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.debug-log {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        order: 2;
    }
    
    .video-container {
        order: 1;
    }
}

