#chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(105.69deg, #3707AA 0%, #280975 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        transform: scale(1);
    }

    100% {
        box-shadow: 0 6px 12px rgba(55, 7, 170, 0.4);
        transform: scale(1.05);
    }
}

#chat-button:hover {
    transform: scale(1.05);
    background: linear-gradient(105.69deg, #280975 0%, #3707AA 100%);
    animation: none;
}

#chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    transform-origin: bottom right;
}

.chat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateY(20px);
}

.chat-header {
    background: linear-gradient(105.69deg, #3707AA 0%, #280975 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

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

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    animation: message-pop 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes message-pop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    background-color: #F8F5FF;
    color: #020010;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    display: flex;
    flex-direction: column;
}

.message.user {
    background: linear-gradient(105.69deg, #3707AA 0%, #280975 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-options {
    display: flex;
    background-color: #F8F5FF;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.option-button {
    background-color: #FFFFFF;
    border: 1px solid #D2D2D2;
    color: #020010;
    border-radius: 18px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    animation: button-in 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(5px);
}

.option-button:nth-child(1) {
    animation-delay: 0.05s;
}

.option-button:nth-child(2) {
    animation-delay: 0.1s;
}

.option-button:nth-child(3) {
    animation-delay: 0.15s;
}

.option-button:nth-child(4) {
    animation-delay: 0.2s;
}

.option-button:nth-child(5) {
    animation-delay: 0.25s;
}

.option-button:nth-child(6) {
    animation-delay: 0.3s;
}

.option-button:nth-child(7) {
    animation-delay: 0.35s;
}

.option-button:nth-child(8) {
    animation-delay: 0.4s;
}

@keyframes button-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.option-button:hover {
    background: linear-gradient(105.69deg, #3707AA 0%, #280975 100%);
    color: white;
    border: 1px solid #3707AA;
    transform: scale(1.02);
}

.chat-input {
    display: flex;
    padding: 10px 15px;
    background: #f7f7f7;
    border-top: 1px solid #e0e0e0;
}

#chat-message-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#chat-send {
    background: #3707AA;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, background 0.3s ease;
}

#chat-send:hover {
    transform: scale(1.1);
    background: #4b1dd3;
}

#chat-send:active {
    transform: scale(0.95);
}

.sender-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: #355e98;
}

.typing-indicator {
    display: flex;
    padding: 6px 12px;
    background: #F8F5FF;
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 15px;
    align-items: center;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #3707AA;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing-dot 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes typing-dot {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.message-content {
    display: inline-block;
    animation: fade-in 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

#chat-window:not(.chat-hidden) {
    animation: window-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes window-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}