html, body, .container-fluid, .row {
    height: 100%;
    margin: 0;
}

body {
    height: 100vh;
    overflow-x:hidden;
    overflow-y:hidden;
}

p {
    font-size: 1rem;
}

.container-fluid, .game-area {
    padding-right: 0;
}

.game-play {
    display: none;
}

.start-screen {
    /* display: none; */
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    text-align: center;
}

.main-text {
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
}

.main-text h1 {
    font-size: 4rem;
    color: rgb(15, 15, 223);
}

.main-text p {
    font-size: 2rem;
}

#startGame {
    z-index: 1;
}

#canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.container::before {
    content: "";
    background: hsla(0, 0%, 41%, 0.25);
    backdrop-filter: blur(70px);
    -webkit-backdrop-filter: blur(70px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;

}

.game-play h1 {
    font-size: 3rem;
}

.menu-area {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.heading {
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.heading h1 {
    /* justify-content: center;
    align-items: center; */
    text-align: center;

    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    font-size: 2rem;
}

.lives-and-rounds {
    font-family: "Space Grotesk", sans-serif;
    text-align: center;
    /* display: flex;
    justify-content: center; */
}

.lives-and-rounds p {
    font-size: 2rem;
    font-weight: 200;
}

.lives-and-rounds span {
    font-weight: 700;
    font-size: 2.5rem;
}

.game-status {
    height: 10vh;
}

.buttons {
    height: 10vh;
    display: flex;
    justify-content: center;
    font-family: "Space Grotesk", sans-serif;
    text-transform: uppercase;
}

#startGame,
#resetGame {
    height: 48px;
    border-radius: 3px;
    padding: 10px 8px;
    color: rgb(49, 47, 42);
    font-weight: 600;
    cursor: pointer;

    display: flex;
    align-items: center;
}

.disabledbutton {
    pointer-events: none;
    opacity: 0.4;
}

#startGame {
    background-color: rgb(250, 181, 51);
    border: 2px solid rgb(248, 170, 25);
    font-size: 0.25em;
}

#resetGame {
    background-color: rgb(250, 97, 51);
    border: 1px solid rgb(248, 81, 25);
    font-size: 1em;
}


#startGame:hover {
    background-color: rgb(229, 165, 45);
}

#resetGame:hover {
    background-color: rgb(232, 90, 46);
}


.game-status h2 {
        font-size: 1.8rem;
}

.game-status p {
        font-size: 1.3rem;
}

#grid {
    display: grid;
    width: min(100vw, 100vh);
    height: 100%;
    gap: 3px;
}

.grid-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    opacity: 0.05;
    transform: scale(0.5);
    transition: transform 100ms ease-in-out, opacity 250ms ease-in;
}

.grid-item.show {
    opacity: 1;
    transform: scale(1);
}

.grid-item.hoverable:hover {
    cursor: pointer;
    transform: scale(0.97);
}

#lives-status-popup {
    position: absolute;
    top: 47vh;
    left:68vw;
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    transform-origin: center;
}

#popupBig {
    position: absolute;
    top: 45vh;
    left:65vw;
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    font-size: 1.8rem;
    transform-origin: center;
    color: white;
}

@media (max-width: 991.98px) {
    .game-play {
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .game-play h1 {
        font-size: 2rem;
    }

    .menu-area {
        flex-direction: row;
        height: 20vh;
    }

    .top-half{
        display: flex;
        flex-direction: column;
    }

    .heading {
        height: auto;
    }

    .heading h1 {
        margin-top: 16px;
        padding: 8px;
    }

    .lives-and-rounds {
        display: flex;
        gap: 32px;
    }

    .lives-and-rounds p {
    font-size: 1.5rem;
    font-weight: 200;
    }

    .lives-and-rounds span {
        font-weight: 700;
        font-size: 2rem;
    }

    #lives-status-popup {
        position: absolute;
        top: 57vh;
        left:44vw;  
    }  

    #popupBig {
        position: absolute;
        top: 55vh;
        left:35vw; 
    }   

    #resetGame, #nextLevel {
        align-self: flex-end;
        justify-self: flex-end;
    }

    .game-status h2 {
        font-size: 1.6rem;
}

    .game-status p {
            font-size: 1.2rem;
    }

    .game-area {
        height: 80vh; 
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: flex; 
        justify-content: center;
    }

    /* #grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        align-content: center;
    } */

    #grid {
        width: min(85vw, 85vh);
        height: auto;
    }

    #smallScreen {
        display: flex;
        flex-direction: column;
    }

}

@media (max-width: 575.98px) {

    _::-webkit-full-page-media, _:future, :root .safari_only {
        /* padding-bottom: 65px; */
        position: fixed;
        bottom: 0; 
        bottom: env(safe-area-inset-bottom);
    }

    .heading h1 {
        /* justify-content: center;
        align-items: center; */
        text-align: left;
        font-size: 1.5rem;
    }

    .lives-and-rounds p {
        font-size: 1.2rem;
    }

    .lives-and-rounds span {
        font-size: 1.5rem;
    }

    .game-status h2 {
        font-size: 1.2rem;
    }

    .game-status p {
        font-size: 1rem;
    }

    #resetGame {
        font-size: 0.7em;
        vertical-align: middle;
    }

    #grid {
        display: grid; 
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); 
        width: min(100vw, 100vh);

    }

    .grid-item {
        width: 100%;
        aspect-ratio: 1 / 1;
        margin: 0;
    }

    #lives-status-popup {
        position: absolute;
        top: 63vh;
        left:40vw;  
    }  

    #popupBig {
        position: absolute;
        top: 62vh;
        left:28vw; 
    } 
}