

:root {
    --primary: #ff0000;
    --dark: #0a0a0a;
    --text-light: #ffffff;
}

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chatbot-toggle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff3333);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.chatbot-toggle:hover::before {
    left: 100%;
}

.chatbot-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.6);
}

.chatbot-toggle.active {
    background: linear-gradient(135deg, #ff3333, #ff6666);
    transform: rotate(45deg);
}

.chatbot-toggle-icon {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.chatbot-toggle:hover .chatbot-toggle-icon {
    transform: scale(1.2);
}

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #00ff00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #000;
    animation: chatbotPulse 2s infinite;
    box-shadow: 0 0 15px #00ff00;
}

@keyframes chatbotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px #00ff00; }
    50% { transform: scale(1.2); box-shadow: 0 0 20px #00ff00; }
}

.chatbot-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    height: 550px;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.98), rgba(40, 10, 10, 0.95));
    border-radius: 25px;
    border: 1px solid rgba(255, 0, 0, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
}

.chatbot-window.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary), #ff3333);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.chatbot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.chatbot-info {
    flex: 1;
}

.chatbot-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.chatbot-status {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: statusBlink 2s infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-actions {
    display: flex;
    gap: 10px;
}

.chatbot-action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.chatbot-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.3);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.5);
}

.message {
    max-width: 85%;
    padding: 15px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
    word-wrap: break-word;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    color: var(--text-light);
    border-bottom-left-radius: 5px;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #ff3333);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 20px 25px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chatbot-input-area {
    padding: 15px 20px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 0, 0, 0.1);
}

.chatbot-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 15px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chatbot-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.chatbot-send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff3333);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.4);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

.chatbot-quick-replies {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-reply {
    padding: 8px 15px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-reply:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
}

.language-selector {
    position: absolute;
    top: 80px;
    right: 15px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 15px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.language-selector.show {
    display: flex;
}

.lang-option {
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-option:hover {
    background: rgba(255, 0, 0, 0.1);
}

.lang-option.active {
    background: rgba(255, 0, 0, 0.2);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    .chatbot-window {
        width: calc(100vw - 40px);
        height: 450px;
        right: 0;
    }
    .chatbot-toggle {
        width: 60px;
        height: 60px;
    }
}
