/* css/synergy.css
   Effect Fusion flourish (the trigger moment) + the Codex "Fusions" collection.
   Fusion color is passed in via --synergy-color. */

/* ── Trigger flourish ── */
.synergy-flourish {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) skewX(-8deg) scale(0.4);
    z-index: 9200;
    pointer-events: none;
    text-align: center;
    opacity: 0;
    --synergy-color: #ffd54f;
    animation: synergy-card-in 2.5s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
.synergy-flourish.synergy-repeat {
    animation-duration: 1.4s;
}

@keyframes synergy-card-in {
    0%   { opacity: 0; transform: translate(-50%, -50%) skewX(-8deg) scale(0.4); }
    12%  { opacity: 1; transform: translate(-50%, -50%) skewX(-8deg) scale(1.12); }
    22%  { transform: translate(-50%, -50%) skewX(-8deg) scale(1); }
    80%  { opacity: 1; transform: translate(-50%, -50%) skewX(-8deg) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) skewX(-8deg) scale(1.05); }
}

.synergy-discovered-label {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: clamp(0.7rem, 2vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 0 12px var(--synergy-color);
}

.synergy-collide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}
.synergy-half {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: clamp(0.75rem, 2.4vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0;
    animation: synergy-half-collide 0.5s ease-out 0.15s forwards;
}
.synergy-half:last-child { animation-name: synergy-half-collide-right; }
.synergy-plus {
    color: var(--synergy-color);
    font-weight: 900;
    font-size: 1.2rem;
}

@keyframes synergy-half-collide {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 0.9; transform: translateX(0); }
}
@keyframes synergy-half-collide-right {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 0.9; transform: translateX(0); }
}

.synergy-title {
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: clamp(2.4rem, 11vw, 6rem);
    font-weight: 900;
    color: #fff;
    -webkit-text-stroke: 2px var(--synergy-color);
    text-shadow: 0 0 30px var(--synergy-color), 0 0 60px var(--synergy-color);
    line-height: 1.02;
}

.synergy-flavor {
    max-width: 460px;
    margin: 10px auto 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: clamp(0.78rem, 2vw, 0.98rem);
    font-style: italic;
    line-height: 1.4;
    color: rgba(235, 235, 240, 0.82);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ── Codex Fusions collection ── */
.synergy-collection {
    margin-top: 28px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding-top: 18px;
}
.synergy-collection-title {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: #ffca28;
    margin-bottom: 12px;
    text-align: center;
}

.synergy-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.synergy-card-name {
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
}
.synergy-card-pair {
    font-size: 0.72rem;
    color: #bbb;
    letter-spacing: 0.02em;
}
.synergy-card-flavor {
    font-size: 0.72rem;
    font-style: italic;
    color: #999;
    line-height: 1.35;
}

.synergy-card-unknown {
    opacity: 0.85;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.3);
}
.synergy-card-unknown .synergy-card-name {
    color: #667;
    letter-spacing: 0.2em;
}
.synergy-card-hint {
    font-size: 0.72rem;
    color: #8a93a8;
    letter-spacing: 0.02em;
}
.synergy-silhouette {
    color: transparent;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    padding: 0 4px;
    -webkit-user-select: none;
    user-select: none;
}

.synergy-summary {
    text-align: center;
    color: #ffca28;
}

@media (max-width: 768px) {
    .synergy-title { font-size: clamp(2rem, 14vw, 3.5rem); }
    .synergy-flavor { max-width: 92vw; }
}

@media (prefers-reduced-motion: reduce) {
    .synergy-flourish,
    .synergy-half { animation-duration: 0.01ms; }
}
