/* Popup tengah + footer — hijau Aztec gelap + emas (selaras landing) */
.cta-button-container-modern {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    margin-bottom: 16px;
    font-family: "Segoe UI", "Poppins", system-ui, sans-serif;
}

.cta-btn-modern {
    flex: 1;
    height: 46px;
    line-height: 46px;
    text-align: center;
    color: #fdf8e8 !important;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 999px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 4px 16px rgba(0, 0, 0, 0.32),
        0 0 24px rgba(201, 162, 39, 0.18);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.25s ease;
    z-index: 1;
}

.cta-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 10px 28px rgba(0, 0, 0, 0.38),
        0 0 32px rgba(201, 162, 39, 0.28);
}

.cta-btn-modern span {
    position: relative;
    z-index: 2;
    color: #fdf8e8 !important;
}

.cta-btn-modern::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.785, 0.135, 0.15, 0.86);
    z-index: -1;
}

.cta-btn-modern:hover::before {
    transform: scaleX(1);
}

.cta-btn-modern.login-btn,
.cta-btn-modern.register-btn {
    background: linear-gradient(
        145deg,
        #c9a227 0%,
        #1e4d36 38%,
        #0c2218 72%,
        #1a1508 100%
    );
}

.popup-overlay {
    position: fixed;
    z-index: 9997;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(201, 162, 39, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 100% 40%, rgba(30, 77, 54, 0.22) 0%, transparent 45%),
        rgba(2, 10, 6, 0.78);
    backdrop-filter: blur(12px) saturate(1.15);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: calc(52px + 80px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    overflow-y: auto;
}

.popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 450px;
}

.popup-image {
    width: 100%;
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(201, 162, 39, 0.22),
        0 20px 50px rgba(0, 0, 0, 0.48);
    margin-bottom: 16px;
}

.popup-title {
    color: #f5ecd4;
    font-size: 15px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.45;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.popup-footer-text {
    font-size: 11px;
    color: rgba(232, 197, 71, 0.75);
}

.aztec888-fixed-footer {
    position: fixed;
    bottom: 52px;
    left: 0;
    right: 0;
    z-index: 9998;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 4px;
    padding: 14px 0 calc(12px + env(safe-area-inset-bottom, 0));
    background: linear-gradient(
        180deg,
        rgba(15, 36, 24, 0.94) 0%,
        rgba(6, 18, 12, 0.97) 55%,
        rgba(3, 8, 5, 0.98) 100%
    );
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-top: 1px solid rgba(201, 162, 39, 0.35);
    box-shadow:
        0 -4px 0 rgba(0, 0, 0, 0.2),
        0 -20px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(201, 162, 39, 0.08);
    border-radius: 22px 22px 0 0;
    font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
}

.aztec888-fixed-footer a {
    flex: 1;
    max-width: 20%;
    text-align: center;
    text-decoration: none;
    color: rgba(253, 248, 232, 0.92) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.aztec888-fixed-footer a:hover {
    color: #f0d78c !important;
    transform: translateY(-3px);
}

.aztec888-fixed-footer img {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.35));
    transition: all 0.4s ease;
}

.aztec888-fixed-footer .tada {
    background: radial-gradient(circle, rgba(201, 162, 39, 0.38) 0%, transparent 68%);
    border-radius: 50%;
    padding: 11px;
    transform: scale(1.12);
    box-shadow:
        0 0 0 1px rgba(201, 162, 39, 0.32),
        0 8px 28px rgba(0, 0, 0, 0.38),
        0 0 28px rgba(201, 162, 39, 0.35);
    animation: aztec888MegaPulse 2.4s ease-in-out infinite;
    margin-top: -15px;
}

@keyframes aztec888MegaPulse {
    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(201, 162, 39, 0.28),
            0 8px 28px rgba(0, 0, 0, 0.35),
            0 0 24px rgba(201, 162, 39, 0.32);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(240, 215, 140, 0.42),
            0 10px 32px rgba(0, 0, 0, 0.4),
            0 0 36px rgba(232, 197, 71, 0.38);
    }
}

@media (max-width: 500px) {
    .aztec888-fixed-footer {
        padding: 8px 0;
        border-radius: 16px 16px 0 0;
    }
    .aztec888-fixed-footer a {
        font-size: 9.5px;
        letter-spacing: 0;
    }
    .aztec888-fixed-footer img {
        width: 22px;
        height: 22px;
    }
    .aztec888-fixed-footer .tada {
        transform: scale(1.1);
        padding: 8px;
        margin-top: -10px;
    }
    .popup-title {
        font-size: 14px;
    }
    .cta-btn-modern {
        font-size: 13px;
        height: 42px;
        line-height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-btn-modern,
    .aztec888-fixed-footer a {
        transition: none !important;
    }
    .cta-btn-modern:hover,
    .aztec888-fixed-footer a:hover {
        transform: none;
    }
    .aztec888-fixed-footer .tada {
        animation: none;
    }
}

.popup-overlay.popup-overlay--off {
    display: none;
    visibility: hidden;
    pointer-events: none;
}

body:has(.popup-overlay.popup-overlay--off) #AZTEC888-promo-layer,
body:has(.popup-overlay.popup-overlay--off) .aztec888-fixed-footer {
    display: none;
    visibility: hidden;
    pointer-events: none;
}

body:has(.popup-overlay.popup-overlay--on) .inner-body-container > .inner-body {
    padding-bottom: calc(52px + 76px + env(safe-area-inset-bottom, 0px));
}

/* Alias: satu tanda hubung (tanpa BEM --) tetap dipakai jika HTML salah ketik */
.popup-overlay.popup-overlay-off {
    display: none;
    visibility: hidden;
    pointer-events: none;
}

body:has(.popup-overlay.popup-overlay-off) #AZTEC888-promo-layer,
body:has(.popup-overlay.popup-overlay-off) .aztec888-fixed-footer {
    display: none;
    visibility: hidden;
    pointer-events: none;
}

body:has(.popup-overlay.popup-overlay-on) .inner-body-container > .inner-body {
    padding-bottom: calc(52px + 76px + env(safe-area-inset-bottom, 0px));
}
