:root {
    --bg-color: #f4f4f9;
    --chat-bg: #ffffff;
    --primary-color: #4A90E2;
    --user-msg-bg: #4A90E2;
    --user-msg-text: #ffffff;
    --bot-msg-bg: #f0f0f0;
    --bot-msg-text: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.chat-container {
    width: 100%;
    max-width: 600px;
    height: 90vh;
    background: var(--chat-bg);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
    background: #fff;
}

header h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

header p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: #888;
}

.chat-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}

.user-message {
    align-self: flex-end;
    background-color: var(--user-msg-bg);
    color: var(--user-msg-text);
    border-bottom-right-radius: 2px;
}

.bot-message {
    align-self: flex-start;
    background-color: var(--bot-msg-bg);
    color: var(--bot-msg-text);
    border-bottom-left-radius: 2px;
}

/* Markdown Styles inside bot messages */
.bot-message h1,
.bot-message h2,
.bot-message h3 {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 1.1em;
    font-weight: 700;
}

.bot-message ul,
.bot-message ol {
    padding-left: 20px;
    margin: 5px 0;
}

.bot-message li {
    margin-bottom: 5px;
}

.bot-message p {
    margin-bottom: 8px;
}

.bot-message strong {
    font-weight: 600;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: #fff;
}

input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border 0.2s;
}

input:focus {
    border-color: var(--primary-color);
}

button {
    background: var(--primary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

button:hover {
    transform: scale(1.05);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}