5
5
padding : 0 ;
6
6
box-sizing : border-box;
7
7
font-family : 'Poppins' , sans-serif;
8
-
9
8
}
10
9
11
10
body {
12
11
display : flex;
13
12
justify-content : center;
14
13
align-items : center;
15
14
min-height : 100vh ;
15
+ position : relative;
16
16
background : linear-gradient (45deg , # 360033, # 0b8793 );
17
- overflow : hidden;
18
-
19
17
}
20
18
21
19
.login-box {
22
20
position : relative;
23
- width : 400px ;
24
- height : 450px ;
21
+ width : 90% ;
22
+ max-width : 400px ;
23
+ height : auto;
25
24
background : linear-gradient (45deg , # 283c86, # 45a247 );
26
25
border-radius : 20px ;
27
26
display : flex;
28
27
justify-content : center;
29
28
align-items : center;
29
+ padding : 20px ;
30
+ box-sizing : border-box;
30
31
}
31
32
32
33
h2 {
38
39
39
40
.input-check : checked ~ h2 {
40
41
color : # FFBF00 ;
41
- text-shadow :
42
- 0 0 15px # FFBF00,
43
- 0 0 30px # FFBF00 ;
42
+ text-shadow : 0 0 15px # FFBF00, 0 0 30px # FFBF00 ;
44
43
}
45
44
46
45
.input-box {
47
46
position : relative;
48
- width : 310 px ;
47
+ width : 100 % ;
49
48
margin : 30px 0 ;
50
49
}
51
50
@@ -201,24 +200,30 @@ button {
201
200
color : # FFBF00 ;
202
201
}
203
202
203
+ /* The yellow bar at the top */
204
204
.login-light {
205
- position : absolute;
206
- top : 0 ;
207
- left : 50% ;
208
- transform : translateX (-50% );
209
- width : 500px ;
210
- height : 10px ;
211
- background : # FFBF00 ;
205
+ position : fixed;
206
+ top : 0 ; /* Center vertically relative to the body */
207
+ left : 50% ; /* Center horizontally */
208
+ transform : translate (-50% , -50% ); /* Adjust to stay at the center */
209
+ width : 100% ;
210
+ max-width : 500px ; /* Limit its size */
211
+ height : 10px ; /* Maintain the height of the yellow line */
212
+ background : # FFBF00 ; /* Keep the yellow color */
212
213
border-radius : 20px ;
214
+ z-index : -1 ; /* Keep it behind other elements */
213
215
}
214
216
217
+ /* The “torch effect” overlay */
215
218
.light {
216
219
position : absolute;
217
220
top : -200% ;
218
221
left : 0 ;
219
222
width : 100% ;
220
- height : 950px ;
221
- background : linear-gradient (to bottom, rgba (255 , 255 , 255 , .3 ) -50% , rgba (255 , 255 , 255 , 0 ) 90% );
223
+ height : 100vh ;
224
+ background : linear-gradient (to bottom,
225
+ rgba (255 , 255 , 255 , 0.3 ) -50% ,
226
+ rgba (255 , 255 , 255 , 0 ) 90% );
222
227
clip-path : polygon (20% 0 , 80% 0 , 100% 100% , 0 100% );
223
228
pointer-events : none;
224
229
transition : .5s ease;
@@ -228,6 +233,7 @@ button {
228
233
top : -90% ;
229
234
}
230
235
236
+ /* The toggle switch */
231
237
.toggle {
232
238
position : absolute;
233
239
top : 20px ;
@@ -236,6 +242,7 @@ button {
236
242
height : 120px ;
237
243
background : # 191919 ;
238
244
border-radius : 10px ;
245
+ transition : right 0.3s ease;
239
246
}
240
247
241
248
.toggle ::before {
@@ -306,9 +313,82 @@ button {
306
313
top : 76px ;
307
314
opacity : 1 ;
308
315
color : # FFBF00 ;
309
- text-shadow :
310
- 0 0 15px # FFBF00,
316
+ text-shadow : 0 0 15px # FFBF00,
311
317
0 0 30px # FFBF00,
312
318
0 0 45px # FFBF00,
313
319
0 0 60px # FFBF00 ;
320
+ }
321
+
322
+ /* Media queries for responsiveness */
323
+ @media (max-width : 1024px ) {
324
+ body {
325
+ background : linear-gradient (45deg , # 360033, # 0b8793 ) fixed;
326
+ background-size : cover;
327
+ }
328
+
329
+ .toggle {
330
+ right : -90px ;
331
+ }
332
+ }
333
+
334
+ @media (max-width : 666px ) {
335
+ body {
336
+ background : linear-gradient (45deg , # 360033, # 0b8793 ) fixed;
337
+ background-size : cover;
338
+ }
339
+
340
+ .toggle {
341
+ right : -68px ;
342
+ }
343
+ }
344
+
345
+ @media (max-width : 768px ) {
346
+ body {
347
+ display : flex;
348
+ justify-content : center;
349
+ align-items : center;
350
+ flex-direction : column;
351
+ padding : 0 10px ;
352
+ }
353
+
354
+
355
+ body {
356
+ background : linear-gradient (45deg , # 360033, # 0b8793 ) fixed;
357
+ background-size : cover;
358
+ }
359
+
360
+ h2 {
361
+ font-size : 1.8em ;
362
+ }
363
+
364
+ .input-box {
365
+ margin : 20px 0 ;
366
+ }
367
+ }
368
+
369
+ @media (max-width : 480px ) {
370
+ body {
371
+ display : flex;
372
+ justify-content : center;
373
+ align-items : center;
374
+ flex-direction : column;
375
+ padding : 0 10px ;
376
+ }
377
+
378
+ body {
379
+ background : linear-gradient (45deg , # 360033, # 0b8793 ) fixed;
380
+ background-size : cover;
381
+ }
382
+
383
+ h2 {
384
+ font-size : 1.5em ;
385
+ }
386
+
387
+ .input-box label {
388
+ font-size : 0.9em ;
389
+ }
390
+
391
+ .toggle {
392
+ right : -70px ;
393
+ }
314
394
}
0 commit comments