.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: all .3s ease;
    transition: all .5s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: auto;
    flex-direction: column;
    justify-content: flex-start;
    background: linear-gradient(to bottom,
        rgba(184, 18, 255, 0.75) 0%,
        rgba(246, 246, 244, 0.75) 26%,
        rgba(246, 246, 244, 0.75) 65%,
        rgba(16, 133, 78, 0.75) 100%
    );
}

.modal--active {
    z-index: 100;
    opacity: 1;
    pointer-events: all;
}

.modal__wrapper {
    position: relative;
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.modal__content-inner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal__content {
    position: relative;
    aspect-ratio: 574 / 786;
    width: 574px;
    background: url('../img/modal/modal.webp') no-repeat center center;
    background-size: 100% 100%;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.modal__content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    padding-top: 80px;
}

.modal-logo {
    aspect-ratio: 340 / 98;
    position: relative;
    z-index: 3;
}

.modal__title {
    font-size: 36px;
    letter-spacing: 1px;
    font-style: normal;
    filter: drop-shadow(0 0 4px rgba(0, 57, 154, 0.25));
    line-height: 1.2;
    margin-bottom: 70px;
}

.modal__bonus {
    width: 412px;
    background-size: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    letter-spacing: 1px;
    font-size: 36px;
    margin-bottom: 60px;
}

.modal__btn {
    aspect-ratio: 418 / 116;
    width: 418px;
    margin: 0 auto;
    background: url('../img/modal/modal_yellow_btn.webp') no-repeat center center;
    background-size: contain;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    font-weight: 900;
    font-size: 32px;
    cursor: pointer;
    text-shadow: 0 0 13px #986417;
    padding-top: 6px;
}

.modal__btn:hover {
    background: url('../img/modal/modal_green_btn.webp') no-repeat center center;
    background-size: contain;
}

.modal__btn-pulse {
    animation: pulse 2s linear infinite;
}

.bear-violet,
.bear-red,
.star-left,
.star-right,
.orange-left,
.orange-right,
.pink-left,
.pink-right ,
.coin-top,
.coin-middle,
.coin-bottom {
    position: absolute;
}

.bear-violet {
    aspect-ratio: 211 / 273;
    background: url('../img/modal/bear_violet.webp') no-repeat center center;
    background-size: cover;
    animation: 2.5s float-left ease-in-out infinite;
    -webkit-animation: 2.5s float-left ease-in-out infinite;
}

.bear-red {
    aspect-ratio: 250 / 304;
    background: url('../img/modal/bear_red.webp') no-repeat center center;
    background-size: cover;
    animation: 2.5s .5s float-left ease-in-out infinite;
    -webkit-animation: 2.5s .5s float-left ease-in-out infinite;
}

.star-left {
    aspect-ratio: 1 / 1;
    background: url('../img/modal/star_left.webp') no-repeat center center;
    background-size: cover;
    -webkit-animation: 1.5s pulse ease-in-out infinite;
    animation: 1.5s pulse ease-in-out infinite;
}

.star-right {
    aspect-ratio: 1 / 1;
    background: url('../img/modal/star_right.webp') no-repeat center center;
    background-size: cover;
    -webkit-animation: 1.5s .5s pulse ease-in-out infinite;
    animation: 1.5s .5s pulse ease-in-out infinite;
}

.orange-left {
    aspect-ratio: 1 / 1;
    background: url('../img/modal/orange_left.webp') no-repeat center center;
    background-size: cover;
    -webkit-animation: 2.5s .5s wobble ease-in-out infinite;
    animation: 2.5s .5s wobble ease-in-out infinite;
}

.orange-right {
    aspect-ratio: 1 / 1;
    background: url('../img/modal/orange_right.webp') no-repeat center center;
    background-size: cover;
    -webkit-animation: 2.5s 1s wobble ease-in-out infinite;
    animation: 2.5s 1s wobble ease-in-out infinite;
}

.pink-left {
    aspect-ratio: 1 / 1;
    background: url('../img/modal/pink_left.webp') no-repeat center center;
    background-size: cover;
    z-index: 1;
    -webkit-animation: 2.5s .5s wobble ease-in-out infinite reverse;
    animation: 2.5s .5s wobble ease-in-out infinite reverse;
}

.pink-right {
    aspect-ratio: 1 / 1;
    background: url('../img/modal/pink_right.webp') no-repeat center center;
    background-size: cover;
    z-index: 1;
    -webkit-animation: 2.5s 1s wobble ease-in-out infinite reverse;
    animation: 2.5s 1s wobble ease-in-out infinite reverse;
}

.coin-top {
    aspect-ratio: 296 / 234;
    background: url('../img/modal/coin_top.webp') no-repeat center center;
    background-size: cover;
    animation: 2.5s float-left ease-in-out infinite;
    -webkit-animation: 2.5s float-left ease-in-out infinite;
}

.coin-middle {
    aspect-ratio: 296 / 234;
    background: url('../img/modal/coin_top.webp') no-repeat center center;
    background-size: cover;
    animation: 2.5s .5s float-left ease-in-out infinite;
    -webkit-animation: 2.5s .5s float-left ease-in-out infinite;
}

.coin-bottom {
    aspect-ratio: 400 / 450;
    background: url('../img/modal/coin_bottom.webp') no-repeat center center;
    background-size: cover;
    animation: 2.5s .9s float-left ease-in-out infinite;
    -webkit-animation: 2.5s .9s float-left ease-in-out infinite;
}

.modal__mask {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

@media (orientation: portrait) and (min-width: 0px) {
    .modal {
        padding: clamp(20px, 5vw, 40px);
    }

    .modal-logo {
        width: clamp(180px, 35vw, 300px);
        margin-bottom: clamp(30px, 10vw, 70px);
    }

    .bear-violet {
        width: clamp(70px, 20vw, 211px);
        left: 15%;
        bottom: 10%;
    }

    .bear-red {
        width: clamp(70px, 24vw, 250px);
        right: 15%;
        bottom: 10%;
    }

    .star-left {
        width: clamp(70px, 16vw, 211px);
        left: 6%;
        top: 5%;
    }

    .star-right {
        width: clamp(70px, 16vw, 211px);
        right: 0;
        top: 10%;
    }

    .orange-left {
        width: clamp(70px, 17vw, 313px);
        left: -2%;
        top: 15%;
    }

    .orange-right {
        width: clamp(70px, 15vw, 313px);
        right: 0;
        top: -2%;
    }

    .pink-left {
        width: clamp(70px, 25vw, 224px);
        left: -3%;
        bottom: 0;
    }

    .pink-right {
        width: clamp(70px, 17vw, 224px);
        right: 0;
        top: 70%;
    }

    .coin-top {
        width: clamp(70px, 17vw, 296px);
        left: 0;
        top: -2%;
    }

    .coin-middle {
        width: clamp(70px, 22vw, 296px);
        right: 0;
        top: 65%;
    }

    .coin-bottom {
        width: clamp(100px, 50vw, 400px);
        left: -15%;
        bottom: 0;
    }
}

@media (orientation: portrait) and (min-width: 768px) and (min-height: 1024px) {
    .bear-violet {
        left: 20%;
        bottom: 0;
    }

    .bear-red {
        right: 20%;
        bottom: 0;
    }

    .star-left {
        left: 10%;
        top: 25%;
    }

    .star-right {
        right: 10%;
        top: 22%;
    }

    .orange-left {
        left: -2%;
        top: 40%;
    }

    .orange-right {
        right: 0;
        top: 10%;
    }

    .coin-top {
        left: -1%;
        top: 20%;
    }

    .coin-bottom {
        width: clamp(100px, 40vw, 400px);
        left: -20%;
        bottom: 0;
    }
}

@media (orientation: landscape) and (min-width: 0px) {
    .modal {
        padding: clamp(10px, 2vw, 50px);
    }

    .modal-logo {
        width: clamp(120px, 13vw, 340px);
        margin-bottom: clamp(10px, 2vw, 40px);
    }

    .bear-violet {
        width: clamp(70px, 10vw, 211px);
        left: 18%;
        top: 70%;
    }

    .bear-red {
        width: clamp(70px, 12vw, 250px);
        right: 18%;
        top: 68%;
    }

    .star-left {
        width: clamp(70px, 12vw, 211px);
        left: 16%;
        top: 20%;
    }

    .star-right {
        width: clamp(70px, 12vw, 211px);
        right: 16%;
        top: 20%;
    }

    .orange-left {
        width: clamp(70px, 12vw, 313px);
        left: -2%;
        top: 40%;
    }

    .orange-right {
        width: clamp(70px, 12vw, 313px);
        right: 10%;
        top: -1%;
    }

    .pink-left {
        width: clamp(70px, 12vw, 224px);
        left: -3%;
        bottom: 0;
    }

    .pink-right {
        width: clamp(70px, 12vw, 224px);
        right: 0;
        top: 50%;
    }

    .coin-top {
        width: clamp(70px, 11vw, 296px);
        left: 0;
        top: -2%;
    }

    .coin-middle {
        width: clamp(70px, 11vw, 296px);
        right: 0;
        top: 45%;
    }

    .coin-bottom {
        width: clamp(70px, 20vw, 400px);
        left: -4%;
        bottom: 0;
    }
}

@media (orientation: landscape) and (min-width: 1024px) {
    .modal {
        padding: clamp(10px, 2vw, 50px);
    }

    .modal-logo {
        width: clamp(120px, 20vw, 340px);
    }
}
