:root {
    --background: #333333;
    --surface: #E5D3DB;
    --num-btn-color: #E49EBE;
    --num-btn-sec-color: #890B48;
    --op-btn-color: #F2F2E9;
    --text-color: #141114;
}

body {
    background-color: var(--background);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

main {
    margin-top: 5rem;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

section {
    background-color: var(--surface);
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    border-radius: 1rem;
    padding: 1rem 2rem;
    width: max-content;
}

button {
    border: none;
    border-radius: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    width: 4rem;
    height: 4rem;
    color: var(--text-color);
}

.display {
    width: 100%;
    height: 9rem;
    background-color: var(--surface);
    color: var(--text-color);
    text-align: right;
    padding: 0.5rem;
}

#expression {
    font-size: 1.7rem;
    font-weight: bold;
    color: var(--text-color);
}

#result {
    font-size: 2rem;
    font-weight: bold;
    color: var(--num-btn-sec-color);
}

.whiteButton {
    background-color: var(--op-btn-color);
}

.pinkButton {
    background-color: var(--num-btn-color);
}

.pinkerButton {
    background-color: var(--num-btn-sec-color);
    color: var(--surface);
}

.whiteButton:active,
.pinkButton:active {
    background-color: var(--num-btn-sec-color);
    color: var(--surface);
}

.pinkerButton:active {
    background-color: var(--num-btn-color);
    color: var(--text-color);
}

.zeroButton {
    width: 9.2rem;
}

.addButton,
.pinkerButton {
    height: 6.4rem;
}

.calcButtons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    min-width: 100%;
}

.leftButtons {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.leftButtons>div {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.rightButtons {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* responsive design */
/* screens below 540px */
@media (max-width: 540px) {
    main {
        margin-top: 2rem;
    }

    section {
        padding: 1rem;
    }

    button {
        font-size: 1.2rem;
        width: 3.5rem;
        height: 3.5rem;
        margin: 0.25rem;
    }

    .display {
        height: 6rem;
    }

    #expression {
        font-size: 1.2rem;
    }

    #result {
        font-size: 1.5rem;
    }

    .zeroButton {
        width: 7.5rem;
    }

    .addButton,
    .pinkerButton {
        height: 4.8rem;
    }
}

/* screens below 320px */
@media (max-width: 320px) {
    main {
        margin-top: 1rem;
    }

    section {
        padding: 0.5rem;
    }

    button {
        font-size: 1rem;
        width: 3rem;
        height: 3rem;
        margin: 0.25rem;
    }

    .display {
        height: 5rem;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
    }

    #expression {
        font-size: 1rem;
    }

    #result {
        font-size: 1.2rem;
    }

    .zeroButton {
        width: 6.5rem;
    }

    .addButton,
    .pinkerButton {
        height: 4.7rem;
    }
}