body {
    display: flex;
    flex-direction: column;
    background-color: #99e7f4;
    align-items: center;
    justify-content: center;
    margin: 0;
    height:  100dvh;
}
@font-face{
    font-family: "gameboy";
    src: url("font/game_boy_1989.ttf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face{
    font-family: "ingame";
    src: url("font/EarlyGameBoy.ttf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

h1{
    font-family: "gameboy", sans-serif;
    color: #034299;
}


.display {
    background-color: #69835d;
    color: #192119;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}


p#display{
    font-family: "ingame", sans-serif;
    font-size: clamp(1.3rem, 10vw, 2rem);
    width: 100%;
    padding: 10px;
    text-align: left;
}

.container{
    padding: 10px;
    height: auto;
    display: grid;
    grid-template-rows: repeat(5, 1fr);
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.item{
    margin: min(5em, 8%);

}

button{
    width: clamp(50px, 10vw, 75px);
    height: clamp(50px, 10vw, 75px);
    border-radius: 50px;
    border: none;
    font-size: clamp(1.5rem, 5vw, 3rem);
    cursor: pointer;
    background-color: #93a5be;
}

button:hover{
    background-color: #424e66;
}

button:active{
    background-color: #f2f2f2 ;
}

/*media queries */
.mainframe{
    display: block;
    position: relative;
    border: 3px solid #424e66;
    border-radius: 15px;
    height: clamp(500px, 80dvh, 850px);
    width: min(80%, 500px);
    padding: 5px;
    background-color: #EAEFEF;
}

@media(max-width: 400px) and (max-height: 700px){
    .mainframe{
        height: 70%;
    }
    .button {
        width: clamp(40px, 12vw, 60px);
        height: clamp(40px, 12vw, 60px);
        font-size: clamp(1rem, 5vw, 1.8rem);
    }
}

@media(min-width: 300px) and (max-width: 499px) and (min-height: 700px) and (max-height: 899px){
    .mainframe{
        height: 60%;
    }
    .button {
        width: clamp(45px, 11vw, 65px);
        height: clamp(45px, 11vw, 65px);
        font-size: clamp(1.1rem, 4.5vw, 1.9rem);
    }
}

@media(min-width: 300px) and (min-height: 800px) and (max-height: 999px){
    .mainframe{
        height: 55%;
    }
    .button {
        width: clamp(50px, 10vw, 70px);
        height: clamp(50px, 10vw, 70px);
        font-size: clamp(1.2rem, 4vw, 2rem);
    }
}

@media(min-width: 499px) and (min-height: 1000px){
    .mainframe{
        height: 55%;
    }
    .button {
        width: clamp(55px, 8vw, 75px);
        height: clamp(55px, 8vw, 75px);
        font-size: clamp(1.3rem, 3vw, 2rem);
    }
}
@media (min-width: 800px) and (max-height: 700px) {
    .mainframe {
        height: 70%;
        min-height: 400px;
    }
    .button {
        width: clamp(30px, 6vw, 50px);
        height: clamp(30px, 6vw, 50px);
        font-size: clamp(0.9rem, 1.5vw, 1.4rem);
        border-radius: 50%;
    }
}


@media(min-width: 1000px) and (min-height: 800px) and (max-height: 899px){
    .mainframe{
        height: 80%;
    }
    .button {
        width: clamp(60px, 6vw, 80px);
        height: clamp(60px, 6vw, 80px);
        font-size: clamp(1.4rem, 2vw, 2.2rem);
    }
}


@media(min-width: 1000px) and (min-height: 900px){
    .mainframe{
        height: 70%;
    }
    .button {
        width: clamp(65px, 5vw, 85px);
        height: clamp(65px, 5vw, 85px);
        font-size: clamp(1.5rem, 1.5vw, 2.4rem);
    }
}
