html {
    overflow: hidden;
}
* {
    box-sizing: border-box;
    margin: 0;
}

.background {
    position: relative;
    background-image: url(images/menu.gif);
    background-size:cover;
    height: 100dvh;
}

.gui {
    visibility: hidden;
    height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron';
    position: absolute;
    top: 0;
    left: 0;
    user-select: none;
    overflow: hidden;
}

.menu {
    visibility: visible;
}

.menucontainer {
    width: 50vw;
    min-width: 400px;
    height: 40vw;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.titlecontainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 2%;
}

.titlecontainer h1 {
    text-transform: uppercase;
    font-size: 4.5rem;
    -webkit-text-fill-color: rgba(255, 255, 255, 0);
    -webkit-text-stroke-width: 3px;
    -webkit-text-stroke-color: black;
    justify-self: flex-start;
    text-align: center;
    line-height: 4.3rem;

}

.titlecontainer h3 {
    font-size: 1.6rem;
    margin-top: -1%;
}

.menu h3 {
    text-transform: uppercase;
    text-align: center;
}



.difficulty {
    display: flex;
    flex-direction: column;
    gap: 1.5dvh;
    margin: 1.5dvh;
}

.difficulty button, .startcontainer button {
    width: 22vw;
    min-width: 400px;
    height: 8dvh;
    font-family: 'Orbitron';
    text-transform: uppercase;
    font-size: 1.5rem;
    border-radius: 25px 5px;
    border: 2px black solid;
    color: #fff;
    cursor: pointer;
}

.startcontainer {
    visibility: visible;
    position: absolute;
}

#start {
    background-color: #4e4e4e
}

#easy {
    background-color: rgb(111, 180, 111);
}

#medium {
    background-color: rgb(199, 162, 84);
}

#hard {
    background-color: rgb(145, 45, 45);
}

.icon {
    height: 2em;
    width: 2em;
}

#howtoplaybtn {
    background-color: #ceecec;
    border: 2px solid black;
    cursor: pointer;
    font-family: 'Orbitron';
    text-transform: uppercase;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 10px;
    position: absolute;
    left: 2dvh;
    bottom: 2dvh;
}
#howtoplaybtn img {
    margin-right: 8px; 
}


#audiobtn {
    height: 3.5vw;
    width: 3.5vw;
    min-height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background-color: #ceecec;
    border: 2px solid black;
    cursor: pointer;
    position: absolute;
    right: 2dvh;
    bottom: 2dvh;
}

.howtoplay {
    background-color: #00000063;
    overflow: hidden;
}
#exithowtoplay{
    width: 50px;
    height: 50px;
    filter: brightness(0) saturate(100%) invert(75%) sepia(55%) saturate(5557%) hue-rotate(318deg) brightness(103%) contrast(91%);
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

.howtoplaycontainer {
    background-color: #fff;
    border: 2px solid black;
    height: 65dvh;
    width: 47vw;
    min-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    border-radius: 25px;
    position: relative;
    text-align: center;
}

.game {
    visibility: hidden;
}

.gamecontainer {
    border: 25px solid rgb(56, 56, 56);
    background-color: #000;
    border-radius: 15px;
    width: 65vw;
    height: 75dvh;
    position: absolute;
    min-width: 800px;
    min-height: 700px;
    
}

.screengui {
    width: 100%;
    height: 100%;
    padding: 3%;
    position: absolute;
    visibility: hidden;
}

#defusescreen {
    display: grid;
    gap: 2%;
    grid-template-areas:
    'num num numpad'
    'num num numpad'
    'bar bar timer';
    grid-template-columns: 1.3fr 1.3fr 1fr;
    grid-template-rows: auto 1fr auto;

}

.gamesection {
    border: 10px solid rgb(56, 56, 56);
    border-radius: 5px;
    width: 100%;
    height: 100%;
    
}

.guesscontainer {
    grid-area: num;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #3bf84b;
    position: relative;
    
}

.guesscontainer h3{
    text-transform: uppercase;
    position: absolute;
    top: 10%;
    width: 70%;
    font-size: 1.3rem;
    text-align: center;
    
}

#numberrange {
    position: absolute;
    top: 25%;
    font-size: 1rem;
}

#feedback {
    position: absolute;
    bottom: 10%;
    font-size: 1.9rem;
    visibility: hidden;
}

#randomnumber {
    font-family: 'Orbitron', monospace;
    font-size: 7rem;
    letter-spacing: 50px;
    text-indent: 50px;
}

.numpadcontainer {
    grid-area: numpad;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 7%;
}

.numpad button {
    color: #3bf84b;
    background-color: #000;
    cursor: pointer;
    border: 3px rgba(255, 255, 255, 0.192) solid;
    width: 3.2vw;
    min-width: 50px;
    height: 3.2vw;
    min-height: 50px;
    font-size: 2rem;
    text-align: center;
    border-radius: 5px;
    font-family: 'Orbitron';
    font-weight: bold;
}

