.calc {
    margin: 50px auto;
    width: 400px;
    height: 600px;

    /* border: 1px solid #000; */
    border-radius: 20px;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    padding: 18px;
    box-shadow: 4px 4px 4px #4f4f4f;
    animation: gradientanimation 5s linear infinite alternate; /* alternate обеспечивает обратное движение анимации */
    background: linear-gradient(45deg, #FFC0CB, #FF1493);
    background-size: 200% 200%;
}

@keyframes gradientanimation {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.calc-screen {
    height: 125px;
    padding: 10px;
    display: grid;
    justify-items: end;
    align-items: end;
    margin-bottom: 24px;
    position: relative;
}

.calculator-window {
    background-color: rgb(255 255 255 / 20%);
    border-radius: 20px;
    padding: 10px;

    /* border: 3px solid #FF1493; */
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 355px;
    height: 100px;
    border: 2px solid rgb(255 255 255 / 40%);
    box-shadow: 0 5px 10px rgb(0 0 0 / 20%), 0 10px 20px rgb(0 0 0 / 10%);
    margin-bottom: 20px;
    position: relative;
    transform: perspective(600px) rotateX(10deg);
    text-align: center;
    line-height: 80px;
    overflow: hidden; 
    white-space: nowrap;
}

.calc-screen p {
    text-align: right;
    font-size: 3rem;
    margin: 0;
    position: absolute; /* Позиционируем абсолютно */
    bottom: 10px; /* Перемещаем вниз */
    right: 18px;
}

.buttons {
    display: grid;
    grid-template-areas: 
    "ac plus-minus percent division"
    "seven eigth nine multi"
    "four five six minus"
    "one two three plus"
    "zero zero dot equal";
    grid-gap: 12px;
    justify-items: center;

}

.btn {
    width: 75px;
    height: 75px;
    background: #FF1493;
    border-radius: 50%;
    text-align: center;
    line-height: 70px;
    font-size: 1.8rem;
    cursor: pointer;
    user-select: none;
    color: white;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 0 8px rgb(0 0 0 / 30%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn.zero {
    grid-area: zero;
    width: 90%;
    border-radius: 34px;
}

.btn:hover {
    filter: brightness(135%);
}

.btn:active {
    filter: brightness(105%);
}

.btn.bgpink {
    background: #FFC0CB;
}

.btn.bgdogwoodrose {
    background: #D71868;
}

.btn.operation {
    background-color: #D71868;
}

.btn.special {
    background-color: #FF1493;
}
