.popup-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 999998;
    padding: 18px;
    background:
        radial-gradient(circle at 50% 100%, rgba(0, 229, 255, .18), transparent 42%),
        rgba(0, 0, 0, .72);
    backdrop-filter: blur(10px);
}

.popup-overlay.show {
    display: flex;
}

.popup-box {
    position: relative;
    width: min(430px, 100%);
    padding: 28px 22px 24px;
    color: #fff;
    border: 1px solid rgba(0, 229, 255, .36);
    border-radius: 26px 26px 18px 18px;
    background:
        linear-gradient(145deg, rgba(18, 9, 24, .96), rgba(7, 10, 22, .94)),
        radial-gradient(circle at 22% 12%, rgba(255, 171, 0, .22), transparent 34%),
        radial-gradient(circle at 88% 22%, rgba(0, 229, 255, .2), transparent 38%);
    box-shadow: 0 -28px 90px rgba(0, 0, 0, .58), 0 0 38px rgba(0, 229, 255, .18);
    overflow: hidden;
    animation: vipSheetUp .58s cubic-bezier(.2, .9, .2, 1) both;
}

.popup-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 14px),
        linear-gradient(120deg, transparent, rgba(255,255,255,.1), transparent);
    opacity: .55;
    pointer-events: none;
}

.popup-content {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 16px;
    text-align: center;
}

.popup-text {
    max-width: 300px;
    margin: 0 auto;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.45;
    text-shadow: 0 0 22px rgba(0, 229, 255, .25);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ff1744, #ff7a00);
    box-shadow: 0 8px 24px rgba(255, 23, 68, .28);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.telegram-btn {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 52px;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 900;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #00a2ff, #00e5ff 52%, #ffab00);
    box-shadow: 0 18px 42px rgba(0, 229, 255, .26);
    overflow: hidden;
}

.telegram-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
}

.telegram-btn::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -75%;
    width: 55%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.72), transparent);
    transform: skewX(-24deg);
    animation: lightningShine 2.15s infinite;
}

@keyframes vipSheetUp {
    from { transform: translateY(110%) scale(.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 420px) {
    .popup-overlay { padding: 10px; }
    .popup-box { border-radius: 24px 24px 16px 16px; padding: 24px 18px 20px; }
    .popup-text { font-size: 16px; }
    .telegram-btn { min-height: 50px; }
}

@keyframes lightningShine {
    0% { left: -75%; opacity: 0; }
    14% { opacity: 1; }
    34% { left: 130%; opacity: 0; }
    100% { left: 130%; opacity: 0; }
}
