*{
    box-sizing: border-box;
}

body{
    background-color: rgb(26, 26, 26);
    background-image: url('../gfx/backdrop.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    height: 100dvh;
    font-family: 'Courier New', monospace, sans-serif;
    font-size: 1.3rem;
    color:rgb(243, 229, 171);
}

header{
    margin-bottom: 50px;
}

footer{
    margin-top: 50px;
    text-shadow: 2px 2px 35px;
}

h1{
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 40px;
}

h1, p{
    margin: 0 auto;
    text-align: center;
}

.flex-container{
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.grid-container{
    display: inline-grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    /*-------*/
    background-color: rgb(117, 85, 36);
    border-radius: 0 0 10px 10px;
    padding: 5px;
}

.memory{
    background-color: rgb(117, 85, 36);
    padding: 5px;
}

.grid-container div{
    background-color: rgb(26, 26, 26);
    height: 50px;
    width: 50px;
    border-radius: 10px;
    box-shadow: .4px .4px 3px;
    /*-------*/
    display: flex;
    justify-content: center;
    align-items: center;
}

.memory div{
    margin: 0 auto;
    background-color: rgb(26, 26, 26);
    height: 30px;
    width: 34px;
    border-radius: 10px;
    font-size: 1.2rem;
    box-shadow: .4px .4px 3px;
    /*-------*/
    display: flex;
    justify-content: center;
    align-items: center;
}

.showmemory{
    border: 1px solid rgb(117, 85, 36);
    padding: 5px;
    max-width: 225px;
    margin: 0 auto;
    height: 30px;
    width: 225px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.showmemory span{
    font-size: 0.9rem;
    text-shadow: 2px 2px 10px;
}

#equals{
    background-color: rgb(66, 0, 0);
}

.grid-container div:hover, .memory div:hover, #equals:hover{
    background-color: rgb(53, 53, 53);
    cursor: pointer;
}

.grid-container div:active, .memory div:active, #equals:active{
    color: rgb(255, 255, 255);
}

.display-main{
    height: 45px;
    background-color: rgb(243, 229, 171);
    font-size: 1rem;
    font-weight: 800;
    padding: 5px;
    max-width: 225px;
    overflow: auto;
    /*-------*/
    display: flex;
    justify-content: flex-end;
    align-items: center;
    color:rgb(0, 0, 0);
    white-space: nowrap;
}

.display-aux{
    height: 60px;
    background-color: rgb(243, 229, 171);
    border-radius: 10px 10px 0 0;
    padding: 5px;
    font-size: 1rem;
    max-width: 225px;
    overflow: auto;
    /*-------*/
    display: flex;
    justify-content: flex-end;
    align-items: center;
    color:rgb(0, 0, 0);
    flex-wrap: wrap;
}

@media only screen and (max-height:810px) {
    header{
        display: none;
    }
    main{
        margin-top: 10px;
    }
}

@media only screen and (max-height:665px) {
    footer{
        margin-top: 10px;
        margin-bottom: 0;
        font-size: .5rem;
    }
}