api-ix commited on
Commit
f71b376
·
verified ·
1 Parent(s): 1af6af9

Create signup.html

Browse files
Files changed (1) hide show
  1. signup.html +385 -0
signup.html ADDED
@@ -0,0 +1,385 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
6
+ <title>Modern Sign Up</title>
7
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+
10
+ <style>
11
+ /* --- RESET & CORE STYLES --- */
12
+ * {
13
+ margin: 0;
14
+ padding: 0;
15
+ box-sizing: border-box;
16
+ font-family: 'Poppins', sans-serif;
17
+ -webkit-tap-highlight-color: transparent;
18
+ }
19
+
20
+ body {
21
+ min-height: 100vh;
22
+ min-height: -webkit-fill-available;
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ background-color: #0f0f1a;
27
+ overflow: hidden;
28
+ position: relative;
29
+ touch-action: none;
30
+ }
31
+
32
+ /* --- AURORA BACKGROUND --- */
33
+ body::before {
34
+ content: '';
35
+ position: absolute;
36
+ top: -50%;
37
+ left: -50%;
38
+ width: 200%;
39
+ height: 200%;
40
+ background: radial-gradient(circle, #4F46E5 0%, #7C3AED 30%, #EC4899 60%, #0f0f1a 80%);
41
+ background-size: 200% 200%;
42
+ animation: auroraMove 15s ease infinite alternate;
43
+ opacity: 0.5;
44
+ z-index: -1;
45
+ filter: blur(80px);
46
+ }
47
+
48
+ @keyframes auroraMove {
49
+ 0% { transform: translate(0, 0) rotate(0deg); }
50
+ 50% { transform: translate(-10%, 5%) rotate(10deg); }
51
+ 100% { transform: translate(5%, -10%) rotate(-5deg); }
52
+ }
53
+
54
+ /* --- CARD STYLING --- */
55
+ .login-card-container {
56
+ perspective: 1500px;
57
+ width: 100%;
58
+ display: flex;
59
+ justify-content: center;
60
+ padding: 20px;
61
+ }
62
+
63
+ .login-card {
64
+ width: 100%;
65
+ max-width: 420px;
66
+ padding: 40px 30px; /* Slightly less vertical padding to fit more fields */
67
+ border-radius: 40px;
68
+ background: rgba(255, 255, 255, 0.05);
69
+ backdrop-filter: blur(25px);
70
+ -webkit-backdrop-filter: blur(25px);
71
+ border: 1px solid rgba(255, 255, 255, 0.15);
72
+ box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05),
73
+ 0 20px 40px rgba(0, 0, 0, 0.3);
74
+ color: #fff;
75
+ text-align: center;
76
+ transition: transform 0.1s ease-out;
77
+ transform-style: preserve-3d;
78
+ will-change: transform;
79
+ }
80
+
81
+ .login-card h2 {
82
+ font-weight: 700;
83
+ font-size: 30px; /* Slightly smaller to save space */
84
+ margin-bottom: 5px;
85
+ background: linear-gradient(to right, #fff, #c4b5fd);
86
+ -webkit-background-clip: text;
87
+ -webkit-text-fill-color: transparent;
88
+ }
89
+
90
+ .login-card p.subtitle {
91
+ font-size: 13px;
92
+ color: rgba(255, 255, 255, 0.6);
93
+ margin-bottom: 25px;
94
+ }
95
+
96
+ /* --- INPUT FIELDS --- */
97
+ .input-group {
98
+ position: relative;
99
+ margin-bottom: 15px; /* Reduced margin for compact fit */
100
+ text-align: left;
101
+ }
102
+
103
+ .input-group i.field-icon {
104
+ position: absolute;
105
+ top: 50%;
106
+ left: 20px;
107
+ transform: translateY(-50%);
108
+ color: rgba(255, 255, 255, 0.5);
109
+ font-size: 16px;
110
+ pointer-events: none;
111
+ transition: 0.3s;
112
+ }
113
+
114
+ .input-group input {
115
+ width: 100%;
116
+ padding: 16px 50px 16px 50px;
117
+ border-radius: 50px;
118
+ border: none;
119
+ outline: none;
120
+ background: rgba(255, 255, 255, 0.08);
121
+ color: #fff;
122
+ font-size: 16px;
123
+ font-weight: 400;
124
+ transition: all 0.3s ease;
125
+ box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
126
+ }
127
+
128
+ .input-group input::placeholder { color: rgba(255, 255, 255, 0.4); }
129
+
130
+ .input-group input:focus {
131
+ background: rgba(255, 255, 255, 0.15);
132
+ box-shadow: 0 0 15px rgba(124, 58, 237, 0.3), inset 2px 2px 5px rgba(0,0,0,0.1);
133
+ }
134
+
135
+ .input-group input:focus + i.field-icon { color: #c4b5fd; }
136
+
137
+ /* Error state styling */
138
+ .input-group input.error {
139
+ border: 1px solid #ef4444;
140
+ box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
141
+ }
142
+
143
+ .toggle-password {
144
+ position: absolute;
145
+ right: 20px;
146
+ top: 50%;
147
+ transform: translateY(-50%);
148
+ cursor: pointer;
149
+ color: rgba(255, 255, 255, 0.5);
150
+ transition: 0.3s;
151
+ padding: 5px;
152
+ }
153
+ .toggle-password:hover { color: #fff; }
154
+
155
+ /* --- BUTTON --- */
156
+ .login-btn {
157
+ width: 100%;
158
+ padding: 16px;
159
+ border-radius: 50px;
160
+ border: none;
161
+ font-size: 16px;
162
+ font-weight: 600;
163
+ color: #fff;
164
+ cursor: pointer;
165
+ background: linear-gradient(135deg, #4F46E5, #EC4899);
166
+ box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
167
+ transition: all 0.3s ease;
168
+ margin-top: 10px;
169
+ user-select: none;
170
+ }
171
+
172
+ .login-btn:hover {
173
+ background: linear-gradient(135deg, #4338ca, #db2777);
174
+ transform: translateY(-2px) scale(1.01);
175
+ box-shadow: 0 15px 30px rgba(124, 58, 237, 0.6);
176
+ }
177
+
178
+ /* --- DIVIDER --- */
179
+ .divider {
180
+ margin: 20px 0 15px;
181
+ display: flex;
182
+ align-items: center;
183
+ color: rgba(255, 255, 255, 0.4);
184
+ font-size: 12px;
185
+ text-transform: uppercase;
186
+ letter-spacing: 1px;
187
+ }
188
+ .divider::before, .divider::after {
189
+ content: "";
190
+ flex: 1;
191
+ height: 1px;
192
+ background: rgba(255, 255, 255, 0.2);
193
+ }
194
+ .divider span { margin: 0 10px; }
195
+
196
+ /* --- SOCIAL BUTTONS --- */
197
+ .social-container {
198
+ display: flex;
199
+ gap: 15px;
200
+ margin-bottom: 20px;
201
+ }
202
+
203
+ .social-btn {
204
+ flex: 1;
205
+ height: 50px;
206
+ border-radius: 50px;
207
+ border: 1px solid rgba(255, 255, 255, 0.2);
208
+ background: rgba(255, 255, 255, 0.05);
209
+ color: white;
210
+ display: flex;
211
+ align-items: center;
212
+ justify-content: center;
213
+ font-size: 18px;
214
+ cursor: pointer;
215
+ transition: all 0.3s ease;
216
+ }
217
+
218
+ .social-btn:hover { transform: translateY(-2px); border-color: transparent; }
219
+ .social-btn.google:hover { background-color: #DB4437; box-shadow: 0 5px 15px rgba(219, 68, 55, 0.4); }
220
+ .social-btn.github:hover { background-color: #111; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); }
221
+
222
+ .links {
223
+ font-size: 13px;
224
+ color: rgba(255, 255, 255, 0.6);
225
+ }
226
+ .links a {
227
+ color: #fff;
228
+ text-decoration: none;
229
+ font-weight: 600;
230
+ margin-left: 5px;
231
+ }
232
+
233
+ /* --- ANIMATIONS --- */
234
+ .shake { animation: shake 0.4s ease-in-out; }
235
+ @keyframes shake {
236
+ 0%, 100% { transform: translateX(0); }
237
+ 25% { transform: translateX(-8px); }
238
+ 75% { transform: translateX(8px); }
239
+ }
240
+
241
+ /* Mobile Adjustments */
242
+ @media (max-width: 480px) {
243
+ .login-card { padding: 30px 20px; }
244
+ .login-card h2 { font-size: 26px; }
245
+ .social-container { gap: 10px; }
246
+ }
247
+ </style>
248
+ </head>
249
+ <body>
250
+
251
+ <div class="login-card-container">
252
+ <div class="login-card" id="tiltCard">
253
+ <h2>Create Account</h2>
254
+ <p class="subtitle">Join us and start your journey</p>
255
+
256
+ <form id="signupForm">
257
+ <div class="input-group">
258
+ <input type="text" id="fullname" placeholder="Full Name" autocomplete="name" required>
259
+ <i class="fa-regular fa-id-card field-icon"></i>
260
+ </div>
261
+
262
+ <div class="input-group">
263
+ <input type="text" id="username" placeholder="Username" autocomplete="username" required>
264
+ <i class="fa-solid fa-at field-icon"></i>
265
+ </div>
266
+
267
+ <div class="input-group">
268
+ <input type="password" id="password" placeholder="Password" required>
269
+ <i class="fa-solid fa-lock field-icon"></i>
270
+ <i class="fa-regular fa-eye toggle-password" data-target="password"></i>
271
+ </div>
272
+
273
+ <div class="input-group">
274
+ <input type="password" id="confirm_password" placeholder="Confirm Password" required>
275
+ <i class="fa-solid fa-lock field-icon"></i>
276
+ <i class="fa-regular fa-eye toggle-password" data-target="confirm_password"></i>
277
+ </div>
278
+
279
+ <button type="submit" class="login-btn" id="signupBtn">Sign Up</button>
280
+ </form>
281
+
282
+ <div class="divider">
283
+ <span>Or sign up with</span>
284
+ </div>
285
+
286
+ <div class="social-container">
287
+ <button class="social-btn google"><i class="fab fa-google"></i></button>
288
+ <button class="social-btn github"><i class="fab fa-github"></i></button>
289
+ </div>
290
+
291
+ <div class="links">
292
+ Already have an account? <a href="#">Log In</a>
293
+ </div>
294
+ </div>
295
+ </div>
296
+
297
+ <script>
298
+ /* --- LOGIC --- */
299
+
300
+ // 1. TILT EFFECT
301
+ const card = document.getElementById('tiltCard');
302
+ const container = document.querySelector('.login-card-container');
303
+
304
+ if (window.matchMedia("(pointer: fine)").matches) {
305
+ container.addEventListener('mousemove', (e) => {
306
+ const rect = container.getBoundingClientRect();
307
+ const x = e.clientX - rect.left - rect.width / 2;
308
+ const y = e.clientY - rect.top - rect.height / 2;
309
+
310
+ const multiple = 15;
311
+ const rotateX = (y / rect.height) * -multiple;
312
+ const rotateY = (x / rect.width) * multiple;
313
+
314
+ card.style.transform = `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
315
+ });
316
+ container.addEventListener('mouseleave', () => {
317
+ card.style.transform = `rotateX(0deg) rotateY(0deg)`;
318
+ });
319
+ }
320
+
321
+ // 2. PASSWORD TOGGLE (For both fields)
322
+ const toggleBtns = document.querySelectorAll('.toggle-password');
323
+
324
+ toggleBtns.forEach(btn => {
325
+ btn.addEventListener('click', () => {
326
+ const targetId = btn.getAttribute('data-target');
327
+ const input = document.getElementById(targetId);
328
+ const type = input.getAttribute('type') === 'password' ? 'text' : 'password';
329
+ input.setAttribute('type', type);
330
+
331
+ btn.classList.toggle('fa-eye');
332
+ btn.classList.toggle('fa-eye-slash');
333
+ });
334
+ });
335
+
336
+ // 3. FORM VALIDATION & SUBMIT
337
+ const form = document.getElementById('signupForm');
338
+ const signupBtn = document.getElementById('signupBtn');
339
+ const passInput = document.getElementById('password');
340
+ const confirmInput = document.getElementById('confirm_password');
341
+
342
+ form.addEventListener('submit', (e) => {
343
+ e.preventDefault();
344
+
345
+ // Clear previous error styles
346
+ passInput.classList.remove('error');
347
+ confirmInput.classList.remove('error');
348
+
349
+ const password = passInput.value;
350
+ const confirm = confirmInput.value;
351
+
352
+ // Check if passwords match
353
+ if (password !== confirm) {
354
+ // Shake animation
355
+ card.classList.add('shake');
356
+
357
+ // Highlight inputs red
358
+ passInput.classList.add('error');
359
+ confirmInput.classList.add('error');
360
+
361
+ // Change button text temporarily
362
+ const originalText = signupBtn.innerText;
363
+ signupBtn.innerText = "Passwords don't match";
364
+ signupBtn.style.background = "linear-gradient(135deg, #ef4444, #b91c1c)";
365
+
366
+ setTimeout(() => {
367
+ card.classList.remove('shake');
368
+ signupBtn.innerText = originalText;
369
+ signupBtn.style.background = ""; // Reset to CSS default
370
+ }, 1500);
371
+ return;
372
+ }
373
+
374
+ // Success Animation
375
+ signupBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Creating Account...';
376
+ signupBtn.style.opacity = '0.8';
377
+
378
+ setTimeout(() => {
379
+ signupBtn.innerHTML = 'Account Created!';
380
+ signupBtn.style.background = 'linear-gradient(135deg, #10B981, #059669)';
381
+ }, 2000);
382
+ });
383
+ </script>
384
+ </body>
385
+ </html>