.context-circle-menu {
    position: fixed;
    z-index: 9999;
    width: 360px;
    height: 360px;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    transform: translate(-50%, -50%);
}

.context-circle-menu.active {
    display: flex;
    pointer-events: auto;
    /* Stronger pop-in for the main anchor */
    animation: menuEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.context-menu-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s;
}

.context-circle-menu.closing .context-menu-container {
    transform: rotate(-360deg);
    filter: blur(4px);
}

.liquid-glass-trigger {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: url(#liquid-refraction) blur(30px) saturate(220%);
    -webkit-backdrop-filter: blur(30px) saturate(220%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.15),
        0 25px 50px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 5px 5px 8px -4px rgba(255, 255, 255, 0.6),
        inset -5px -5px 8px -4px rgba(0, 0, 0, 0.6),
        inset 0 0 12px 2px rgba(0, 0, 0, 0.3),
        inset 0 0 30px 0 rgba(255, 255, 255, 0.1);
}

.liquid-glass-trigger i {
    color: white;
    font-size: 1.6rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.context-circle-menu.active .liquid-glass-trigger i {
    transform: rotate(135deg);
}

.liquid-glass-trigger.shake {
    animation: shakeEffect 0.08s linear infinite;
}

.liquid-glass-item {
    position: absolute;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: url(#liquid-refraction) blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    /* Exaggerated Elastic transition with spinning rotation */
    transition:
        transform 0.7s cubic-bezier(0.5, 1.8, 0.5, 0.8),
        opacity 0.4s ease;
    opacity: 0;
    /* Initial state: center of menu with rotation */
    transform: translate(0, 0) scale(0) rotate(-360deg);
    overflow: hidden;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 4px 4px 6px -4px rgba(255, 255, 255, 0.5),
        inset -4px -4px 6px -4px rgba(0, 0, 0, 0.7);
}

.liquid-glass-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 50%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(45deg);
    transition: all 0.7s ease;
}

.liquid-glass-item:hover::after {
    left: 150%;
}

/* Mega Burst: translates to pos + rotates to 0 + scales with bounce */
.context-circle-menu.active .liquid-glass-item {
    opacity: 1;
    transform: translate(var(--x), var(--y)) scale(1) rotate(0deg);
}

.context-circle-menu.closing .liquid-glass-item {
    opacity: 0;
    transform: translate(0, 0) scale(0) rotate(360deg);
    transition-duration: 0.45s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translate(var(--x), var(--y)) scale(1.22) !important;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 5px 5px 10px -4px rgba(255, 255, 255, 0.7),
        inset -5px -5px 10px -4px rgba(0, 0, 0, 0.8);
}

.liquid-glass-item i {
    width: 22px;
    height: 22px;
    stroke-width: 3px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    z-index: 2;
}

.liquid-glass-item .label {
    position: absolute;
    bottom: -35px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
    color: white;
    padding: 4px 12px;
    border-radius: 14px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.7);
}

.liquid-glass-item:hover .label {
    opacity: 1;
    transform: translateY(0);
}

@keyframes menuEnter {
    from {
        transform: translate(-50%, -50%) scale(0.4);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes shakeEffect {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(4px);
    }

    50% {
        transform: translateX(0);
    }

    75% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0);
    }
}