*{
    box-sizing: border-box;
}
body{
    margin: 0;
    padding: 0;
}
.container{
    /* Make the div takes the whole viewport height */
    height: 100vh;

    /* The following three properties to center the div vertically */
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 30%;
    margin: 0 auto;
    text-align: center;
}
.container div, 
.container #input{
    width: 100%;
}
.container #input{
    margin-bottom: 2%;
    padding: 2% 3%;
    min-height: 55px;
    border: 1px solid black;
    border-radius: 5px;
    font-size: 2rem;
    font-weight: bold;
}
.container div span{
    font-size: 3rem;
    display: inline-block;
    width: 24%;
    padding: 20px;
    margin: 5px auto;
    border-radius: 5px;
    cursor: pointer;
    -webkit-transition: transform .3s;
    transition: transform .3s;
}
.royalBlue{
    background-color: #758cd4;
}
.grey{
    background-color: #ddd;
}
.royalBlue:hover{
    background-color: #5870bb;
}
.grey:hover{
    background-color: #9E9E9E;
}
.container #equal,
.container #negative{
    width: 49%;
}
.container #erase{
    color: rgb(196, 21, 21);
}

@media screen and (min-width: 800px) and (max-width: 1013px){
    .container{
        width: 40%;
    }
}

@media screen and (min-width: 613px) and (max-width: 799px){
    .container{
        width: 50%;
    }
}

@media screen and (min-width: 390px) and (max-width: 612px){
    .container{
        width: 80%;
    }
}

@media screen and (max-width: 389px){
    .container{
        width: 100%;
    }
    .container div span{
        font-size: 2rem;
    }
}
