/* ═══════════════════════════════════════════════════════════════════
 *  Social Tasks — claim-success celebration
 *  ──────────────────────────────────────────────────────────────────
 *  The gold bubble that pops when a player claims a social task.
 *  Intentionally borrows the visual language of the casino's own
 *  big-win animation (Obsidian Vault gold + serif headline) so the
 *  player feels the same "something just happened" moment whether
 *  the XP came from a slot spin or a social task.
 *
 *  Layout:  fixed overlay, centred card, subtle gold glow behind it,
 *           14 sparks that radiate outward. Non-blocking: clicking
 *           anywhere closes it, and it auto-dismisses after 3.5 s.
 * ═══════════════════════════════════════════════════════════════════ */

.fym-social-celebrate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 220ms ease-out;
}
.fym-social-celebrate.is-open {
    opacity: 1;
    pointer-events: auto;
}
.fym-social-celebrate::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(60% 50% at 50% 50%,
            rgba(233, 195, 73, 0.18) 0%,
            rgba(10, 9, 6, 0.65) 60%,
            rgba(10, 9, 6, 0.82) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.fym-social-celebrate__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(233, 195, 73, 0.25);
    color: #bfb79c;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: all 140ms ease;
    z-index: 3;
}
.fym-social-celebrate__close:hover {
    color: #e9c349;
    border-color: #e9c349;
    background: rgba(233, 195, 73, 0.08);
}

.fym-social-celebrate__card {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, #16140b 0%, #0a0906 100%);
    border: 1px solid rgba(233, 195, 73, 0.5);
    padding: 2rem 2.5rem;
    text-align: center;
    min-width: 300px;
    max-width: 90vw;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(233, 195, 73, 0.12) inset,
        0 0 60px rgba(233, 195, 73, 0.28);
    transform: scale(0.85);
    opacity: 0;
    transition: transform 420ms cubic-bezier(0.22, 0.8, 0.26, 1.4),
                opacity   280ms ease-out;
}
.fym-social-celebrate.is-open .fym-social-celebrate__card {
    transform: scale(1);
    opacity: 1;
}

.fym-social-celebrate__icon {
    font-size: 52px;
    line-height: 1;
    filter: drop-shadow(0 4px 18px rgba(233, 195, 73, 0.55));
    margin-bottom: 0.75rem;
    animation: fym-social-bounce 0.6s cubic-bezier(0.22, 0.8, 0.26, 1.4) both;
}
@keyframes fym-social-bounce {
    0%   { transform: translateY(-10px) scale(0.6); opacity: 0; }
    60%  { transform: translateY(4px)   scale(1.12); opacity: 1; }
    100% { transform: translateY(0)     scale(1); }
}

.fym-social-celebrate__title {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #bfb79c;
    margin-bottom: 0.35rem;
}

.fym-social-celebrate__name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #e9c349;
    margin-bottom: 1rem;
    max-width: 320px;
    word-break: break-word;
}

.fym-social-celebrate__xp {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    color: #f0dd92;
    line-height: 1;
}
.fym-social-celebrate__num {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 6px 28px rgba(233, 195, 73, 0.4);
}
.fym-social-celebrate__unit {
    font-size: 14px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #bfb79c;
    align-self: flex-end;
    padding-bottom: 8px;
}

/* ── Sparks (radial burst behind the card) ────────────────────── */
.fym-social-celebrate__sparks {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}
.fym-social-celebrate__spark {
    --i: 0;
    position: absolute;
    width: 3px;
    height: 3px;
    left: -1.5px;
    top: -1.5px;
    background: #f0dd92;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(240, 221, 146, 0.8);
    opacity: 0;
    transform: translate(0, 0) scale(0);
    animation: fym-social-spark 1.2s cubic-bezier(0.22, 0.8, 0.26, 1) forwards;
    animation-delay: calc(var(--i) * 30ms);
}
@keyframes fym-social-spark {
    0%   { opacity: 0; transform: translate(0, 0) scale(0); }
    15%  { opacity: 1; }
    100% {
        opacity: 0;
        transform:
            rotate(calc(var(--i) * 25.7deg))
            translateX(160px)
            rotate(calc(var(--i) * -25.7deg))
            scale(0.4);
    }
}

/* Respect reduced-motion users — drop the sparks + bounce, keep the
   bubble but without the bravado. */
@media (prefers-reduced-motion: reduce) {
    .fym-social-celebrate__icon { animation: none; }
    .fym-social-celebrate__sparks { display: none; }
    .fym-social-celebrate.is-open .fym-social-celebrate__card {
        transition-duration: 120ms;
    }
}
