.chat-container {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 380px;
    height: 550px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e0e6ed;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-header {
    background-color: #1a73e8;
    color: white;
    padding: 16px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-chat {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#close-chat:hover {
    opacity: 1;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f8f9fa;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 10px;
}

.msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg.bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.msg.user {
    align-self: flex-end;
    background-color: #1a73e8;
    color: white;
    border-bottom-right-radius: 4px;
}

.loading-indicator {
    align-self: flex-start;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.3s ease;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #94a3b8;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.loading-text {
    font-size: 13px;
    color: #64748b;
    margin-left: 4px;
}

.chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    border: 1px solid #cbd5e0;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#user-input:focus {
    border-color: #1a73e8;
}

#user-input:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
}

#send-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#send-btn:hover:not(:disabled) {
    background-color: #1557b0;
}

#send-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

#send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.chat-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #1a73e8;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
    z-index: 10000;
    transition: transform 0.2s, background-color 0.2s;
}

.chat-fab:hover {
    transform: scale(1.05);
    background-color: #1557b0;
}