#overlay-arena {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.15);
    width: 820px;
    height: 460px;
    background: #000;
    border: 2px solid #fff;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    opacity: 0.2;
    transition: transform 0.44s linear, opacity 0.44s linear;
}

/* when open, add a class to trigger full size */
.arena-contents {
    width: 100%;
    height: 100%;
    /* keep contents neutral; the arena container animates now */
    transform: scale(1);
    opacity: 1;
}

/* when the arena has .opening, scale the whole box up */
#overlay-arena.opening {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* closing state scales down the whole box */
#overlay-arena.closing {
    transform: translate(-50%, -50%) scale(0.15);
    opacity: 0.2;
}

/* projectiles */
.proj {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

.proj.circleStab {
    width: 22px;
    height: 22px;
    background-image: url('/img/bullethell/circleStab.png');
}

.proj.sideScroll {
    width: 44px;
    height: 28px;
    background-image: url('/img/bullethell/sideScroll.png');
}

.proj.slamdown {
    height: 360px;
    background-image: url('/img/bullethell/slamDown.png');
}

.tele {
    position: absolute;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    bottom: 0;
}

/* player */
#player {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background-image: url('/img/bullethell/player.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes playerShake {
    0% {
        transform: translate(-50%, -50%) translate(0, 0);
    }

    20% {
        transform: translate(-50%, -50%) translate(-4px, 2px);
    }

    40% {
        transform: translate(-50%, -50%) translate(4px, -2px);
    }

    60% {
        transform: translate(-50%, -50%) translate(-2px, 2px);
    }

    80% {
        transform: translate(-50%, -50%) translate(2px, -2px);
    }

    100% {
        transform: translate(-50%, -50%) translate(0, 0);
    }
}

.player-shake {
    animation: playerShake 0.25s ease-in-out;
    filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(10000%) hue-rotate(355deg) brightness(200%) contrast(200%);
}