.act-animation-effect {
    --act-accent: #facc15;
    position: fixed;
    inset: 0;
    z-index: 2200;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: actAnimationFade 1120ms ease-out forwards;
}

.act-animation-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--act-accent) 24%, transparent), transparent 34%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.10), transparent 24%),
        rgba(2, 6, 23, 0.62);
}

.act-animation-burst {
    position: absolute;
    width: min(680px, 86vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--act-accent) 70%, transparent), transparent 18%, transparent 100%),
        radial-gradient(circle, transparent 48%, color-mix(in srgb, var(--act-accent) 52%, transparent) 50%, transparent 62%);
    opacity: 0;
    animation: actAnimationBurst 1120ms cubic-bezier(0.18, 0.86, 0.28, 1) forwards;
}

.act-animation-panel {
    position: relative;
    width: min(760px, 92vw);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 2px solid color-mix(in srgb, var(--act-accent) 72%, #ffffff 18%);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.86)),
        radial-gradient(circle at 22% 18%, color-mix(in srgb, var(--act-accent) 18%, transparent), transparent 42%);
    box-shadow:
        0 26px 62px rgba(0, 0, 0, 0.50),
        0 0 34px color-mix(in srgb, var(--act-accent) 38%, transparent);
    opacity: 0;
    transform: translateY(18px) scale(0.9);
    animation: actAnimationPanel 1120ms cubic-bezier(0.18, 0.88, 0.28, 1) forwards;
}

.act-animation-card-wrap {
    width: 176px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.46));
}

.act-animation-card-wrap .card,
.act-animation-card-wrap .cg-card {
    cursor: default;
}

.act-animation-copy {
    min-width: 0;
    color: #f8fafc;
}

.act-animation-eyebrow {
    color: color-mix(in srgb, var(--act-accent) 82%, #ffffff 18%);
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.act-animation-title {
    margin: 8px 0 14px;
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
    color: #ffffff;
    text-shadow:
        0 0 16px color-mix(in srgb, var(--act-accent) 72%, transparent),
        0 4px 20px rgba(0, 0, 0, 0.76);
}

.act-animation-effect-text {
    margin: 0;
    max-height: 6.4em;
    overflow: hidden;
    color: #e5e7eb;
    font-size: clamp(0.95rem, 2.4vw, 1.12rem);
    font-weight: 700;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.act-animation-slot-list {
    display: grid;
    gap: 8px;
    max-height: 8.6em;
    overflow: hidden;
}

.act-animation-slot {
    position: relative;
    min-width: 0;
    padding: 9px 12px 10px;
    border: 1px solid color-mix(in srgb, var(--act-accent) 58%, rgba(255, 255, 255, 0.34));
    border-left-width: 5px;
    border-radius: 10px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--act-accent) 18%, rgba(15, 23, 42, 0.78)), rgba(15, 23, 42, 0.62)),
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--act-accent) 24%, transparent), transparent 42%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 8px 18px rgba(0, 0, 0, 0.22);
    animation: actAnimationSlotIn 520ms cubic-bezier(0.18, 0.88, 0.28, 1) both;
    animation-delay: calc(110ms + var(--slot-index, 0) * 70ms);
}

.act-animation-slot-inscription {
    border-color: color-mix(in srgb, #38bdf8 68%, rgba(255, 255, 255, 0.3));
    background:
        linear-gradient(135deg, rgba(12, 74, 110, 0.62), rgba(30, 41, 59, 0.62)),
        radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.22), transparent 42%);
}

.act-animation-slot-aura {
    border-color: color-mix(in srgb, #c084fc 70%, rgba(255, 255, 255, 0.28));
    background:
        linear-gradient(135deg, rgba(76, 29, 149, 0.58), rgba(15, 23, 42, 0.64)),
        radial-gradient(circle at 0 0, rgba(192, 132, 252, 0.28), transparent 42%);
}

.act-animation-slot-label {
    margin-bottom: 3px;
    color: color-mix(in srgb, var(--act-accent) 74%, #ffffff 26%);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.act-animation-slot-text {
    color: #f8fafc;
    font-size: clamp(0.88rem, 2.1vw, 1.02rem);
    font-weight: 800;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.act-animation-owner {
    margin-top: 14px;
    color: rgba(248, 250, 252, 0.78);
    font-weight: 800;
}

.act-animation-particle {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--act-accent);
    box-shadow: 0 0 16px var(--act-accent);
    opacity: 0;
    animation: actAnimationParticle 920ms ease-out forwards;
}

.act-animation-player {
    --act-accent: #34d399;
}

.act-animation-opponent {
    --act-accent: #fb7185;
}

.act-animation-failed {
    --act-accent: #94a3b8;
}

.act-animation-inscription-act {
    --act-accent: #a78bfa;
}

.act-animation-inscription-effect {
    --act-accent: #38bdf8;
}

.act-animation-inscription-act .act-animation-backdrop,
.act-animation-inscription-effect .act-animation-backdrop {
    background:
        radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--act-accent) 30%, transparent), transparent 34%),
        radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.12), transparent 26%),
        rgba(7, 10, 28, 0.70);
}

.act-animation-inscription-act .act-animation-panel,
.act-animation-inscription-effect .act-animation-panel {
    border-color: color-mix(in srgb, var(--act-accent) 82%, #ffffff 12%);
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(30, 27, 75, 0.88)),
        radial-gradient(circle at 20% 18%, color-mix(in srgb, var(--act-accent) 24%, transparent), transparent 44%);
}

@keyframes actAnimationFade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    82% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes actAnimationBurst {
    0% { opacity: 0; transform: scale(0.76) rotate(0deg); }
    20% { opacity: 0.7; }
    100% { opacity: 0; transform: scale(1.26) rotate(48deg); }
}

@keyframes actAnimationPanel {
    0% { opacity: 0; transform: translateY(18px) scale(0.9); }
    16% { opacity: 1; transform: translateY(0) scale(1.04); }
    32% { transform: scale(1); }
    82% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: translateY(-10px) scale(0.98); }
}

@keyframes actAnimationParticle {
    0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
    18% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--particle-x), var(--particle-y)) scale(1.2); }
}

@keyframes actAnimationSlotIn {
    0% { opacity: 0; transform: translateX(18px) scale(0.96); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 640px) {
    .act-animation-panel {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: center;
    }

    .act-animation-card-wrap {
        width: 138px;
        min-height: 196px;
        margin: 0 auto;
    }

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

    .act-animation-slot-list {
        max-height: 10em;
    }

}

@media (prefers-reduced-motion: reduce) {
    .act-animation-effect,
    .act-animation-burst,
    .act-animation-panel,
    .act-animation-particle {
        animation-duration: 1ms;
    }
}
