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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    width: 100%;
    max-width: 700px;
    height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: #1a3a5c;
    color: #fff;
    padding: 16px 20px;
    text-align: center;
}

.chat-header h1 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.chat-header p {
    font-size: 0.85rem;
    opacity: 0.8;
}

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

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message.bot {
    align-self: flex-start;
    background: #e8edf2;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: #1a3a5c;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-content {
    white-space: pre-wrap;
}

.chat-input-area {
    display: flex;
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    gap: 8px;
}

#user-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}

#user-input:focus {
    border-color: #1a3a5c;
}

#send-btn {
    padding: 10px 20px;
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

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

#send-btn:hover:not(:disabled) {
    background: #244f7a;
}

.typing-indicator {
    align-self: flex-start;
    padding: 10px 14px;
    background: #e8edf2;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    color: #888;
    font-style: italic;
}
