.modal {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 999;
    background: rgba(50, 42, 50, 0.9);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

#modal-tg {
    font-weight: 700;
    font-style: normal;
    color: #FFF;
    line-height: 100%;
}

#modal-tg .modal__close {
    position: absolute;
    top: -26px;
    right: -27px;
    cursor: pointer;
}

#modal-tg .modal__close svg {
    fill: #CCEEFF;
    transition: all 0.2s ease-in-out;
}

#modal-tg .modal__close:hover svg {
    fill: #E8144A;
}

#modal-tg .modal__body {
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 460px;
    position: relative;
    background: linear-gradient(100.84deg, #FF4A76 3.32%, #CCEDFF 60.99%);
    background-repeat: no-repeat;
    background-size: 100%;
}

#modal-tg .modal__body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("./bg.png");
    background-repeat: no-repeat;
    background-size: 100% 460px;
}

#modal-tg .modal-tg__row {
    position: relative;
    z-index: 2;
    height: 100%;
}

#modal-tg  .modal-tg__title {
    color: #FFFFFF;
    font-size: 38px;
    text-transform: uppercase;
    padding-top: 55px;
    margin-left: 33px;
    margin-bottom: 25px;
    line-height: 100%;
}

#modal-tg .modal-tg__advantage-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding-left: 66px;
}

#modal-tg .modal-tg__advantage-item {
    color: #FFFFFF;
    font-size: 32px;
    line-height: 36px;
    max-width: 300px;
}

#modal-tg .modal-tg__advantage-item:nth-child(1) {
    margin-bottom: -2px;
}

#modal-tg .modal-tg__add-name {
    position: absolute;
    top: 104px;
    right: 64px;
    max-width: 266px;
    color: #E8144A;
    font-size: 40px;
    line-height: 46px;
    text-align: center;

}

#modal-tg .modal-tg__add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 276px;
    height: 40px;
    background: #E8144A;
    color: #FFFFFF;
    font-size: 18px;
    position: absolute;
    right: 55px;
    bottom: 24px;
    transition: all 0.2s ease-in-out;
}

#modal-tg .modal-tg__wrapper:hover .modal-tg__add-button {
    background: #61B1E5;
}

@media (max-width: 900px) {
    #modal-tg .modal__close {
        right: 14px;
        top: -33px;
    }
}

@media (max-width: 700px) {
    #modal-tg .modal__body {
        max-height: 477px;
        background: linear-gradient(-207.92deg, #FF4A76 -14.28%, #CCEDFF 44.74%);
    }
    #modal-tg .modal__body::after {
        background-image: url("./bg-m.png");
        background-size: 100% 477px;
    }
    #modal-tg  .modal-tg__title {
        font-size: 24px;
        margin-left: 0;
        text-align: center;
        padding-top: 20px;
        margin-bottom: 16px;
    }

    #modal-tg .modal-tg__advantage-list {
        flex-wrap: wrap;
        flex-direction: row;
        position: relative;
    }

    #modal-tg .modal-tg__advantage-item {
        font-size: 24px;
        line-height: 26px;
    }
    #modal-tg .modal-tg__advantage-item:nth-child(1) {
        max-width: 165px;
        margin-left: 20px;
        margin-bottom: 0px;
        margin-top: 3px;
        order: 1;
    }
    #modal-tg .modal-tg__advantage-item:nth-child(2) {
        order: 3;
        position: absolute;
        top: 102px;
        left: 32%;
        max-width: 220px;
    } 
    #modal-tg .modal-tg__advantage-item:nth-child(3) {
        order: 2;
        max-width: 140px;
        position: absolute;
        left: 66%;
        top: 3px;
    }

    #modal-tg .modal-tg__add-name {
        max-width: 100%;
        width: 90%;
        text-align: center;
        top: auto;
        bottom: 145px;
        right: 50%;
        transform: translateX(50%);
        font-size: 28px;
        line-height: 34px;
        padding-right: 12px;
        white-space: nowrap;
    }

    #modal-tg .modal-tg__add-name span {
        white-space: nowrap;
        overflow-x: hidden;
        width: auto;
        text-overflow: ellipsis;
        max-width: 48%;
        display: inline-block;
        position: relative;
        top: 7px;
    }
    #modal-tg .modal-tg__add-button {
        width: 224px;
        right: 50%;
        transform: translateX(50%);
        bottom: 15px;
    }
}

@media (max-width: 450px) {
    #modal-tg .modal-tg__advantage-list {
        padding-left: 0;
    }
    #modal-tg .modal-tg__advantage-item:nth-child(1) {
        margin-left: 55px;
    }
    #modal-tg .modal-tg__advantage-item {
        font-size: 20px;
        line-height: 22px;
    }
}

@media (max-width: 375px) {
    #modal-tg .modal-tg__advantage-item:nth-child(1) {
        margin-left: 50px;
        max-width: 150px;
    }
}