/* public/assets/css/animations.css - Fantasy & Crystal Micro-Animations */

/* 1. Crystal Shimmer Keyframe */
@keyframes crystalShimmer {
    0% {
        filter: drop-shadow(0 0 4px var(--gold-glow));
        opacity: 0.85;
    }
    50% {
        filter: drop-shadow(0 0 16px var(--gold-glow-strong));
        opacity: 1;
    }
    100% {
        filter: drop-shadow(0 0 4px var(--gold-glow));
        opacity: 0.85;
    }
}

/* 2. Sine Wave Tail Float */
@keyframes tailFloatIdle {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(1.5deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* 3. Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

/* 4. Magical Slide / Fade Up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Animation Classes */
.animate-shimmer {
    animation: crystalShimmer 4s ease-in-out infinite;
}

.animate-float {
    animation: tailFloatIdle 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Desktop Cursor Glow Follower */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-glow) 0%, rgba(212, 175, 55, 0.05) 45%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

.cursor-particle {
    position: fixed;
    pointer-events: none;
    z-index: 998;
    width: 6px;
    height: 6px;
    background: var(--gold-pale);
    box-shadow: 0 0 6px var(--gold-accent);
    transform: rotate(45deg);
    border-radius: 1px;
    opacity: 0.8;
    animation: particleFade 1s forwards ease-out;
}

@keyframes particleFade {
    0% {
        transform: translate(0, 0) scale(1) rotate(45deg);
        opacity: 0.9;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(0) rotate(180deg);
        opacity: 0;
    }
}

/* Intro Screen Overlay */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #08090c;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.intro-oc-container {
    width: 220px;
    height: 220px;
    position: relative;
    margin-bottom: 1.5rem;
}

.intro-skip-btn {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--crystal-border);
    color: var(--gold-pale);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.intro-skip-btn:hover {
    background: var(--gold-accent);
    color: #000;
}

/* Reduced Motion Fallbacks */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .cursor-glow, .cursor-particle {
        display: none !important;
    }
    .intro-overlay {
        display: none !important;
    }
    .fade-in-section {
        opacity: 1 !important;
        transform: none !important;
    }
}
