:root {
    --primary-color: #09fcfd;
    --secondary-color: #510303;
    --size-unit: 64px;
    --ships-animation-time: 200ms;
    --explosions-animation-time: 600ms;
}

*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

body {
    box-sizing: border-box;
    font-family: "Lato", sans-serif;
}

.container {
    width: 100vw;
    height: 100vh;
    position: relative;

    background-color: #000;
}

.information {
    display: flex;
    justify-content: space-between;
    z-index: 2;
    position: relative;
    padding: 20px;
    font-size: 32px;
    color: #fff;
}

.modal {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    background-color: #000;
}

.modal__content {
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal__text {
    font-size: 42px;
    text-align: center;
}

.modal__button {
    padding: 30px 15px;
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    font-size: 42px;
    margin-top: 20px;
    outline: none;
    background-color: transparent;

    transition: box-shadow 0.1s ease-in;
}

.modal__button:hover {
    box-shadow: 0px 0px 20px 5px var(--primary-color);
}

.spaceship {
    width: var(--size-unit);
    height: var(--size-unit);
    position: fixed;
    background-image: url("../images/ship.png");
    animation: move-8-units-X var(--ships-animation-time) steps(8) infinite;
}

.enemy {
    position: fixed;
    width: var(--size-unit);
    height: var(--size-unit);
    background-image: url("../images/enemy.png");
    animation: move-5-units-X var(--ships-animation-time) steps(5) infinite;
    z-index: 1;
}

.enemy--big {
    position: fixed;
    width: calc(var(--size-unit) * 2);
    height: calc(var(--size-unit) * 2);
    background-image: url("../images/enemy-big.png");
    animation: move-16-units-X var(--ships-animation-time) steps(8) infinite;
}

.explosion {
    position: fixed;
    width: var(--size-unit);
    height: var(--size-unit);
    background-image: url("../images/explosion.png");
    animation: move-17-units-X var(--explosions-animation-time) steps(17)
        forwards;
}

.explosion--big {
    position: fixed;
    width: calc(var(--size-unit) * 2);
    height: calc(var(--size-unit) * 2);
    background-image: url("../images/explosion-big.png");
    animation: move-34-units-X var(--explosions-animation-time) steps(17)
        forwards;
}

.missile {
    position: absolute;
    width: 12px;
    height: 24px;
    background-image: url("../images/missile.png");
    background-size: cover;
}

@keyframes move-8-units-X {
    from {
        background-position-x: 0px;
    }

    to {
        background-position-x: calc(var(--size-unit) * -8);
    }
}

@keyframes move-5-units-X {
    from {
        background-position-x: 0px;
    }

    to {
        background-position-x: calc(var(--size-unit) * -5);
    }
}

@keyframes move-16-units-X {
    from {
        background-position-x: 0px;
    }

    to {
        background-position-x: calc(var(--size-unit) * -16);
    }
}

@keyframes move-17-units-X {
    from {
        background-position-x: 0px;
    }

    to {
        background-position-x: calc(var(--size-unit) * -17);
    }
}

@keyframes move-34-units-X {
    from {
        background-position-x: 0px;
    }

    to {
        background-position-x: calc(var(--size-unit) * -34);
    }
}

.hide {
    display: none;
}

.hit {
    background-color: var(--secondary-color);
}
