#mouse-trail-svg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
}

#mouse-trail-svg.is-hidden {
    display: none;
}

#mouse-trail-svg.is-animating #mouse-trail-path {
    opacity: 1;
}

#mouse-trail-path {
    opacity: 0;
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 0.1 0.8;
    --path-flow-duration: 1s;
    animation:
        path-color-cycle .2s linear infinite alternate,
        path-length-flow var(--path-flow-duration) linear infinite;
    animation-play-state: paused;
    filter: drop-shadow(0 0 6px rgba(255, 77, 109, 0.45));
}

#mouse-trail-svg.is-animating #mouse-trail-path {
    animation-play-state: running;
}

@keyframes path-color-cycle {
    0% {
        stroke: rgb(255, 0, 0, .99);
    }
    16% {
        stroke: rgb(255, 127, 0, .99);
    }
    33% {
        stroke: rgb(255, 255, 0, .99);
    }
    50% {
        stroke: rgb(0, 255, 0, .99);
    }
    66% {
        stroke: rgb(0, 0, 255, .99);
    }
    83% {
        stroke: rgb(75, 0, 130, .99);
    }
    100% {
        stroke: rgb(148, 0, 211, .99);
    }
}

@keyframes path-length-flow {
    0% {
        stroke-dashoffset: 1;
    }
    50% {
        stroke-dashoffset: 0;
    }
    50.01% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -1;
    }
}

.path-toggle-button {
    position: fixed;
    left: -0px;
    bottom: -0px;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: black;
    padding: 0.45rem 0.55rem;
    font: inherit;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.path-toggle-button svg {
    display: block;
}

.path-toggle-button:hover {
    border-color: rgba(0, 0, 0, 0.35);
}

.path-toggle-button-enabled {
    background: greenyellow;
}

.path-hover-highlight {
    outline: 2px solid red;
    animation: path-hover-fade 1.5s linear forwards;
}

@keyframes path-hover-fade {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}