|
31 | 31 |
|
32 | 32 | body { |
33 | 33 | font-family: 'Lato', sans-serif; |
34 | | - background: linear-gradient(180deg, #020617 0%, #0f172a 50%, #1e293b 100%); |
| 34 | + background: #020617; |
35 | 35 | color: var(--text-primary); |
36 | 36 | overflow-x: hidden; |
| 37 | + position: relative; |
| 38 | + } |
| 39 | + |
| 40 | + /* Animated Background */ |
| 41 | + .animated-bg { |
| 42 | + position: fixed; |
| 43 | + top: 0; |
| 44 | + left: 0; |
| 45 | + width: 100%; |
| 46 | + height: 100%; |
| 47 | + z-index: -1; |
| 48 | + overflow: hidden; |
| 49 | + } |
| 50 | + |
| 51 | + .gradient-orb { |
| 52 | + position: absolute; |
| 53 | + border-radius: 50%; |
| 54 | + filter: blur(80px); |
| 55 | + opacity: 0.5; |
| 56 | + animation: float 20s ease-in-out infinite; |
| 57 | + } |
| 58 | + |
| 59 | + .gradient-orb:nth-child(1) { |
| 60 | + width: 500px; |
| 61 | + height: 500px; |
| 62 | + background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, transparent 70%); |
| 63 | + top: -200px; |
| 64 | + left: -200px; |
| 65 | + animation-delay: 0s; |
| 66 | + } |
| 67 | + |
| 68 | + .gradient-orb:nth-child(2) { |
| 69 | + width: 600px; |
| 70 | + height: 600px; |
| 71 | + background: radial-gradient(circle, rgba(34, 211, 238, 0.3) 0%, transparent 70%); |
| 72 | + bottom: -300px; |
| 73 | + right: -200px; |
| 74 | + animation-delay: 5s; |
| 75 | + } |
| 76 | + |
| 77 | + .gradient-orb:nth-child(3) { |
| 78 | + width: 400px; |
| 79 | + height: 400px; |
| 80 | + background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%); |
| 81 | + top: 50%; |
| 82 | + left: 50%; |
| 83 | + transform: translate(-50%, -50%); |
| 84 | + animation-delay: 10s; |
| 85 | + } |
| 86 | + |
| 87 | + @keyframes float { |
| 88 | + 0%, 100% { |
| 89 | + transform: translate(0, 0) scale(1); |
| 90 | + } |
| 91 | + 33% { |
| 92 | + transform: translate(30px, -30px) scale(1.1); |
| 93 | + } |
| 94 | + 66% { |
| 95 | + transform: translate(-20px, 20px) scale(0.9); |
| 96 | + } |
| 97 | + } |
| 98 | + |
| 99 | + #particles-canvas { |
| 100 | + position: absolute; |
| 101 | + top: 0; |
| 102 | + left: 0; |
| 103 | + width: 100%; |
| 104 | + height: 100%; |
| 105 | + opacity: 0.6; |
37 | 106 | } |
38 | 107 |
|
39 | 108 | /* Navbar */ |
|
413 | 482 | </style> |
414 | 483 | </head> |
415 | 484 | <body> |
| 485 | + <!-- Animated Background --> |
| 486 | + <div class="animated-bg"> |
| 487 | + <canvas id="particles-canvas"></canvas> |
| 488 | + <div class="gradient-orb"></div> |
| 489 | + <div class="gradient-orb"></div> |
| 490 | + <div class="gradient-orb"></div> |
| 491 | + </div> |
416 | 492 | <!-- Navigation --> |
417 | 493 | <div class="navbar-black w-nav"> |
418 | 494 | <div class="container-47"> |
@@ -699,6 +775,88 @@ <h2 class="h2-section-text" data-i18n="updates.title">Latest Updates</h2> |
699 | 775 | } |
700 | 776 |
|
701 | 777 | requestAnimationFrame(raf); |
| 778 | + |
| 779 | + // Particle Animation Background |
| 780 | + const canvas = document.getElementById('particles-canvas'); |
| 781 | + const ctx = canvas.getContext('2d'); |
| 782 | + |
| 783 | + function resizeCanvas() { |
| 784 | + canvas.width = window.innerWidth; |
| 785 | + canvas.height = window.innerHeight; |
| 786 | + } |
| 787 | + resizeCanvas(); |
| 788 | + window.addEventListener('resize', resizeCanvas); |
| 789 | + |
| 790 | + class Particle { |
| 791 | + constructor() { |
| 792 | + this.reset(); |
| 793 | + this.y = Math.random() * canvas.height; |
| 794 | + } |
| 795 | + |
| 796 | + reset() { |
| 797 | + this.x = Math.random() * canvas.width; |
| 798 | + this.y = Math.random() * canvas.height; |
| 799 | + this.size = Math.random() * 2 + 0.5; |
| 800 | + this.speedX = (Math.random() - 0.5) * 0.5; |
| 801 | + this.speedY = (Math.random() - 0.5) * 0.5; |
| 802 | + this.opacity = Math.random() * 0.5 + 0.2; |
| 803 | + } |
| 804 | + |
| 805 | + update() { |
| 806 | + this.x += this.speedX; |
| 807 | + this.y += this.speedY; |
| 808 | + |
| 809 | + if (this.x < 0 || this.x > canvas.width) this.speedX *= -1; |
| 810 | + if (this.y < 0 || this.y > canvas.height) this.speedY *= -1; |
| 811 | + } |
| 812 | + |
| 813 | + draw() { |
| 814 | + ctx.fillStyle = `rgba(56, 189, 248, ${this.opacity})`; |
| 815 | + ctx.beginPath(); |
| 816 | + ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); |
| 817 | + ctx.fill(); |
| 818 | + } |
| 819 | + } |
| 820 | + |
| 821 | + const particles = []; |
| 822 | + const particleCount = 80; |
| 823 | + |
| 824 | + for (let i = 0; i < particleCount; i++) { |
| 825 | + particles.push(new Particle()); |
| 826 | + } |
| 827 | + |
| 828 | + function connectParticles() { |
| 829 | + for (let i = 0; i < particles.length; i++) { |
| 830 | + for (let j = i + 1; j < particles.length; j++) { |
| 831 | + const dx = particles[i].x - particles[j].x; |
| 832 | + const dy = particles[i].y - particles[j].y; |
| 833 | + const distance = Math.sqrt(dx * dx + dy * dy); |
| 834 | + |
| 835 | + if (distance < 150) { |
| 836 | + ctx.strokeStyle = `rgba(56, 189, 248, ${0.2 * (1 - distance / 150)})`; |
| 837 | + ctx.lineWidth = 0.5; |
| 838 | + ctx.beginPath(); |
| 839 | + ctx.moveTo(particles[i].x, particles[i].y); |
| 840 | + ctx.lineTo(particles[j].x, particles[j].y); |
| 841 | + ctx.stroke(); |
| 842 | + } |
| 843 | + } |
| 844 | + } |
| 845 | + } |
| 846 | + |
| 847 | + function animateParticles() { |
| 848 | + ctx.clearRect(0, 0, canvas.width, canvas.height); |
| 849 | + |
| 850 | + particles.forEach(particle => { |
| 851 | + particle.update(); |
| 852 | + particle.draw(); |
| 853 | + }); |
| 854 | + |
| 855 | + connectParticles(); |
| 856 | + requestAnimationFrame(animateParticles); |
| 857 | + } |
| 858 | + |
| 859 | + animateParticles(); |
702 | 860 | </script> |
703 | 861 | </body> |
704 | 862 | </html> |
0 commit comments