/* ============================================
   WebStore Pro - Premium Animations
   ============================================ */

/* ---- Keyframes ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.08); }
    70% { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
    to { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes morphBlob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
    75% { border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%; }
}
@keyframes typeWriter {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.2); }
    50% { box-shadow: 0 0 40px rgba(99,102,241,0.5); }
}
@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}
@keyframes textReveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

/* ---- Animation Classes ---- */
.animate-fadeInUp { animation: fadeInUp 0.7s cubic-bezier(0.4,0,0.2,1) forwards; opacity: 0; }
.animate-fadeInDown { animation: fadeInDown 0.7s cubic-bezier(0.4,0,0.2,1) forwards; opacity: 0; }
.animate-fadeInLeft { animation: fadeInLeft 0.7s cubic-bezier(0.4,0,0.2,1) forwards; opacity: 0; }
.animate-fadeInRight { animation: fadeInRight 0.7s cubic-bezier(0.4,0,0.2,1) forwards; opacity: 0; }
.animate-scaleIn { animation: scaleIn 0.6s cubic-bezier(0.4,0,0.2,1) forwards; opacity: 0; }
.animate-bounceIn { animation: bounceIn 0.8s cubic-bezier(0.4,0,0.2,1) forwards; opacity: 0; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse { animation: pulse 2.5s ease-in-out infinite; }
.animate-glow { animation: glowPulse 3s ease-in-out infinite; }
.animate-morph { animation: morphBlob 8s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Staggered Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* ---- Scroll Reveal System ---- */
.reveal {
    opacity: 0; transform: translateY(50px);
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
    opacity: 0; transform: translateX(-60px);
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
    opacity: 0; transform: translateX(60px);
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale {
    opacity: 0; transform: scale(0.85);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ---- Hover Effects ---- */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.hover-glow:hover { box-shadow: 0 0 30px rgba(99,102,241,0.3); }
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }
.hover-rotate:hover { transform: rotate(5deg) scale(1.05); }

/* ---- Magnetic Button Effect ---- */
.btn-magnetic {
    position: relative; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-magnetic::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.btn-magnetic:hover::before { width: 300px; height: 300px; }

/* ---- Tilt Effect (JS-driven) ---- */
.tilt-card {
    transition: transform 0.3s ease;
    transform-style: preserve-3d; perspective: 1000px;
}

/* ---- Loading Skeleton ---- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px;
}
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-img { height: 200px; border-radius: 12px; }

/* ---- Cursor Trail (JS-enhanced) ---- */
.cursor-dot {
    width: 8px; height: 8px; background: var(--primary);
    border-radius: 50%; position: fixed; pointer-events: none;
    z-index: 9999; transition: transform 0.1s; mix-blend-mode: difference;
}
.cursor-ring {
    width: 36px; height: 36px; border: 2px solid var(--primary);
    border-radius: 50%; position: fixed; pointer-events: none;
    z-index: 9999; transition: all 0.15s ease-out; mix-blend-mode: difference;
}

/* ---- Page Loader ---- */
.page-loader {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--dark); display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-spinner {
    width: 48px; height: 48px; border-radius: 50%;
    border: 3px solid rgba(99,102,241,0.2);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

/* ---- Parallax Layers ---- */
.parallax-layer {
    will-change: transform; transition: transform 0.1s linear;
}

/* ---- Ripple Effect ---- */
.ripple-effect { position: relative; overflow: hidden; }
.ripple-effect .ripple {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,0.3);
    animation: ripple 0.6s ease-out; pointer-events: none;
}

/* ---- Text Animations ---- */
.text-reveal {
    animation: textReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.word-animate span {
    display: inline-block; opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}
.word-animate span:nth-child(1) { animation-delay: 0s; }
.word-animate span:nth-child(2) { animation-delay: 0.1s; }
.word-animate span:nth-child(3) { animation-delay: 0.2s; }
.word-animate span:nth-child(4) { animation-delay: 0.3s; }
.word-animate span:nth-child(5) { animation-delay: 0.4s; }

/* ---- Notification Badge Bounce ---- */
.badge-bounce { animation: bounceIn 0.5s ease; }

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; z-index: 10001;
    background: linear-gradient(90deg, var(--primary), var(--secondary), #f59e0b);
    transform-origin: left; transform: scaleX(0);
    transition: transform 0.1s linear;
}

/* ---- Enhanced Bubble Animations ---- */
.bubble-bg {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.bubble-bg .bubble {
    position: absolute; border-radius: 50%;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(14,165,233,0.06));
    animation: bubbleFloat var(--duration, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
.bubble-bg .bubble:nth-child(odd) {
    background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(236,72,153,0.04));
}
.bubble-bg .bubble:nth-child(3n) {
    background: linear-gradient(135deg, rgba(16,185,129,0.07), rgba(6,182,212,0.05));
}
@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
    25% { transform: translateY(-30px) translateX(15px) scale(1.05); opacity: 0.8; }
    50% { transform: translateY(-60px) translateX(-10px) scale(0.95); opacity: 0.5; }
    75% { transform: translateY(-30px) translateX(20px) scale(1.02); opacity: 0.7; }
}

/* Smart Color Bubbles for Hero */
.hero .bubble-bg .bubble:nth-child(1) { width:120px;height:120px;top:20%;left:10%;--duration:7s;--delay:0s; }
.hero .bubble-bg .bubble:nth-child(2) { width:80px;height:80px;top:60%;left:75%;--duration:9s;--delay:1s; }
.hero .bubble-bg .bubble:nth-child(3) { width:160px;height:160px;top:40%;left:50%;--duration:11s;--delay:2s; }
.hero .bubble-bg .bubble:nth-child(4) { width:60px;height:60px;top:70%;left:20%;--duration:6s;--delay:0.5s; }
.hero .bubble-bg .bubble:nth-child(5) { width:100px;height:100px;top:15%;left:65%;--duration:8s;--delay:1.5s; }
.hero .bubble-bg .bubble:nth-child(6) { width:50px;height:50px;top:80%;left:85%;--duration:10s;--delay:3s; }

/* Gradient Orb Animation */
.orb-glow {
    position: absolute; border-radius: 50%; filter: blur(60px);
    animation: orbMove 12s ease-in-out infinite alternate;
}
.orb-glow.orb-1 {
    width: 300px; height: 300px; top: 10%; left: 15%;
    background: rgba(99, 102, 241, 0.15);
}
.orb-glow.orb-2 {
    width: 250px; height: 250px; bottom: 15%; right: 10%;
    background: rgba(14, 165, 233, 0.12);
    animation-delay: -4s;
}
.orb-glow.orb-3 {
    width: 200px; height: 200px; top: 50%; left: 60%;
    background: rgba(168, 85, 247, 0.1);
    animation-delay: -8s;
}
@keyframes orbMove {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
    100% { transform: translate(10px, -10px) scale(1.05); }
}

/* Enhanced Card Shine Effect */
.shine-card {
    position: relative; overflow: hidden;
}
.shine-card::after {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
    transition: all 0.6s ease;
    transform: rotate(45deg) translateY(100%);
}
.shine-card:hover::after {
    transform: rotate(45deg) translateY(-100%);
}
