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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Join Form Styles */
.form-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 50px auto;
}

.form-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

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

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn:hover {
    background: #5a6fd8;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Chat Interface Styles */
.chat-interface {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

.chat-header {
    background: #667eea;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-main {
    flex: 1;
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    height: 100%;
}

/* Users Panel */
.users-panel {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.users-panel h3 {
    margin-bottom: 15px;
    color: #334155;
}

#users-list {
    flex: 1;
    overflow-y: auto;
}

.user-item {
    padding: 8px 12px;
    background: white;
    border-radius: 5px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-item.mcp {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.user-badge {
    background: #667eea;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}

.user-badge.mcp {
    background: #f59e0b;
}

.connection-status {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

.status-indicator.connected {
    background: #22c55e;
}

.status-indicator.connecting {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

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

/* Chat Panel */
.chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fff;
}

.message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    background: #f1f5f9;
    max-width: 70%;
}

.message.own {
    background: #667eea;
    color: white;
    margin-left: auto;
}

.message.mcp {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
    opacity: 0.7;
}

.message-username {
    font-weight: 600;
}

.message-content {
    line-height: 1.4;
}

.message-input {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.message-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 16px;
}

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

/* Video Panel */
.video-panel {
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.video-panel h3 {
    margin-bottom: 15px;
    color: #334155;
}

.video-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#local-video {
    width: 100%;
    height: 150px;
    background: #000;
    border-radius: 5px;
    object-fit: cover;
}

#remote-videos {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.remote-video {
    width: 100%;
    height: 120px;
    background: #000;
    border-radius: 5px;
    object-fit: cover;
}

.video-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-controls .btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    text-align: left;
}

/* MCP Info */
.mcp-info {
    background: white;
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.mcp-info h3 {
    margin-bottom: 15px;
    color: #f59e0b;
}

.mcp-info code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
}

.mcp-info pre {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .users-panel {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 150px;
    }
    
    .video-panel {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        max-height: 200px;
    }
    
    .message {
        max-width: 85%;
    }
} 