/* Special Moment Animations for Journal Events */

/* Конфетти эффект для легендарных предметов */
.journal-event-special.confetti {
    animation: confetti-burst 5s ease-out;
    background: linear-gradient(135deg, #f3e5f5 0%, #fff3e0 100%);
}

@keyframes confetti-burst {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 rgba(156, 39, 176, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(156, 39, 176, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(156, 39, 176, 0.2);
    }
}

/* Искры для эпических предметов */
.journal-event-special.sparkle {
    animation: sparkle-fade 3s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes sparkle-fade {
    0% {
        box-shadow: 0 0 0 rgba(255, 152, 0, 0);
    }
    30% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.8), inset 0 0 15px rgba(255, 152, 0, 0.3);
    }
    100% {
        box-shadow: 0 2px 4px rgba(255, 152, 0, 0.1);
    }
}

/* Взрыв для победы над боссом */
.journal-event-special.explosion {
    animation: explosion-impact 5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes explosion-impact {
    0% {
        transform: scale(0.8) rotate(-2deg);
        opacity: 0.5;
    }
    20% {
        transform: scale(1.15) rotate(2deg);
        opacity: 1;
    }
    40% {
        transform: scale(0.95) rotate(-1deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Сияние при повышении уровня */
.journal-event-special.level-up-burst {
    animation: level-glow 4s ease-in-out;
    background: radial-gradient(circle at center, #ffeb3b 0%, #fff 40%, #f5f5f5 100%);
}

@keyframes level-glow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(255, 235, 59, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 235, 59, 0.9), inset 0 0 20px rgba(255, 235, 59, 0.4);
    }
}

/* Искры кузни при крафте */
.journal-event-special.forge-spark {
    animation: forge-flash 4s ease-out;
}

@keyframes forge-flash {
    0% {
        background: linear-gradient(135deg, #ff5722 0%, #ffc107 100%);
        transform: translateY(-5px);
    }
    30% {
        box-shadow: 0 5px 30px rgba(255, 87, 34, 0.8);
    }
    100% {
        background: #f5f5f5;
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}

/* Тёмный портал для подземелий */
.journal-event-special.dark-portal {
    animation: portal-shimmer 3s ease-in-out;
    background: linear-gradient(135deg, #37474f 0%, #263238 100%);
    color: #b0bec5;
}

@keyframes portal-shimmer {
    0%, 100% {
        box-shadow: 0 0 0 rgba(55, 71, 79, 0);
    }
    50% {
        box-shadow: 0 0 30px rgba(55, 71, 79, 0.9), inset 0 0 20px rgba(38, 50, 56, 0.5);
    }
}

/* Общий класс для всех особых моментов */
.journal-event-special {
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
}

/* Отключить анимации при prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .journal-event-special,
    .journal-event-special.confetti,
    .journal-event-special.sparkle,
    .journal-event-special.explosion,
    .journal-event-special.level-up-burst,
    .journal-event-special.forge-spark,
    .journal-event-special.dark-portal {
        animation: none;
    }
}

