body {
    font-family: sans-serif;
    background-color: #f4f4f9;
}

.chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #5a8a5a;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.chat-window.open {
    transform: scale(1);
}

.chat-header {
    background-color: #black;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
}

#close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
}

.message.user {
    background-color: #e9e9eb;
    align-self: flex-end;
}

.message.assistant {
    background-color: #5a8a5a;
    color: white;
    align-self: flex-start;
}

.message.loading {
    background-color: #e9e9eb;
    align-self: flex-start;
    font-style: italic;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
}

#chat-form {
    display: flex;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px;
    font-size: 16px;
}

#chat-form button {
    background-color: #5a8a5a;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    margin-left: 10px;
    cursor: pointer;
}