/* ── AGEN108 Welcome Popup ── */

#popupBanner {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 8, 2, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

#popupBanner.is-visible {
    opacity: 1;
    visibility: visible;
}

#popupContent {
    position: relative;
    width: 100%;
    max-width: 440px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(168deg, #0f1f0f 0%, #060d06 45%, #0a160a 100%);
    border: 1px solid rgba(14, 254, 0, 0.28);
    box-shadow:
        0 0 0 1px rgba(14, 254, 0, 0.08),
        0 28px 70px rgba(0, 0, 0, 0.65),
        0 0 90px rgba(14, 254, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: scale(0.88) translateY(28px);
    opacity: 0;
    transition:
        transform 0.65s cubic-bezier(0.34, 1.45, 0.64, 1),
        opacity 0.45s ease;
}

#popupContent.is-visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}

#popupContent::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 23px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(14, 254, 0, 0.55) 0%,
        transparent 35%,
        transparent 65%,
        rgba(14, 254, 0, 0.25) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: popupBorderPulse 3.5s ease-in-out infinite;
}

@keyframes popupBorderPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.popup-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(14, 254, 0, 0.35);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.popup-close-btn:hover {
    background: rgba(14, 254, 0, 0.18);
    border-color: #0efe00;
    color: #0efe00;
    transform: rotate(90deg);
}

.popup-image-wrap {
    position: relative;
    overflow: hidden;
}

.popup-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, transparent, #0a160a);
    pointer-events: none;
}

.popup-image-wrap img {
    width: 100%;
    display: block;
    filter: saturate(1.1) contrast(1.05);
}

.popup-body {
    padding: 26px 24px 22px;
    text-align: center;
    background: linear-gradient(180deg, #0a160a 0%, #040804 100%);
}

.popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #1a5c08, #0efe00);
    color: #001a00;
    padding: 7px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 22px;
    box-shadow: 0 4px 18px rgba(14, 254, 0, 0.3);
}

.popup-badge::before {
    content: '★';
    font-size: 10px;
    color: #001a00;
}

.popup-actions {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.popup-btn {
    position: relative;
    overflow: hidden;
    display: block;
    padding: 15px 20px;
    border-radius: 13px;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1.2px;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    transition:
        transform 0.3s cubic-bezier(0.2, 1, 0.3, 1),
        box-shadow 0.3s ease,
        filter 0.3s ease;
}

.popup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-28deg);
    animation: popupShimmer 2.8s infinite ease-in-out;
}

@keyframes popupShimmer {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

.popup-btn--login {
    background: linear-gradient(135deg, #143d08 0%, #26700c 55%, #138700 100%);
    color: #fff;
    border: 1px solid rgba(14, 254, 0, 0.22);
    box-shadow: 0 4px 18px rgba(38, 112, 12, 0.45);
}

.popup-btn--register {
    background: linear-gradient(135deg, #0efe00 0%, #2dd80b 55%, #099e00 100%);
    color: #001a00;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 18px rgba(14, 254, 0, 0.35);
}

.popup-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.12);
}

.popup-btn--login:hover {
    box-shadow: 0 8px 28px rgba(14, 254, 0, 0.4);
}

.popup-btn--register:hover {
    box-shadow: 0 8px 28px rgba(14, 254, 0, 0.55);
}

.popup-btn:active {
    transform: translateY(0);
}

.popup-footer {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(14, 254, 0, 0.1);
}

.popup-footer p {
    margin: 0;
    color: #5a6e5a;
    font-size: 11px;
    letter-spacing: 0.4px;
}

.popup-footer span {
    color: #0efe00;
    font-weight: 600;
}

@media (max-width: 480px) {
    #popupContent {
        max-width: 100%;
        border-radius: 18px;
    }

    .popup-body {
        padding: 22px 18px 18px;
    }

    .popup-btn {
        font-size: 15px;
        padding: 14px 16px;
    }

    .popup-badge {
        font-size: 10px;
        letter-spacing: 1px;
    }
}