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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #343541;
    color: #ececf1;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #343541;
    position: relative;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.welcome-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 600;
    color: #ececf1;
    text-align: center;
}

.message {
    display: flex;
    padding: 24px;
    gap: 24px;
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
}

.message.user {
    background-color: #343541;
}

.message.assistant {
    background-color: #444654;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.message.user .message-avatar {
    background-color: #19c37d;
}

.message.assistant .message-avatar {
    background-color: #ab68ff;
}

.message-content {
    flex: 1;
    line-height: 1.75;
    color: #ececf1;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-content p {
    margin-bottom: 12px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Input Container */
.input-container {
    padding: 24px;
    background-color: #343541;
    border-top: 1px solid #4d4d4f;
}

.chat-form {
    max-width: 768px;
    margin: 0 auto;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    background-color: #40414f;
    border-radius: 12px;
    border: 1px solid #565869;
    padding: 12px;
    gap: 12px;
}

.input-wrapper:focus-within {
    border-color: #10a37f;
}

#messageInput {
    flex: 1;
    background: transparent;
    border: none;
    color: #ececf1;
    font-size: 16px;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.5;
}

#messageInput:focus {
    outline: none;
}

#messageInput::placeholder {
    color: #8e8ea0;
}

.send-button {
    background-color: transparent;
    border: none;
    color: #8e8ea0;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.send-button:not(:disabled):hover {
    background-color: #565869;
    color: #ececf1;
}

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

/* Loading indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8e8ea0;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Scrollbar */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #565869;
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #6e6e7e;
}

/* Responsive */
@media (max-width: 768px) {
    .message {
        padding: 16px;
    }
}
