/* ==========================================================
   MODAL ROOT — TELEGRAM SAFE
========================================================== */

#modal-root {
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none;
}

#modal-root > * {
    pointer-events: auto;
}

/* ==========================================================
   PREMIUM UNLOCK POPUP
========================================================== */

.premium-unlock-popup {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
    padding: 24px 12px;

    animation: premiumFadeIn 0.25s ease forwards;
}

.premium-unlock-popup.hidden {
    display: none;
}

.premium-unlock-overlay {
    position: absolute;
    inset: 0;
}

/* BODY */
.premium-unlock-popup .premium-offer {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 420px;

    padding: 22px 20px 24px;
    border-radius: 28px;

    background: #0b0a0f;
    border: 1px solid rgba(255, 255, 255, 0.12);

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(255, 47, 146, 0.35);

    display: flex;
    flex-direction: column;
    animation: premiumScaleIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;

}

/* CLOSE */
.premium-unlock-close {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 34px;
    height: 34px;
    border-radius: 50%;

    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
}

/* ==========================================================
   CARD STACK
========================================================== */

.premium-offer-cards {
    position: relative;
    height: 220px;
    margin-bottom: 14px;
    perspective: 800px;

}

.premium-card {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);

    width: 150px;
    height: 210px;
    border-radius: 22px;
    overflow: hidden;

    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
}

/* BACK CARDS — GRADIENT ONLY */
.back-card {
    background: linear-gradient(
            135deg,
            rgba(255, 104, 205, 0.15),
            rgba(120, 70, 255, 0.25)
    );
    opacity: 0.65;
    z-index: 1;

    animation-fill-mode: forwards;
}

.back-card-1 {
    animation: cardLeftIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.15s;
    z-index: 1;
}

.back-card-2 {
    animation: cardRightIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.15s;
    z-index: 2;
}

/* MAIN CARD */
.main-card {
    z-index: 3;
    width: 170px;
    height: 220px;

    box-shadow: 0 0 0 6px rgba(255, 95, 189, 0.12),
    0 0 44px rgba(255, 47, 146, 0.6);

    animation-delay: 0.16s;
}

.premium-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-card-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 45%,
            rgba(0, 0, 0, 0.9) 100%
    );
}

/* ==========================================================
   TEXT & FEATURES
========================================================== */

.premium-offer-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.premium-offer-title span {
    color: #ff68cd;
}

.premium-offer-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #cfc7dd;
    margin-bottom: 14px;
}

.premium-offer-features {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.premium-offer-features li {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    color: #fff;
}

.feature-check {
    color: #6CFF8D;
    font-weight: 700;
}


/* ==========================================================
   CTA
========================================================== */

.premium-offer-btn {
    padding: 16px;
    border-radius: 18px;
    border: none;

    font-size: 1rem;
    font-weight: 600;
    color: #fff;

    background: linear-gradient(135deg, #ff68cd, #ff2f92);
    box-shadow: 0 0 28px rgba(255, 47, 146, 0.9);
    cursor: pointer;
}

@keyframes premiumFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes premiumScaleIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cardFloatIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes cardLeftIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform:
                translateX(calc(-50% - 24px))
                translateY(0)
                rotate(-8deg)
                scale(0.95);
    }
}

@keyframes cardRightIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform:
                translateX(calc(-50% + 24px))
                translateY(0)
                rotate(8deg)
                scale(0.95);
    }
}

@keyframes cardCenterIn {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(24px) scale(0.9);
    }
    to {
        opacity: 1;
        transform:
                translateX(-50%)
                translateY(0)
                scale(1);
    }
}
