-
Interactive Neon UI login form
HTML
CSS
JavaScript
Access Terminal
Please authenticate to continue
Username
Password
Forgot Access?
Initialize Session
:root { --bg-color: #05070b; --tube-color: #f3faff; --neon-glow: #00f0ff; --neon-dark: #0066cc; --text-muted: #6272a4; /* New Status Colors */ --neon-success: #39ff14; --neon-failed: #ff3131; } /* --- [Existing CSS remains exactly the same as previous step] --- */ * { box-sizing: border-box; margin: 0; padding: 0; } body { background-color: var(--bg-color); height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: 'Courier New', Courier, monospace; overflow: hidden; perspective: 1000px; } .light-fixture { position: absolute; top: 0; display: flex; justify-content: center; width: 100%; z-index: 10; } .tube { width: 280px; height: 6px; background: var(--tube-color); border-radius: 0 0 4px 4px; box-shadow: 0 2px 10px #fff, 0 4px 25px var(--neon-glow), 0 10px 50px var(--neon-dark); animation: flicker 4s infinite alternate; } .bracket { width: 12px; height: 10px; background: #222; border-bottom: 2px solid #444; } .bracket.left { border-radius: 0 0 0 4px; } .bracket.right { border-radius: 0 0 4px 0; } .light-beam { position: absolute; top: 6px; width: 450px; height: 600px; background: linear-gradient(to bottom, rgba(0, 240, 255, 0.12) 0%, rgba(0, 102, 204, 0.03) 50%, rgba(0, 0, 0, 0) 100%); clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%); pointer-events: none; animation: beam-pulse 4s infinite alternate; } .login-container { z-index: 5; transform: rotateX(5deg); transition: transform 0.5s ease; } .login-container:hover { transform: rotateX(0deg) scale(1.02); } .login-form { background: rgba(10, 15, 26, 0.75); padding: 50px 40px; border-radius: 16px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(0, 240, 255, 0.15); box-shadow: 0 -4px 30px rgba(0, 240, 255, 0.2), 0 20px 50px rgba(0, 0, 0, 0.9); width: 360px; } h2 { color: #fff; font-size: 1.6rem; letter-spacing: 2px; margin-bottom: 6px; text-transform: uppercase; text-shadow: 0 0 10px rgba(255, 255, 255, 0.2); } .subtitle { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 30px; } .input-group { position: relative; margin-bottom: 30px; } .input-group input { width: 100%; padding: 12px 10px 10px 5px; background: transparent; border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.2); color: #fff; font-size: 1rem; outline: none; transition: border-color 0.3s ease; } .input-group label { position: absolute; top: 12px; left: 5px; color: var(--text-muted); pointer-events: none; transition: 0.3s ease all; font-size: 0.9rem; } .input-bar { position: relative; display: block; width: 100%; } .input-bar::before { content: ''; height: 2px; width: 0; bottom: 0; position: absolute; background: var(--neon-glow); box-shadow: 0 0 10px var(--neon-glow); transition: 0.4s ease all; left: 50%; } .input-group input:focus~label, .input-group input:not(:placeholder-shown)~label { top: -15px; font-size: 0.75rem; color: var(--neon-glow); letter-spacing: 1px; } .input-group input:focus~.input-bar::before { width: 100%; left: 0; } .input-group input:focus { border-bottom-color: transparent; } .form-actions { display: flex; justify-content: flex-end; margin-top: -10px; margin-bottom: 30px; } .forgot-pass { color: var(--text-muted); font-size: 0.75rem; text-decoration: none; transition: color 0.2s; } .forgot-pass:hover { color: var(--neon-glow); } .submit-btn { width: 100%; padding: 14px; background: transparent; border: 1px solid var(--neon-glow); border-radius: 4px; color: var(--neon-glow); font-family: inherit; font-weight: bold; font-size: 0.9rem; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; position: relative; overflow: hidden; transition: all 0.4s ease; } .submit-btn:hover { background: var(--neon-glow); color: #000; box-shadow: 0 0 30px var(--neon-glow); } @keyframes flicker { 0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; box-shadow: 0 2px 10px #fff, 0 4px 25px var(--neon-glow), 0 10px 50px var(--neon-dark); } 20%, 24%, 55% { opacity: 0.6; box-shadow: 0 2px 5px #fff, 0 4px 10px var(--neon-dark); } } @keyframes beam-pulse { 0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: 0.4; } } /* --- NEW: Interactive Notification Banner Elements --- */ .notification-container { max-height: 0; opacity: 0; transform: translateY(-10px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border-radius: 6px; font-size: 0.8rem; letter-spacing: 1px; margin-bottom: 0; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; } /* Dynamic State Triggers via JS classes */ .notification-container.show-success { max-height: 50px; opacity: 1; transform: translateY(0); padding: 12px; margin-bottom: 25px; background: rgba(57, 255, 20, 0.08); border-color: var(--neon-success); color: var(--neon-success); box-shadow: 0 0 15px rgba(57, 255, 20, 0.2); } .notification-container.show-failed { max-height: 50px; opacity: 1; transform: translateY(0); padding: 12px; margin-bottom: 25px; background: rgba(255, 49, 49, 0.08); border-color: var(--neon-failed); color: var(--neon-failed); box-shadow: 0 0 15px rgba(255, 49, 49, 0.2); } /* Loading State on Button */ .submit-btn.loading { color: transparent; pointer-events: none; } .submit-btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; top: 50%; left: 50%; margin-top: -10px; margin-left: -10px; border: 2px solid transparent; border-top-color: var(--neon-glow); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Testing Dashboard Styling */ .demo-controls { position: absolute; bottom: 20px; display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, 0.03); padding: 10px 20px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); } .demo-controls p { color: var(--text-muted); font-size: 0.75rem; } .demo-controls button { background: #111; color: #fff; border: 1px solid #333; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.7rem; } .demo-controls button:hover { background: #222; border-color: #50fa7b; }
document.getElementById('loginForm').addEventListener('submit', function(e) { e.preventDefault(); // Stop standard page reload const submitBtn = document.getElementById('submitBtn'); const usernameInput = document.getElementById('username').value; // Trigger loading spinner decoration submitBtn.classList.add('loading'); clearNotification(); // Simulating a server check delays setTimeout(() => { submitBtn.classList.remove('loading'); // Simple logic for standard form submission: // If they type "admin", grant access. Otherwise, fail. if (usernameInput.toLowerCase() === 'admin') { displayStatus('success', 'ACCESS GRANTED. DEPLOYING SESSION.'); } else { displayStatus('failed', 'ERR: INVALID CREDENTIALS.'); } }, 80000 / 100); // 800ms simulation }); // Helper Function to cleanly inject messages function displayStatus(type, message) { const notifyElement = document.getElementById('notification'); const textElement = notifyElement.querySelector('.msg-text'); clearNotification(); textElement.textContent = message; if (type === 'success') { notifyElement.classList.add('show-success'); } else if (type === 'failed') { notifyElement.classList.add('show-failed'); } } function clearNotification() { const notifyElement = document.getElementById('notification'); notifyElement.classList.remove('show-success', 'show-failed'); } // Global hook specifically for the bottom layout testing toggles function triggerDemo(state) { if (state === 'success') { displayStatus('success', 'SUCCESS: TERMINAL LINK ESTABLISHED.'); } else { displayStatus('failed', 'CRITICAL ERROR: CONNECTION TIMEOUT.'); } }
Live Preview