@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=IBM+Plex+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

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

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 95vh;
    background-color: rgb(33, 33, 33);
    font-family: 'Roboto', sans-serif;
}

.heading {
    color: white;
    font-size: 3.9vw;
    margin-bottom: 1.6vw;
    font-family: "Caveat", serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
    animation: fadeIn 1s ease-in-out;
}

.heading:hover {
    color: rgb(255, 153, 0);
}

#display {
    background-color: black;
    color: white;
    text-align: right;
    font-size: 2.85vw;
    border: none;
    width: 100%;
    outline: none;
    padding: 2vw;
    animation: slideIn 0.5s ease-in-out;
}

#calculator {
    font-family: 'Roboto', sans-serif;
    background-color: black;
    width: 26vw;
    max-width: 26vw;
    padding: 3.9vw 0vw 0.325vw 0.35vw;
    border-radius: 2.6vw;
    border: 0.04vw solid gray; 
    box-shadow: 0 6px 30px black;
    animation: zoomIn 0.5s ease-in-out;
}

#buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5vw;
    padding: 0.5vw;
}

#buttons button {
    background-color: #343434;
    color: white;
    border-radius: 2.6vw; 
    height: 5.2vw;
    width: 5.2vw;
    font-size: 2.6vw;
    text-align: center;
    border: none;
    transition: transform 0.2s;
}

#buttons button:hover {
    opacity: 70%;
    transform: scale(1.1);
}

#buttons button:active {
    opacity: 90%;
    transform: scale(0.9);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
