* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f3f4f6;

    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 700px;

    background: white;

    border-radius: 20px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

    overflow: hidden;

    display: flex;
    flex-direction: column;
}

/* Header */

.chat-header {
    background: #6c5ce7;
    color: white;

    padding: 20px;

    display: flex;
    align-items: center;

    gap: 15px;
}

.ai-avatar {
    width: 55px;
    height: 55px;

    background: white;
    color: #6c5ce7;

    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 24px;
    font-weight: bold;
}

.chat-header h1 {
    font-size: 22px;
}

.chat-header p {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.9;
}

/* Chat messages */

.chat-box {
    flex: 1;

    padding: 25px;

    overflow-y: auto;

    background: #f8f9fb;
}

.message {
    margin-bottom: 20px;

    max-width: 75%;
}

.message-name {
    font-size: 12px;
    font-weight: bold;

    margin-bottom: 5px;
}

.message-text {
    padding: 12px 16px;

    border-radius: 15px;

    line-height: 1.5;

    font-size: 15px;
}

/* AI message */

.ai-message {
    margin-right: auto;
}

.ai-message .message-name {
    color: #6c5ce7;
}

.ai-message .message-text {
    background: white;

    border: 1px solid #e5e7eb;
}

/* User message */

.user-message {
    margin-left: auto;

    text-align: right;
}

.user-message .message-name {
    color: #333;
}

.user-message .message-text {
    background: #6c5ce7;

    color: white;

    text-align: left;
}

/* Input */

.chat-input-area {
    padding: 15px;

    background: white;

    border-top: 1px solid #e5e7eb;

    display: flex;

    gap: 10px;
}

#userInput {
    flex: 1;

    padding: 14px 16px;

    border: 1px solid #d1d5db;

    border-radius: 12px;

    font-size: 15px;

    outline: none;
}

#userInput:focus {
    border-color: #6c5ce7;
}

#sendButton {
    padding: 0 25px;

    border: none;

    border-radius: 12px;

    background: #6c5ce7;

    color: white;

    font-size: 15px;

    cursor: pointer;
}

#sendButton:hover {
    background: #5849c4;
}