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

body{
    background-color: #f0f0f0;
}

.grid-container {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(4, 100px);
    grid-template-rows: minmax(120px, auto) repeat(5, 100px);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.grid-container button {
    cursor: pointer;
    font-size: 2rem;
    border: none;
    outline: none;
    background-color: #111;
    color: #eee;
    transition: background-color 0.3s, color 0.3s;
}

.grid-container button:hover {
    background-color: #5a5a5a;
    color: #fff;
}

.grid-container .operator {
    background-color: #ca841a;
    transition: background-color 0.3s;
}

.grid-container .operator:hover {
    background-color: #745018;
}

.span-two{
    grid-column: span 2;
}

.grid-container .output{
    grid-column: 1 / -1;
    background-color: #222;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-around;
    padding: 10px;
    word-wrap: break-word;
    word-break: break-all;
}

.grid-container .output .previus-operand{
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.5rem;
    font-family: 'Digital-7', monospace;
}

.grid-container .output .current-operand{
    color: #fff;
    font-size: 2.5rem;
    font-family: 'Digital-7', monospace;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Digital-7', monospace;
    gap: 15px;
    transition: transform 0.2s;
}

footer a {
    font-size:25px;
    color: #ca841a;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}
footer p {
    color: #111;
    padding-left: 38px;
}
footer a:nth-last-child(1) {
    padding-right: 38px;
}
footer a:hover {
    font-size: 28px;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(4, 110px);
        grid-template-rows: minmax(125px, auto) repeat(5, 105px);
    }

    .grid-container button {
        font-size: 2rem;
    }

    .grid-container .output .previus-operand {
        font-size: 1.7rem;
    }

    .grid-container .output .current-operand {
        font-size: 2.5rem;
    }
    footer {
        bottom: 40px;
        width: 90%;
        }
        
        footer a {
        font-size: 30px;
        }
        footer p {
        color: #111;
        padding-left: 15px;
        }
        footer a:nth-last-child(1) {
        padding-right: 18px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(4, 88px);
        grid-template-rows: minmax(115px, auto) repeat(5, 85px);
    }

    .grid-container button {
        font-size: 1.6rem;
    }

    .grid-container .output .previus-operand {
        font-size: 1.5rem;
    }

    .grid-container .output .current-operand {
        font-size: 2rem;
    }

    footer {
        bottom: 40px;
        width: 90%;
        }
        
        footer a {
        font-size: 30px;
        }
        footer p {
        color: #111;
        padding-left: 15px;
        }
        footer a:nth-last-child(1) {
        padding-right: 18px;
    }
}