<style>
    .cube-grid-2 {
        --loader-size: clamp(48px, 12vmin, 96px);
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: calc(var(--loader-size) * 0.05);
        width: var(--loader-size);
        height: var(--loader-size);
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .cube-grid-2 div {
        width: 100%;
        height: 100%;
        background: {{ playerColor2 }};
        animation: cube-scale 1.3s infinite ease-in-out;
        will-change: transform;
    }

    .cube-grid-2 div:nth-child(2) {
        animation-delay: 0.1s;
    }

    .cube-grid-2 div:nth-child(3) {
        animation-delay: 0.2s;
    }

    .cube-grid-2 div:nth-child(4) {
        background: linear-gradient(to top, {{ playerColor }} 0, {{ playerColor2 }} 100%) !important;
        animation-delay: 0.3s;
    }

    .cube-grid-2 div:nth-child(5) {
        background: linear-gradient(to top, {{ playerColor }} 0, {{ playerColor2 }} 100%) !important;
        animation-delay: 0.4s;
    }

    .cube-grid-2 div:nth-child(6) {
        background: linear-gradient(to top, {{ playerColor }} 0, {{ playerColor2 }} 100%) !important;
        animation-delay: 0.5s;
    }

    .cube-grid-2 div:nth-child(7) {
        animation-delay: 0.6s;
        background: {{ playerColor }};
    }

    .cube-grid-2 div:nth-child(8) {
        animation-delay: 0.7s;
        background: {{ playerColor }};
    }

    .cube-grid-2 div:nth-child(9) {
        background: {{ playerColor }};
        animation-delay: 0.8s;
    }

    @keyframes cube-scale {
        0%,
        70%,
        100% {
            transform: scale(1);
            -webkit-transform: scale(1);
        }
        35% {
            transform: scale(0.5);
            -webkit-transform: scale(0.5);
        }
    }
</style>
<div class="cube-grid-2">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</div>