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

@font-face {
    font-family: 'digital-7';
    src: url(fonts/digital-7.ttf);
    font-style: normal;
}

body {
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
}

.container {
    background-color: rgba(51, 51, 51, 1);
    padding: 40px 30px 30px;
    border-radius: 20px;
    min-width: 300px;
    min-height: 400px;
    box-shadow: 25px 25px 100px rgba(0, 0, 0, 0.25),
        inset -5px -5px 15px rgba(0, 0, 0, 0.25),
        inset 5px 5px 15px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 500px;
}

.calculator {
    display: grid;
    gap: 10px;
    position: relative;
}

.calculator .value {
    grid-column: span 4;
    height: 100px;
    width: calc(100% - 10px);
    background-color: #a7af7c;
    margin-bottom: 10px;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 56px;
    padding: 10px;
    text-align: right;
    font-family: 'digital-7';
}

.calculator button {
    border: none;
    width: 100%;
    height: 80px;
    background: linear-gradient(180deg, #2f2f2f, #3f3f3f);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: inset -8px 0 8px rgba(0, 0, 0, 0.15),
        inset 0 -8px 8px rgba(0, 0, 0, 0.25),
        0 0 0 2px rgba(0, 0, 0, 0.75),
        10px 20px 25px rgba(0, 0, 0, 0.4);
    position: relative;
}

.calculator button::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    right: 12px;
    bottom: 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2d2d2d, #4d4d4d);
    box-shadow: -5px -5px 15px rgba(0, 0, 0, 0.1),
        10px 5px 18px rgba(0, 0, 0, 0.27);
    border-left: 1px solid rgba(0, 0, 0, 0.27);
    border-bottom: 1px solid rgba(0, 0, 0, 0.27);
    border-top: 1px solid rgba(0, 0, 0, 0.6);
}

.calculator button i {
    position: relative;
    text-transform: uppercase;
    font-style: normal;
    font-size: 1.5em;
}

.calculator button:active {
    filter: brightness(1.5);
}

.calculator button.clear {
    background: #f00;
}

.calculator button.clear::before {
    background: linear-gradient(90deg, #d20000, rgba(255, 255, 255, 0.36));
    border-left: 1px solid rgba(255, 255, 255, 0.27);
    border-bottom: 1px solid rgba(255, 255, 255, 0.27);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.calculator button.equal {
    grid-row: span 2;
    height: 180px;
    background: #2196f3;
}

.calculator button.equal::before {
    background: linear-gradient(90deg, #1f79c9, rgba(255, 255, 255, 0.36));
    border-left: 1px solid rgba(255, 255, 255, 0.27);
    border-bottom: 1px solid rgba(255, 255, 255, 0.27);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
}

footer {
    position: fixed;
    bottom: 0;
    width: 40%;
    background: #2196f3;
    backdrop-filter: blur(20px);
    text-align: center;
    border-radius: 20px 20px 0 0;
    padding: 10px;
    box-shadow: 0px -2px 100px rgba(33, 242, 99, 0.2);
    transition: background 0.5s, box-shadow 0.5s;
    font-size: 1rem;
}

footer a {
    color: #ebebeb;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        max-width: 90%;
    }

    .calculator .value {
        font-size: 36px;
        height: 80px;
    }

    .calculator button {
        height: 60px;
    }

    .calculator button.equal {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }

    .calculator .value {
        font-size: 24px;
        height: 60px;
    }

    .calculator button {
        height: 50px;
    }

    .calculator button.equal {
        height: 100px;
    }
}