html {
    box-sizing: border-box;
    font-family: sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
    font-family: inherit;
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.calculator {
    border-radius: 12px;
    background-color: #222;
}

.display {
    width: 100%;
    max-width: 316px;
    height: 64px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    background-color: #565d64;
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.buttons-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buttons {
    display: flex;
    gap: 4px;
}

button {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.clear {
    background-color: #565d64;
    margin-right: auto;
}

.operator,
.equal {
    background-color: #708090;
}

.digit,
.decimal,
.backspace {
    background-color: #28313a;
}

.digit {
    font-weight: bold;
}

.clear:hover {
    background-color: #454c53;
}

.operator:hover,
.equal:hover {
    background-color: #607080;
}

.digit:hover,
.decimal:hover,
.backspace:hover {
    background-color: #172029;
}

.clear:active {
    background-color: #565d64;
}

.operator:active,
.equal:active {
    background-color: #708090;
}

.digit:active,
.decimal:active,
.backspace:active {
    background-color: #28313a;
}