body.modal_opened {overflow: hidden;}

.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: none;
    flex-flow: column;
    width: 100%;
    height: 100%;
    padding: 30px 10px;
    overflow-y: auto;
    background: rgba(21, 31, 42, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: modal_overlay_show 230ms both;
}

.modal {
    position: relative;
    display: none;
    width: 720px;
    max-width: 100%;
    margin: auto;
    padding: 45px 40px 40px;
    background: #fff;
    border-top: 4px solid var(--seccolor);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modal_show 350ms var(--ease) both;
    animation-delay: 80ms;
}

.modal_title {
    padding-right: 40px;
    font-size: 32px;
    line-height: 38px;
    font-weight: 900;
    text-transform: uppercase;
}
.modal_text {
    margin-top: 10px;
    font-size: 16px;
    line-height: 21px;
    color: var(--gray);
}
.modal .quiz_progress {margin-top: 25px;}
.modal .quiz_question {margin-top: 30px;}
.modal_small {width: 540px;}
.modal_small .quiz {margin-top: 25px;}

/* Крестик из двух линий */
.close {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}
.close::before,
.close::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 19px;
    width: 24px;
    height: 2px;
    background-color: var(--maincolor);
    transform: rotate(45deg);
    transition: background-color 250ms, transform 350ms var(--ease);
}
.close::after {transform: rotate(-45deg);}

@media (hover: hover) and (min-width: 769px) {
    .close:hover::before {background-color: var(--seccolor); transform: rotate(135deg);}
    .close:hover::after {background-color: var(--seccolor); transform: rotate(45deg);}
}

@keyframes modal_overlay_show {
    0% {opacity: 0;}
    100% {opacity: 1;}
}

@keyframes modal_show {
    0% {opacity: 0; transform: translateY(30px) scale(0.97);}
    100% {opacity: 1; transform: none;}
}

@media screen and (max-width: 768px) {
    .modal_overlay {padding: 10px;}
    .modal {padding: 30px 15px 25px;}
    .modal_title {
        font-size: 24px;
        line-height: 28px;
    }
    .modal_text {font-size: 14px; line-height: 18px;}
    .close {right: 5px; top: 5px;}
}
