body {
    background-color: #040720;
    margin: 0;
}

#main-container {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template: 1fr max-content 1fr / 1fr max-content 1fr;
}

#menu-container {
    grid-row-start: 1;
    grid-column-start: 3;
    display: flex;
    justify-content: flex-end;
    height: 20%;
    padding-top: 1rem;
    padding-right: 4rem;
    gap: 0.5rem;
}

#menu-container > img {
    cursor: pointer;
}

#menu-container > img:hover {
    filter: brightness(150%);
}

h1, h2, h3 {
    user-select: none;
}

#space {
    grid-row-start: 2;
    grid-column-start: 2;
    position: relative;
    width: 800px;
    height: 450px;
    cursor: crosshair;
    overflow: hidden;
}

#hitpoints {
    position: absolute;
    left: 10px;
    top: 10px;
    display: flex;
}

.hitpoint {
    height: 30px;
    width: 30px;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.empty {
    opacity: 40%;
}

#level-label {
    font: 1rem "Press Start 2P", serif;
    color: lightyellow;
    opacity: 50%;
    position: absolute;
    z-index: 1;
    justify-self: center;
}

#score {
    font: 1.5rem "Press Start 2P", serif;
    color: white;
    position: absolute;
    z-index: 1;
    top: 0px;
    right: 10px;
}

#title-container {
    font: 1rem "Press Start 2P", serif;
    color: red;
    text-align: center;
    position: absolute;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-wrap: nowrap;
    z-index: 2;
    pointer-events: none;
}

#title, #subtitle {
    display: none;
}

.object {
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    position: absolute;
}

#ship {
    width: 40px;
    height: 40px;
}

.beam {
    width: 40px;
    height: 40px;
}

.asteroid {
    width: 40px;
    height: 40px;
}

.one-eye {
    width: 40px;
    height: 40px;
}

.pirate {
    width: 40px;
    height: 40px;
}

.energy-ball {
    width: 40px;
    height: 40px;
}

.pirate-boss {
    width: 160px;
    height: auto;
}

.death-ray {
    width: 80px;
    height: auto;
}

#legend-container {
    grid-row-start: 2;
    grid-column-start: 3;
    display: flex;
    align-items: center;
    font: 1rem "Press Start 2P", serif;
    color: #14239F;
}

#legend-container > ul {
    list-style-type: none;
}

#legend-container > ul > li {
    margin: 0.4rem;
}


/* moving background */
#space {
    background-image: url('../images/background.png');
    background-repeat: repeat-y;
    background-size: cover;
    background-position: center 0;

    animation: scrollDown 20s linear infinite;
}

@keyframes scrollDown {
    0%{
        background-position: center 0px;
    }
    100%{
        background-position: center 450px; 
    }
}
