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

body {
    font-family: 'Consolas', monospace;
    background: #36393f;
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: #dcddde;
}

.header {
    background: #202225;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1e2124;
}

.header h1 {
    color: #ffffff;
    font-size: 1.25rem;
}

.chat-container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.message {
    padding: 0.25rem 1rem;
    word-wrap: break-word;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.message:hover {
    background: #32353b;
}

.user-message {
    color: #00b0f4;
}

.bot-message {
    color: #dcddde;
}

.message-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Header styling with proper alignment */
.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timestamp {
    color: #72767d;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

/* Container for username and processing indicator */
.user-info-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.username {
    color: #fff;
    font-weight: bold;
}

/* Processing indicator that appears next to username */
.processing-indicator {
    color: #00b0f4;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    position: relative;
}

/* Animation for the processing indicator */
.processing-indicator:after {
    content: '';
    display: inline-block;
    animation: ellipsis 2s steps(4) infinite;
    position: absolute;
}

@keyframes ellipsis {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* Message image */
.message-image {
    max-width: 100%;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

/* Message text */
.message-text {
    line-height: 1.5;
    width: 100%;
}

.message-text > * {
    margin-bottom: 1rem;
}

.message-text > *:last-child {
    margin-bottom: 0;
}

.message-text ul,
.message-text ol {
    padding-left: 1.5rem;
}

.message-text p {
    margin: 0.5rem 0;
}

/* Copy button */
.copy-button {
    background: transparent;
    border: none;
    color: #72767d;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    margin-left: auto;
}

.message:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    color: #dcddde;
}

/* Input area */
.input-container {
    padding: 1rem;
    background: #40444b;
    border-top: 1px solid #202225;
    display: flex;
    gap: 0.5rem;
}

.input-container input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 0.25rem;
    outline: none;
    font-size: 0.9375rem;
    background: #40444b;
    color: #dcddde;
    font-family: 'Consolas', monospace;
}

.input-container input:focus {
    background: #202225;
}

.send-button {
    background: transparent;
    color: #b9bbbe;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.send-button:hover {
    color: #dcddde;
}