/* ========================================
   COLORS - Customize here!
   ======================================== */
:root {
    --primary-color: #4a90e2;
    --background: #f5f5f5;
    --chat-bg: #ffffff;
    --user-message-bg: #4a90e2;
    --bot-message-bg: #e8e8e8;
    --input-border: #ddd;
    --text-color: #333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ========================================
   CHAT CONTAINER
   ======================================== */
.chat-container {
    width: 100%;
    max-width: 600px;
    height: 600px;
    background: var(--chat-bg);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.chat-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

/* ========================================
   CHAT BOX (Scrollable)
   ======================================== */
.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Custom Scrollbar */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========================================
   MESSAGES
   ======================================== */
.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

/* User Messages (Right side, blue) */
.user-message {
    background: var(--user-message-bg);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Bot Messages (Left side, gray) */
.bot-message {
    background: var(--bot-message-bg);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* ========================================
   INPUT AREA
   ======================================== */
.chat-input {
    display: flex;
    padding: 20px;
    background: var(--chat-bg);
    border-top: 1px solid var(--input-border);
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--input-border);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#messageInput:focus {
    border-color: var(--primary-color);
}

#sendButton {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sendButton:hover {
    background: #3a7bc8;
    transform: scale(1.05);
}

#sendButton:active {
    transform: scale(0.95);
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        border-radius: 0;
    }
    
    .message {
        max-width: 85%;
    }
}
