.fusion-animation-effect {
    --fusion-accent: #fb923c;
    --fusion-core: #fef3c7;
    position: fixed;
    inset: 0;
    z-index: 2300;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: fusionAnimationFade 1400ms ease-out forwards;
}

.fusion-animation-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 48%, rgba(254, 243, 199, 0.18), transparent 22%),
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--fusion-accent) 34%, transparent), transparent 46%),
        rgba(2, 6, 23, 0.72);
}

.fusion-animation-vortex {
    position: absolute;
    width: min(720px, 88vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg, transparent 0 9%, rgba(251, 146, 60, 0.86) 12%, transparent 22%, transparent 42%, rgba(254, 243, 199, 0.76) 48%, transparent 58%, transparent 100%),
        radial-gradient(circle, transparent 34%, rgba(251, 146, 60, 0.34) 40%, transparent 56%);
    filter: blur(1px) drop-shadow(0 0 26px rgba(251, 146, 60, 0.55));
    opacity: 0;
    animation: fusionVortex 1400ms cubic-bezier(0.18, 0.86, 0.26, 1) forwards;
}

.fusion-animation-stage {
    position: relative;
    width: min(900px, 94vw);
    height: min(520px, 82vh);
    display: grid;
    place-items: center;
}

.fusion-animation-card-wrap {
    position: absolute;
    width: 156px;
    min-height: 221px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.52));
}

.fusion-animation-card-wrap .card,
.fusion-animation-card-wrap .cg-card {
    cursor: default;
    pointer-events: none;
}

.fusion-animation-material.left {
    transform: translateX(-250px) rotate(-6deg) scale(0.92);
    animation: fusionMaterialLeft 1400ms cubic-bezier(0.2, 0.82, 0.28, 1) forwards;
}

.fusion-animation-material.right {
    transform: translateX(250px) rotate(6deg) scale(0.92);
    animation: fusionMaterialRight 1400ms cubic-bezier(0.2, 0.82, 0.28, 1) forwards;
}

.fusion-animation-result {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
    animation: fusionResultCard 1400ms cubic-bezier(0.18, 0.9, 0.26, 1) forwards;
}

.fusion-animation-copy {
    position: absolute;
    bottom: 16px;
    left: 50%;
    width: min(660px, 88vw);
    transform: translateX(-50%);
    text-align: center;
    color: #fff7ed;
    opacity: 0;
    animation: fusionCopy 1400ms ease-out forwards;
}

.fusion-animation-eyebrow {
    color: #fed7aa;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(251, 146, 60, 0.70);
}

.fusion-animation-title {
    margin: 7px 0 6px;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-shadow:
        0 0 18px rgba(251, 146, 60, 0.92),
        0 5px 22px rgba(0, 0, 0, 0.74);
}

.fusion-animation-subtitle {
    margin: 0;
    color: rgba(255, 247, 237, 0.86);
    font-size: clamp(0.9rem, 2vw, 1.08rem);
    font-weight: 800;
}

.fusion-animation-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--fusion-core);
    box-shadow:
        0 0 10px var(--fusion-core),
        0 0 22px var(--fusion-accent);
    opacity: 0;
    animation: fusionParticle 1040ms ease-out forwards;
}

.fusion-animation-opponent {
    --fusion-accent: #fb7185;
    --fusion-core: #ffe4e6;
}

