/* ============================================
   SNAPDO - ANIMATED VISUAL EFFECTS
   Modern, Premium, Eye-Catching Design
   ============================================ */

/* ---------- 1. ANIMATED GRADIENT BACKGROUND ---------- */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, 
        #0f172a, 
        #1e1b4b, 
        #312e81, 
        #0f172a,
        #1e293b,
        #0f172a
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Aurora Effect Overlay */
.aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora::before,
.aurora::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(100px);
}

.aurora::before {
    background: radial-gradient(circle, #0ea5e9 0%, transparent 70%);
    animation: aurora1 20s ease-in-out infinite;
    top: -50%;
    left: -50%;
}

.aurora::after {
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    animation: aurora2 25s ease-in-out infinite;
    bottom: -50%;
    right: -50%;
}

@keyframes aurora1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10%, 10%) rotate(120deg); }
    66% { transform: translate(-5%, 5%) rotate(240deg); }
}

@keyframes aurora2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-10%, -5%) rotate(-120deg); }
    66% { transform: translate(5%, -10%) rotate(-240deg); }
}

/* ---------- 2. FLOATING PARTICLES ---------- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(14, 165, 233, 0.4);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.particle:nth-child(1) { left: 10%; animation-duration: 25s; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-duration: 20s; animation-delay: 2s; width: 6px; height: 6px; }
.particle:nth-child(3) { left: 30%; animation-duration: 28s; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-duration: 22s; animation-delay: 1s; width: 8px; height: 8px; background: rgba(139, 92, 246, 0.3); }
.particle:nth-child(5) { left: 50%; animation-duration: 24s; animation-delay: 3s; }
.particle:nth-child(6) { left: 60%; animation-duration: 18s; animation-delay: 5s; width: 5px; height: 5px; background: rgba(16, 185, 129, 0.3); }
.particle:nth-child(7) { left: 70%; animation-duration: 26s; animation-delay: 2s; }
.particle:nth-child(8) { left: 80%; animation-duration: 21s; animation-delay: 4s; width: 7px; height: 7px; }
.particle:nth-child(9) { left: 90%; animation-duration: 23s; animation-delay: 1s; background: rgba(245, 158, 11, 0.3); }
.particle:nth-child(10) { left: 5%; animation-duration: 27s; animation-delay: 6s; width: 4px; height: 4px; }

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(720deg);
        opacity: 0;
    }
}

/* ---------- 3. GLASSMORPHISM EFFECT ---------- */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ---------- 4. NEON GLOW EFFECTS ---------- */
.neon-text {
    text-shadow: 
        0 0 5px rgba(14, 165, 233, 0.5),
        0 0 10px rgba(14, 165, 233, 0.3),
        0 0 20px rgba(14, 165, 233, 0.2);
}

.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6, #ec4899);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neon-border:hover::before {
    opacity: 1;
}

/* Category Glows */
.glow-coding { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
.glow-trading { box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
.glow-tools { box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
.glow-tips { box-shadow: 0 0 20px rgba(245, 158, 11, 0.4); }

/* ---------- 5. ANIMATED TEXT GRADIENT ---------- */
.gradient-text {
    background: linear-gradient(135deg, 
        #0ea5e9, 
        #8b5cf6, 
        #ec4899,
        #0ea5e9
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 5s ease infinite;
}

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

/* ---------- 6. SHIMMER EFFECT ---------- */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ---------- 7. SCROLL REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

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

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

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

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
}

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

.hover-scale:hover {
    transform: scale(1.05);
}

/* ---------- 9. PULSE ANIMATION ---------- */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid #0ea5e9;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* ---------- 10. FLOATING ANIMATION ---------- */
.float {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-2deg); }
}

.float-delay-1 { animation-delay: 1s; }
.float-delay-2 { animation-delay: 2s; }
.float-delay-3 { animation-delay: 3s; }

/* ---------- 11. ROTATE GLOW BORDER ---------- */
.rotate-glow {
    position: relative;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    overflow: hidden;
}

.rotate-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, #0ea5e9, #8b5cf6, #ec4899, #0ea5e9);
    border-radius: inherit;
    animation: rotate 4s linear infinite;
    z-index: -1;
}

.rotate-glow::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: inherit;
    z-index: -1;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* ---------- 12. TYPING CURSOR EFFECT ---------- */
.typing::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #0ea5e9;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---------- 13. MAGNETIC BUTTON EFFECT ---------- */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.magnetic-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ---------- 14. UNDERLINE ANIMATION ---------- */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ---------- 15. BORDER GLOW PULSE ---------- */
.border-glow {
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { 
        border-color: rgba(14, 165, 233, 0.3);
        box-shadow: 0 0 5px rgba(14, 165, 233, 0.2);
    }
    50% { 
        border-color: rgba(14, 165, 233, 0.6);
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
    }
}

/* ---------- 16. TILT 3D EFFECT ---------- */
.tilt-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.tilt-3d:hover {
    transform: rotateX(5deg) rotateY(5deg);
}

/* ---------- 17. WAVE ANIMATION ---------- */
.wave {
    position: relative;
    overflow: hidden;
}

.wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: wave 3s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* ---------- 18. BOUNCE ANIMATION ---------- */
.bounce {
    animation: bounce 2s ease-in-out infinite;
}

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

/* ---------- 19. SPIN SLOW ---------- */
.spin-slow {
    animation: spin 20s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ---------- 20. MORPHING SHAPE ---------- */
.morph {
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}
