/* ══════════════════════════════════════════════
   streak-celebration.css
   Full‑screen, character‑centric streak celebration.
   ══════════════════════════════════════════════ */

/* ── Overlay ── */
.sc-overlay {
    position: fixed;
    inset: 0;
    z-index: 260; /* above area (253), main quest (254), daily (260?) Actually we want above area */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 18, 0.92);
    backdrop-filter: blur(8px);
    padding: var(--space-4);
    animation: scOverlayIn 0.5s ease-out both;
    pointer-events: none;
}

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

.sc-overlay.sc-exit {
    animation: scOverlayOut 0.4s ease-in forwards;
}

@keyframes scOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scOverlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ── Content container ── */
.sc-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;
}

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

/* ── Background glow ── */
.sc-glow {
    position: absolute;
    width: 80%;
    max-width: 400px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 120, 0, 0.3) 0%, rgba(255, 60, 0, 0.1) 40%, transparent 70%);
    filter: blur(40px);
    animation: scGlowPulse 2s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes scGlowPulse {
    0%   { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.1); }
}

/* ── Fire layers ── */
.sc-fire-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.sc-flame {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 80%;
    background: radial-gradient(ellipse at bottom, rgba(255, 150, 0, 0.5) 0%, transparent 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    filter: blur(10px);
    animation: scFlameRise 1.8s ease-in-out infinite alternate;
    opacity: 0;
}

.sc-flame:nth-child(1) {
    width: 140%;
    height: 90%;
    background: radial-gradient(ellipse at bottom, rgba(255, 80, 0, 0.4) 0%, transparent 70%);
    animation-duration: 2.2s;
    animation-delay: 0.1s;
    filter: blur(15px);
    bottom: 10%;
}

.sc-flame:nth-child(2) {
    width: 100%;
    height: 70%;
    background: radial-gradient(ellipse at bottom, rgba(255, 200, 50, 0.6) 0%, transparent 60%);
    animation-duration: 1.5s;
    animation-delay: 0.3s;
    filter: blur(6px);
    bottom: 30%;
}

.sc-flame:nth-child(3) {
    width: 80%;
    height: 50%;
    background: radial-gradient(ellipse at bottom, rgba(255, 255, 200, 0.7) 0%, transparent 50%);
    animation-duration: 1.2s;
    animation-delay: 0.5s;
    filter: blur(3px);
    bottom: 40%;
}

@keyframes scFlameRise {
    0%   { opacity: 0.3; transform: translateX(-50%) scaleY(0.8) scaleX(0.9); }
    100% { opacity: 0.9; transform: translateX(-50%) scaleY(1.2) scaleX(1.1); }
}

/* ── Sparks / embers ── */
.sc-sparks {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.sc-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffaa33;
    box-shadow: 0 0 6px #ff8800;
    opacity: 0;
    animation: scSparkFloat 1.8s ease-out var(--sc-spark-delay) infinite;
}

@keyframes scSparkFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0.5); }
    20%  { opacity: 1; transform: translateY(-10px) scale(1); }
    100% { opacity: 0; transform: translateY(-120px) scale(0.3); }
}

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

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

@keyframes scCharEnter {
    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); }
}

/* ── Streak number ── */
.sc-streak-number {
    position: relative;
    z-index: 4;
    font-family: 'Oswald', var(--font), sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 150, 0, 0.8), 0 0 40px rgba(255, 80, 0, 0.5);
    letter-spacing: 0.04em;
    animation: scNumPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s both;
    line-height: 1;
}

.sc-streak-number .sc-number {
    font-size: 1.2em;
    background: linear-gradient(180deg, #ffe68f, #ff8800);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

.sc-streak-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: -0.2rem;
    animation: scTextFade 0.5s ease-out 0.8s both;
}

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

.sc-message {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-2);
    animation: scTextFade 0.5s ease-out 1.0s both;
    max-width: 280px;
}

/* ── Continue button ── */
.sc-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: scTextFade 0.5s ease-out 1.2s both;
    pointer-events: auto;
}

.sc-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);
}
.sc-continue-btn:active {
    transform: scale(0.97);
}
.sc-continue-btn:focus-visible {
    outline: 3px solid rgba(226, 176, 74, 0.6);
    outline-offset: 3px;
}

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

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

    .sc-flame {
        animation: none;
        opacity: 0.5;
        transform: translateX(-50%) scaleY(1) scaleX(1);
        filter: blur(6px);
    }

    .sc-spark {
        display: none;
    }

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

    .sc-streak-number {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .sc-streak-label,
    .sc-message,
    .sc-continue-btn {
        animation: none;
        opacity: 1;
        transform: none;
    }
}