/* Chatbot Styles - v3.1 */
#betflow-chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    border: none;
}

.chatbot-trigger:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(147, 51, 234, 0.6);
}

.chatbot-trigger i {
    font-size: 28px;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid #000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: rgba(17, 17, 17, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(147, 51, 234, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.chatbot-window.open {
    display: flex;
    animation: windowSlideIn 0.3s ease;
}

@keyframes windowSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(236, 72, 153, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.chatbot-avatar i {
    font-size: 24px;
    color: #fff;
}

.chatbot-header-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px 0;
}

.chatbot-header-text span {
    font-size: 11px;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chatbot-header-text span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulseOnline 2s infinite;
}

@keyframes pulseOnline {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d4d4d8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fff;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9333ea, #ec4899);
    border-radius: 6px;
}

.chatbot-message {
    display: flex;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot .message-content {
    background: rgba(39, 39, 42, 0.8);
    color: #e4e4e7;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.chatbot-typing {
    display: none;
    padding: 0 20px 10px;
}

.chatbot-typing.visible {
    display: flex;
    gap: 6px;
    align-items: center;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a855f7;
    animation: typingDot 1.4s infinite ease-in-out;
}

.chatbot-typing span:nth-child(1) { animation-delay: 0s; }
.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-input-area {
    padding: 15px 20px;
    background: rgba(17, 17, 17, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(39, 39, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
}

#chatbot-input:focus {
    border-color: #a855f7;
    background: rgba(39, 39, 42, 0.95);
}

#chatbot-input::placeholder {
    color: #71717a;
}

#chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#chatbot-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

#chatbot-send:active {
    transform: scale(0.95);
}

#chatbot-send i {
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        right: 20px;
        bottom: 100px;
    }
    
    .chatbot-trigger {
        width: 56px;
        height: 56px;
    }
    
    .chatbot-trigger i {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    #betflow-chatbot {
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-window {
        width: 100vw;
        height: calc(100vh - 80px);
        right: 0;
        bottom: 80px;
        border-radius: 20px 20px 0 0;
    }
    
    .chatbot-trigger {
        width: 52px;
        height: 52px;
    }
}