forked from YadavAkhileshh/Alien-Invasion-Defense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
948 lines (825 loc) · 27.7 KB
/
test.html
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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reviews, Testimonials & Popular Services</title>
<style>
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
margin: 0;
padding: 0;
}
.container {
width: 80%;
margin: 0 auto;
padding: 2rem;
}
header {
/* background-color: #2c3e50; */
color: #ecf0f1;
text-align: center;
padding: 10rem 0;
margin-bottom: 2rem;
margin-top: 10px;
}
h1,
h2 {
margin: 0;
padding: 1rem 0;
}
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 2rem;
color: #2c3e50;
text-align: center;
margin-top: 3rem;
}
.subtitle {
font-size: 1.2rem;
font-style: italic;
margin-top: 0.5rem;
}
.testimonial-grid,
.services-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-bottom: 3rem;
}
.testimonial,
.service {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
padding: 1.5rem;
transition: transform 0.3s ease;
}
.testimonial:hover,
.service:hover {
transform: translateY(-5px);
}
.testimonial img,
.service img {
width: 80px;
height: 80px;
border-radius: 50%;
object-fit: cover;
margin-bottom: 1rem;
}
.testimonial h3,
.service h3 {
margin: 0 0 0.5rem 0;
color: #2c3e50;
}
.testimonial p,
.service p {
font-style: italic;
color: #7f8c8d;
}
.rating {
color: #f1c40f;
font-size: 1.2rem;
margin-bottom: 0.5rem;
}
.cta {
text-align: center;
margin-top: 3rem;
padding: 2rem;
background-color: #3498db;
color: #fff;
border-radius: 10px;
}
.cta-button {
display: inline-block;
background-color: #2c3e50;
color: #fff;
text-decoration: none;
padding: 1rem 2rem;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s ease;
margin-top: 1rem;
}
.cta-button:hover {
background-color: #1a252f;
}
.stats {
display: flex;
justify-content: space-around;
margin: 3rem 0;
text-align: center;
}
.stat-item {
background-color: #2c3e50;
color: #ecf0f1;
padding: 1.5rem;
border-radius: 10px;
width: 200px;
}
.stat-number {
font-size: 2.5rem;
font-weight: bold;
margin-bottom: 0.5rem;
}
.features {
background-color: #ecf0f1;
padding: 3rem 0;
margin: 3rem 0;
}
.feature-list {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.feature-item {
width: 30%;
min-width: 250px;
margin: 1rem;
text-align: center;
}
.feature-icon {
font-size: 3rem;
color: #3498db;
margin-bottom: 1rem;
}
.home-button {
position: absolute;
top: 20px;
left: 20px;
background-color: #2c3e50;
color: #ecf0f1;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s ease;
}
.home-button:hover {
background-color: #34495e;
}
header {
position: relative;
/* Add this to ensure proper positioning of the home button */
}
/* body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
margin: 0;
padding: 0;
} */
.container {
width: 80%;
margin: 0 auto;
padding: 2rem;
}
header {
background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
color: #ecf0f1;
text-align: center;
padding: 2rem 0;
margin-bottom: 2rem;
}
h1,
h2 {
margin: 0;
padding: 1rem 0;
}
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 2rem;
color: #2c3e50;
text-align: center;
margin-top: 3rem;
}
.subtitle {
font-size: 1.2rem;
font-style: italic;
margin-top: 0.5rem;
}
.service-tabs {
display: flex;
justify-content: center;
gap: 1rem;
margin: 2rem 0;
}
.service-tab {
padding: 1rem 2rem;
background-color: #fff;
border-radius: 30px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.service-tab:hover {
background-color: #3498db;
color: #fff;
}
.services-grid,
.scholarships-grid,
.jobs-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.service-card {
background-color: #fff;
border-radius: 15px;
padding: 2rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}
.service-card:hover {
transform: translateY(-5px);
}
.scholarship-card {
background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
border-radius: 15px;
padding: 2rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.job-card {
background-color: #fff;
border-radius: 15px;
padding: 2rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.amount-badge {
background-color: #2ecc71;
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
display: inline-block;
margin-bottom: 1rem;
}
.deadline-badge {
background-color: #e74c3c;
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
display: inline-block;
margin-bottom: 1rem;
}
.job-type {
background-color: #3498db;
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
display: inline-block;
margin-bottom: 1rem;
}
.stats {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
gap: 1rem;
margin: 3rem 0;
}
.stat-item {
background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
color: #ecf0f1;
padding: 1.5rem;
border-radius: 10px;
width: 200px;
text-align: center;
}
.stat-number {
font-size: 2.5rem;
font-weight: bold;
margin-bottom: 0.5rem;
}
.cta {
text-align: center;
margin-top: 3rem;
padding: 2rem;
background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
color: #fff;
border-radius: 10px;
}
.cta-button {
display: inline-block;
background-color: #2c3e50;
color: #fff;
text-decoration: none;
padding: 1rem 2rem;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s ease;
margin-top: 1rem;
}
.cta-button:hover {
background-color: #1a252f;
}
.card {
background: linear-gradient(to bottom right, #4caf50, #2196F3);
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: center;
width: 1040px;
color: white;
}
h1 {
font-size: 28px;
/* Increased font size */
font-weight: bold;
/* Bold text */
margin: 0 0 10px 0;
}
.subtitle {
font-size: 18px;
/* Increased font size */
font-weight: bold;
/* Bold text */
margin: 0;
}
</style>
</style>
</head>
<body>
<header>
<h1>Welcome to Alien Invasion Defense!</h1>
<p class="subtitle">Defend your base from waves of alien invaders and become the ultimate space defender! 🌌</p>
</header>
<div class="container">
<section class="stats">
<div class="stat-item">
<div class="stat-number">1000+</div>
<div class="stat-label">Players Defended</div>
</div>
<div class="stat-item">
<div class="stat-number">5M+</div>
<div class="stat-label">Alien Ships Destroyed</div>
</div>
<div class="stat-item">
<div class="stat-number">4.8</div>
<div class="stat-label">User Rating</div>
</div>
</section>
<h2>What Our Players Are Saying</h2>
<div class="about-section">
<div class="carousel">
<button id="prev" class="carousel-btn">‹</button>
<div class="item">
<div class="icon-container">
<img src="./assets/images/client.avif" alt="Alice R.">
</div>
<h3>Alice R.</h3>
<div class="rating">★★★★★</div>
<p>"An epic space shooter! I love the graphics and gameplay!"</p>
</div>
<div class="item">
<div class="icon-container">
<img src="./assets/images/client2.avif" alt="Mark T.">
</div>
<h3>Mark T.</h3>
<div class="rating">★★★★☆</div>
<p>"Simple controls and intense action! A must-play for shooter fans!"</p>
</div>
<div class="item">
<div class="icon-container">
<img src="./assets/images/client3.avif" alt="Chris L.">
</div>
<h3>Chris L.</h3>
<div class="rating">★★★★★</div>
<p>"I enjoy competing for the highest score! The leaderboard feature is fantastic!"</p>
</div>
<div class="item">
<div class="icon-container">
<img src="./assets/images/client4.avif" alt="Jane D.">
</div>
<h3>Jane D.</h3>
<div class="rating">★★★★☆</div>
<p>"Great graphics and immersive gameplay! Can't put it down!"</p>
</div>
<div class="item">
<div class="icon-container">
<img src="./assets/images/client5.avif" alt="Paul G.">
</div>
<h3>Paul G.</h3>
<div class="rating">★★★★★</div>
<p>"Perfect for quick gaming sessions! Love the new updates!"</p>
</div>
<div class="item">
<div class="icon-container">
<img src="./assets/images/client6.avif" alt="Sarah W.">
</div>
<h3>Sarah W.</h3>
<div class="rating">★★★★★</div>
<p>"I keep coming back for the daily challenges! So engaging!"</p>
</div>
<button id="next" class="carousel-btn">›</button>
</div>
</div>
<style>
.about-section {
width: 100%;
}
.carousel {
position: relative;
width: 100%;
height: 420px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.item {
position: absolute;
width: 300px;
height: 420px;
text-align: center;
background-color: rgb(185, 246, 250);
border-radius: 10px;
transition: transform 0.5s, opacity 0.5s;
border: 4px solid #c3e6f7;
opacity: 0;
z-index: 0;
filter: blur(5px);
}
.icon-container {
margin: 0 auto;
width: 80%;
}
.icon-container img {
width: 200px;
height: 200px;
border: 3px solid black;
border-radius: 50%;
}
.carousel-btn {
position: absolute;
top: 40%;
color: #0e0e0e;
background-color: transparent;
border: none;
font-size: 5rem;
font-family: monospace;
font-weight: bold;
z-index: 10;
padding: 0px;
cursor: pointer;
}
#next {
right: 10px;
}
#prev {
left: 10px;
}
.active {
opacity: 1;
z-index: 1;
filter: none;
transform: scale(1.1); /* Center card is slightly larger */
}
.left, .right {
opacity: 0.6;
z-index: 0;
transform: scale(0.9); /* Side cards are slightly smaller */
}
.item{
border: 4px solid rgb(102, 141, 240);
}
</style>
<script>
const items = document.querySelectorAll('.carousel .item');
const next = document.getElementById('next');
const prev = document.getElementById('prev');
let activeIndex = 0;
function loadShow() {
items.forEach((item, index) => {
item.classList.remove('active', 'left', 'right');
item.style.transform = `translateX(${(index - activeIndex) * 100}%)`;
item.style.opacity = 0; // Hide all items initially
item.style.filter = 'blur(5px)'; // Blur all items initially
});
items[activeIndex].classList.add('active');
items[activeIndex].style.opacity = 1;
items[activeIndex].style.filter = 'none';
// Show left card
if (activeIndex > 0) {
items[activeIndex - 1].classList.add('left');
items[activeIndex - 1].style.transform = `translateX(-120%) scale(0.9)`;
items[activeIndex - 1].style.opacity = 0.6;
items[activeIndex - 1].style.filter = 'blur(5px)';
}
// Show right card
if (activeIndex < items.length - 1) {
items[activeIndex + 1].classList.add('right');
items[activeIndex + 1].style.transform = `translateX(120%) scale(0.9)`;
items[activeIndex + 1].style.opacity = 0.6;
items[activeIndex + 1].style.filter = 'blur(5px)';
}
}
loadShow();
next.onclick = function () {
activeIndex = (activeIndex + 1) % items.length;
loadShow();
};
prev.onclick = function () {
activeIndex = (activeIndex - 1 + items.length) % items.length;
loadShow();
};
</script>
<h2 style="color: rgb(153, 153, 248);text-shadow: #0e0e0e;font-size: xx-large;">Features You’ll Love</h2>
<div class="services-grid">
<div class="service">
<div class="icon-container">
<img src="./assets/images/alien.jpeg" alt="photo">
</div>
<h3>Exciting Alien Invasion Gameplay</h3>
<p>Fight waves of alien ships attacking your base and enjoy thrilling action!</p>
</div>
<div class="service">
<div class="icon-container">
<img src="./assets/images/control.jpeg" alt="photo">
</div>
<h3>Easy Controls & Interface</h3>
<p>Restart the game, track your score, and see your remaining lives easily.</p>
</div>
<div class="service">
<div class="icon-container">
<img src="./assets/images/graphics.png" alt="photo">
</div>
<h3>Modern Graphics</h3>
<p>Enjoy a simple and clean interface that enhances the gaming experience.</p>
</div>
<!-- New Service Cards -->
<div class="service">
<div class="icon-container">
<img src="./assets/images/poweups.jpeg" alt="photo">
</div>
<h3>Special Power-Ups</h3>
<p>Collect unique power-ups that give you special abilities to defeat aliens faster.</p>
</div>
<div class="service">
<div class="icon-container">
<img src="./assets/images/high score.jpeg" alt="photo">
</div>
<h3>High-Score Tracking</h3>
<p>See your high scores and compete with friends to be at the top of the leaderboard.</p>
</div>
<div class="service">
<div class="icon-container">
<img src="./assets/images/multiplayer.jpeg" alt="photo">
</div>
<h3>Multiplayer Mode</h3>
<p>Challenge your friends in real-time battles with a seamless multiplayer mode.</p>
</div>
</div>
<style>
.service{
border: 5px solid rgb(153, 153, 248);
}
</style>
<div class="card">
<h1>Join the Defense Team</h1>
<p class="subtitle">Your mission: Protect your base and score high!</p>
</div>
<section class="features">
<h2>How to Play</h2>
<div class="feature-list">
<div class="feature-item">
<div class="feature-img"><img src="./assets/images/Screenshot 2024-10-29 232410.png" alt="photo"></div>
<h3>Start the Game</h3>
<p>Click the "Start" button to begin your defense.</p>
</div>
<div class="feature-item">
<div class="feature-img"><img src="./assets/images/Screenshot 2024-10-29 232427.png" alt="photo"></div>
<h3>Move and Shoot</h3>
<p>Use your keyboard or on-screen controls to maneuver your spaceship and destroy the invaders.</p>
</div>
<div class="feature-item">
<div class="feature-img"><img src="./assets/images/Screenshot 2024-10-29 232459.png" alt="photo"></div>
<h3>Game Over</h3>
<p>When you lose all 3 lives, the game ends. Click "Restart" to try again!</p>
</div>
</div>
</section>
<style>
/* Section Container Styling */
.features {
background:linear-gradient(to right,rgb(200, 199, 200),rgb(179, 231, 245));
border: 10px solid blue;
text-align: center;
padding: 40px 20px;
font-family: Arial, sans-serif;
border-radius: 10%;
}
/* Section Title Styling */
.features h2 {
font-size: 2.5rem;
color: #3e9cff;
margin-bottom: 30px;
text-transform: uppercase;
font-weight: 700;
}
/* Feature List Grid Layout */
.feature-list {
display: flex;
gap: 20px;
justify-content: center;
flex-wrap: wrap;
}
/* Feature Item Card Styling */
.feature-item {
width: 280px;
background-color: #fff;
padding: 20px;
border-radius: 12px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
cursor: pointer;
border: 3px solid blue;
}
/* Hover Effects for Feature Item */
.feature-item:hover {
transform: translateY(-10px);
box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
background: linear-gradient(to right,rgb(252, 216, 242),rgb(123, 203, 246));
}
/* Image Container Styling */
.feature-img {
justify-self: center;
height: 200px;
margin-bottom: 15px;
width: 200px;
height: auto;
border-radius: 50%;
overflow: hidden;
}
.feature-img img {
border: 3px solid rgb(86, 86, 244);
width: 200px;
height: 200px;
border-radius: 50%;
transition: transform 0.3s ease;
}
/* Image Zoom Effect on Hover */
.feature-item:hover .feature-img img {
transform: scale(1.1);
}
/* Feature Item Title Styling */
.feature-item h3 {
font-size: 1.5rem;
color: #333;
margin: 10px 0;
font-weight: 600;
}
/* Feature Item Paragraph Styling */
.feature-item p {
font-size: 1rem;
color: #666;
line-height: 1.6;
}
/* Responsive Layout */
@media (max-width: 768px) {
.feature-item {
width: 100%;
}
}
</style>
<div class="cta">
<h2>Are You Ready to Defend Your Base?</h2>
<p>Join the battle against the alien invaders today!</p>
<a href="./index.html" class="cta-button">Start Defending Now ➡ </a>
</div>
</div>
<div class="container">
<div class="service-tabs">
<div class="service-tab">Gameplay</div>
<button class="service-tab"><a style="color: black; text-decoration: none;" href="./Leaderboard.html">Leaderboard</a> </button>
<div class="service-tab">Tips & Strategies</div>
</div>
<h2>Game Rules</h2>
<div class="rules-grid">
<div class="rule-card">
<h3>Survive as long as you can!</h3>
<p>Defend against alien ships and protect your base. Only 3 lives available!</p>
</div>
<div class="rule-card">
<h3>Restart Anytime</h3>
<p>Use the "Restart" button to jump back into the action.</p>
</div>
<div class="rule-card">
<h3>Earn Points</h3>
<p>Destroy alien ships to rack up points and aim for the highest score!</p>
</div>
</div>
<div class="cta">
<h2>Take Your Skills to the Next Level!</h2>
<p>Join fellow defenders and compete for the top score!</p>
<a href="login/login.html" class="cta-button">Get Started Now ➡</a>
</div>
</div>
<script src="/scripts/componentLoader.js"></script>
<script>
prependComponent("Navbar");
prependComponent('Cursor');
prependComponent("ScrollToTop");
appendComponent('Footer');
appendComponent('ChatBot');
waitTillComponentsLoaded();
</script>
<script>
window.embeddedChatbotConfig = {
chatbotId: "mFGdtw23Qrxjx4cWS-w19",
domain: "www.chatbase.co",
};
</script>
<script src="https://www.chatbase.co/embed.min.js" chatbotId="mFGdtw23Qrxjx4cWS-w19" domain="www.chatbase.co"
defer></script>
<div class="circle-container">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div>
<style>
.circle {
position: absolute;
width: 25px;
height: 25px;
border-radius: 50%;
pointer-events: none;
background: radial-gradient(circle, rgba(73, 232, 247, 0.466), rgba(141, 38, 172, 0.5));
transition: transform 0.1s, left 0.1s, top 0.1s;
}
.circle-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 9999;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
const coords = { x: 0, y: 0 };
const circles = document.querySelectorAll(".circle");
circles.forEach(function (circle) {
circle.x = 0;
circle.y = 0;
});
window.addEventListener("mousemove", function (e) {
coords.x = e.pageX;
coords.y = e.pageY - window.scrollY; // Adjust for vertical scroll position
});
function animateCircles() {
let x = coords.x;
let y = coords.y;
circles.forEach(function (circle, index) {
circle.style.left = `${x - 12}px`;
circle.style.top = `${y - 12}px`;
circle.style.transform = `scale(${(circles.length - index) / circles.length})`;
const nextCircle = circles[index + 1] || circles[0];
circle.x = x;
circle.y = y;
x += (nextCircle.x - x) * 0.3;
y += (nextCircle.y - y) * 0.3;
});
requestAnimationFrame(animateCircles);
}
animateCircles();
});
</script>
</body>
</html>