/* =============================================
   Elite Bayi Progress — Stripe-style CSS
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Root & Reset ── */
.ebp-wrapper {
    --ebp-blue-1:    #0057FF;
    --ebp-blue-2:    #338BFF;
    --ebp-blue-glow: rgba(0, 87, 255, 0.35);
    --ebp-bg:        #0A0F1E;
    --ebp-card-bg:   #111827;
    --ebp-border:    rgba(255,255,255,0.07);
    --ebp-text-1:    #F9FAFB;
    --ebp-text-2:    #6B7280;
    --ebp-track-bg:  rgba(255,255,255,0.06);
    --ebp-radius:    18px;
    --ebp-font:      'Plus Jakarta Sans', system-ui, sans-serif;

    font-family: var(--ebp-font);
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    padding: 4px;
}

/* ── Card ── */
.ebp-card {
    background: var(--ebp-card-bg);
    border: 1px solid var(--ebp-border);
    border-radius: var(--ebp-radius);
    padding: 28px 32px 24px;
    box-shadow:
        0 0 0 1px rgba(0,87,255,0.08),
        0 8px 32px rgba(0,0,0,0.45),
        0 1px 0 rgba(255,255,255,0.04) inset;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.ebp-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0,87,255,0.09) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Header ── */
.ebp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ebp-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ebp-blue-2);
}

.ebp-days {
    font-size: 11px;
    font-weight: 500;
    color: var(--ebp-text-2);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--ebp-border);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Amounts ── */
.ebp-amounts {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 18px;
}

.ebp-current {
    font-size: 36px;
    font-weight: 800;
    color: var(--ebp-text-1);
    letter-spacing: -0.03em;
    line-height: 1;
}

.ebp-target {
    font-size: 16px;
    font-weight: 500;
    color: var(--ebp-text-2);
}

/* ── Track / Progress Bar ── */
.ebp-track {
    position: relative;
    height: 10px;
    background: var(--ebp-track-bg);
    border-radius: 99px;
    overflow: visible;
    margin-bottom: 14px;
}

.ebp-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--ebp-blue-1) 0%, var(--ebp-blue-2) 100%);
    position: relative;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: width;
}

.ebp-fill::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--ebp-blue-2);
    box-shadow: 0 0 0 4px var(--ebp-blue-glow);
    transition: opacity 0.3s ease;
}

/* hide the knob when at 0 */
.ebp-fill[style*="width: 0"]::after {
    opacity: 0;
}

.ebp-glow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    pointer-events: none;
    border-radius: 99px;
    background: var(--ebp-blue-glow);
    filter: blur(8px);
    width: 0%;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Footer ── */
.ebp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ebp-percent {
    font-size: 13px;
    font-weight: 700;
    color: var(--ebp-blue-2);
    font-variant-numeric: tabular-nums;
}

.ebp-remaining {
    font-size: 12px;
    font-weight: 500;
    color: var(--ebp-text-2);
}

.ebp-done-tag {
    font-size: 12px;
    font-weight: 700;
    color: #34D399;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
    padding: 2px 10px;
    border-radius: 20px;
}

/* ══════════════════════════════════
   CONFETTI OVERLAY
   ══════════════════════════════════ */
.ebp-confetti-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    pointer-events: none;
}

#ebp-confetti-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ══════════════════════════════════
   CONGRATULATIONS CARD
   ══════════════════════════════════ */
.ebp-congrats-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 99999;
    background: linear-gradient(145deg, #0F172A 0%, #1E2D4D 100%);
    border: 1px solid rgba(0,87,255,0.4);
    border-radius: 24px;
    padding: 48px 52px;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(0,87,255,0.2),
        0 32px 80px rgba(0,0,0,0.7),
        0 0 80px rgba(0,87,255,0.2);
    animation: ebp-card-pop 0.7s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    font-family: var(--ebp-font, 'Plus Jakarta Sans', sans-serif);
}

@keyframes ebp-card-pop {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.ebp-trophy {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    display: block;
    animation: ebp-bounce 1s 1s ease-in-out infinite alternate;
}

@keyframes ebp-bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-8px); }
}

.ebp-congrats-title {
    font-size: 38px;
    font-weight: 800;
    color: #F9FAFB;
    margin: 0 0 4px;
    letter-spacing: -0.03em;
}

.ebp-congrats-sub {
    font-size: 22px;
    font-weight: 700;
    color: #338BFF;
    margin: 0 0 12px;
    letter-spacing: 0.01em;
}

.ebp-congrats-amount {
    font-size: 14px;
    color: #6B7280;
    margin: 0 0 24px;
}

.ebp-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #FCD34D;
    background: rgba(252, 211, 77, 0.1);
    border: 1px solid rgba(252, 211, 77, 0.35);
    padding: 8px 24px;
    border-radius: 99px;
    animation: ebp-pulse-badge 2s 1.5s ease-in-out infinite;
}

@keyframes ebp-pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(252,211,77,0.3); }
    50%       { box-shadow: 0 0 0 8px rgba(252,211,77,0); }
}
