* {
    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%);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
}

.status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.status.connected {
    background: #27ae60;
}

.status.disconnected {
    background: #e74c3c;
}

/* Login Screen */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.login-form input, .login-form select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus, .login-form select:focus {
    outline: none;
    border-color: #3498db;
}

.login-form button {
    width: 100%;
    padding: 0.75rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-form button:hover {
    background: #2980b9;
}

.channel-creation {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
}

.channel-creation h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1rem;
}

/* Main App */
.main-app {
    display: flex;
    flex: 1;
    height: calc(100vh - 80px);
}

.sidebar {
    width: 300px;
    background: #34495e;
    color: white;
    padding: 1rem;
    overflow-y: auto;
}

.user-info {
    background: #2c3e50;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.user-info span {
    display: block;
}

#currentUser {
    font-weight: bold;
    font-size: 1.1rem;
}

#currentChannel {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.channels-section, .users-section {
    margin-bottom: 2rem;
}

.channels-section h3, .users-section h3 {
    margin-bottom: 0.5rem;
    color: #ecf0f1;
}

.channel-item, .user-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s;
}

.channel-item:hover, .user-item:hover {
    background: #3c5a78;
}

.channel-item.active {
    background: #3498db;
}

.user-item.talking {
    background: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { background: #e74c3c; }
    50% { background: #c0392b; }
    100% { background: #e74c3c; }
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ecf0f1;
}

.talk-button-container {
    padding: 2rem;
    text-align: center;
    background: white;
    border-bottom: 1px solid #bdc3c7;
}

.talk-button {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.talk-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.talk-button:active {
    transform: translateY(0);
    background: #a93226;
}

.recording-indicator {
    margin-top: 1rem;
    color: #e74c3c;
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.messages-container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.messages-list {
    max-height: 100%;
}

.message {
    background: white;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message.system {
    background: #fff3cd;
    color: #856404;
    font-style: italic;
}

.message.audio {
    border-left: 4px solid #3498db;
}

.message-info {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

.audio-controls {
    padding: 1rem;
    background: white;
    border-top: 1px solid #bdc3c7;
    text-align: center;
}

.audio-controls input {
    width: 200px;
    margin: 0 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-app {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
    }
    
    .talk-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}