/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #36393f;
}

.chat-header {
    height: 48px;
    border-bottom: 1px solid #3c3c41;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background-color: #36393f;
    box-shadow: 0 1px 0 rgba(4, 4, 5, 0.2), 0 1.5px 0 rgba(6, 6, 7, 0.05), 0 2px 0 rgba(4, 4, 5, 0.05);
}

.channel-info {
    display: flex;
    align-items: center;
}

.channel-info .channel-icon {
    margin-right: 8px;
    font-size: 24px;
    color: #8e9297;
}

.channel-info .channel-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.channel-logo {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #7289da, #99aab5);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-family: 'ScriptME6', monospace;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px; 
}

.member-count {
    font-size: 14px;
    color: #8e9297;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scroll-behavior: smooth;
}

.welcome-message {
    padding: 16px 0;
    border-bottom: 1px solid #3c3c41;
    margin-bottom: 16px;
}

.welcome-message h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.welcome-message p {
    color: #8e9297;
    font-size: 16px;
}

.message {
    display: flex;
    padding: 8px 0;
    margin: 0 0 8px 0;
    position: relative;
}

.message:hover {
    background-color: rgba(4, 4, 5, 0.07);
    margin: 0 -16px 8px -16px;
    padding: 8px 16px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    margin-right: 16px;
    flex-shrink: 0;
}

.message-avatar img,
.message-avatar video {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}

.message-username {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin-right: 8px;
    cursor: pointer;
}

.message-timestamp {
    font-size: 12px;
    color: #72767d;
    margin-left: 8px;
}

.message-text {
    font-size: 16px;
    line-height: 1.375;
    color: #dcddde;
    word-wrap: break-word;
}

.inline-emoji,
.inline-gif {
    vertical-align: middle;
}

.message-media {
    max-width: 400px;
    margin: 8px 0;
    border-radius: 8px;
    overflow: hidden;
}

.message-media img,
.message-media video {
    width: 100%;
    height: auto;
    display: block;
}

.message-reactions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.reaction {
    background-color: #42464d;
    border: 1px solid #5865f2;
    border-radius: 12px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.15s ease;
}

.reaction:hover {
    background-color: #5865f2;
}

.reaction.active {
    background-color: #5865f2;
}

.message-input-container {
    padding: 16px;
    background-color: #36393f;
}

.message-input-wrapper {
    position: relative;
    background-color: #40444b;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

#message-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #dcddde;
    font-size: 16px;
    padding: 12px 16px;
    resize: none;
    max-height: 144px;
}

#message-input::placeholder {
    color: #72767d;
}

#send-button {
    background: none;
    border: none;
    color: #8e9297;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

#send-button:hover:not(:disabled) {
    color: #dcddde;
}

#send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animations */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: messageSlideIn 0.2s ease-out;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: #8e9297;
    font-size: 14px;
    font-style: italic;
}

.typing-dots {
    display: inline-flex;
    margin-left: 8px;
}

.typing-dot {
    width: 4px;
    height: 4px;
    background-color: #8e9297;
    border-radius: 50%;
    margin: 0 1px;
    animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-6px);
    }
}

.system-message {
    padding: 4px 0;
    color: #8e9297;
    font-size: 14px;
    font-style: italic;
    text-align: center;
}

.attachment-btn,
.emoji-btn {
    background: none;
    border: none;
    color: #8e9297;
    padding: 12px;
    cursor: pointer;
    font-size: 20px;
    transition: color 0.15s ease;
}

.attachment-btn:hover,
.emoji-btn:hover {
    color: #dcddde;
}