-
Animated Glassmorphism Login
HTML
CSS
JavaScript
Login
Please enter your credentials to connect.
Email Address
Password
Remember device
Forgot details?
Sign In
New around here?
Create account
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { position: relative; display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #0f111a; overflow: hidden; } /* ---------------------------------------------------- ANIMATED BACKGROUND LAYER (Fixed Stack Order) ---------------------------------------------------- */ .background-glow { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; /* Explicitly beneath the login card */ pointer-events: none; /* Prevents background elements from blocking clicks */ } .sphere { position: absolute; border-radius: 50%; filter: blur(60px); -webkit-filter: blur(60px); /* Performance fixes to prevent animation stuttering */ will-change: transform; transform: translate3d(0, 0, 0); } .sphere-1 { width: 350px; height: 350px; background: linear-gradient(135px, #ff007f, #7928ca); top: 15%; left: 20%; animation: driftFirst 14s infinite alternate ease-in-out; } .sphere-2 { width: 450px; height: 450px; background: linear-gradient(135px, #00dfd8, #007cf0); bottom: 10%; right: 15%; animation: driftSecond 18s infinite alternate ease-in-out; } /* Smooth floating keyframes */ @keyframes driftFirst { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(80px, -40px) scale(1.1); } 100% { transform: translate(140px, 60px) scale(1); } } @keyframes driftSecond { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-100px, 40px) scale(0.9); } 100% { transform: translate(-160px, -60px) scale(1.1); } } /* ---------------------------------------------------- GLASSMORPHISM LOGIN CARD ---------------------------------------------------- */ .login-container { position: relative; z-index: 2; /* Sits completely above the spheres layer */ width: 420px; padding: 40px; border-radius: 24px; background: rgba(18, 88, 200, 0.3); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 25px 45px rgba(0, 0, 0, 0.4); /* Pop-in entry animation */ animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(30px); } @keyframes cardAppear { to { opacity: 1; transform: translateY(0); } } /* Typography */ h2 { color: #fff; font-size: 2rem; font-weight: 600; margin-bottom: 6px; text-align: center; letter-spacing: -0.5px; } .subtitle { color: rgba(255, 255, 255, 0.5); font-size: 0.9rem; margin-bottom: 35px; text-align: center; } /* Smooth Interactive Form Controls */ .input-group { position: relative; margin-bottom: 25px; } .input-group input { width: 100%; padding: 15px 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; outline: none; color: #fff; font-size: 1rem; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } .input-group input:focus { border-color: rgba(0, 223, 216, 0.6); background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 20px rgba(0, 223, 216, 0.15); } .input-group label { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.4); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); pointer-events: none; } /* Float animation rules when input is populated or focused */ .input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label { top: -10px; left: 10px; font-size: 0.8rem; padding: 0 6px; color: #00dfd8; } /* Inline Action Elements */ .form-actions { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; margin-bottom: 30px; color: rgba(255, 255, 255, 0.6); } .remember-me { display: flex; align-items: center; gap: 8px; cursor: pointer; } .remember-me input { accent-color: #00dfd8; cursor: pointer; } .forgot-pass, .signup-text a { color: #00dfd8; text-decoration: none; transition: color 0.2s ease; } .forgot-pass:hover, .signup-text a:hover { color: #007cf0; text-decoration: underline; } /* High Vibrancy Submit Button */ .submit-btn { width: 100%; padding: 15px; background: #fff; border: none; border-radius: 12px; color: #0f111a; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; } .submit-btn:hover { background: #00dfd8; color: #fff; box-shadow: 0 10px 25px rgba(0, 223, 216, 0.4); transform: translateY(-2px); } .submit-btn:active { transform: translateY(0); } .signup-text { text-align: center; font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); margin-top: 30px; }
Live Preview