body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 90%;
    max-width: 500px;
    height: 80vh;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-header {
    background: #4a90e2;
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

.chat-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.chat-subtitle {
    margin: 5px 0 0;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Chat Box - Custom Scrollbar */
.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #4a90e2 #e0e0e0; /* Thumb and Track colors */
}

/* WebKit browsers (Chrome, Edge, Safari) */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

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

.chat-box::-webkit-scrollbar-thumb {
    background-color: #4a90e2;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.chat-message {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-message.bot {
    align-self: flex-start;
    background-color: #e0f7fa;
    color: #006064;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 15px;
}

.chat-message.user {
    align-self: flex-end;
    background-color: #d1c4e9;
    color: #4527a0;
    border-bottom-right-radius: 5px;
    border-top-left-radius: 15px;
}

.chat-footer {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
}

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

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

#send-button {
    background: #4a90e2;
    color: #ffffff;
    border: none;
    margin-left: 10px;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

#send-button:hover {
    background: #357ab8;
}

#send-button svg {
    width: 20px;
    height: 20px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: #4a90e2;
    border-radius: 50%;
    animation: typing 1.5s infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .chat-container {
        height: 90vh;
    }
}

@media (min-width: 1024px) {
    .chat-container {
        max-width: 600px;
        height: 85vh;
    }
}
