* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #36393f;
    color: #dcddde;
    height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background: #2f3136;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #40444b;
}

.header h1 {
    color: #7289da;
    font-size: 1.5rem;
}

.user-controls {
    display: flex;
    gap: 0.5rem;
}

.user-controls input {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: #40444b;
    color: #dcddde;
}

.user-controls button {
    padding: 0.5rem 1rem;
    background: #7289da;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    background: #2f3136;
    padding: 1rem;
    border-right: 1px solid #40444b;
    overflow-y: auto;
}

.sidebar h3 {
    color: #8e9297;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.channel {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 2px;
    color: #8e9297;
}

.channel:hover, .channel.active {
    background: #40444b;
    color: #dcddde;
}

.voice-section, .users-section {
    margin-top: 2rem;
}

.voice-channel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #40444b;
    border-radius: 4px;
}

.voice-channel button {
    padding: 0.25rem 0.5rem;
    background: #43b581;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.channel-header {
    padding: 1rem;
    background: #36393f;
    border-bottom: 1px solid #40444b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.channel-actions {
    display: flex;
    gap: 0.5rem;
}

.channel-actions button {
    padding: 0.5rem;
    background: #40444b;
    color: #dcddde;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #36393f;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.username {
    font-weight: bold;
    color: #7289da;
    margin-right: 0.5rem;
}

.timestamp {
    font-size: 0.75rem;
    color: #8e9297;
}

.file-attachment {
    background: #40444b;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    border: 1px solid #7289da;
}

.file-attachment a {
    color: #7289da;
    text-decoration: none;
}

.message-input {
    padding: 1rem;
    background: #40444b;
    display: flex;
    gap: 0.5rem;
}

.message-input input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    background: #36393f;
    color: #dcddde;
}

.message-input button {
    padding: 0.75rem 1.5rem;
    background: #7289da;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#addChannel {
    width: 100%;
    padding: 0.5rem;
    background: #40444b;
    color: #dcddde;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
}

.user-item {
    padding: 0.25rem 0;
    color: #dcddde;
    font-size: 0.9rem;
}

.user-item::before {
    content: "●";
    color: #43b581;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
}

@media (max-width: 600px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
    }
}