| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
| <title>Modern Sign Up</title> |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet"> |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> |
|
|
| <style> |
| |
| * { |
| margin: 0; |
| padding: 0; |
| box-sizing: border-box; |
| font-family: 'Poppins', sans-serif; |
| -webkit-tap-highlight-color: transparent; |
| } |
| |
| body { |
| min-height: 100vh; |
| min-height: -webkit-fill-available; |
| display: flex; |
| justify-content: center; |
| align-items: center; |
| background-color: #0f0f1a; |
| |
| |
| overflow-x: hidden; |
| overflow-y: auto; |
| padding: 40px 0; |
| |
| position: relative; |
| } |
| |
| |
| body::before { |
| content: ''; |
| position: fixed; |
| top: -50%; |
| left: -50%; |
| width: 200%; |
| height: 200%; |
| background: radial-gradient(circle, #4F46E5 0%, #7C3AED 30%, #EC4899 60%, #0f0f1a 80%); |
| background-size: 200% 200%; |
| animation: auroraMove 15s ease infinite alternate; |
| opacity: 0.5; |
| z-index: -1; |
| filter: blur(80px); |
| pointer-events: none; |
| } |
| |
| @keyframes auroraMove { |
| 0% { transform: translate(0, 0) rotate(0deg); } |
| 50% { transform: translate(-10%, 5%) rotate(10deg); } |
| 100% { transform: translate(5%, -10%) rotate(-5deg); } |
| } |
| |
| |
| .login-card-container { |
| perspective: 1500px; |
| width: 100%; |
| display: flex; |
| justify-content: center; |
| padding: 20px; |
| } |
| |
| .login-card { |
| width: 100%; |
| max-width: 420px; |
| padding: 40px 30px; |
| border-radius: 40px; |
| background: rgba(255, 255, 255, 0.05); |
| backdrop-filter: blur(25px); |
| -webkit-backdrop-filter: blur(25px); |
| border: 1px solid rgba(255, 255, 255, 0.15); |
| box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05), |
| 0 20px 40px rgba(0, 0, 0, 0.3); |
| color: #fff; |
| text-align: center; |
| transition: transform 0.1s ease-out; |
| transform-style: preserve-3d; |
| will-change: transform; |
| } |
| |
| .login-card h2 { |
| font-weight: 700; |
| font-size: 30px; |
| margin-bottom: 5px; |
| background: linear-gradient(to right, #fff, #c4b5fd); |
| -webkit-background-clip: text; |
| -webkit-text-fill-color: transparent; |
| } |
| |
| .login-card p.subtitle { |
| font-size: 13px; |
| color: rgba(255, 255, 255, 0.6); |
| margin-bottom: 25px; |
| } |
| |
| |
| .input-group { |
| position: relative; |
| margin-bottom: 15px; |
| text-align: left; |
| } |
| |
| .input-group.password-group { |
| margin-bottom: 5px; |
| } |
| |
| .input-group i.field-icon { |
| position: absolute; |
| top: 50%; |
| left: 20px; |
| transform: translateY(-50%); |
| color: rgba(255, 255, 255, 0.5); |
| font-size: 16px; |
| pointer-events: none; |
| transition: 0.3s; |
| } |
| |
| .input-group input { |
| width: 100%; |
| padding: 16px 50px 16px 50px; |
| border-radius: 50px; |
| border: none; |
| outline: none; |
| background: rgba(255, 255, 255, 0.08); |
| color: #fff; |
| font-size: 16px; |
| font-weight: 400; |
| transition: all 0.3s ease; |
| box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1); |
| } |
| |
| .input-group input::placeholder { color: rgba(255, 255, 255, 0.4); } |
| |
| .input-group input:focus { |
| background: rgba(255, 255, 255, 0.15); |
| box-shadow: 0 0 15px rgba(124, 58, 237, 0.3), inset 2px 2px 5px rgba(0,0,0,0.1); |
| } |
| |
| .input-group input:focus + i.field-icon { color: #c4b5fd; } |
| |
| .input-group input.error { |
| border: 1px solid #ef4444; |
| box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); |
| } |
| |
| .toggle-password { |
| position: absolute; |
| right: 20px; |
| top: 50%; |
| transform: translateY(-50%); |
| cursor: pointer; |
| color: rgba(255, 255, 255, 0.5); |
| transition: 0.3s; |
| padding: 5px; |
| } |
| .toggle-password:hover { color: #fff; } |
| |
| |
| .feedback-container { |
| height: 20px; |
| margin-bottom: 10px; |
| padding: 0 20px; |
| display: flex; |
| align-items: center; |
| justify-content: flex-start; |
| } |
| |
| .strength-bar-bg { |
| width: 100%; |
| height: 4px; |
| background: rgba(255, 255, 255, 0.1); |
| border-radius: 10px; |
| overflow: hidden; |
| display: none; |
| position: relative; |
| } |
| |
| .strength-bar-fill { |
| height: 100%; |
| width: 0%; |
| border-radius: 10px; |
| transition: width 0.3s ease, background-color 0.3s ease; |
| } |
| |
| .feedback-text { |
| font-size: 12px; |
| font-weight: 500; |
| opacity: 0; |
| transition: opacity 0.3s; |
| margin-left: 5px; |
| } |
| |
| .text-weak { color: #ef4444; } |
| .text-medium { color: #f59e0b; } |
| .text-strong { color: #10b981; } |
| .text-match { color: #10b981; } |
| .text-mismatch { color: #ef4444; } |
| |
| |
| .login-btn { |
| width: 100%; |
| padding: 16px; |
| border-radius: 50px; |
| border: none; |
| font-size: 16px; |
| font-weight: 600; |
| color: #fff; |
| cursor: pointer; |
| background: linear-gradient(135deg, #4F46E5, #EC4899); |
| box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4); |
| transition: all 0.3s ease; |
| margin-top: 10px; |
| user-select: none; |
| } |
| |
| .login-btn:hover { |
| background: linear-gradient(135deg, #4338ca, #db2777); |
| transform: translateY(-2px) scale(1.01); |
| box-shadow: 0 15px 30px rgba(124, 58, 237, 0.6); |
| } |
| |
| |
| .divider { |
| margin: 20px 0 15px; |
| display: flex; |
| align-items: center; |
| color: rgba(255, 255, 255, 0.4); |
| font-size: 12px; |
| text-transform: uppercase; |
| letter-spacing: 1px; |
| } |
| .divider::before, .divider::after { |
| content: ""; |
| flex: 1; |
| height: 1px; |
| background: rgba(255, 255, 255, 0.2); |
| } |
| .divider span { margin: 0 10px; } |
| |
| |
| .social-container { |
| display: flex; |
| gap: 15px; |
| margin-bottom: 20px; |
| } |
| |
| .social-btn { |
| flex: 1; |
| height: 50px; |
| border-radius: 50px; |
| border: 1px solid rgba(255, 255, 255, 0.2); |
| background: rgba(255, 255, 255, 0.05); |
| color: white; |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| font-size: 18px; |
| cursor: pointer; |
| transition: all 0.3s ease; |
| } |
| |
| .social-btn:hover { transform: translateY(-2px); border-color: transparent; } |
| .social-btn.google:hover { background-color: #DB4437; box-shadow: 0 5px 15px rgba(219, 68, 55, 0.4); } |
| .social-btn.github:hover { background-color: #111; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); } |
| |
| .links { |
| font-size: 13px; |
| color: rgba(255, 255, 255, 0.6); |
| } |
| .links a { |
| color: #fff; |
| text-decoration: none; |
| font-weight: 600; |
| margin-left: 5px; |
| } |
| |
| |
| .shake { animation: shake 0.4s ease-in-out; } |
| @keyframes shake { |
| 0%, 100% { transform: translateX(0); } |
| 25% { transform: translateX(-8px); } |
| 75% { transform: translateX(8px); } |
| } |
| |
| @media (max-width: 480px) { |
| .login-card { padding: 30px 20px; } |
| .login-card h2 { font-size: 26px; } |
| .social-container { gap: 10px; } |
| } |
| </style> |
| </head> |
| <body> |
|
|
| <div class="login-card-container"> |
| <div class="login-card" id="tiltCard"> |
| <h2>Create Account</h2> |
| <p class="subtitle">Join us and start your journey</p> |
|
|
| <form id="signupForm"> |
| <div class="input-group"> |
| <input type="text" id="fullname" placeholder="Full Name" autocomplete="name" required> |
| <i class="fa-regular fa-id-card field-icon"></i> |
| </div> |
|
|
| <div class="input-group"> |
| <input type="email" id="email" placeholder="Email Address" autocomplete="email" required> |
| <i class="fa-regular fa-envelope field-icon"></i> |
| </div> |
|
|
| <div class="input-group"> |
| <input type="text" id="username" placeholder="Username" autocomplete="username" required> |
| <i class="fa-solid fa-at field-icon"></i> |
| </div> |
|
|
| <div class="input-group password-group"> |
| <input type="password" id="password" placeholder="Password" required> |
| <i class="fa-solid fa-lock field-icon"></i> |
| <i class="fa-regular fa-eye toggle-password" data-target="password"></i> |
| </div> |
| |
| <div class="feedback-container"> |
| <div class="strength-bar-bg" id="strengthBarBg"> |
| <div class="strength-bar-fill" id="strengthFill"></div> |
| </div> |
| <span id="strengthText" class="feedback-text"></span> |
| </div> |
|
|
| <div class="input-group password-group"> |
| <input type="password" id="confirm_password" placeholder="Confirm Password" required> |
| <i class="fa-solid fa-lock field-icon"></i> |
| <i class="fa-regular fa-eye toggle-password" data-target="confirm_password"></i> |
| </div> |
|
|
| <div class="feedback-container"> |
| <span id="matchText" class="feedback-text"></span> |
| </div> |
|
|
| <button type="submit" class="login-btn" id="signupBtn">Sign Up</button> |
| </form> |
|
|
| <div class="divider"> |
| <span>Or sign up with</span> |
| </div> |
|
|
| <div class="social-container"> |
| <button class="social-btn google"><i class="fab fa-google"></i></button> |
| <button class="social-btn github"><i class="fab fa-github"></i></button> |
| </div> |
|
|
| <div class="links"> |
| Already have an account? <a href="login.html">Log In</a> |
| </div> |
| </div> |
| </div> |
|
|
| <script> |
| |
| |
| |
| const card = document.getElementById('tiltCard'); |
| const container = document.querySelector('.login-card-container'); |
| |
| if (window.matchMedia("(pointer: fine)").matches) { |
| container.addEventListener('mousemove', (e) => { |
| const rect = container.getBoundingClientRect(); |
| const x = e.clientX - rect.left - rect.width / 2; |
| const y = e.clientY - rect.top - rect.height / 2; |
| |
| const multiple = 15; |
| const rotateX = (y / rect.height) * -multiple; |
| const rotateY = (x / rect.width) * multiple; |
| |
| card.style.transform = `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; |
| }); |
| container.addEventListener('mouseleave', () => { |
| card.style.transform = `rotateX(0deg) rotateY(0deg)`; |
| }); |
| } |
| |
| |
| const toggleBtns = document.querySelectorAll('.toggle-password'); |
| toggleBtns.forEach(btn => { |
| btn.addEventListener('click', () => { |
| const targetId = btn.getAttribute('data-target'); |
| const input = document.getElementById(targetId); |
| const type = input.getAttribute('type') === 'password' ? 'text' : 'password'; |
| input.setAttribute('type', type); |
| |
| btn.classList.toggle('fa-eye'); |
| btn.classList.toggle('fa-eye-slash'); |
| }); |
| }); |
| |
| |
| const passwordInput = document.getElementById('password'); |
| const confirmInput = document.getElementById('confirm_password'); |
| |
| |
| const strengthBarBg = document.getElementById('strengthBarBg'); |
| const strengthFill = document.getElementById('strengthFill'); |
| const strengthText = document.getElementById('strengthText'); |
| |
| |
| const matchText = document.getElementById('matchText'); |
| |
| |
| passwordInput.addEventListener('input', () => { |
| const val = passwordInput.value; |
| |
| |
| if(val.length > 0) { |
| strengthBarBg.style.display = 'block'; |
| strengthText.style.opacity = '1'; |
| } else { |
| strengthBarBg.style.display = 'none'; |
| strengthText.style.opacity = '0'; |
| return; |
| } |
| |
| |
| let score = 0; |
| if(val.length >= 8) score++; |
| if(/[0-9]/.test(val)) score++; |
| if(/[!@#$%^&*]/.test(val)) score++; |
| if(/[A-Z]/.test(val)) score++; |
| |
| |
| if(val.length < 6) { |
| strengthFill.style.width = '20%'; |
| strengthFill.style.backgroundColor = '#ef4444'; |
| strengthText.innerText = 'Too Short'; |
| strengthText.className = 'feedback-text text-weak'; |
| } else if(score < 2) { |
| strengthFill.style.width = '40%'; |
| strengthFill.style.backgroundColor = '#ef4444'; |
| strengthText.innerText = 'Weak'; |
| strengthText.className = 'feedback-text text-weak'; |
| } else if(score === 2) { |
| strengthFill.style.width = '70%'; |
| strengthFill.style.backgroundColor = '#f59e0b'; |
| strengthText.innerText = 'Medium'; |
| strengthText.className = 'feedback-text text-medium'; |
| } else { |
| strengthFill.style.width = '100%'; |
| strengthFill.style.backgroundColor = '#10b981'; |
| strengthText.innerText = 'Strong'; |
| strengthText.className = 'feedback-text text-strong'; |
| } |
| |
| |
| checkMatch(); |
| }); |
| |
| |
| confirmInput.addEventListener('input', checkMatch); |
| |
| function checkMatch() { |
| const pass = passwordInput.value; |
| const conf = confirmInput.value; |
| |
| if (conf.length === 0) { |
| matchText.style.opacity = '0'; |
| return; |
| } |
| |
| matchText.style.opacity = '1'; |
| |
| if (pass === conf) { |
| matchText.innerHTML = '<i class="fa-solid fa-check"></i> Passwords match'; |
| matchText.className = 'feedback-text text-match'; |
| confirmInput.classList.remove('error'); |
| } else { |
| matchText.innerHTML = '<i class="fa-solid fa-xmark"></i> Do not match'; |
| matchText.className = 'feedback-text text-mismatch'; |
| } |
| } |
| |
| |
| const form = document.getElementById('signupForm'); |
| const signupBtn = document.getElementById('signupBtn'); |
| |
| form.addEventListener('submit', (e) => { |
| e.preventDefault(); |
| |
| |
| passwordInput.classList.remove('error'); |
| confirmInput.classList.remove('error'); |
| |
| const password = passwordInput.value; |
| const confirm = confirmInput.value; |
| |
| |
| if (password !== confirm) { |
| card.classList.add('shake'); |
| passwordInput.classList.add('error'); |
| confirmInput.classList.add('error'); |
| |
| setTimeout(() => { |
| card.classList.remove('shake'); |
| }, 1000); |
| return; |
| } |
| |
| |
| signupBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Creating Account...'; |
| signupBtn.style.opacity = '0.8'; |
| |
| setTimeout(() => { |
| signupBtn.innerHTML = 'Account Created!'; |
| signupBtn.style.background = 'linear-gradient(135deg, #10B981, #059669)'; |
| }, 2000); |
| }); |
| </script> |
| </body> |
| </html> |
|
|