/* ============================================
   FORTEX TRADING - ADVANCED VISUAL EFFECTS
   Spectacular Animations & Interactions
   ============================================ */

/* ============================================
   ANIMATED GRADIENT BACKGROUNDS
   ============================================ */
.gradient-bg-1 {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.gradient-bg-2 {
    background: linear-gradient(45deg, #fa709a, #fee140, #30cfd0, #667eea);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}

.gradient-bg-3 {
    background: linear-gradient(45deg, #a8edea, #fed6e3, #ffecd2, #fcb69f);
    background-size: 400% 400%;
    animation: gradientShift 18s ease infinite;
}

/* ============================================
   GLOWING TEXT EFFECTS
   ============================================ */
.text-glow {
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 10px rgba(129, 140, 248, 0.5),
                     0 0 20px rgba(129, 140, 248, 0.3),
                     0 0 30px rgba(129, 140, 248, 0.1);
    }
    to {
        text-shadow: 0 0 20px rgba(129, 140, 248, 0.8),
                     0 0 30px rgba(167, 139, 250, 0.6),
                     0 0 40px rgba(244, 114, 182, 0.4);
    }
}

/* ============================================
   NEON BORDERS
   ============================================ */
.neon-border {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
                linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #6366f1) border-box;
    animation: neonPulse 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5),
                    0 0 10px rgba(139, 92, 246, 0.3),
                    inset 0 0 5px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8),
                    0 0 30px rgba(139, 92, 246, 0.6),
                    0 0 40px rgba(236, 72, 153, 0.4),
                    inset 0 0 10px rgba(99, 102, 241, 0.4);
    }
}

/* ============================================
   3D CARD EFFECTS
   ============================================ */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.05);
}

.card-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    transform: translateZ(50px);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   FLOATING PARTICLES
   ============================================ */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: floatShape 20s infinite ease-in-out;
}

.shape-circle {
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.shape-square {
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    transform: rotate(45deg);
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(16, 185, 129, 0.2);
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(30px) rotate(90deg);
    }
    50% {
        transform: translateY(-60px) translateX(-30px) rotate(180deg);
    }
    75% {
        transform: translateY(-30px) translateX(-60px) rotate(270deg);
    }
}

/* ============================================
   RIPPLE EFFECTS
   ============================================ */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   PULSING GLOW ORBS
   ============================================ */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    animation: orbPulse 6s ease-in-out infinite;
    pointer-events: none;
}

.glow-orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #6366f1, transparent);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ec4899, transparent);
    bottom: 10%;
    right: 10%;
    animation-delay: 2s;
}

.glow-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #8b5cf6, transparent);
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes orbPulse {
    0%, 100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2) translate(20px, 20px);
        opacity: 0.6;
    }
}

/* ============================================
   SHIMMER EFFECTS
   ============================================ */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    animation: shimmerSlide 3s infinite;
}

@keyframes shimmerSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================================
   PERSPECTIVE TILT CARDS
   ============================================ */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateY(10deg) rotateX(5deg);
}

/* ============================================
   BOUNCING ARROWS
   ============================================ */
.bounce-arrow {
    animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* ============================================
   GRADIENT TEXT ANIMATION
   ============================================ */
.gradient-text-animated {
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #f43f5e, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   SPINNING LOADER
   ============================================ */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   BREATHING EFFECT
   ============================================ */
.breathe {
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   RAINBOW BORDER
   ============================================ */
.rainbow-border {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(45deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #9400d3, #ff0000
    );
    background-size: 400% 400%;
    animation: rainbowShift 6s linear infinite;
}

.rainbow-border-inner {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

@keyframes rainbowShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 400% 50%;
    }
}

/* ============================================
   MAGNETIC HOVER EFFECT
   ============================================ */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic:hover {
    transform: scale(1.1);
    cursor: pointer;
}

/* ============================================
   TYPEWRITER EFFECT
   ============================================ */
.typewriter {
    overflow: hidden;
    border-right: 2px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: currentColor;
    }
}

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   GLASS MORPHISM
   ============================================ */
.glass {
    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 0 rgba(31, 38, 135, 0.2);
}

/* ============================================
   LIQUID BLOB
   ============================================ */
.liquid-blob {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blobMorph 10s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes blobMorph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}
