/* ============================================================
   Challenge Circle — animations.css
   All @keyframes and animation utility classes
   ============================================================ */

/* ── Float (hero mockup) ─────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-18px); }
}
.float { animation: float 6s ease-in-out infinite; }

/* ── Fade In Up (hero text stagger) ─────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.10s; opacity: 0; }
.delay-2 { animation-delay: 0.25s; opacity: 0; }
.delay-3 { animation-delay: 0.40s; opacity: 0; }
.delay-4 { animation-delay: 0.55s; opacity: 0; }

/* ── Ping (live indicator dot) ────────────────────────────── */
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}
.ping {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ping::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.75;
    animation: ping 1.2s cubic-bezier(0,0,0.2,1) infinite;
}

/* ── Pulse ────────────────────────────────────────────────── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
.pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* ── Pulse Gold (affiliate teaser card) ──────────────────── */
@keyframes pulseGold {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}
.pulse-gold { animation: pulseGold 2s ease-in-out infinite; }

/* ── Rank Badge Shine ─────────────────────────────────────── */
@keyframes rankShine {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}
.rank-badge {
    background-size: 200% auto;
    animation: rankShine 3s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}
.rank-recruit { background-image: linear-gradient(90deg, #6b7280, #9ca3af, #6b7280); }
.rank-scout   { background-image: linear-gradient(90deg, #059669, #34d399, #059669); }
.rank-captain { background-image: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb); }
.rank-elite   { background-image: linear-gradient(90deg, #7c3aed, #a78bfa, #7c3aed); }
.rank-legend  { background-image: linear-gradient(90deg, #b45309, #fbbf24, #b45309); }

/* ── Coin Pop (payout approved etc.) ─────────────────────── */
@keyframes coinPop {
    0%   { transform: scale(0) translateY(0);   opacity: 1; }
    50%  { transform: scale(1.3) translateY(-30px); opacity: 1; }
    100% { transform: scale(1) translateY(-60px); opacity: 0; }
}
.coin-pop {
    animation: coinPop 0.8s ease forwards;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 28px;
    user-select: none;
}

/* ── Badge Pop (new badge earned) ───────────────────────────── */
@keyframes badgePop {
    0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
    100% { transform: scale(1) rotate(0);       opacity: 1; }
}
.badge-pop { animation: badgePop 0.5s ease forwards; }

/* ── Leaderboard #1 Gold Glow ───────────────────────────────── */
@keyframes leaderGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(251,191,36,0.2); }
    50%       { box-shadow: 0 0 45px rgba(251,191,36,0.55); }
}
.leader-glow { animation: leaderGlow 2.5s ease-in-out infinite; }

/* ── Testimonial scroll ────────────────────────────────────── */
@keyframes scrollLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.testimonial-track {
    display: flex;
    gap: 2rem;
    animation: scrollLeft 35s linear infinite;
    width: max-content;
}
.testimonial-track:hover { animation-play-state: paused; }

/* ── XP bar fill (on page load) ─────────────────────────────── */
@keyframes xpFill {
    from { width: 0; }
}
.xp-bar-fill { animation: xpFill 1.5s ease forwards; }

/* ── Typing indicator (chat) ────────────────────────────────── */
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40%            { transform: scale(1.2); opacity: 1; }
}
.typing-dot {
    display: inline-block;
    width: 6px; height: 6px;
    background: #a78bfa;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* ── Card hover lift ─────────────────────────────────────────── */
.card-hover {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    border-color: rgba(139,92,246,0.45) !important;
    box-shadow: 0 20px 60px rgba(139,92,246,0.12);
}

/* ── Spinner ─────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid rgba(139,92,246,0.3);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
