.lat-ghost-effect {
    position: fixed;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    contain: layout paint style;
    pointer-events: none;
}

.lat-ghost-effect[hidden] {
    display: none;
}

.lat-ghost-effect__portal {
    display: none;
}

.lat-ghost-effect__ghost {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100px;
    height: 100px;
    opacity: 0;
    filter: blur(10px);
    transform-origin: center;
    will-change: transform, opacity, filter;
}

.lat-ghost-effect__svg {
    display: block;
    width: 100%;
    height: auto;
}

.lat-ghost-effect--light-theme .lat-ghost-effect__svg {
    animation: lat-ghost-light-theme-pulse 6.5s ease-in-out infinite;
    animation-delay: var(--lat-ghost-pulse-delay, 0ms);
    filter: brightness(0.52) contrast(1.2) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
    will-change: filter;
}

.lat-ghost-effect__shape {
    fill: url('#lat-ghost-gradient');
}

.lat-ghost-effect__definitions {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

@keyframes lat-ghost-light-theme-pulse {
    0%,
    38%,
    65%,
    100% {
        filter: brightness(0.52) contrast(1.2) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
    }

    46%,
    54% {
        filter: brightness(0.08) contrast(1.35) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
    }
}

@media (prefers-reduced-motion: reduce) {
    .lat-ghost-effect {
        display: none;
    }
}
