*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    font-size: clamp(24px, 5.5vh, 48px);
}

body {
    display: flex;
    justify-content: center;
    background-color: #d6f8d1;
}

.calculator {
    height: clamp(400px, 90vh, 800px);
    aspect-ratio: 0.59;
    background: linear-gradient(to bottom, #ff94db, #f55ec3);
    box-shadow: 5px 5px 15px rgb(201, 180, 192);
    border: 2px solid black;
    padding: 1.2rem 0.6rem;
    border-radius: 25px;
    margin: 0.2rem 0;
    font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 485px) {
    html {
        font-size: clamp(22px, 10vw, 44px);
    }
    .calculator{
        width: max(350px, 95vw);
        aspect-ratio: 0.58;
        height: auto;
    }
}

.keypad {
    margin-top: 0.8rem;
}

.keypad-row {
    margin: 0.2rem 0;
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
}

.calculator button {
    flex: 1;
    aspect-ratio: 1;
    font-size: 1rem;
    background: linear-gradient(to bottom, #ffffc1, #ffffa8);
    border-radius: 15px;
    border: 2px solid black;
}

.display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    aspect-ratio: 3.1;
    background-color: rgb(231, 255, 253);
    border: 2px solid black;
    text-align: right;
    padding: 0.2rem 0.4rem 0;
    gap: 0.1rem;
}

.line-1 {
    font-size: 0.6rem;
    color: #575757;
}

.line-2 {
    font-size: 1rem;
}

#backspace, #clear {
    font-size: 0.9rem;
}

button:focus-visible {
    outline-color: rgb(0, 132, 255);
}

button:hover {
    filter: brightness(0.96);
    cursor: pointer;
}