@keyframes fusionAnimationFade {
    0% { opacity: 0; }
    8% { opacity: 1; }
    86% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes fusionVortex {
    0% { opacity: 0; transform: scale(0.62) rotate(0deg); }
    18% { opacity: 0.42; }
    46% { opacity: 0.95; transform: scale(0.86) rotate(112deg); }
    70% { opacity: 0.78; transform: scale(1.04) rotate(226deg); }
    100% { opacity: 0; transform: scale(1.28) rotate(340deg); }
}

@keyframes fusionMaterialLeft {
    0% { opacity: 0; transform: translateX(-310px) rotate(-10deg) scale(0.78); }
    14% { opacity: 1; transform: translateX(-250px) rotate(-6deg) scale(0.92); }
    42% { opacity: 1; transform: translateX(-168px) rotate(-3deg) scale(1); }
    58% { opacity: 1; transform: translateX(-22px) rotate(5deg) scale(0.48); filter: brightness(1.8) blur(0); }
    70% { opacity: 0; transform: translateX(0) rotate(24deg) scale(0.08); filter: brightness(2.8) blur(8px); }
    100% { opacity: 0; transform: translateX(0) rotate(24deg) scale(0.08); }
}

@keyframes fusionMaterialRight {
    0% { opacity: 0; transform: translateX(310px) rotate(10deg) scale(0.78); }
    14% { opacity: 1; transform: translateX(250px) rotate(6deg) scale(0.92); }
    42% { opacity: 1; transform: translateX(168px) rotate(3deg) scale(1); }
    58% { opacity: 1; transform: translateX(22px) rotate(-5deg) scale(0.48); filter: brightness(1.8) blur(0); }
    70% { opacity: 0; transform: translateX(0) rotate(-24deg) scale(0.08); filter: brightness(2.8) blur(8px); }
    100% { opacity: 0; transform: translateX(0) rotate(-24deg) scale(0.08); }
}

@keyframes fusionResultCard {
    0%, 62% { opacity: 0; transform: scale(0.16) rotate(0deg); filter: brightness(2.4) blur(10px); }
    72% { opacity: 1; transform: scale(1.16) rotate(0deg); filter: brightness(1.45) blur(0); }
    82% { opacity: 1; transform: scale(1) rotate(0deg); filter: brightness(1.08); }
    90% { opacity: 1; transform: scale(1) rotate(0deg); }
    100% { opacity: 0; transform: scale(0.98) translateY(-10px); }
}

@keyframes fusionCopy {
    0%, 52% { opacity: 0; transform: translateX(-50%) translateY(12px); }
    68% { opacity: 1; transform: translateX(-50%) translateY(0); }
    88% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

@keyframes fusionParticle {
    0% { opacity: 0; transform: translate(var(--particle-x), var(--particle-y)) scale(0.5); }
    16% { opacity: 1; }
    64% { opacity: 1; transform: translate(0, 0) scale(1.2); }
    100% { opacity: 0; transform: translate(0, 0) scale(0.2); }
}

@media (max-width: 640px) {
    .fusion-animation-stage {
        height: min(460px, 78vh);
    }

    .fusion-animation-card-wrap {
        width: 126px;
        min-height: 178px;
    }

    .fusion-animation-card-wrap .cg-card {
        transform: scale(0.8);
        transform-origin: center;
    }

    .fusion-animation-material.left {
        animation-name: fusionMaterialLeftMobile;
    }

    .fusion-animation-material.right {
        animation-name: fusionMaterialRightMobile;
    }
}

@keyframes fusionMaterialLeftMobile {
    0% { opacity: 0; transform: translateX(-168px) rotate(-9deg) scale(0.78); }
    14% { opacity: 1; transform: translateX(-130px) rotate(-6deg) scale(0.9); }
    42% { opacity: 1; transform: translateX(-84px) rotate(-3deg) scale(0.96); }
    58% { opacity: 1; transform: translateX(-16px) rotate(5deg) scale(0.46); filter: brightness(1.8) blur(0); }
    70%, 100% { opacity: 0; transform: translateX(0) rotate(24deg) scale(0.08); filter: brightness(2.8) blur(8px); }
}

@keyframes fusionMaterialRightMobile {
    0% { opacity: 0; transform: translateX(168px) rotate(9deg) scale(0.78); }
    14% { opacity: 1; transform: translateX(130px) rotate(6deg) scale(0.9); }
    42% { opacity: 1; transform: translateX(84px) rotate(3deg) scale(0.96); }
    58% { opacity: 1; transform: translateX(16px) rotate(-5deg) scale(0.46); filter: brightness(1.8) blur(0); }
    70%, 100% { opacity: 0; transform: translateX(0) rotate(-24deg) scale(0.08); filter: brightness(2.8) blur(8px); }
}

@media (prefers-reduced-motion: reduce) {
    .fusion-animation-effect,
    .fusion-animation-vortex,
    .fusion-animation-card-wrap,
    .fusion-animation-copy,
    .fusion-animation-particle {
        animation-duration: 1ms;
    }
}
