.scg-wrap {
    margin: 0 0 1rem 0;
}


/* Gate box */

.scg-gate {
    border: 1px dashed #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    background: #fffdf6;
}

.scg-msg {
    margin: 8px 0 12px 0;
    line-height: 1.5;
}

.scg-actions .scg-skip {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
}

.scg-actions .btn-aff {
    background-image: repeating-linear-gradient(to right, #bd0f11, #f3e160)!important;
    color: #fff!important;
    animation-fill-mode: forwards;
    animation-timing-function: linear;
    background-size: 200% auto;
    background-position: 0 100%;
    animation: 2s infinite gradient;
    border: 2px solid;
    border-radius: 5px;
    padding: 10px 15px;
    position: relative;
    font-size: 16px;
}

@media (max-width: 992px) {
    .scg-actions .btn-aff {
        font-size: 14px;
    }
}

.scg-actions .btn-aff:after,
.scg-actions .btn-aff:before {
    content: "";
    position: absolute;
    width: 50%;
    height: 50%;
    z-index: -1;
    -webkit-animation-timing-function: ease;
    animation-timing-function: ease;
    -webkit-animation-duration: 2s;
    animation-duration: 2s;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    border-radius: 7px;
    -webkit-border-radius: 7px;
    -moz-border-radius: 7px;
    -ms-border-radius: 7px;
    -o-border-radius: 7px;
}

.scg-actions .btn-aff:before {
    left: 0;
    top: 0;
    -webkit-box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
    box-shadow: 0 0 17px 3px #ffff01, 0 0 4px 2px #ffff01;
    -webkit-animation-name: yellow-shadow;
    animation-name: yellow-shadow;
}

.scg-actions .btn-aff:after {
    right: 0;
    bottom: 0;
    -webkit-box-shadow: 0 0 17px 3px #0ff, 0 0 4px 2px #0ff;
    box-shadow: 0 0 17px 3px #0ff, 0 0 4px 2px #0ff;
    -webkit-animation-name: cyan-shadow;
    animation-name: cyan-shadow;
}

@keyframes gradient {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes yellow-shadow {
    0%,
    100% {
        top: 0;
        left: 0;
    }
    25% {
        top: 50%;
        left: 0;
    }
    50% {
        top: 50%;
        left: 50%;
    }
    75% {
        top: 0;
        left: 50%;
    }
}

@keyframes cyan-shadow {
    0%,
    100% {
        right: 0;
        bottom: 0;
    }
    25% {
        right: 0;
        bottom: 50%;
    }
    50% {
        right: 50%;
        bottom: 50%;
    }
    75% {
        right: 50%;
        bottom: 0;
    }
}

.scg-actions .btn-aff {
    position: relative;
    z-index: 0;
    /* NEW: tạo stacking context */
    isolation: isolate;
    /* NEW: "cô lập" context để z-index âm không chui xuống ancestor */
}


/* Pseudo vẫn -1 để nằm dưới nội dung nút nhưng trong cùng context */

.scg-actions .btn-aff:before,
.scg-actions .btn-aff:after {
    z-index: -1;
    pointer-events: none;
    /* tránh chặn click */
}


/* (3) Banner sớm hơn, đặt trên cùng */

.scg-banner {
    margin: 0 0 10px 0;
}

.scg-banner img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}


/* Animation rung nhẹ */


/* Disclosure */

.scg-disclosure {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.scg-skip {
    background: none;
    border: none;
    text-decoration: underline;
    font-size: 14px;
}