/* ══════════════════════════════════════════════
   level-up-celebration.css
   Full‑screen Level Up celebration – power‑up feel.
   ══════════════════════════════════════════════ */

/* ── Overlay ── */
.lu-overlay {
    position: fixed;
    inset: 0;
    z-index: 265; /* above streak (260) but below evolution (future) */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 18, 0.92);
    backdrop-filter: blur(10px);
    padding: var(--space-4);
    animation: luOverlayIn 0.5s ease-out both;
    pointer-events: none;
}

.lu-overlay.lu-active {
    pointer-events: auto;
}

.lu-overlay.lu-exit {
    animation: luOverlayOut 0.4s ease-in forwards;
}

@keyframes luOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes luOverlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ── Content container ── */
.lu-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-4);
    pointer-events: none;
}

.lu-content * {
    pointer-events: none;
}
.lu-continue-btn {
    pointer-events: auto;
}

/* ── Background glow (blue/cyan power aura) ── */
.lu-glow {
    position: absolute;
    width: 80%;
    max-width: 400px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.3) 0%, rgba(0, 100, 255, 0.1) 40%, transparent 70%);
    filter: blur(50px);
    animation: luGlowPulse 2.5s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes luGlowPulse {
    0%   { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.15); }
}

/* ── Energy particles ── */
.lu-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.lu-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #66ccff;
    box-shadow: 0 0 10px #00aaff;
    opacity: 0;
    animation: luParticleRise 2s ease-out var(--lu-particle-delay) infinite;
}

@keyframes luParticleRise {
    0%   { opacity: 0; transform: translateY(0) scale(0.5); }
    20%  { opacity: 1; transform: translateY(-15px) scale(1); }
    100% { opacity: 0; transform: translateY(-150px) scale(0.3); }
}

/* ── Character ── */
.lu-character-wrap {
    position: relative;
    z-index: 3;
    width: 200px;
    height: 200px;
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lu-character-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 0 40px rgba(0, 150, 255, 0.6)) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    animation: luCharEnter 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes luCharEnter {
    0%   { opacity: 0; transform: scale(0.5) translateY(30px); }
    70%  { opacity: 1; transform: scale(1.1) translateY(-6px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Power pulse (character glow flash) ── */
.lu-power-pulse {
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.4) 0%, transparent 70%);
    filter: blur(20px);
    animation: luPulseBurst 0.8s ease-out 0.6s both;
    z-index: 2;
    pointer-events: none;
}

@keyframes luPulseBurst {
    0%   { opacity: 0; transform: scale(0.8); }
    40%  { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.5); }
}

/* ── "LEVEL UP!" headline ── */
.lu-headline {
    position: relative;
    z-index: 4;
    font-family: 'Oswald', var(--font), sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff5d6 0%, #f0c860 40%, #e2b04a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(226, 176, 74, 0.3);
    animation: luHeadlinePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.7s both;
    line-height: 1.1;
}

@keyframes luHeadlinePop {
    0%   { opacity: 0; transform: scale(0.3) rotate(-3deg); }
    70%  { opacity: 1; transform: scale(1.1) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ── Level number ── */
.lu-level-number {
    position: relative;
    z-index: 4;
    font-family: 'Oswald', var(--font), sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 180, 255, 0.8), 0 0 40px rgba(0, 100, 255, 0.5);
    letter-spacing: 0.04em;
    margin-top: -0.2rem;
    animation: luLevelPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.9s both;
}

@keyframes luLevelPop {
    0%   { opacity: 0; transform: scale(0.3); }
    70%  { opacity: 1; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}

/* ── Subtitle (reward info) ── */
.lu-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-2);
    animation: luFadeIn 0.5s ease-out 1.1s both;
}

@keyframes luFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Continue button ── */
.lu-continue-btn {
    position: relative;
    z-index: 5;
    margin-top: var(--space-5);
    padding: var(--space-3) var(--space-8);
    border-radius: var(--radius-sm);
    border: 2px solid var(--gold);
    background: var(--gold);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 700;
    font-size: var(--text-xl);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    animation: luFadeIn 0.5s ease-out 1.3s both;
    pointer-events: auto;
}

.lu-continue-btn:hover {
    background: var(--gold-glow);
    border-color: var(--gold-glow);
    box-shadow: 0 0 30px rgba(226, 176, 74, 0.4);
    transform: translateY(-1px);
}
.lu-continue-btn:active {
    transform: scale(0.97);
}
.lu-continue-btn:focus-visible {
    outline: 3px solid rgba(226, 176, 74, 0.6);
    outline-offset: 3px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .lu-overlay,
    .lu-overlay.lu-exit {
        animation: none;
        opacity: 1;
    }
    .lu-overlay.lu-exit { opacity: 0; }

    .lu-glow {
        animation: none;
        opacity: 0.7;
        transform: none;
    }

    .lu-particle {
        display: none;
    }

    .lu-character-img {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .lu-power-pulse {
        animation: none;
        opacity: 0.3;
    }

    .lu-headline,
    .lu-level-number {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .lu-subtitle,
    .lu-continue-btn {
        animation: none;
        opacity: 1;
        transform: none;
    }
}