:root {
    --primary-gradient: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
    --bot-msg-color: #f0f2f5;
    --user-msg-color: #4ca1af;
    --text-dark: #2d3436;
    --white: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: #eef2f3;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 450px;
    height: 80vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* HEADER */
.chat-header {
    background: var(--primary-gradient);
    padding: 20px;
    color: white;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 24px;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 12px;
}

.brand-text h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

.brand-text p {
    font-size: 0.75rem;
    opacity: 0.8;
}

.status-dot {
    height: 8px;
    width: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

/* CHAT WINDOW */
.chat-window {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #fafbfc;
}

/* MESSAGES */
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

.bot-message {
    align-self: flex-start;
    background: var(--bot-msg-color);
    color: var(--text-dark);
    border-bottom-left-radius: 2px;
}

.user-message {
    align-self: flex-end;
    background: var(--user-msg-color);
    color: white;
    border-bottom-right-radius: 2px;
}

/* INPUT AREA */
.input-area {
    padding: 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

#user-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: 0.3s;
}

#user-input:focus {
    border-color: #4ca1af;
}

#send-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

#send-btn:hover {
    transform: scale(1.05);
}

/* TYPING DOTS */
.typing .dot {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.3s linear infinite;
}

.typing .dot:nth-child(2) { animation-delay: -1.1s; }
.typing .dot:nth-child(3) { animation-delay: -0.9s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* MARKDOWN SUPPORT */
.markdown h1, .markdown h2, .markdown h3 {
    margin: 8px 0;
    font-weight: 600;
}

.markdown p {
    margin: 6px 0;
}

.markdown ul {
    margin-left: 20px;
    padding-left: 10px;
}

.markdown code {
    background: #2b2b2b;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #fff;
}

.markdown pre code {
    display: block;
    padding: 12px;
    border-radius: 6px;
    white-space: pre-wrap;
}