File size: 12,400 Bytes
58e9048
 
 
 
b72d137
58e9048
 
 
 
 
 
 
 
 
 
 
b72d137
58e9048
 
 
 
b72d137
58e9048
 
 
b72d137
1af6af9
58e9048
b72d137
58e9048
 
1af6af9
58e9048
 
 
 
 
 
 
 
 
 
 
 
b72d137
58e9048
 
 
 
 
 
 
 
1af6af9
58e9048
 
b72d137
 
 
 
58e9048
 
 
b72d137
1af6af9
b72d137
 
58e9048
b72d137
 
58e9048
 
b72d137
58e9048
 
1af6af9
58e9048
 
 
 
 
 
b72d137
 
 
58e9048
 
 
 
 
 
 
 
1af6af9
58e9048
 
b72d137
58e9048
 
b72d137
58e9048
 
 
 
 
 
b72d137
58e9048
 
b72d137
1af6af9
58e9048
 
 
 
 
b72d137
 
58e9048
 
 
 
b72d137
58e9048
 
 
 
 
1af6af9
58e9048
 
 
b72d137
58e9048
b72d137
1af6af9
58e9048
 
 
b72d137
58e9048
 
 
 
 
1af6af9
58e9048
 
 
8f8212c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1af6af9
58e9048
 
b72d137
58e9048
 
b72d137
58e9048
 
 
 
b72d137
 
 
58e9048
 
 
 
1af6af9
b72d137
 
 
1af6af9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58e9048
 
 
1af6af9
b72d137
58e9048
 
 
 
 
 
 
 
 
b72d137
58e9048
 
 
b72d137
 
 
 
 
 
1af6af9
 
 
58e9048
 
 
 
 
 
 
 
1af6af9
58e9048
 
 
0c7ea39
58e9048
 
 
 
b72d137
58e9048
 
 
 
8f8212c
 
 
 
1af6af9
58e9048
 
1af6af9
 
 
 
 
622c627
1af6af9
 
622c627
1af6af9
 
 
 
58e9048
fff4be2
58e9048
 
 
 
 
b72d137
 
 
58e9048
 
 
b72d137
 
 
 
 
 
 
 
 
58e9048
b72d137
 
58e9048
b72d137
 
 
 
58e9048
b72d137
58e9048
 
 
 
 
 
 
 
 
 
b72d137
58e9048
 
 
 
b72d137
58e9048
 
 
 
b72d137
58e9048
 
 
 
 
1af6af9
58e9048
b72d137
58e9048
b72d137
 
58e9048
 
 
 
62a88e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<!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>Ultra Modern Login</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>
        /* --- RESET & CORE STYLES --- */
        * {
            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: hidden;
            position: relative;
            touch-action: none; 
        }

        /* --- AURORA BACKGROUND --- */
        body::before {
            content: '';
            position: absolute;
            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);
        }

        @keyframes auroraMove {
            0% { transform: translate(0, 0) rotate(0deg); }
            50% { transform: translate(-10%, 5%) rotate(10deg); }
            100% { transform: translate(5%, -10%) rotate(-5deg); }
        }

        /* --- CARD STYLING --- */
        .login-card-container {
            perspective: 1500px;
            width: 100%;
            display: flex;
            justify-content: center;
            padding: 20px;
        }

        .login-card {
            width: 100%;
            max-width: 420px;
            padding: 50px 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: 32px;
            margin-bottom: 8px;
            letter-spacing: -0.5px;
            background: linear-gradient(to right, #fff, #c4b5fd);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .login-card p.subtitle {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.6);
            margin-bottom: 30px;
        }

        /* --- INPUT FIELDS --- */
        .input-group {
            position: relative;
            margin-bottom: 20px;
            text-align: left;
        }

        .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; }

        .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; }

        /* --- FORGOT PASSWORD LINK --- */
        .forgot-pass {
            text-align: right;
            margin-top: -10px; /* Pull closer to input */
            margin-bottom: 20px;
            font-size: 13px;
        }
        .forgot-pass a {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            transition: color 0.3s ease;
        }
        .forgot-pass a:hover {
            color: #fff;
            text-decoration: underline;
        }

        /* --- MAIN BUTTON --- */
        .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;
            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 --- */
        .divider {
            margin: 25px 0 20px;
            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 BUTTONS --- */
        .social-container {
            display: flex;
            gap: 15px;
            margin-bottom: 25px;
        }

        .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; /* Icon size */
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        /* Hover Effects for Socials */
        .social-btn:hover {
            transform: translateY(-2px);
            border-color: transparent;
        }
        
        .social-btn.google:hover {
            background-color: #DB4437; /* Google Red */
            box-shadow: 0 5px 15px rgba(219, 68, 55, 0.4);
        }
        
        .social-btn.github:hover {
            background-color: #111; /* Github Black */
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        }

        .links {
            margin-top: 10px;
            font-size: 13px;
            color: rgba(255, 255, 255, 0.6);
        }
        .links a {
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            margin-left: 5px;
        }

        /* --- ANIMATIONS --- */
        .shake { animation: shake 0.4s ease-in-out; }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-8px); }
            75% { transform: translateX(8px); }
        }

        /* Mobile Adjustments */
        @media (max-width: 480px) {
            .login-card { padding: 40px 20px; }
            .login-card h2 { font-size: 28px; }
            .social-container { gap: 10px; }
        }
    </style>
</head>
<body>

    <div class="login-card-container">
        <div class="login-card" id="tiltCard">
            <h2>Welcome Back</h2>
            <p class="subtitle">Access your dashboard</p>

            <form id="loginForm">
                <div class="input-group">
                    <input type="text" id="username" placeholder="Email or Username" autocomplete="off" required>
                    <i class="fa-regular fa-user field-icon"></i>
                </div>

                <div class="input-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" id="togglePassword"></i>
                </div>

                <div class="forgot-pass">
                    <a href="forget.html">Forgot Password?</a>
                </div>

                <button type="submit" class="login-btn" id="loginBtn">Log In</button>
            </form>

            <div class="divider">
                <span>Or continue 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">
                No account? <a href="signup.html">Create One</a>
            </div>
        </div>
    </div>

    <script>
        /* --- LOGIC --- */

        // 1. TILT EFFECT
        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)`;
            });
        }

        // 2. PASSWORD TOGGLE
        const passwordInput = document.getElementById('password');
        const toggleBtn = document.getElementById('togglePassword');

        toggleBtn.addEventListener('click', () => {
            const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
            passwordInput.setAttribute('type', type);
            toggleBtn.classList.toggle('fa-eye');
            toggleBtn.classList.toggle('fa-eye-slash');
        });

        // 3. SUBMIT ANIMATION
        const form = document.getElementById('loginForm');
        const loginBtn = document.getElementById('loginBtn');

        form.addEventListener('submit', (e) => {
            e.preventDefault();

            const username = document.getElementById('username').value;
            const password = document.getElementById('password').value;

            if (username === "" || password === "") {
                card.classList.add('shake');
                setTimeout(() => card.classList.remove('shake'), 400);
                return;
            }

            loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Checking...';
            loginBtn.style.opacity = '0.8';
            
            setTimeout(() => {
                loginBtn.innerHTML = 'Success!';
                loginBtn.style.background = 'linear-gradient(135deg, #10B981, #059669)';
            }, 2000);
        });
    </script>
</body>
</html>