/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #fff;
    overflow: hidden;
}

.chat-container {
    width: 100%;
    max-width: 500px;
    height: 80vh;
    background: #f9fbfd;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Chatbox */
.chatbox {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
    background-color: #eef2f7;
}

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 15px;
    font-size: 0.95em;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.message.user {
    align-self: flex-end;
    background: #4caf50;
    color: white;
}

.message.bot {
    align-self: flex-start;
    background: #007bff;
    color: white;
}

/* Typing Indicator */
.typing-indicator {
    font-style: italic;
    color: #555;
    padding: 10px;
    display: none;
    text-align: left;
}

/* Button Styles */
.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.action-button {
    padding: 12px 18px;
    background: #007bff;
    color: white;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.action-button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.action-button:active {
    transform: scale(1);
    background: #004494;
}

/* Chat Footer */
.chat-footer {
    background: #eef2f7;
    padding: 10px;
    text-align: center;
}

#scrollToBottom {
    background: transparent;
    border: none;
    font-size: 1.2em;
    color: #007bff;
    cursor: pointer;
    transition: color 0.3s;
}

#scrollToBottom:hover {
    color: #004494;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
