@font-face {
    font-family: "Robot";
    src: url("fonts/robot9000italic-yzxe8-webfont.woff2") format("woff2"),
        url("fonts/robot9000italic-yzxe8-webfont.woff") format("woff");
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    height: 100vh;
    background-image: url("images/starfield.jpg");
    background-size: cover;
    background-repeat: no-repeat;
}

#grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 1800px;
    padding: 10px;
    margin: auto;
}

#game-title {
    grid-column: 1 / span 12;
    text-align: center;
    background-color: #222;
    padding: 5px 0;
    border-radius: 8px;
    background-image: url("images/hyperspace.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid black;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
    margin-top: 3px;
}
#game-title img {
    max-width: 475px;
    max-height: 335px;
}
#stats-bar {
    font-family: "Robot", "Courier New", Courier, monospace;
    font-size: 1.6rem;
    grid-column: 1 / span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    position: relative;
    border-radius: 5px;
    border: 2px solid black;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    height: 40px;
    align-items: center;
}

#vitals-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: -1;
}

#health-ammo {
    margin-top: 3px;
    grid-column: 4 / span 2;
    color: red;
    text-align: center;
}

#score-container {
    margin-top: 3px;
    grid-column: 9 / span 1;
    text-align: center;
    color: rgb(126, 204, 235);
}

#game-section {
    grid-column: 1 / span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
}

#high-scores-box {
    font-family: "Robot", "Courier New", Courier, monospace;
    font-size: 1.6rem;
    color: lightgray;
    grid-column: 1 / span 3;
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid black;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
    background-image: url("images/hud.png");
    background-size: cover;
}
#game-container {
    grid-column: 4 / span 6;
    position: relative;
    height: 800px;
    background-image: url("images/moonBg.png");
    background-size: cover;
    border-radius: 8px;
    border: 2px solid black;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
}
#instructions-box {
    font-family: "Robot", "Courier New", Courier, monospace;
    font-size: 1.6rem;
    color: lightgray;
    grid-column: 10 / span 3;
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid black;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
    background-image: url("images/hud.png");
    background-size: cover;
}

#high-scores-list {
    list-style-type: none;
    padding: 0;
}

#game-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#start-button {
    font-family: "Robot", "Courier New", Courier, monospace;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    background-color: blue;
    color: lightgray;
}

#next-wave-button {
    font-family: "Robot", "Courier New", Courier, monospace;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    background-color: blue;
    color: lightgray;
}

#game-over-message {
    font-size: 24px;
    color: red;
    background-color: #f9f9f9;
    padding: 10px;
}
.powerup-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.powerup-info .health-pack,
.powerup-info .ammo-pack {
    position: static;
    margin-right: 10px;
}

#mute-button {
    font-family: "Robot", "Courier New", Courier, monospace;
    font-size: 1.6rem;
    width: 8rem;
    height: 3rem;
    padding: 5px 5px;
    cursor: pointer;
    border-radius: 5px;
    background-color: blue;
    color: lightgray;
    margin-left: 0.5rem;
    text-align: center;
}

#mute-button:hover,
#start-button:hover,
#next-wave-button:hover {
    box-shadow: 0 0 8px 4px rgba(255, 255, 255, 0.6); /* Adds a white glow around the button */
}

.credits {
    display: none;
}

/*Game Elements*/
.health-pack {
    width: 50px;
    height: 50px;
    position: absolute;
    right: 0;
    background-image: url("images/healthPack.png");
    background-size: cover;
}

.ammo-pack {
    width: 50px;
    height: 50px;
    position: absolute;
    right: 0;
    background-image: url("images/ammoCrate.png");
    background-size: cover;
}

#soldier {
    width: 60px;
    height: 60px;
    position: absolute;
    left: 20px;
    top: 50%;
    background-image: url("images/spaceSoldier.png");
    background-size: cover;
}

.alien {
    width: 60px;
    height: 60px;
    position: absolute;
    right: 0;
    margin-left: 0;
    background-size: cover;
}

.red {
    background-image: url("images/redAlien.png");
}

.green {
    background-image: url("images/greenAlien.png");
    height: 70px;
}

.yellow {
    background-image: url("images/yellowAlien.png");
    width: 80px;
}

.Laser {
    width: 10px;
    height: 5px;
    background-color: red;
    position: absolute;
}

.rocket {
    width: 10px;
    height: 5px;
    background-color: rgb(0, 225, 255);
    position: absolute;
}

.alien-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.alien-info .alien {
    position: static;
    margin-right: 10px;
}

.health-bar {
    position: absolute;
    top: -10px;
    right: 0px;
    width: 90%;
    height: 5px;
    background-color: green;
    transition: width 0.3s;
}

@media screen and (max-width: 1920px) and (max-height: 1080px) {
    #game-title {
        padding: 3px 0;
    }

    #game-title img {
        max-width: 350px;
        max-height: 200px;
    }

    #stats-bar {
        font-size: 1.4rem;
        height: 30px;
    }

    #game-container {
        height: 600px;
    }

    #high-scores-box,
    #instructions-box {
        font-size: 1.4rem;
        padding: 15px;
    }

    .health-pack,
    .ammo-pack {
        width: 40px;
        height: 40px;
    }

    #soldier {
        width: 50px;
        height: 50px;
    }

    .alien {
        width: 50px;
        height: 50px;
    }

    .green {
        width: 60px;
    }

    .yellow {
        width: 70px;
    }
}

@media screen and (max-width: 1200px) {
    #game-container {
        height: 60vh;
    }

    .alien {
        width: 50px;
        height: 50px;
    }

    .green {
        width: 60px;
    }

    .yellow {
        width: 70px;
    }

    #soldier {
        width: 50px;
        height: 50px;
    }
}

@media screen and (max-width: 768px) {
    #game-title img {
        max-width: 100%;
        max-height: auto;
    }

    #game-container {
        height: 50vh;
    }

    .alien {
        width: 40px;
        height: 40px;
    }

    .green {
        width: 50px;
    }

    .yellow {
        width: 60px;
    }

    #soldier {
        width: 40px;
        height: 40px;
    }
}
