.cube-container {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    perspective: 800px;
}

.cube {
    position: relative;
    width: 50px;
    height: 50px;
    transform-style: preserve-3d;
    transform: rotateX(-30deg) rotateY(30deg);
}

.cube.active {
    animation: cubeRotate 4s linear infinite;
}

@keyframes cubeRotate {
    0% {
        transform: rotateX(-30deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(-30deg) rotateY(360deg);
    }
}

.step:hover .cube {
    animation-play-state: paused;
}

.cube .box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.cube .box span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(21, 21, 25, 1), var(--glow-color));
    transform: rotateY(calc(90deg * var(--i))) translateZ(25px);
    filter: drop-shadow(0 0 15px color-mix(in srgb, var(--glow-color) 80%, transparent));
}

.cube .top {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transform: rotateX(90deg) translateZ(25px);
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.8);
}
