*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    font-family: "Roboto",sans-serif;
    background-color: rgba(27, 3, 40, 0.603);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calculator{
    display: grid;
    grid-template-rows: minmax(80px,auto) repeat(5,60px);
    grid-template-columns: repeat(4,60px);
    justify-content: center;
    background-color: hsl(278, 17%, 41%);
    padding: 1.4rem;
    border-radius: 12px;
    border: 2px solid black;
    gap: 0.7rem;
}

.calculator button{
    border: none;
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 500;
    color: rgb(166, 50, 205);
    background-color:black;
    border-radius: 10px;
    cursor: pointer;
}

.calculator button:hover {
    background-color: black;
}

.span-2 {
    grid-column: span 2;
}

.calculator > .output{
    font-size: 2rem;
    background-color: inherit;
    color: white;
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-end;
    word-break: break-all;
    border-radius: inherit;
}

.output .prev-display{
    font-size: 1.3rem;
    font-weight: 400;
    color: white;
}