/* SPT Fx Community - Premium Animations */

/* ===== KEYFRAME ANIMATIONS ===== */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(107, 70, 193, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(107, 70, 193, 0.6);
        transform: scale(1.02);
    }
}

@keyframes gradient-shift {
    0% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
    100% { 
        background-position: 0% 50%; 
    }
}

/* Enhanced gradient animation for better performance */
.gradient-enhanced {
    background: linear-gradient(-45deg, #6B46C1, #F97316, #8B5CF6, #EC4899);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    will-change: background-position;
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #F97316; }
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) translateX(20px) rotate(120deg);
    }
    66% {
        transform: translateY(-10px) translateX(-20px) rotate(240deg);
    }
}

@keyframes bounce-icon {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    80% { transform: translateY(-4px); }
}

/* ===== UTILITY CLASSES ===== */

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

.animate-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

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

.animate-gradient {
    background: linear-gradient(-45deg, #6B46C1, #F97316, #8B5CF6, #EC4899);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    will-change: background-position;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.6s ease-out forwards;
}

.animate-bounce-in {
    animation: bounce-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.animate-typewriter {
    overflow: hidden;
    border-right: 2px solid #F97316;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

.animate-particle {
    animation: particle-float 12s ease-in-out infinite;
}

.animate-morphing-blob {
    animation: morphing-blob 8s ease-in-out infinite;
}

/* ===== HOVER EFFECTS ===== */

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-glow {
    transition: all 0.3s ease;
    position: relative;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(107, 70, 193, 0.4);
    transform: scale(1.05);
}

.hover-tilt {
    transition: transform 0.3s ease;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(10deg) scale(1.05);
}

.hover-slide-up {
    transition: transform 0.3s ease;
    overflow: hidden;
}

.hover-slide-up::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hover-slide-up:hover::before {
    left: 100%;
}

.hover-ripple {
    position: relative;
    overflow: hidden;
}

.hover-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hover-ripple:hover::after {
    width: 300px;
    height: 300px;
}

/* ===== BUTTON ANIMATIONS ===== */

.btn-premium {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #6B46C1, #F97316);
    background-size: 200% 200%;
    transition: all 0.3s ease;
}

.btn-premium:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 70, 193, 0.4);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== FORM ANIMATIONS ===== */

.input-premium {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #6B46C1, #F97316) border-box;
}

.input-premium:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.2);
}

.input-premium:focus + .input-label {
    transform: translateY(-25px) scale(0.8);
    color: #6B46C1;
}

.input-label {
    transition: all 0.3s ease;
    transform-origin: left top;
}

/* ===== CARD ANIMATIONS ===== */

.card-premium {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-premium:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* ===== LOADING ANIMATIONS ===== */

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ===== SCROLL ANIMATIONS ===== */

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== NAVBAR ANIMATIONS ===== */

.navbar-slide-down {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.navbar-slide-down.visible {
    transform: translateY(0);
}

.nav-link-underline {
    position: relative;
}

.nav-link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #6B46C1, #F97316);
    transition: width 0.3s ease;
}

.nav-link-underline:hover::after {
    width: 100%;
}

/* ===== BACKGROUND EFFECTS ===== */

.bg-particles {
    position: relative;
    overflow: hidden;
}

.bg-particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(107, 70, 193, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: particle-float 20s ease-in-out infinite;
}

.gradient-mesh {
    background: 
        radial-gradient(at 40% 20%, hsla(228, 100%, 74%, 1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 1) 0px, transparent 50%),
        radial-gradient(at 80% 50%, hsla(340, 100%, 76%, 1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(22, 100%, 77%, 1) 0px, transparent 50%),
        radial-gradient(at 80% 100%, hsla(242, 100%, 70%, 1) 0px, transparent 50%),
        radial-gradient(at 0% 0%, hsla(343, 100%, 76%, 1) 0px, transparent 50%);
    animation: gradient-shift 15s ease infinite;
}

/* ===== RESPONSIVE ANIMATIONS ===== */

@media (max-width: 768px) {
    .animate-float,
    .animate-float-slow,
    .animate-particle {
        animation-duration: 4s;
    }
    
    .hover-tilt:hover {
        transform: scale(1.02);
    }
    
    .card-premium:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== STAGGER ANIMATIONS ===== */

.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInScale 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* ===== GLASSMORPHISM EFFECTS ===== */

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-card-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}