.modal {
    position: fixed;
    inset: 0;
    background: url("../img/modal/modal_bg.webp") no-repeat center center;
    background-size: cover;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: all .3s ease;
    transition: all .5s ease;
    overflow: hidden;
}

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

.modal-inner-wrapper {
    height: 100%;
    position: relative;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    padding: clamp(10px, 2vw, 45px) 0;
    z-index: 102;
}

.left-column--modal,
.right-column--modal {
    position: absolute;
    aspect-ratio: 472 / 1016;
    bottom: -20%;
}

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

.modal__content {
    width: 705px;
    height: 810px;
    aspect-ratio: 705 / 810;
    background: image-set(
            url('../img/modal/modal@1x.webp') 1x,
            url('../img/modal/modal@2x.webp') 2x
    ) no-repeat center center;
    background-size: cover;
    isolation: isolate;
    z-index: 102;
    padding-top: 166px;
    position: absolute;
}

.modal__content.no-transition {
    transition: none !important;
}

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

.modal__title {
    font-size: 54px;
    font-weight: 700;
    color: #3C1625;
    margin-bottom: 64px;
    text-shadow: 0 -3px 58px rgba(249, 237, 147, 1);
}

.modal__subtitle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 36px;
    letter-spacing: 1px;
    font-weight: 700;
    line-height: 1.2;
    max-width: 400px;
    margin-bottom: 40px;
}

.modal__subtitle-first,
.modal__subtitle-second {
    font-size: 48px;
    font-weight: 700;
    font-style: normal;
    color: #3C1625;
    text-align: center;
    text-shadow: 0 -3px 58px rgba(249, 237, 147, 1);
}

.modal__btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    pointer-events: auto;
}

.modal__btn {
    width: 562px;
    height: 104px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: image-set(
            url('../img/wheel/wheel_btn_red@1x.webp') 1x,
            url('../img/wheel/wheel_btn_red@1x.webp') 2x
    ) no-repeat center center;
    background-size: cover;
}

.modal__btn:hover {
    background: image-set(
            url('../img/wheel/wheel_btn_green@1x.webp') 1x,
            url('../img/wheel/wheel_btn_green@2x.webp') 2x
    ) no-repeat center center;
    background-size: cover;
}

.modal__btn-label {
    font-size: 36px;
    line-height: 1;
    font-weight: 700;
    color: #fff;
    padding-bottom: 5px;
}

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

#button {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight {
    color: #007D43;
}

@media (orientation: portrait) and (min-width: 0px) {
    .modal-inner-wrapper {
        padding: clamp(10px, 3vw, 45px) 0;
    }

    .logo-wrapper--modal {
        width: clamp(160px, 30vw, 300px);
    }

    .modal::after {
        content: "";
        position: absolute;
        top: 60%;
        aspect-ratio: 310 / 667;
        height: 100%;
        max-height: 667px;
    }

    .modal::after {
        right: 0;
        background: url("../img/columns/right_column.webp") no-repeat;
        background-size: contain;
    }
}

@media (orientation: portrait) and (min-width: 380px) {
    .modal::after {
        top: 55%;
    }
}

@media (orientation: portrait) and (min-width: 768px) and (min-height: 1024px) {
    .modal::before,
    .modal::after {
        content: "";
        position: absolute;
        top: 65%;
        aspect-ratio: 310 / 667;
        height: 100%;
        max-height: 667px;
        z-index: 1;
    }

    .modal::before {
        left: 0;
        background: url("../img/columns/left_column.webp") no-repeat;
        background-size: contain;
    }

    .modal::after {
        right: 0;
        background: url("../img/columns/right_column.webp") no-repeat;
        background-size: contain;
    }
}

@media (orientation: landscape) and (min-width: 0px) {
    .logo-wrapper--modal {
        position: relative;
        width: clamp(100px, 20vw, 400px);
        margin-bottom: clamp(10px, 2vw, 80px);
    }

    .logo-shine--modal {
        background: transparent;
        position: absolute;
        width: 95%;
        height: 100%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
        overflow: hidden;
    }

    .logo-shine--modal::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 90%;
        height: 100%;
        background: linear-gradient(
                120deg,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.5) 50%,
                rgba(255, 255, 255, 0) 100%
        );
        animation: shine 2.5s infinite;
        pointer-events: none;
    }

    .modal::after,
    .modal::before {
        content: "";
        position: absolute;
        bottom: -15%;
        aspect-ratio: 472 / 1016;
        height: 100%;
        max-height: 1016px;
        z-index: 1;
    }

    .modal::before {
        left: 0;
        background: url("../img/columns/left_column.webp") no-repeat;
        background-size: contain;
    }

    .modal::after {
        right: 0;
        background: url("../img/columns/right_column.webp") no-repeat;
        background-size: contain;
    }
}

@media (orientation: landscape) and (min-width: 0px) and (max-height: 700px) {
    .modal-inner-wrapper {
        padding: clamp(10px, 2vw, 45px) 0;
    }

    .logo-wrapper--modal {
        width: clamp(100px, 20vw, 200px);
    }
}

@media (orientation: landscape) and (min-width: 1030px) and (max-height: 1030px) {
    .modal::after,
    .modal::before {
        bottom: -55%;
    }
}

@media (orientation: landscape) and (min-width: 1440px) {
    .modal::after,
    .modal::before {
        bottom: -20%;
    }
}
