/* Nyx AI Studio - Advanced Animations */

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg);
    }
    66% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

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

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Glow Pulse Animation */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5),
                    inset 0 0 20px rgba(255, 215, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8),
                    inset 0 0 30px rgba(255, 215, 0, 0.3);
    }
}

.glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* Constellation Animation */
@keyframes constellation-draw {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.constellation-line {
    stroke: var(--nyx-gold);
    stroke-width: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    fill: none;
    animation: constellation-draw 3s ease-out forwards;
}

/* Sparkle Effect */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

.sparkle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--nyx-gold) 0%, transparent 70%);
    animation: sparkle 2s ease-in-out infinite;
}

/* Text Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--nyx-gold);
    }
}

.typing-animation {
    overflow: hidden;
    border-right: 3px solid var(--nyx-gold);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end),
               blink-caret 0.75s step-end infinite;
}

/* Aurora Background Effect */
@keyframes aurora {
    0% {
        transform: translateX(-50%) translateY(0) rotate(0deg);
    }
    33% {
        transform: translateX(-50%) translateY(-100px) rotate(120deg);
    }
    66% {
        transform: translateX(-50%) translateY(-50px) rotate(240deg);
    }
    100% {
        transform: translateX(-50%) translateY(0) rotate(360deg);
    }
}

.aurora-bg {
    position: fixed;
    top: 0;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, 
                rgba(159, 122, 234, 0.3) 0%,
                rgba(107, 70, 193, 0.2) 25%,
                rgba(255, 215, 0, 0.1) 50%,
                transparent 70%);
    filter: blur(60px);
    opacity: 0.5;
    animation: aurora 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* Neon Text Flicker */
@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 10px var(--nyx-gold),
                     0 0 20px var(--nyx-gold),
                     0 0 30px var(--nyx-gold),
                     0 0 40px var(--nyx-gold);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.neon-flicker {
    animation: neon-flicker 1.5s infinite alternate;
}

/* Card Entrance Animation */
@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-entrance {
    animation: card-entrance 0.6s ease-out forwards;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.5);
    animation: ripple 0.6s ease-out;
}

/* Gradient Shift Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-shift {
    background: linear-gradient(270deg, var(--nyx-purple), var(--nyx-gold), var(--nyx-purple));
    background-size: 600% 600%;
    animation: gradient-shift 10s ease infinite;
}

/* Loading Dots */
@keyframes loading-dots {
    0%, 20% {
        opacity: 0;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-10px);
    }
    100% {
        opacity: 0;
        transform: translateY(0);
    }
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nyx-gold);
    margin: 0 3px;
    animation: loading-dots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0; }

/* Particle Generator */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

@keyframes particle-rise {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(0.5);
    }
}

.particle-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--nyx-gold);
    border-radius: 50%;
    animation: particle-rise 10s linear infinite;
}

/* Glitch Effect */
@keyframes glitch {
    0%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg);
    }
}

.glitch:hover {
    animation: glitch 0.3s ease-in-out;
}

/* Success Animation */
@keyframes success-checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.success-checkmark {
    stroke: #2ED573;
    stroke-width: 3;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: success-checkmark 0.5s ease-out forwards;
}

/* Rotate Animation */
@keyframes rotate-continuous {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate-animation {
    animation: rotate-continuous 20s linear infinite;
}