.floating-buttons {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.floating-ai-icon a {
    position: relative;
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: #020714;
    border: 2px solid #00e5ff;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.floating-ai-icon:hover a {
    transform: scale(1.12);
    box-shadow: 0 0 35px rgba(0, 229, 255, 0.85);
    border-color: #ffffff;
}

.floating-ai-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.floating-ai-icon:hover img {
    filter: brightness(1.15);
}

.main-float-btn {
    position: relative;
    order: 4;
}

.pulse-ring,
.pulse-ring-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid rgba(0, 229, 255, 0.5);
    border-radius: 50%;
    animation: pulse-wave 2s infinite;
    z-index: 1;
}

.pulse-ring-2 {
    animation-delay: 1s;
    border-color: rgba(0, 112, 243, 0.4);
}


/* Enhanced Tooltips */

.tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.95);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(17, 24, 39, 0.95);
}

.floating-ai-icon:hover .tooltip,
.float-btn:hover .tooltip,
.expand-btn:hover .tooltip,
.scroll-top-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-4px);
}

@keyframes pulse-wave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Ensure Back-to-Top Button sits cleanly above the CodeXpro Web floating button */
.backto-top > div {
    bottom: 110px !important;
    right: 29px !important;
    border: 1.5px solid rgba(0, 229, 255, 0.35);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 229, 255, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.backto-top > div:hover {
    border-color: #00e5ff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6) !important;
    transform: translateY(-3px);
}

@media only screen and (max-width: 575px) {
    .backto-top > div {
        bottom: 105px !important;
        right: 28px !important;
    }
}