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

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +89 -40
index.html CHANGED
@@ -14,25 +14,22 @@
14
  padding: 0;
15
  box-sizing: border-box;
16
  font-family: 'Poppins', sans-serif;
17
- /* Disable blue highlight on touch devices */
18
  -webkit-tap-highlight-color: transparent;
19
  }
20
 
21
  body {
22
  min-height: 100vh;
23
- /* Fix for mobile height issues */
24
  min-height: -webkit-fill-available;
25
  display: flex;
26
  justify-content: center;
27
  align-items: center;
28
  background-color: #0f0f1a;
29
- overflow: hidden; /* Prevents scrollbars */
30
  position: relative;
31
- /* Disables browser handling of gestures like pinch-zoom */
32
  touch-action: none;
33
  }
34
 
35
- /* --- AURORA BACKGROUND ANIMATION --- */
36
  body::before {
37
  content: '';
38
  position: absolute;
@@ -54,7 +51,7 @@
54
  100% { transform: translate(5%, -10%) rotate(-5deg); }
55
  }
56
 
57
- /* --- CARD CONTAINER --- */
58
  .login-card-container {
59
  perspective: 1500px;
60
  width: 100%;
@@ -63,10 +60,9 @@
63
  padding: 20px;
64
  }
65
 
66
- /* --- GLASS CARD STYLING --- */
67
  .login-card {
68
  width: 100%;
69
- max-width: 420px; /* Responsive limit */
70
  padding: 50px 30px;
71
  border-radius: 40px;
72
  background: rgba(255, 255, 255, 0.05);
@@ -77,7 +73,7 @@
77
  0 20px 40px rgba(0, 0, 0, 0.3);
78
  color: #fff;
79
  text-align: center;
80
- transition: transform 0.1s ease-out; /* Faster transition for smoother tilt */
81
  transform-style: preserve-3d;
82
  will-change: transform;
83
  }
@@ -95,7 +91,7 @@
95
  .login-card p.subtitle {
96
  font-size: 14px;
97
  color: rgba(255, 255, 255, 0.6);
98
- margin-bottom: 35px;
99
  }
100
 
101
  /* --- INPUT FIELDS --- */
@@ -112,7 +108,7 @@
112
  transform: translateY(-50%);
113
  color: rgba(255, 255, 255, 0.5);
114
  font-size: 16px;
115
- pointer-events: none; /* Allows clicking through icon */
116
  transition: 0.3s;
117
  }
118
 
@@ -124,25 +120,20 @@
124
  outline: none;
125
  background: rgba(255, 255, 255, 0.08);
126
  color: #fff;
127
- /* Font size 16px prevents iOS zoom on focus */
128
  font-size: 16px;
129
  font-weight: 400;
130
  transition: all 0.3s ease;
131
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
132
  }
133
 
134
- .input-group input::placeholder {
135
- color: rgba(255, 255, 255, 0.4);
136
- }
137
 
138
  .input-group input:focus {
139
  background: rgba(255, 255, 255, 0.15);
140
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3), inset 2px 2px 5px rgba(0,0,0,0.1);
141
  }
142
 
143
- .input-group input:focus + i.field-icon {
144
- color: #c4b5fd;
145
- }
146
 
147
  .toggle-password {
148
  position: absolute;
@@ -152,11 +143,11 @@
152
  cursor: pointer;
153
  color: rgba(255, 255, 255, 0.5);
154
  transition: 0.3s;
155
- padding: 5px; /* Bigger touch target */
156
  }
