* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.container {
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 10, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator {
    width: 80%;
    height: 400px;
    background: #3d4452;
    padding: 16px 20px;
    border-radius: 12px;
}

@media (max-width: 500px) {
    .calculator {
        height: auto;
        padding: 12px;
    }
    .calculator form .result input {
        font-size: 24px;
    }
}


.calculator form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    row-gap: 4px;
}

.calculator form .result input{
    width: 100%;
    padding: 15px 10px;
    background-color: transparent;
    letter-spacing: 2px;
    text-align: right;
    color: #fff;
    font-weight: 600;
    font-size: 34px;
    border: none;
    outline: none;
}

.calculator .row {
    display: flex;
    gap: 2px;
}

.calculator .row button {
    width: calc(100% / 4);
    outline: none;
    border: none;
    padding: 12px;
    border-radius: 10px;
    box-shadow: inset 0px 0px 2px 1px rgb(255 255 255 / 72%);
    background: transparent;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.calculator .row button.clicked {
    transform: scale(0.9);
    box-shadow: inset 0px 0px 1px 1px rgb(255 255 255 / 40%);
}

.calculator .row:not(:last-child) button:last-child {
    background-color: #000;
}

.calculator .row:nth-child(2) button:first-child {
    box-shadow: inset 0px 0px 2px 2px rgba(255, 3, 3, 0.886);
}

.calculator .row:nth-child(2) button:nth-child(2) {
    box-shadow: inset 0px 0px 2px 2px rgba(9, 255, 0, 0.886);
}

.calculator .row:last-child button {
    flex: 1;
}

.calculator .row:last-child button:last-child {
    flex: 2;
    background-color: #f1c40f;
    color: #000;
    font-weight: bold;
    box-shadow: none;
}