/* Page-specific: Pricing plans, referral box, coupon modal */
.join-main {
    position: relative;
    z-index: 1;
    padding-top: 100px;
    min-height: 100vh;
    animation: fadeSlideIn 0.45s ease;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
/* =========================================
   ENSURE CONTENT STAYS ABOVE THE CANVAS
   ========================================= */
/* We explicitly target all your main wrappers to ensure they sit at z-index: 2 */
/* Specifically force `.join-main` and `.page` to override their local z-index: 1 */
.join-main, 
.page {
    position: relative;
    z-index: 2 !important; 
}
/* Plan Cards */
.plan-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.plan-card:hover {
    transform: translateY(-8px);
    border-color: var(--purple);
    box-shadow: var(--shadow-lg);
}
.plan-card.popular {
    border: 2px solid var(--purple);
    position: relative;
    background: rgba(255, 255, 255, 0.85);
}
.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: white;
    padding: 5px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.plan-header {
    padding: 1.8rem 1.5rem 0.8rem;
    text-align: center;
}
.plan-price {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--purple);
    padding: 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    background: rgba(139, 92, 246, 0.03);
}
.plan-price .currency { font-size: 1.8rem; vertical-align: top; }
.plan-price .period { font-size: 0.9rem; color: #6b6b80; display: block; }
.plan-features {
    list-style: none;
    padding: 1.5rem;
    flex-grow: 1;
}
.plan-features li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    font-size: 0.9rem;
    color: #2d2d3f;
}
.plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--purple);
    font-weight: 700;
}

.referral-box{
    background:#ffffff9a;
    border-radius:20px;
    padding:35px;
    box-shadow:0 10px 25px rgba(0,0,0,.06);
}

.reward-row{
    display:flex;
    gap:20px;
    margin-bottom:15px;
}

.reward-card{
    flex:1;
    display:flex;
    align-items:center;
    gap:18px;
    padding:18px;
    background:#f7f4ff;
    border:1px solid rgba(139,92,246,.18);
    border-radius:16px;
    transition:.3s;
}

.reward-card:hover{
    transform:translateY(-4px);
    background:#f2ecff;
}

.reward-icon{
    width:55px;
    height:55px;
    border-radius:50%;
    background:#7c3aed;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    flex-shrink:0;
}

.reward-content h5{
    margin-bottom:5px;
}

.reward-content p{
    margin:0;
    color:#666;
    font-size:.95rem;
}

.claim-box{
    background:#fafafa63;
    border-radius:16px;
    padding:20px;
}

.claim-steps{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.step{
    flex:1 1 calc(50% - 12px);
    display:flex;
    align-items:flex-start;
    gap:10px;
    background:#fff;
    border-radius:10px;
    padding:12px 15px;
    border:1px solid #ececec;
    font-size:.94rem;
}

.step span{
    width:28px;
    height:28px;
    border-radius:50%;
    background:#7c3aed;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:600;
    flex-shrink:0;
}

/* Tablet */
@media(max-width:768px){

    .reward-row{
        flex-direction:column;
    }

    .step{
        flex:1 1 100%;
    }

    .referral-box{
        padding:25px;
    }

}

/* Mobile */
@media(max-width:576px){

    .reward-card{
        flex-direction:column;
        text-align:center;
    }

    .reward-icon{
        margin-bottom:5px;
    }

    .claim-box{
        padding:15px;
    }

    .step{
        font-size:.9rem;
    }

}

.info-box {
    background: linear-gradient(135deg, var(--purple), var(--blue));
    width: 180px;
    padding: 18px 0;
    border-radius: 60px;
    text-align: center;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.info-box:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Modal for coupon */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-content-custom {
    background: #fff;
    border-radius: 28px;
    padding: 28px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b6b80;
}
.modal-close:hover { color: #2d2d3f; }
.modal-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 18px;
    margin: 10px 0;
}

.coupon-section {
    text-align: center;
    margin: 40px 0;
}
.redeem-btn {
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: 0.3s;
    cursor: pointer;
}
.redeem-btn:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

@media (max-width: 992px) {
    .section-title { font-size: 1.8rem; }
}
@media (max-width: 576px) {
    .plan-price { font-size: 2rem; }
    .info-box { width: 150px; font-size: 0.9rem; }
}
.modal-img{
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}