-
Animated Electric Login & Signup
HTML
CSS
JavaScript
⚡
Welcome Back
Sign in to access your account
Email Address
Password
◉
Remember me
Forgot Password?
SIGN IN
OR CONTINUE WITH
Google
Apple
GitHub
Don't have an account?
Create Account
✦
Create Account
Join us and start your journey
Full Name
Email Address
Create Password
◉
Confirm Password
◉
I agree to the Terms & Conditions and Privacy Policy.
CREATE ACCOUNT
Already have an account?
Sign In
* { margin: 0; padding: 0; box-sizing: border-box; } body { min-height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; font-family: Arial, Helvetica, sans-serif; color: #fff; scale:0.7; background: radial-gradient(circle at 20% 20%, #17303b, transparent 30%), radial-gradient(circle at 80% 80%, #16283d, transparent 30%), #070a0f; } /* ========================= BACKGROUND ========================= */ .bg-orb { position: fixed; border-radius: 50%; pointer-events: none; filter: blur(3px); } .bg-orb.one { width: 180px; height: 180px; left: -70px; top: -70px; background: #00eaff; box-shadow: 0 0 100px #00eaff; animation: orb1 7s ease-in-out infinite; } .bg-orb.two { width: 160px; height: 160px; right: -60px; bottom: -60px; background: #0077ff; box-shadow: 0 0 100px #0077ff; animation: orb2 8s ease-in-out infinite; } @keyframes orb1 { 50% { transform: translate(80px, 70px); } } @keyframes orb2 { 50% { transform: translate(-70px, -70px); } } /* ========================= FLIP CONTAINER ========================= */ .flip-container { width: min(430px, 92vw); height: 650px; perspective: 1500px; } .flip-card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .75, .2, 1); } .flip-card.flipped { transform: rotateY(180deg); } /* ========================= ELECTRIC FRAME ========================= */ .card-face { position: absolute; inset: 0; padding: 2px; border-radius: 30px; overflow: hidden; backface-visibility: hidden; isolation: isolate; } .card-face::before { content: ""; position: absolute; width: 180%; height: 180%; left: -40%; top: -40%; background: conic-gradient(transparent 0deg, transparent 255deg, #00eaff 285deg, #ffffff 305deg, #00eaff 325deg, transparent 350deg); animation: electric 3s linear infinite; z-index: -2; } @keyframes electric { to { transform: rotate(360deg); } } /* ========================= INNER CARD ========================= */ .card-inner { position: relative; width: 100%; height: 100%; padding: 42px 38px; border-radius: 28px; background: linear-gradient(145deg, #171e27, #0a0e14); box-shadow: inset 7px 7px 15px rgba(0, 0, 0, .85), inset -5px -5px 12px rgba(255, 255, 255, .035), 0 30px 80px rgba(0, 0, 0, .75); overflow: hidden; } /* Signup back */ .signup-face { transform: rotateY(180deg); } /* ========================= DECORATIVE RINGS ========================= */ .card-inner::before { content: ""; position: absolute; width: 190px; height: 190px; border: 1px solid rgba(0, 234, 255, .18); border-radius: 50%; right: -100px; top: -100px; box-shadow: 0 0 30px rgba(0, 234, 255, .08), inset 0 0 30px rgba(0, 234, 255, .04); pointer-events: none; } .card-inner::after { content: ""; position: absolute; width: 100px; height: 100px; border: 1px solid rgba(0, 234, 255, .12); border-radius: 50%; left: -60px; bottom: -60px; pointer-events: none; } /* ========================= LOGO ========================= */ .logo { width: 64px; height: 64px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; border-radius: 20px; background: #10161e; color: #00eaff; font-size: 27px; font-weight: bold; box-shadow: 7px 7px 15px rgba(0, 0, 0, .8), -4px -4px 10px rgba(255, 255, 255, .04), inset 2px 2px 5px rgba(0, 0, 0, .7); text-shadow: 0 0 8px #00eaff, 0 0 22px #00eaff; animation: logoGlow 2.5s infinite; } @keyframes logoGlow { 50% { box-shadow: 7px 7px 15px rgba(0, 0, 0, .8), 0 0 28px rgba(0, 234, 255, .35); } } /* ========================= TITLE ========================= */ .title { text-align: center; font-size: 29px; margin-bottom: 7px; letter-spacing: 1px; text-shadow: 2px 2px 4px #000, -1px -1px 1px rgba(255, 255, 255, .12); } .subtitle { text-align: center; font-size: 13px; color: #788596; margin-bottom: 28px; } /* ========================= INPUT ========================= */ .field { position: relative; margin-bottom: 19px; } .field input { width: 100%; height: 53px; border: 1px solid transparent; outline: none; border-radius: 13px; padding: 0 18px; background: #0e141c; color: #fff; font-size: 14px; box-shadow: inset 5px 5px 10px rgba(0, 0, 0, .8), inset -3px -3px 7px rgba(255, 255, 255, .035); transition: .35s; } .field label { position: absolute; left: 18px; top: 17px; padding: 0 5px; color: #667384; background: #0e141c; pointer-events: none; font-size: 13px; transition: .3s; } .field input:focus { border-color: #00eaff; box-shadow: inset 5px 5px 10px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 234, 255, .25), 0 0 18px rgba(0, 234, 255, .28); } .field input:focus+label, .field input:not(:placeholder-shown)+label { top: -7px; color: #00eaff; font-size: 10px; text-shadow: 0 0 7px #00eaff; } /* ========================= PASSWORD ========================= */ .password-field input { padding-right: 52px; } .eye { position: absolute; right: 17px; top: 17px; color: #657385; cursor: pointer; font-size: 17px; transition: .3s; } .eye:hover { color: #00eaff; text-shadow: 0 0 8px #00eaff; } /* ========================= OPTIONS ========================= */ .options { display: flex; justify-content: space-between; align-items: center; margin: 2px 2px 22px; font-size: 11px; } .remember { display: flex; align-items: center; gap: 6px; color: #718091; cursor: pointer; } .remember input { accent-color: #00eaff; } .link { color: #00eaff; cursor: pointer; text-decoration: none; } .link:hover { text-shadow: 0 0 8px #00eaff; } /* ========================= ELECTRIC BUTTON ========================= */ .main-btn { width: 100%; height: 53px; position: relative; border: none; border-radius: 13px; cursor: pointer; overflow: hidden; color: #001015; font-weight: bold; font-size: 14px; letter-spacing: 1.5px; background: linear-gradient(120deg, #00a9c1, #00eaff, #9cffff, #00a9c1); background-size: 250% 100%; box-shadow: 0 8px 20px rgba(0, 0, 0, .6), 0 0 20px rgba(0, 234, 255, .25); animation: buttonMove 4s linear infinite; transition: .3s; } @keyframes buttonMove { to { background-position: 250% 0; } } .main-btn::before { content: ""; position: absolute; width: 70px; height: 150%; top: -25%; left: -100px; background: rgba(255, 255, 255, .55); transform: rotate(20deg); transition: .55s; } .main-btn:hover::before { left: 120%; } .main-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0, 0, 0, .75), 0 0 35px rgba(0, 234, 255, .65); } .main-btn:active { transform: translateY(2px); box-shadow: inset 5px 5px 10px rgba(0, 0, 0, .4); } /* ========================= DIVIDER ========================= */ .divider { display: flex; align-items: center; gap: 10px; margin: 22px 0; color: #566272; font-size: 10px; } .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #293541, transparent); } /* ========================= SOCIAL ========================= */ .social { display: flex; gap: 10px; } .social button { flex: 1; height: 42px; border: none; border-radius: 11px; background: #10161e; color: #8592a1; cursor: pointer; box-shadow: 5px 5px 10px rgba(0, 0, 0, .7), -3px -3px 7px rgba(255, 255, 255, .03); transition: .3s; } .social button:hover { color: #00eaff; transform: translateY(-2px); box-shadow: 0 0 15px rgba(0, 234, 255, .2), 5px 5px 10px rgba(0, 0, 0, .7); } /* ========================= SWITCH ========================= */ .switch-text { text-align: center; margin-top: 22px; color: #697788; font-size: 12px; } .switch-btn { color: #00eaff; cursor: pointer; margin-left: 5px; font-weight: bold; transition: .3s; } .switch-btn:hover { text-shadow: 0 0 10px #00eaff; } /* ========================= CHECKBOX ========================= */ .terms { display: flex; gap: 8px; align-items: flex-start; color: #687688; font-size: 10px; line-height: 1.5; margin: 2px 2px 20px; } .terms input { margin-top: 2px; accent-color: #00eaff; } .terms span { color: #00eaff; } /* ========================= SUCCESS MESSAGE ========================= */ .message { text-align: center; margin-top: 12px; min-height: 16px; font-size: 11px; color: #00eaff; } /* ========================= MOBILE ========================= */ @media(max-width:500px) { .flip-container { height: 620px; } .card-inner { padding: 34px 22px; } .title { font-size: 25px; } .social { gap: 7px; } .social button { font-size: 11px; } }
/* ========================= FLIP CARD ========================= */ function flipCard() { const card = document.getElementById("flipCard"); card.classList.toggle("flipped"); } /* ========================= PASSWORD TOGGLE ========================= */ function togglePassword(id, element) { const input = document.getElementById(id); if (input.type === "password") { input.type = "text"; element.style.color = "#00eaff"; } else { input.type = "password"; element.style.color = ""; } } /* ========================= LOGIN DEMO ========================= */ document .getElementById("loginForm") .addEventListener("submit", function(e) { e.preventDefault(); const message = document.getElementById("loginMessage"); message.textContent = "✓ Login successful"; setTimeout(() => { message.textContent = ""; }, 3000); }); /* ========================= SIGNUP DEMO ========================= */ document .getElementById("signupForm") .addEventListener("submit", function(e) { e.preventDefault(); const password = document.getElementById("signupPassword").value; const confirm = document.getElementById("confirmPassword").value; const message = document.getElementById("signupMessage"); if (password !== confirm) { message.style.color = "#ff4268"; message.textContent = "✕ Passwords do not match"; return; } message.style.color = "#00ffb3"; message.textContent = "✓ Account created successfully"; setTimeout(() => { message.textContent = ""; }, 3000); });
Live Preview