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

:root {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: #343434;
}

body {
    min-height: 100vh;
    line-height: 1.5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -mox-osx-font-smoothing: grayscale;
}

input, button, textarea, select {
    font: inherit;
}

#calculator {

    background: linear-gradient(145deg, #e9e9e9, #888a8ff1);

    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
    border-radius: 12px;
    
    backdrop-filter: blur(4px);

    aspect-ratio: 3/4;
    width: min(95vw, 400px);

    min-width: 280px;
    min-height: 400px;

    padding: 1.5rem;
    margin: 2rem auto;

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#display {
    background-color: rgba(233, 227, 227, 0.897);
    color: #2d3748;
    width: 95%;
    min-height: 95px;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    justify-self: center;
    align-self: center;
    padding-left: 0%;
    padding-right: 0%;

    text-align: left;
    font-size: 64px;

}

.buttons {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.digits {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
}

.digits button {
    min-height: 80px;
    aspect-ratio: 1;
}

.operations {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

button {
    background-color: #2d3748;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #2d3748; 
    transition: all 0.2s ease;

    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2),
    -5px -5px 10px rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    min-height: 70px;
    aspect-ratio: 1;

    font-size: 1.5rem;
    font-weight: 500;
    color: #999ba1e7;

}

button:hover {
    background: linear-gradient(145deg, #404040, #333333);
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.3),
                -6px -6px 12px rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);}

    button:active {
        background: linear-gradient(145deg, #2d2d2d, #3a3a3a);
        box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.3),
                    inset -4px -4px 8px rgba(255, 255, 255, 0.05);
        transform: translateY(1px);
    }    

.operations button {
    background-color: #93c5fd;
    color: #1e40af;
}

#equals {
    background-color: #93c5fd;
    background: linear-gradient(145deg, #93c5fd, #60a5fa);
    color: #1e3a8a;
}

.row {
    display: flex;
    justify-content: space-evenly;
}

