/* Floating Chat Bubbles Styles */
.floating-chat-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

/* Floating Chat Bubble */
.floating-chat-bubble {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 320px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: bubbleFloatIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: auto;
    z-index: 9999;
}

@media (max-width: 767px) {
    .floating-chat-bubble {
        max-width: 280px;
        right: 15px;
        bottom: 80px;
    }
}

.floating-chat-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.floating-chat-bubble.hide {
    animation: bubbleFloatOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.floating-chat-bubble-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: #1a1a2e;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    position: relative;
    z-index: 1;
    animation: avatarBounce 2s ease-in-out infinite;
}

.floating-chat-bubble-avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes avatarPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.15);
    }
}

.floating-chat-bubble-content {
    flex: 1;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(251, 191, 36, 0.1);
    transition: all 0.3s ease;
}

.floating-chat-bubble:hover .floating-chat-bubble-content {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 12px 40px rgba(251, 191, 36, 0.2),
                0 0 0 1px rgba(251, 191, 36, 0.2);
    transform: translateY(-2px);
}

.floating-chat-bubble-content::before {
    content: '';
    position: absolute;
    right: -12px;
    bottom: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 12px;
    border-color: transparent transparent transparent rgba(30, 41, 59, 0.95);
}

.floating-chat-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.floating-chat-bubble-name {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.8125rem;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.floating-chat-bubble-time {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.6875rem;
    color: #94a3b8;
    white-space: nowrap;
}

.floating-chat-bubble-message {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.floating-chat-bubble-message p {
    margin: 0;
}

/* Single bubble positioning - always at same position */

@keyframes bubbleFloatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bubbleFloatOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.floating-chat-bubble.show {
    animation: bubbleFloatIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards,
               float 3s ease-in-out infinite 0.5s;
}
