:root {
    --primary-color: hsl(0, 0%, 15%);
    --secondary-color: hsl(0, 0%, 30%);
    --hover-color: hsl(0, 0%, 40%);
    --active-color: hsl(0, 0%, 50%);
    --accent-color: hsl(35, 100%, 55%);
    --accent-hover: hsl(35, 100%, 65%);
    --accent-active: hsl(35, 100%, 75%);
    --text-color: hsl(0, 0%, 100%);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: aliceblue;
    font-family: Arial, sans-serif;
}

#container {
    width: min(100%, 28rem);
    padding: 1rem;
    background-color: var(--primary-color);
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#display {
    display: block;
    width: 100%;
    height: 5rem;
    padding: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    resize: none;
    white-space: pre;
    overflow-wrap: normal;
    background-color: var(--secondary-color);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    font-family: "Press Start 2P", system-ui;
    font-size: clamp(1rem, 5vw, 1.5rem);
    border: none;
    border-radius: 20px;
}

#display::-webkit-scrollbar {
    display: none;
}

#display:focus {
    outline: none;
}

#keys {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(0.25rem, 2vw, 0.75rem);
    padding: 1rem 0;
}

.number-button,
.operator-button {
    width: min(5rem, 100%);
    aspect-ratio: 1;
    justify-self: center;
    padding: 0.25rem;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font: bold clamp(1rem, 6vw, 2rem) Arial, sans-serif;
    cursor: pointer;
}

.number-button {
    background-color: var(--secondary-color);
}

.number-button:hover {
    background-color: var(--hover-color);
}

.number-button:active,
.operator-button:active {
    background-color: var(--active-color);
}

.operator-button {
    background-color: var(--accent-color);
}

.operator-button:hover {
    background-color: var(--accent-hover);
}

.operator-button:active {
    background-color: var(--accent-active);
}

.number-button:focus-visible,
.operator-button:focus-visible {
    outline: 3px solid var(--text-color);
    outline-offset: 2px;
}

#multiply,
#divide,
#add,
#subtract,
#calc {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
}
