/* --- DIVINE ASCENSION UI --- */

#spatula-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* STRICT PALETTE: Deep Dark Background to focus on Gold */
    background: radial-gradient(circle at center, #2a1a00 0%, #000000 90%);
    z-index: 2200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- VISUALS: GOD RAYS & FLASH --- */

#spatula-god-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vmax;
    height: 200vmax;
    /* Gold and Transparent only */
    background: repeating-conic-gradient(from 0deg,
            rgba(255, 215, 0, 0.1) 0deg 5deg,
            transparent 5deg 15deg);
    transform: translate(-50%, -50%);
    animation: rotateRays 120s linear infinite;
    /* Slow majestic rotation */
    z-index: 0;
    pointer-events: none;
}

@keyframes rotateRays {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#spatula-flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    z-index: 2300;
    pointer-events: none;
}

.white-flash {
    animation: flashAnim 1.5s ease-out forwards;
}

@keyframes flashAnim {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* --- PHASE A: ASCENSION --- */

#spatula-visual {
    position: relative;
    width: 100px;
    height: 160px;
    z-index: 10;
    filter: drop-shadow(0 0 30px #FF8C00);
    animation: beatHeart 3s infinite ease-in-out;
}

/* CSS Spatula Construction */
.spatula-handle {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100px;
    background: linear-gradient(to right, #B8860B, #FFD700, #B8860B);
    border: 2px solid #8B4500;
    border-radius: 0 0 5px 5px;
}

.spatula-blade {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 70px;
    background: linear-gradient(135deg, #FFD700 0%, #FFFACD 50%, #FFD700 100%);
    border: 3px solid #FFD700;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(255, 140, 0, 0.5);
}

.spatula-slit {
    position: absolute;
    top: 15%;
    width: 8px;
    height: 70%;
    background: rgba(139, 69, 19, 0.4);
    border-radius: 2px;
}

.slit-left {
    left: 20%;
}

.slit-right {
    right: 20%;
}

.slit-center {
    left: 50%;
    transform: translateX(-50%);
}

@keyframes beatHeart {

    0%,
    100% {
        transform: scale(3) rotate(-10deg);
        filter: drop-shadow(0 0 30px #FF8C00);
    }

    50% {
        transform: scale(3.5) rotate(-10deg);
        filter: drop-shadow(0 0 60px #FFD700);
    }
}

#spatula-title {
    font-family: 'Arial Black', sans-serif;
    font-size: 6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Will animate to wide */
    background: linear-gradient(to bottom, #fff 20%, #FFD700 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(255, 140, 0, 0.5);
    margin-bottom: 50px;
    z-index: 10;
    text-align: center;
    position: absolute;
    top: 10%;
    width: 100%;
    opacity: 0;
}

.text-reveal {
    animation: zoomOutText 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes zoomOutText {
    0% {
        transform: scale(1.5);
        letter-spacing: 20px;
        opacity: 0;
    }

    100% {
        transform: scale(1.0);
        letter-spacing: 4px;
        opacity: 1;
    }
}

/* --- PHASE B: BESTOWAL --- */

#spatula-container {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: center;
}

#spatula-card-row {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    z-index: 20;
    position: relative;
    /* Context for dust */
    margin-top: 100px;
    /* Space for title */
}

/* Shake Animation for Layout */
.impact-shake {
    animation: shakeY 0.2s ease-in-out;
}

@keyframes shakeY {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(20px);
    }

    75% {
        transform: translateY(-10px);
    }
}

.divine-card {
    width: 220px;
    height: 320px;
    background: linear-gradient(135deg, #fffbf0 0%, #FFD700 100%);
    border: 4px solid #fff;
    border-radius: 12px;
    box-shadow: 0 0 40px #FF8C00;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    color: #553300;
    position: relative;

    /* Initial State: Off Screen Top */
    transform: translateY(-150vh);
    opacity: 1;
    /* Visible but off screen */
}

.drop-from-sky {
    animation: dropIn 0.4s cubic-bezier(0.5, 0, 0.5, 1) forwards;
}

@keyframes dropIn {
    0% {
        transform: translateY(-150vh) scale(0.5);
    }

    70% {
        transform: translateY(20px) scale(1.0);
    }

    /* Overshoot */
    100% {
        transform: translateY(0) scale(1.0);
    }
}

.divine-card::after {
    content: "";
    /* Legendary Border Glow */
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid white;
    border-radius: 12px;
    box-shadow: inset 0 0 20px #FFD700;
    pointer-events: none;
}

/* DUST PARTICLES */
.dust-ring {
    position: absolute;
    width: 200px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 300px;
    /* Bottom of card */
    left: 10px;
    animation: expandDust 0.5s ease-out forwards;
    pointer-events: none;
    box-shadow: 0 0 20px gold;
}

@keyframes expandDust {
    0% {
        transform: scale(0.5);
        opacity: 1;
        border-width: 10px;
    }

    100% {
        transform: scale(2.0);
        opacity: 0;
        border-width: 0px;
    }
}

/* --- PHASE C: GLORY --- */

#spatula-claim-btn {
    margin-top: 80px;
    padding: 20px 80px;
    font-size: 2rem;
    font-weight: 900;
    color: #aa5500;
    background: white;
    border: 4px solid #FFD700;
    border-radius: 60px;
    box-shadow: 0 0 50px #FFD700, 0 0 100px #FF8C00;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0;
    /* Hidden initially */
    transform: scale(0.5);
    transition: transform 0.1s;
}

.pulse-violent {
    animation: heartrate 0.8s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes heartrate {
    0% {
        transform: scale(1.0);
        box-shadow: 0 0 50px #FFD700;
    }

    15% {
        transform: scale(1.15);
        box-shadow: 0 0 80px #FFD700, 0 0 120px orange;
    }

    30% {
        transform: scale(1.0);
        box-shadow: 0 0 50px #FFD700;
    }

    100% {
        transform: scale(1.0);
        box-shadow: 0 0 50px #FFD700;
    }
}

#spatula-claim-btn:active {
    filter: brightness(0.9);
    transform: scale(0.95) !important;
}

/* Card Content Typography */
.divine-card .icon {
    font-size: 5rem;
    margin: 15px 0;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.divine-card .title {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.divine-card .type {
    font-size: 0.8rem;
    color: #aa7700;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.divine-card .desc {
    font-size: 0.85rem;
    color: #442200;
    font-weight: 500;
}