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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    max-height: 800px;
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

@media (max-width: 500px) {
    .chat-container {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

.chat-header {
    background: #007bff;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.1em;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message.bot {
    background: #e9ecef;
    align-self: flex-start;
    border-bottom-right-radius: 5px;
}

.message.user {
    background: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-left-radius: 5px;
}

.typing-indicator {
    align-self: flex-start;
    color: #888;
    font-size: 0.9em;
    display: none;
    margin-bottom: 5px;
}

.chat-input-area {
    display: flex;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #ddd;
}

#user-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
}

#user-input:focus {
    border-color: #007bff;
}

#send-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: background 0.2s;
}

#send-btn:hover {
    background: #0056b3;
}