* {
    box-sizing: border-box;
}

:root {
    --number-of-players-squared: 0;
}

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    color: #F0F0F0;
}

.game {
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
}

.players {
    z-index: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    display: grid;
    grid-template-columns: repeat(var(--number-of-players-squared), 1fr);
}

.player {
    position: relative;
    display: inline-block;
}

.player .canvas {
    z-index: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    display: block;
    border: 0;
    image-rendering: pixelated;
}

.gui {
    z-index: 1;
    height: 100%;
    width: 100%;
    position: absolute;
    display: block;
}

@keyframes pulsate {
    0% {
        opacity: 1.0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1.0;
    }
}

.loading {
    width: min(10vh, 10vw);
    height: min(10vh, 10vw);
    background: #404040;
    animation: pulsate 2s ease-out;
    animation-iteration-count: infinite;
}

.fullscreen-wrapper {
    z-index: 1000;
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #00000033
}

.fullscreen-content {
    text-align: center;
}

.player .gui {
    padding: 1rem;
    display: grid;
    grid-template-rows: auto 1fr 1em;
    grid-template-columns: 5rem 1fr 1em;
    grid-template-areas:
    "power-ups . ."
    ". . ."
    ". . ammo";
}

.ammo {
    grid-area: ammo;
    justify-self: right;
    align-self: end;
    font-size: 3em;
}

.power-ups {
    width: 100%;
    height: 100%;
    grid-area: power-ups;
    overflow: hidden;
}

.power-ups img {
    min-width: 100%;
    image-rendering: pixelated;
    border: 0.2rem solid transparent;
}

.power-ups .activated {
    border: 0.2rem solid #000000;
}

.death-screen {
    width: 100%;
    height: 100%;
    background-color: #000000A0;
    backdrop-filter: blur(2px);
    font-size: 5em;
}