diff --git a/Animation Login.js b/Animation Login.js index e69de29..9a24f9f 100644 --- a/Animation Login.js +++ b/Animation Login.js @@ -0,0 +1,81 @@ +// Particle System +const particlesContainer = document.getElementById('particles'); +const particleCount = 150; +const particles = []; + +class Particle { + constructor() { + this.element = document.createElement('div'); + this.element.className = 'particle'; + this.reset(); + particlesContainer.appendChild(this.element); + } + + reset() { + this.x = Math.random() * window.innerWidth; + this.y = Math.random() * window.innerHeight; + this.vx = (Math.random() - 0.5) * 1.2; + this.vy = (Math.random() - 0.5) * 1.2; + this.size = Math.random() * 3 + 2; + + const colors = [ + '#00d9ff', '#ff00ff', '#00ffff', + '#ff0080', '#9d00ff', '#00ff88' + ]; + + const color = colors[Math.floor(Math.random() * colors.length)]; + this.element.style.background = color; + this.element.style.boxShadow = `0 0 15px ${color}`; + this.element.style.width = `${this.size}px`; + this.element.style.height = `${this.size}px`; + + this.updatePosition(); + } + + updatePosition() { + this.element.style.left = `${this.x}px`; + this.element.style.top = `${this.y}px`; + } + + move() { + this.x += this.vx; + this.y += this.vy; + + if (this.x < -10) this.x = window.innerWidth + 10; + if (this.x > window.innerWidth + 10) this.x = -10; + if (this.y < -10) this.y = window.innerHeight + 10; + if (this.y > window.innerHeight + 10) this.y = -10; + + this.updatePosition(); + } +} + +// Create particles with even distribution +const cols = 15; +const rows = 10; +let particleIndex = 0; + +for (let i = 0; i < rows; i++) { + for (let j = 0; j < cols; j++) { + if (particleIndex >= particleCount) break; + + const particle = new Particle(); + + // Even distribution + slight random offset + particle.x = (j / cols) * window.innerWidth + (Math.random() - 0.5) * 100; + particle.y = (i / rows) * window.innerHeight + (Math.random() - 0.5) * 100; + particle.updatePosition(); + + particles.push(particle); + particleIndex++; + } + if (particleIndex >= particleCount) break; +} + +// Animate +function animate() { + particles.forEach(p => p.move()); + requestAnimationFrame(animate); +} + +animate(); \ No newline at end of file diff --git a/Login.css b/Login.css index af3fa19..c8f6e48 100644 --- a/Login.css +++ b/Login.css @@ -37,12 +37,30 @@ body { z-index: 2; background: rgba(30, 0, 50, 0.6); backdrop-filter: blur(10px); - border: 1px solid rgba(255, 255, 255, 0.1); + border: 2px solid rgba(0, 217, 255, 0.3); border-radius: 20px; padding: 50px 40px; width: 90%; max-width: 400px; - box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), + 0 0 40px rgba(0, 217, 255, 0.3), + inset 0 0 30px rgba(0, 217, 255, 0.1); + animation: glowBorder 3s ease-in-out infinite; +} + +@keyframes glowBorder { + 0%, 100% { + border-color: rgba(0, 217, 255, 0.4); + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), + 0 0 40px rgba(0, 217, 255, 0.3), + inset 0 0 30px rgba(0, 217, 255, 0.1); + } + 50% { + border-color: rgba(255, 0, 255, 0.5); + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), + 0 0 50px rgba(255, 0, 255, 0.4), + inset 0 0 40px rgba(255, 0, 255, 0.15); + } } h1 { diff --git a/Login.html b/Login.html index bfd0253..dd9f08d 100644 --- a/Login.html +++ b/Login.html @@ -1,45 +1,52 @@ -
- - -