* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", sans-serif;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator {
    background: black;
    color: white;
    height: 800px;
    width: 80%;
    max-width: 500px;
    border-radius: 50px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    
}

.display {
    /* background-color: red; */
    height: 15rem;
    width: 100%;
    text-align: right;
    padding: 1rem;
    font-size: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.previous-display {
    opacity: 0.5;
    font-size: 1.5rem;
    overflow: hidden;
}

.buttons-container {
    width: 100%;
    /* height: 100%; */
    display: grid;
    /* row-gap: 0.5rem; */
    /* column-gap: 0.5rem; */
    gap: 0.5rem;

    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;

    background: #333;
    border-radius: 50%;
    cursor: pointer;
    font-size: 3rem;
    height: 6rem;
    width: 6rem;
    /* transition: filter 0.3s; */
    transition: opacity 0.2s;
}

.button.function {
    color: black;
    background-color: #a5a5a5;
}

.button.operator {
    background-color: #f1a33c;
}

.button.number-0 {
    grid-column: 1 / span 2;
    width: 13rem;
    border-radius: 3rem;
    justify-content: flex-start;
    padding-left: 2.2rem;
}

.button:hover {
    /* filter: brightness(0.5); */
    opacity: 0.5;
}

@media screen and (max-width: 576px) {
    .calculator {
        height: 600px;
        width: 350px;
    }
    .display {
        height: 11.25rem;
        font-size: 3rem;
    }
    .button {
        font-size: 1.7rem;
        height: 4rem;
        width: 4rem;
    }
    .button.number-0 {
        border-radius: 2rem;
        padding-left: 1.3rem;
        width: 8rem;
    }
    .buttons-container {
        margin-top: 2rem;
    }
}
