@import url('https://fonts.googleapis.com/css2?family=Bitter&display=swap');
* {
    box-sizing: border-box;
    font-family: 'Bitter';
}
body {
    margin: 0;
    height: 100vh;
    background: #374353;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}
.calculator {
    min-height: 550px;
    width: 350px;
    background-color: #374353;
    border-radius: 20px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.151), -3px -3px 5px rgb(255,255,255,0.151);
}
@media screen and (max-width: 500px){
    .calculator {
        min-height: 100vh;
        min-width: 100vw;
        border-radius: 0;
    }
}
.calculator {
    padding: 25px;
    display: grid;
    align-items: space-between;
}
.result {
    height: 7.5em;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.264), inset -1px -1px 3px rgba(255, 255, 255, 0.233);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-around;
    align-items: right;
    position: relative;
    text-align: center;
}
.previous, .current {
    position: relative;
    text-align: right;
    color: white;
    word-wrap: break-word;
    word-break: break-all;
}
.previous {
    font-size: 0.9em;
    line-height: 0.9em;
}
.current {
    font-size: 1.6em;
    line-height: 1.6em;
}
.buttons {
    display: grid;
    grid-template-columns: auto auto auto auto;
    grid-template-rows: auto auto auto auto auto;
    justify-content: space-between;
    align-content: space-around;
}
button {
    height: 55px;
    min-width: 55px;
    line-height: 55px;
    background-color: transparent;
    border-radius: 15px;
    border: none;
    box-shadow: 1.5px 1.5px 3px rgba(0, 0, 0, 0.264), -1.5px -1.5px 3px rgba(255, 255, 255, 0.233);
    color: rgb(255, 255, 255);
    font-size: 1.3em;
    text-align: center;
    padding: 0;
}
button:hover {
    box-shadow: inset 1.5px 1.5px 3px rgba(0, 0, 0, 0.264), inset -1.5px -1.5px 3px rgba(255, 255, 255, 0.233);
}
button:focus {
    outline: none;
}
button.first {
    grid-column: 1/span 2;
}
button:last-child {
    grid-column: 3/span 2;
}