.numpad button:active, .numpad button.active {
    color: #8ff597;
    background-color: #2b2b2b;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    gap: 5%;
    color: #3bf84b;
    width: 100%;
    height: 70%;
}

#guessbox{
    color: #3bf84b;
    border: 4px rgba(255, 255, 255, 0.192) solid;
    height: 20%;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-size: 1rem;
    min-height: 4rem;
}

.bombcontainer {
    position: relative;
    height: 135px;
    grid-area: bar;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.bombcontainer img {
    height:80px;
    width:80px;
    position: absolute;
    left: 4%;
    top: 13%;
}
#bartimerunder {
    background-color: #0c0a2b;
    width: 83%;
    height: 40%;
    position: absolute;
    border-radius: 25px;
    
}
#bartimerover {
    background-color: #e2cc69;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    background: repeating-linear-gradient(
    45deg,
    #f6ba52,
    #f6ba52 10px,
    #f0a248 10px,
    #f0a248 20px
    );
}

.timercontainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fc1919;
    position: relative;
    grid-area: timer;
}
.timercontainer h3 {
    font-size: 3.2rem;
    position: absolute;
}

#losttime {
    position: absolute;
    right: 15%;
    bottom: 10%;
    font-size: 1.5rem;
    opacity: 0;
}

#losescreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fc1919;
    position: relative;
    gap: 5%;
}

#losescreen h1 {
    font-size: 5rem;
    text-transform: uppercase;
    text-align: center;
}

#losescreen p {
    font-size: 2rem;
    text-align: center;
}

#losescreen h3{
    font-size: 4rem;
}

#leaderboardscreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #3bf84b;
    top: 0;
}

#leaderboardscreen h3 {
    font-size: 2rem;
}
#leaderboardscreen h1 {
    font-size: 4.6rem;
    margin-bottom: 10%;
}
#leaderboardscreen h5 {
    font-size: 1.3rem;
}

.scores{
    text-align: center;
    font-size: 1.3rem;
    margin: 3%;
}

#playagain{
    font-family: "Orbitron";
    padding: 1% 2%;
    font-size: 1.3rem;
    color:#3bf84b;
    font-weight: bold;
    background-color:#000;
    border:rgb(56, 56, 56) 3px solid;
    cursor: pointer;
    border-radius: 5px;

}

#leaderboarddifficulty{
    text-transform: uppercase;
}

.whiteoverlay{
    background-color: #fff;
    opacity: 0;
}

.difficultycontainer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    visibility: hidden;
    width: 100%;
}

.howtoplaycontainer p {
    margin: 10px
}

/* Media query for smaller screens */


@media only screen and (max-width: 600px) {

    .menucontainer {
        height: 80dvh;
    }

    .titlecontainer h1{
        font-size: 2.6rem;
        -webkit-text-stroke-width: 2px;
    }

    .titlecontainer h3{
        font-size: 1.2rem;
    }

    .difficulty button, .startcontainer button {
        min-width: 300px;
        font-size: 1.2rem;
    }

    .gamecontainer {
        width: 90dvw;
        height: 90dvh;
        min-width: 0px;
        min-height: 0px;
    }

    #defusescreen {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        
    
    }


    .bombcontainer {
        visibility: hidden;
        display: none;
    }

    #randomnumber {
        font-family: 'Orbitron', monospace;
        font-size: 3rem;
        letter-spacing: 1rem;
        text-indent: 1rem;
    }

    .guesscontainer h3{
        font-size: 0.8rem;
        width: 80%;
        top: 10%;
    }

    #numberrange {
        font-size: 0.8rem;
        top: auto;
        bottom: 5%;
    }

    #feedback {
        font-size: 0.8rem;
        bottom: 20%;
    }

    .numpad {
        display: flex;
        flex-wrap: wrap;
        grid-template-columns: repeat(3, 1fr);;
        gap: 3%;
        justify-content: center;
        align-items: center;
    }

    .numpadcontainer {
        height: 50%;
    }

    .numpad button {
        min-width: 40px;
        min-height: 40px;
        font-size: 1.3rem;
        text-align: center;
        border-radius: 5px;
    }

    #guessbox{
        font-size: 0.8rem;
        min-height: 2rem;

    }

    .guesscontainer {
        height: 50%; 
    }

    .timercontainer {
        height: 30%;
    }

    #timer{
        font-size: 2.5rem;
    }

    #leaderboardscreen{
        transform: scale(0.8);
        text-align: center;
    }

    #losesceren {
        transform: scale(0.8)
    }

    .howtoplaycontainer{
        width: 90vw;
        height: 90vh;
        min-width: 0;
    }

    #howtoplayimg{
        display: none;
    }

}


@media only screen and (max-width: 950px){
    .gamecontainer {
        transform: scale(0.9)
    }

    #timer {
        font-size: 2.4rem;
    }
}