157
  .toggle-password:hover { color: #fff; }
158
 
159
- /* --- BUTTON --- */
160
  .login-btn {
161
  width: 100%;
162
  padding: 16px;
@@ -169,23 +160,75 @@
169
  background: linear-gradient(135deg, #4F46E5, #EC4899);
170
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
171
  transition: all 0.3s ease;
172
- margin-top: 10px;
173
- /* Disable selection */
174
  user-select: none;
175
  }
176
 
177
  .login-btn:hover {
178
  background: linear-gradient(135deg, #4338ca, #db2777);
179
- transform: translateY(-3px) scale(1.02);
180
  box-shadow: 0 15px 30px rgba(124, 58, 237, 0.6);
181
  }
182
 
183
- .login-btn:active {
184
- transform: translateY(0) scale(0.98);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  }
186
 
187
  .links {
188
- margin-top: 25px;
189
  font-size: 13px;
190
  color: rgba(255, 255, 255, 0.6);
191
  }
@@ -206,12 +249,9 @@
206
 
207
  /* Mobile Adjustments */
208
  @media (max-width: 480px) {
209
- .login-card {
210
- padding: 40px 20px;
211
- }
212
- .login-card h2 {
213
- font-size: 28px;
214
- }
215
  }
216
  </style>
217
  </head>
@@ -220,7 +260,7 @@
220
  <div class="login-card-container">
221
  <div class="login-card" id="tiltCard">
222
  <h2>Welcome Back</h2>
223
- <p class="subtitle">Enter your credentials to access your account.</p>
224
 
225
  <form id="loginForm">
226
  <div class="input-group">
@@ -234,11 +274,24 @@
234
  <i class="fa-regular fa-eye toggle-password" id="togglePassword"></i>
235
  </div>
236
 
237
- <button type="submit" class="login-btn" id="loginBtn">Let's Go</button>
238
  </form>
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  <div class="links">
241
- Don't have an account? <a href="#">Sign Up</a>
242
  </div>
243
  </div>
244
  </div>
@@ -250,14 +303,12 @@
250
  const card = document.getElementById('tiltCard');
251
  const container = document.querySelector('.login-card-container');
252
 
253
- // Only apply tilt on non-touch devices to save battery/performance on mobile
254
  if (window.matchMedia("(pointer: fine)").matches) {
255
  container.addEventListener('mousemove', (e) => {
256
  const rect = container.getBoundingClientRect();
257
  const x = e.clientX - rect.left - rect.width / 2;
258
  const y = e.clientY - rect.top - rect.height / 2;
259
 
260
- // Reduced multiplier for subtler effect
261
  const multiple = 15;
262
  const rotateX = (y / rect.height) * -multiple;
263
  const rotateY = (x / rect.width) * multiple;
@@ -291,15 +342,13 @@
291
  const username = document.getElementById('username').value;
292
  const password = document.getElementById('password').value;
293
 
294
- // Simple validation check
295
  if (username === "" || password === "") {
296
  card.classList.add('shake');
297
  setTimeout(() => card.classList.remove('shake'), 400);
298
  return;
299
  }
300
 
301
- // Loading state
302
- loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Authenticating...';
303
  loginBtn.style.opacity = '0.8';
304
 
305
  setTimeout(() => {
 
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;
 
51
  100% { transform: translate(5%, -10%) rotate(-5deg); }
52
  }
53
 
54
+ /* --- CARD STYLING --- */
55
  .login-card-container {
56
  perspective: 1500px;
57
  width: 100%;
 
60
  padding: 20px;
61
  }
62
 
 
63
  .login-card {
64
  width: 100%;
65
+ max-width: 420px;
66
  padding: 50px 30px;
67
  border-radius: 40px;
68
  background: 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
  }
 
91
  .login-card p.subtitle {
92
  font-size: 14px;
93
  color: rgba(255, 255, 255, 0.6);
94
+ margin-bottom: 30px;
95
  }
96
 
97
  /* --- INPUT FIELDS --- */
 
108
  transform: translateY(-50%);
109
  color: rgba(255, 255, 255, 0.5);
110
  font-size: 16px;
111
+ pointer-events: none;
112
  transition: 0.3s;
113
  }
114
 
 
120
  outline: none;
121
  background: rgba(255, 255, 255, 0.08);
122
  color: #fff;
 
123
  font-size: 16px;
124
  font-weight: 400;
125
  transition: all 0.3s ease;
126
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
127
  }
128
 
129
+ .input-group input::placeholder { color: rgba(255, 255, 255, 0.4); }
 
 
130
 
131
  .input-group input:focus {
132
  background: rgba(255, 255, 255, 0.15);
133
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3), inset 2px 2px 5px rgba(0,0,0,0.1);
134
  }
135
 
136
+ .input-group input:focus + i.field-icon { color: #c4b5fd; }
 
 
137
 
138
  .toggle-password {
139
  position: absolute;
 
143
  cursor: pointer;
144
  color: rgba(255, 255, 255, 0.5);
145
  transition: 0.3s;
146
+ padding: 5px;
147
  }
148
  .toggle-password:hover { color: #fff; }
149
 
150
+ /* --- MAIN BUTTON --- */
151
  .login-btn {
152
  width: 100%;
153
  padding: 16px;
 
160
  background: linear-gradient(135deg, #4F46E5, #EC4899);
161
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
162
  transition: all 0.3s ease;
 
 
163
  user-select: none;
164
  }
165
 
166
  .login-btn:hover {
167
  background: linear-gradient(135deg, #4338ca, #db2777);
168
+ transform: translateY(-2px) scale(1.01);
169
  box-shadow: 0 15px 30px rgba(124, 58, 237, 0.6);
170
  }
171
 
172
+ /* --- DIVIDER --- */
173
+ .divider {
174
+ margin: 25px 0 20px;
175
+ display: flex;
176
+ align-items: center;
177
+ color: rgba(255, 255, 255, 0.4);
178
+ font-size: 12px;
179
+ text-transform: uppercase;
180
+ letter-spacing: 1px;
181
+ }
182
+ .divider::before, .divider::after {
183
+ content: "";
184
+ flex: 1;
185
+ height: 1px;
186
+ background: rgba(255, 255, 255, 0.2);
187
+ }
188
+ .divider span { margin: 0 10px; }
189
+
190
+ /* --- SOCIAL BUTTONS --- */
191
+ .social-container {
192
+ display: flex;
193
+ gap: 15px;
194
+ margin-bottom: 25px;
195
+ }
196
+
197
+ .social-btn {
198
+ flex: 1;
199
+ height: 50px;
200
+ border-radius: 50px;
201
+ border: 1px solid rgba(255, 255, 255, 0.2);
202
+ background: rgba(255, 255, 255, 0.05);
203
+ color: white;
204
+ display: flex;
205
+ align-items: center;
206
+ justify-content: center;
207
+ font-size: 18px; /* Icon size */
208
+ cursor: pointer;
209
+ transition: all 0.3s ease;
210
+ position: relative;
211
+ overflow: hidden;
212
+ }
213
+
214
+ /* Hover Effects for Socials */
215
+ .social-btn:hover {
216
+ transform: translateY(-2px);
217
+ border-color: transparent;
218
+ }
219
+
220
+ .social-btn.google:hover {
221
+ background-color: #DB4437; /* Google Red */
222
+ box-shadow: 0 5px 15px rgba(219, 68, 55, 0.4);
223
+ }
224
+
225
+ .social-btn.github:hover {
226
+ background-color: #111; /* Github Black */
227
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
228
  }
229
 
230
  .links {
231
+ margin-top: 10px;
232
  font-size: 13px;
233
  color: rgba(255, 255, 255, 0.6);
234
  }
 
249
 
250
  /* Mobile Adjustments */
251
  @media (max-width: 480px) {
252
+ .login-card { padding: 40px 20px; }
253
+ .login-card h2 { font-size: 28px; }
254
+ .social-container { gap: 10px; }
 
 
 
255
  }
256
  </style>
257
  </head>
 
260
  <div class="login-card-container">
261
  <div class="login-card" id="tiltCard">
262
  <h2>Welcome Back</h2>
263
+ <p class="subtitle">Access your dashboard</p>
264
 
265
  <form id="loginForm">
266
  <div class="input-group">
 
274
  <i class="fa-regular fa-eye toggle-password" id="togglePassword"></i>
275
  </div>
276
 
277
+ <button type="submit" class="login-btn" id="loginBtn">Log In</button>
278
  </form>
279
 
280
+ <div class="divider">
281
+ <span>Or continue with</span>
282
+ </div>
283
+
284
+ <div class="social-container">
285
+ <button class="social-btn google" onclick="alert('Google Login clicked!')">
286
+ <i class="fab fa-google"></i>
287
+ </button>
288
+ <button class="social-btn github" onclick="alert('GitHub Login clicked!')">
289
+ <i class="fab fa-github"></i>
290
+ </button>
291
+ </div>
292
+
293
  <div class="links">
294
+ No account? <a href="#">Create One</a>
295
  </div>
296
  </div>
297
  </div>
 
303
  const card = document.getElementById('tiltCard');
304
  const container = document.querySelector('.login-card-container');
305
 
 
306
  if (window.matchMedia("(pointer: fine)").matches) {
307
  container.addEventListener('mousemove', (e) => {
308
  const rect = container.getBoundingClientRect();
309
  const x = e.clientX - rect.left - rect.width / 2;
310
  const y = e.clientY - rect.top - rect.height / 2;
311
 
 
312
  const multiple = 15;
313
  const rotateX = (y / rect.height) * -multiple;
314
  const rotateY = (x / rect.width) * multiple;
 
342
  const username = document.getElementById('username').value;
343
  const password = document.getElementById('password').value;
344
 
 
345
  if (username === "" || password === "") {
346
  card.classList.add('shake');
347
  setTimeout(() => card.classList.remove('shake'), 400);
348
  return;
349
  }
350
 
351
+ loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Checking...';
 
352
  loginBtn.style.opacity = '0.8';
353
 
354
  setTimeout(() => {