File size: 75,922 Bytes
9d13461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SecureAI - AI & Cybersecurity Platform</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .gradient-bg {
            background: linear-gradient(135deg, #6e8efb 0%, #4a6cf7 100%);
        }
        .dark-gradient-bg {
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        }
        .tool-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .cyber-pattern {
            background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
            background-size: 15px 15px;
        }
        .blink {
            animation: blink 1s infinite;
        }
        @keyframes blink {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }
    </style>
</head>
<body class="bg-gray-50 font-sans">
    <!-- Auth Modal -->
    <div id="authModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white dark:bg-gray-800 rounded-lg p-6 w-full max-w-md">
            <div class="flex justify-between items-center mb-4">
                <h3 class="text-xl font-bold text-gray-800 dark:text-white">Welcome to SecureAI</h3>
                <button onclick="closeAuthModal()" class="text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            
            <div class="flex mb-4 border-b border-gray-200 dark:border-gray-700">
                <button id="loginTab" class="px-4 py-2 font-medium text-blue-600 border-b-2 border-blue-600 dark:text-blue-400 dark:border-blue-400">Login</button>
                <button id="registerTab" class="px-4 py-2 font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300">Register</button>
            </div>
            
            <!-- Login Form -->
            <div id="loginForm">
                <div class="mb-4">
                    <button onclick="loginWithGoogle()" class="w-full flex items-center justify-center gap-2 bg-white border border-gray-300 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600">
                        <i class="fab fa-google text-red-500"></i>
                        Continue with Google
                    </button>
                </div>
                <div class="mb-4">
                    <button onclick="loginWithWeb3()" class="w-full flex items-center justify-center gap-2 bg-gray-800 text-white rounded-lg px-4 py-2 text-sm font-medium hover:bg-gray-700 dark:bg-gray-600 dark:hover:bg-gray-500">
                        <i class="fab fa-ethereum text-purple-400"></i>
                        Connect Wallet
                    </button>
                </div>
                <div class="flex items-center my-4">
                    <div class="flex-grow border-t border-gray-300 dark:border-gray-600"></div>
                    <span class="mx-4 text-gray-500 dark:text-gray-400">or</span>
                    <div class="flex-grow border-t border-gray-300 dark:border-gray-600"></div>
                </div>
                <div class="mb-4">
                    <label for="loginEmail" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Email</label>
                    <input type="email" id="loginEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                </div>
                <div class="mb-4">
                    <label for="loginPassword" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Password</label>
                    <input type="password" id="loginPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                </div>
                <div class="flex items-center justify-between mb-4">
                    <div class="flex items-center">
                        <input id="rememberMe" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600">
                        <label for="rememberMe" class="ml-2 block text-sm text-gray-700 dark:text-gray-300">Remember me</label>
                    </div>
                    <a href="#" class="text-sm text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">Forgot password?</a>
                </div>
                <button onclick="handleLogin()" class="w-full gradient-bg text-white py-2 px-4 rounded-md hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
                    Sign In
                </button>
            </div>
            
            <!-- Register Form (hidden by default) -->
            <div id="registerForm" class="hidden">
                <div class="mb-4">
                    <label for="registerEmail" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Email</label>
                    <input type="email" id="registerEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                </div>
                <div class="mb-4">
                    <label for="registerPassword" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Password</label>
                    <input type="password" id="registerPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                </div>
                <div class="mb-4">
                    <label for="confirmPassword" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Confirm Password</label>
                    <input type="password" id="confirmPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                </div>
                <div class="flex items-center mb-4">
                    <input id="acceptTerms" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600">
                    <label for="acceptTerms" class="ml-2 block text-sm text-gray-700 dark:text-gray-300">
                        I agree to the <a href="#" class="text-blue-600 hover:text-blue-500 dark:text-blue-400">Terms</a> and <a href="#" class="text-blue-600 hover:text-blue-500 dark:text-blue-400">Privacy Policy</a>
                    </label>
                </div>
                <button onclick="handleRegister()" class="w-full gradient-bg text-white py-2 px-4 rounded-md hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
                    Create Account
                </button>
            </div>
        </div>
    </div>

    <!-- MFA Modal -->
    <div id="mfaModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white dark:bg-gray-800 rounded-lg p-6 w-full max-w-md">
            <div class="flex justify-between items-center mb-4">
                <h3 class="text-xl font-bold text-gray-800 dark:text-white">Multi-Factor Authentication</h3>
                <button onclick="closeMFAModal()" class="text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            
            <div class="mb-4 text-sm text-gray-600 dark:text-gray-300">
                For security reasons, please verify your identity using one of these methods:
            </div>
            
            <div class="space-y-3">
                <button onclick="verifyWithOTP()" class="w-full flex items-center justify-between px-4 py-3 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600">
                    <div class="flex items-center">
                        <div class="p-2 rounded-full bg-blue-100 dark:bg-blue-900 mr-3">
                            <i class="fas fa-mobile-alt text-blue-600 dark:text-blue-400"></i>
                        </div>
                        <span class="font-medium text-gray-800 dark:text-white">Email OTP</span>
                    </div>
                    <i class="fas fa-chevron-right text-gray-500 dark:text-gray-400"></i>
                </button>
                
                <button onclick="verifyWithAuthenticator()" class="w-full flex items-center justify-between px-4 py-3 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600">
                    <div class="flex items-center">
                        <div class="p-2 rounded-full bg-green-100 dark:bg-green-900 mr-3">
                            <i class="fas fa-lock text-green-600 dark:text-green-400"></i>
                        </div>
                        <span class="font-medium text-gray-800 dark:text-white">Authenticator App</span>
                    </div>
                    <i class="fas fa-chevron-right text-gray-500 dark:text-gray-400"></i>
                </button>
                
                <button onclick="verifyWithWeb3()" class="w-full flex items-center justify-between px-4 py-3 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600">
                    <div class="flex items-center">
                        <div class="p-2 rounded-full bg-purple-100 dark:bg-purple-900 mr-3">
                            <i class="fab fa-ethereum text-purple-600 dark:text-purple-400"></i>
                        </div>
                        <span class="font-medium text-gray-800 dark:text-white">Web3 Wallet</span>
                    </div>
                    <i class="fas fa-chevron-right text-gray-500 dark:text-gray-400"></i>
                </button>
            </div>
        </div>
    </div>

    <!-- OTP Verification Modal -->
    <div id="otpModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white dark:bg-gray-800 rounded-lg p-6 w-full max-w-md">
            <div class="flex justify-between items-center mb-4">
                <h3 class="text-xl font-bold text-gray-800 dark:text-white">Verify Email OTP</h3>
                <button onclick="closeOTPModal()" class="text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            
            <div class="mb-4 text-sm text-gray-600 dark:text-gray-300">
                We've sent a 6-digit verification code to your email. Please enter it below:
            </div>
            
            <div class="mb-4">
                <div class="flex justify-between space-x-2">
                    <input type="text" maxlength="1" class="w-12 h-12 text-center text-xl border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" pattern="\d*">
                    <input type="text" maxlength="1" class="w-12 h-12 text-center text-xl border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" pattern="\d*">
                    <input type="text" maxlength="1" class="w-12 h-12 text-center text-xl border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" pattern="\d*">
                    <input type="text" maxlength="1" class="w-12 h-12 text-center text-xl border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" pattern="\d*">
                    <input type="text" maxlength="1" class="w-12 h-12 text-center text-xl border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" pattern="\d*">
                    <input type="text" maxlength="1" class="w-12 h-12 text-center text-xl border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" pattern="\d*">
                </div>
            </div>
            
            <div class="mb-4 text-sm text-gray-500 dark:text-gray-400">
                Didn't receive a code? <a href="#" class="text-blue-600 hover:text-blue-500 dark:text-blue-400">Resend</a>
            </div>
            
            <button onclick="verifyOTP()" class="w-full gradient-bg text-white py-2 px-4 rounded-md hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
                Verify & Continue
            </button>
        </div>
    </div>

    <!-- Navigation -->
    <nav class="bg-white dark:bg-gray-800 shadow-sm">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between h-16">
                <div class="flex items-center">
                    <div class="flex-shrink-0 flex items-center">
                        <i class="fas fa-shield-alt text-blue-600 text-2xl mr-2"></i>
                        <span class="text-xl font-bold text-gray-800 dark:text-white">Secure<span class="text-blue-600">AI</span></span>
                    </div>
                    <div class="hidden sm:ml-6 sm:flex sm:space-x-8">
                        <a href="#" class="border-blue-500 text-gray-900 dark:text-white inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="homeNav">
                            Home
                        </a>
                        <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="aiToolsNav">
                            AI Tools
                        </a>
                        <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="cyberNav">
                            Cybersecurity
                        </a>
                        <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="docsNav">
                            Docs
                        </a>
                    </div>
                </div>
                <div class="hidden sm:ml-6 sm:flex sm:items-center">
                    <div class="relative">
                        <button onclick="toggleTheme()" class="p-1 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
                            <i class="fas fa-moon dark:hidden"></i>
                            <i class="fas fa-sun hidden dark:block text-yellow-300"></i>
                        </button>
                    </div>
                    <div class="ml-3 relative">
                        <div>
                            <button onclick="toggleUserMenu()" type="button" class="bg-white dark:bg-gray-700 rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
                                <span class="sr-only">Open user menu</span>
                                <div class="h-8 w-8 rounded-full gradient-bg flex items-center justify-center text-white font-medium">
                                    <span id="userInitials">?</span>
                                </div>
                            </button>
                        </div>
                        <div id="userMenu" class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white dark:bg-gray-700 ring-1 ring-black ring-opacity-5 focus:outline-none hidden" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
                        </div>
                    </div>
                </div>
                <div class="-mr-2 flex items-center sm:hidden">
                    <button onclick="toggleMobileMenu()" type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500" aria-controls="mobile-menu" aria-expanded="false">
                        <span class="sr-only">Open main menu</span>
                        <i class="fas fa-bars"></i>
                    </button>
                </div>
            </div>
        </div>

        <!-- Mobile menu -->
        <div class="sm:hidden hidden" id="mobile-menu">
            <div class="pt-2 pb-3 space-y-1">
                <a href="#" class="bg-blue-50 border-blue-500 text-blue-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium dark:bg-gray-700 dark:text-blue-400">Home</a>
                <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium dark:text-gray-400 dark:hover:bg-gray-700">AI Tools</a>
                <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium dark:text-gray-400 dark:hover:bg-gray-700">Cybersecurity</a>
                <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium dark:text-gray-400 dark:hover:bg-gray-700">Docs</a>
            </div>
            <div class="pt-4 pb-3 border-t border-gray-200 dark:border-gray-700">
                <div class="flex items-center px-4">
                    <div class="flex-shrink-0">
                        <div class="h-10 w-10 rounded-full gradient-bg flex items-center justify-center text-white font-medium">
                            <span>?</span>
                        </div>
                    </div>
                    <div class="ml-3">
                        <div class="text-base font-medium text-gray-800 dark:text-white">Guest User</div>
                        <div class="text-sm font-medium text-gray-500 dark:text-gray-400">guest@example.com</div>
                    </div>
                    <button onclick="toggleTheme()" class="ml-auto p-1 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300">
                        <i class="fas fa-moon dark:hidden"></i>
                        <i class="fas fa-sun hidden dark:block text-yellow-300"></i>
                    </button>
                </div>
                <div class="mt-3 space-y-1">
                    <a href="#" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-gray-400 dark:hover:text-gray-300">Your Profile</a>
                    <a href="#" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-gray-400 dark:hover:text-gray-300">Settings</a>
                    <a href="#" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-gray-400 dark:hover:text-gray-300">Sign out</a>
                </div>
            </div>
        </div>
    </nav>

    <!-- Main Content -->
    <main>
        <!-- Hero Section -->
        <section id="homeSection" class="gradient-bg text-white">
            <div class="max-w-7xl mx-auto py-16 px-4 sm:py-24 sm:px-6 lg:px-8">
                <div class="text-center">
                    <h1 class="text-4xl font-extrabold tracking-tight sm:text-5xl lg:text-6xl">
                        Secure AI Platform for Everyone
                    </h1>
                    <p class="mt-6 max-w-lg mx-auto text-xl text-blue-100">
                        Open-source AI utilities with enterprise-grade cybersecurity, powered by Web3 authentication and decentralized storage.
                    </p>
                    <div class="mt-10 flex justify-center space-x-4">
                        <button onclick="openAuthModal()" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-blue-700 bg-white hover:bg-blue-50">
                            Get Started
                            <i class="fas fa-arrow-right ml-2"></i>
                        </button>
                        <a href="#" class="inline-flex items-center px-6 py-3 border border-white text-base font-medium rounded-md text-white hover:bg-blue-700 hover:bg-opacity-20">
                            <i class="fas fa-book mr-2"></i>
                            Documentation
                        </a>
                    </div>
                </div>
            </div>
        </section>

        <!-- Features Section -->
        <section class="py-12 bg-white dark:bg-gray-900">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="lg:text-center">
                    <h2 class="text-base text-blue-600 dark:text-blue-400 font-semibold tracking-wide uppercase">Features</h2>
                    <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 dark:text-white sm:text-4xl">
                        Everything you need in one platform
                    </p>
                    <p class="mt-4 max-w-2xl text-xl text-gray-500 dark:text-gray-400 lg:mx-auto">
                        Combining cutting-edge AI with robust security measures for a complete digital experience.
                    </p>
                </div>

                <div class="mt-10">
                    <div class="space-y-10 md:space-y-0 md:grid md:grid-cols-2 md:gap-x-8 md:gap-y-10">
                        <div class="relative">
                            <div class="absolute flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white">
                                <i class="fas fa-robot"></i>
                            </div>
                            <div class="ml-16">
                                <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">AI Chat Assistant</h3>
                                <p class="mt-2 text-base text-gray-500 dark:text-gray-400">
                                    Powered by open-source LLMs with privacy-focused architecture. No data leaves your device without consent.
                                </p>
                            </div>
                        </div>

                        <div class="relative">
                            <div class="absolute flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white">
                                <i class="fas fa-image"></i>
                            </div>
                            <div class="ml-16">
                                <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Image Generation</h3>
                                <p class="mt-2 text-base text-gray-500 dark:text-gray-400">
                                    Create stunning visuals with Stable Diffusion models, with options for on-device or cloud processing.
                                </p>
                            </div>
                        </div>

                        <div class="relative">
                            <div class="absolute flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white">
                                <i class="fas fa-code"></i>
                            </div>
                            <div class="ml-16">
                                <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Code Assistant</h3>
                                <p class="mt-2 text-base text-gray-500 dark:text-gray-400">
                                    AI-powered coding companion that understands your project context and suggests improvements.
                                </p>
                            </div>
                        </div>

                        <div class="relative">
                            <div class="absolute flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white">
                                <i class="fas fa-shield-alt"></i>
                            </div>
                            <div class="ml-16">
                                <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Security Suite</h3>
                                <p class="mt-2 text-base text-gray-500 dark:text-gray-400">
                                    Comprehensive cybersecurity tools including threat simulations, breach detection, and AI defense.
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- AI Tools Section -->
        <section id="aiToolsSection" class="py-12 bg-gray-50 dark:bg-gray-800 hidden">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="lg:text-center mb-12">
                    <h2 class="text-base text-blue-600 dark:text-blue-400 font-semibold tracking-wide uppercase">AI Utilities</h2>
                    <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 dark:text-white sm:text-4xl">
                        Powerful AI tools at your fingertips
                    </p>
                    <p class="mt-4 max-w-2xl text-xl text-gray-500 dark:text-gray-400 lg:mx-auto">
                        Free, open-source AI models running on optimized infrastructure.
                    </p>
                </div>

                <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
                    <!-- Chat Assistant Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-blue-500 rounded-md p-3">
                                    <i class="fas fa-robot text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">AI Chat Assistant</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Powered by Mistral 7B</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Conversational AI that can answer questions, summarize content, and assist with creative writing.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-600 text-right">
                            <button onclick="openChatTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Open Tool <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Image Generation Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-purple-500 rounded-md p-3">
                                    <i class="fas fa-image text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Image Generation</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Powered by Stable Diffusion XL</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Create stunning visuals from text prompts with various artistic styles and customization options.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-600 text-right">
                            <button onclick="openImageTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Open Tool <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Code Assistant Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-green-500 rounded-md p-3">
                                    <i class="fas fa-code text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Code Assistant</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Powered by CodeLlama</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    AI pair programmer that helps you write better code, debug issues, and learn new programming concepts.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-600 text-right">
                            <button onclick="openCodeTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Open Tool <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- AI Search Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-red-500 rounded-md p-3">
                                    <i class="fas fa-search text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">AI Search</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Powered by ColBERTv2</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Semantic search that understands your queries and retrieves the most relevant information.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-600 text-right">
                            <button onclick="openSearchTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Open Tool <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Document AI Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-yellow-500 rounded-md p-3">
                                    <i class="fas fa-file-alt text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Document AI</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Powered by Donut</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Extract, analyze and summarize information from documents with AI-powered document processing.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-600 text-right">
                            <button onclick="openDocTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Open Tool <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Audio AI Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
                                    <i class="fas fa-microphone-alt text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Audio AI</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Powered by Whisper</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Transcribe, translate and analyze audio content with state-of-the-art speech recognition.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-600 text-right">
                            <button onclick="openAudioTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Open Tool <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Cybersecurity Section -->
        <section id="cyberSection" class="py-12 dark:bg-gray-900 hidden">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="lg:text-center mb-12">
                    <h2 class="text-base text-blue-600 dark:text-blue-400 font-semibold tracking-wide uppercase">Security Suite</h2>
                    <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 dark:text-white sm:text-4xl">
                        Enterprise-grade cybersecurity
                    </p>
                    <p class="mt-4 max-w-2xl text-xl text-gray-500 dark:text-gray-400 lg:mx-auto">
                        Protect your digital assets with our comprehensive security tools.
                    </p>
                </div>

                <div class="bg-white dark:bg-gray-800 shadow overflow-hidden sm:rounded-lg mb-8">
                    <div class="px-4 py-5 sm:px-6 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
                        <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">
                            Security Dashboard
                        </h3>
                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200">
                            Protected
                        </span>
                    </div>
                    <div class="px-4 py-5 sm:p-6">
                        <div class="grid grid-cols-1 gap-5 sm:grid-cols-3">
                            <div class="bg-blue-50 dark:bg-gray-700 overflow-hidden shadow rounded-lg">
                                <div class="px-4 py-5 sm:p-6">
                                    <div class="flex items-center">
                                        <div class="flex-shrink-0 bg-blue-100 dark:bg-blue-900 rounded-md p-3">
                                            <i class="fas fa-shield-alt text-blue-600 dark:text-blue-400"></i>
                                        </div>
                                        <div class="ml-5 w-0 flex-1">
                                            <dl>
                                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">
                                                    Threat Detection
                                                </dt>
                                                <dd>
                                                    <div class="text-lg font-medium text-gray-900 dark:text-white">
                                                        0 active
                                                    </div>
                                                </dd>
                                            </dl>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="bg-green-50 dark:bg-gray-700 overflow-hidden shadow rounded-lg">
                                <div class="px-4 py-5 sm:p-6">
                                    <div class="flex items-center">
                                        <div class="flex-shrink-0 bg-green-100 dark:bg-green-900 rounded-md p-3">
                                            <i class="fas fa-check-circle text-green-600 dark:text-green-400"></i>
                                        </div>
                                        <div class="ml-5 w-0 flex-1">
                                            <dl>
                                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">
                                                    System Health
                                                </dt>
                                                <dd>
                                                    <div class="text-lg font-medium text-gray-900 dark:text-white">
                                                        100%
                                                    </div>
                                                </dd>
                                            </dl>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="bg-yellow-50 dark:bg-gray-700 overflow-hidden shadow rounded-lg">
                                <div class="px-4 py-5 sm:p-6">
                                    <div class="flex items-center">
                                        <div class="flex-shrink-0 bg-yellow-100 dark:bg-yellow-900 rounded-md p-3">
                                            <i class="fas fa-clock text-yellow-600 dark:text-yellow-400"></i>
                                        </div>
                                        <div class="ml-5 w-0 flex-1">
                                            <dl>
                                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">
                                                    Last Scan
                                                </dt>
                                                <dd>
                                                    <div class="text-lg font-medium text-gray-900 dark:text-white">
                                                        Just now
                                                    </div>
                                                </dd>
                                            </dl>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
                    <!-- Vulnerability Scanner -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-red-500 rounded-md p-3">
                                    <i class="fas fa-bug text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Vulnerability Scanner</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">AI-powered detection</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Scan your systems for known vulnerabilities and get AI-generated remediation advice.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-700 text-right">
                            <button onclick="openScanner()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Run Scan <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Phishing Simulator -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-purple-500 rounded-md p-3">
                                    <i class="fas fa-fish text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Phishing Simulator</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Training tool</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Test your team's ability to identify phishing attempts with realistic simulations.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-700 text-right">
                            <button onclick="openPhishingTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Configure <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- DDoS Simulator -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-orange-500 rounded-md p-3">
                                    <i class="fas fa-network-wired text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">DDoS Simulator</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Controlled environment</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Test your infrastructure's resilience against distributed denial-of-service attacks.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-700 text-right">
                            <button onclick="openDDoSTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Run Test <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Malware Analysis -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-yellow-500 rounded-md p-3">
                                    <i class="fas fa-virus text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Malware Analysis</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Sandbox environment</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Upload suspicious files for analysis in a secure sandbox with AI-powered detection.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-700 text-right">
                            <button onclick="openMalwareTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Analyze File <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Password Auditor -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-green-500 rounded-md p-3">
                                    <i class="fas fa-key text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Password Auditor</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Security assessment</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Check if your passwords have been compromised in data breaches (secure offline check).
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-700 text-right">
                            <button onclick="openPasswordTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Check Passwords <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>

                    <!-- Network Monitor -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden tool-card transition duration-300 ease-in-out">
                        <div class="p-5">
                            <div class="flex items-center">
                                <div class="flex-shrink-0 bg-indigo-500 rounded-md p-3">
                                    <i class="fas fa-wifi text-white"></i>
                                </div>
                                <div class="ml-4">
                                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">Network Monitor</h3>
                                    <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Real-time analysis</p>
                                </div>
                            </div>
                            <div class="mt-4">
                                <p class="text-sm text-gray-500 dark:text-gray-400">
                                    Monitor your network traffic for suspicious activity with AI anomaly detection.
                                </p>
                            </div>
                        </div>
                        <div class="px-5 py-3 bg-gray-50 dark:bg-gray-700 text-right">
                            <button onclick="openNetworkTool()" class="text-sm font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300">
                                Start Monitoring <i class="fas fa-arrow-right ml-1"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Chat Tool Modal -->
        <div id="chatToolModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
            <div class="bg-white dark:bg-gray-800 rounded-lg w-full max-w-4xl h-[80vh] flex flex-col">
                <div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">
                        <i class="fas fa-robot mr-2 text-blue-500"></i>
                        AI Chat Assistant
                    </h3>
                    <div class="flex items-center space-x-2">
                        <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200">
                            Mistral 7B
                        </span>
                        <button onclick="closeChatTool()" class="text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                            <i class="fas fa-times"></i>
                        </button>
                    </div>
                </div>
                
                <div class="flex-1 overflow-y-auto p-4 space-y-4" id="chatMessages">
                    <div class="flex items-start">
                        <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center">
                            <i class="fas fa-robot text-blue-600 dark:text-blue-400"></i>
                        </div>
                        <div class="ml-3">
                            <div class="bg-gray-100 dark:bg-gray-700 rounded-lg p-3">
                                <p class="text-sm text-gray-800 dark:text-gray-200">
                                    Hello! I'm your AI assistant powered by Mistral 7B. How can I help you today?
                                </p>
                            </div>
                            <div class="mt-1 text-xs text-gray-500 dark:text-gray-400">
                                Just now
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="px-4 py-3 border-t border-gray-200 dark:border-gray-700">
                    <div class="flex space-x-2">
                        <div class="flex-1">
                            <textarea id="chatInput" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" rows="2" placeholder="Type your message..."></textarea>
                        </div>
                        <button onclick="sendChatMessage()" class="self-end gradient-bg text-white p-2 rounded-md hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
                            <i class="fas fa-paper-plane"></i>
                        </button>
                    </div>
                    <div class="mt-2 flex justify-between items-center">
                        <div class="flex space-x-2">
                            <button class="p-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                                <i class="fas fa-paperclip"></i>
                            </button>
                            <button class="p-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                                <i class="fas fa-code"></i>
                            </button>
                        </div>
                        <div class="text-xs text-gray-500 dark:text-gray-400">
                            AI responses may be inaccurate
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Image Tool Modal -->
        <div id="imageToolModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
            <div class="bg-white dark:bg-gray-800 rounded-lg w-full max-w-4xl h-[80vh] flex flex-col">
                <div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">
                        <i class="fas fa-image mr-2 text-purple-500"></i>
                        AI Image Generator
                    </h3>
                    <div class="flex items-center space-x-2">
                        <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200">
                            Stable Diffusion XL
                        </span>
                        <button onclick="closeImageTool()" class="text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                            <i class="fas fa-times"></i>
                        </button>
                    </div>
                </div>
                
                <div class="flex-1 overflow-y-auto p-4">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                        <div>
                            <div class="mb-4">
                                <label for="imagePrompt" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Prompt</label>
                                <textarea id="imagePrompt" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" rows="3" placeholder="Describe the image you want to generate..."></textarea>
                            </div>
                            <div class="mb-4">
                                <label for="negativePrompt" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Negative Prompt</label>
                                <input type="text" id="negativePrompt" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" placeholder="Things you don't want to see in the image">
                            </div>
                            <div class="grid grid-cols-2 gap-4 mb-4">
                                <div>
                                    <label for="imageStyle" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Style</label>
                                    <select id="imageStyle" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                                        <option>Realistic</option>
                                        <option>Digital Art</option>
                                        <option>Photographic</option>
                                        <option>Fantasy Art</option>
                                        <option>Anime</option>
                                        <option>Watercolor</option>
                                    </select>
                                </div>
                                <div>
                                    <label for="imageSize" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Size</label>
                                    <select id="imageSize" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-purple-500 focus:border-purple-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                                        <option>512x512</option>
                                        <option>768x768</option>
                                        <option>1024x1024</option>
                                    </select>
                                </div>
                            </div>
                            <button onclick="generateImage()" class="w-full bg-purple-600 text-white py-2 px-4 rounded-md hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500">
                                Generate Image
                            </button>
                        </div>
                        <div class="bg-gray-100 dark:bg-gray-700 rounded-lg flex items-center justify-center h-64 md:h-auto">
                            <div class="text-center p-4" id="imageResult">
                                <i class="fas fa-image text-gray-400 text-4xl mb-2"></i>
                                <p class="text-sm text-gray-500 dark:text-gray-400">Your generated image will appear here</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="px-4 py-3 border-t border-gray-200 dark:border-gray-700 text-right">
                    <div class="text-xs text-gray-500 dark:text-gray-400">
                        Generated images are stored temporarily for 48 hours
                    </div>
                </div>
            </div>
        </div>

        <!-- Scanner Tool Modal -->
        <div id="scannerToolModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
            <div class="bg-white dark:bg-gray-800 rounded-lg w-full max-w-4xl h-[80vh] flex flex-col">
                <div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
                    <h3 class="text-lg font-medium text-gray-900 dark:text-white">
                        <i class="fas fa-bug mr-2 text-red-500"></i>
                        Vulnerability Scanner
                    </h3>
                    <button onclick="closeScannerTool()" class="text-gray-500 hover:text-gray-700 dark:hover:text-gray-300">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="flex-1 overflow-y-auto p-4">
                    <div class="mb-6">
                        <h4 class="text-md font-medium text-gray-900 dark:text-white mb-2">Scan Target</h4>
                        <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Scan Type</label>
                                <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-red-500 focus:border-red-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                                    <option>Web Application</option>
                                    <option>Network</option>
                                    <option>API</option>
                                    <option>Cloud Infrastructure</option>
                                </select>
                            </div>
                            <div class="md:col-span-2">
                                <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Target URL/IP</label>
                                <div class="flex">
                                    <input type="text" class="flex-1 px-3 py-2 border border-gray-300 rounded-l-md shadow-sm focus:outline-none focus:ring-red-500 focus:border-red-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white" placeholder="https://example.com or 192.168.1.1">
                                    <button class="bg-red-600 text-white px-4 py-2 rounded-r-md hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                                        Validate
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="text-md font-medium text-gray-900 dark:text-white mb-2">Scan Options</h4>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Intensity</label>
                                <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-red-500 focus:border-red-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                                    <option>Light (fast)</option>
                                    <option selected>Standard</option>
                                    <option>Aggressive</option>
                                    <option>Comprehensive (slow)</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Vulnerability Database</label>
                                <select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-red-500 focus:border-red-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
                                    <option>Latest Threats</option>
                                    <option selected>Comprehensive</option>
                                    <option>Zero-Day Focused</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="text-md font-medium text-gray-900 dark:text-white mb-2">Advanced Options</h4>
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <input id="scan-auth" type="checkbox" class="h-4 w-4 text-red-600 focus:ring-red-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600">
                                <label for="scan-auth" class="ml-2 block text-sm text-gray-700 dark:text-gray-300">Authenticated Scan</label>
                            </div>
                            <div class="flex items-center">
                                <input id="scan-crawl" type="checkbox" class="h-4 w-4 text-red-600 focus:ring-red-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600" checked>
                                <label for="scan-crawl" class="ml-2 block text-sm text-gray-700 dark:text-gray-300">Crawl Website</label>
                            </div>
                            <div class="flex items-center">
                                <input id="scan-ai" type="checkbox" class="h-4 w-4 text-red-600 focus:ring-red-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600" checked>
                                <label for="scan-ai" class="ml-2 block text-sm text-gray-700 dark:text-gray-300">Use AI Analysis</label>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-gray-100 dark:bg-gray-700 rounded-lg p-4">
                        <h4 class="text-md font-medium text-gray-900 dark:text-white mb-2">Scan Summary</h4>
                        <div class="grid grid-cols-3 gap-4 text-center">
                            <div class="bg-white dark:bg-gray-800 p-3 rounded shadow">
                                <div class="text-sm text-gray-500 dark:text-gray-400">Estimated Time</div>
                                <div class="font-medium text-gray-900 dark:text-white">5-15 min</div>
                            </div>
                            <div class="bg-white dark:bg-gray-800 p-3 rounded shadow">
                                <div class="text-sm text-gray-500 dark:text-gray-400">Tests to Run</div>
                                <div class="font-medium text-gray-900 dark:text-white">1,248</div>
                            </div>
                            <div class="bg-white dark:bg-gray-800 p-3 rounded shadow">
                                <div class="text-sm text-gray-500 dark:text-gray-400">AI Models</div>
                                <div class="font-medium text-gray-900 dark:text-white">3</div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="px-4 py-3 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center">
                    <div class="text-sm text-gray-500 dark:text-gray-400">
                        Scans are logged securely for audit purposes
                    </div>
                    <button onclick="startScan()" class="bg-red-600 text-white py-2 px-6 rounded-md hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                        Start Scan
                    </button>
                </div>
            </div>
        </div>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-800 text-white">
        <div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase mb-4">SecureAI</h3>
                    <p class="text-gray-300 text-sm">
                        Open-source platform combining AI utilities with enterprise-grade cybersecurity, powered by Web3 authentication.
                    </p>
                </div>
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase mb-4">AI Tools</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Chat Assistant</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Image Generation</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Code Assistant</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">AI Search</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase mb-4">Security</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Vulnerability Scanner</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Phishing Simulator</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">DDoS Testing</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Malware Analysis</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase mb-4">Connect</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">GitHub</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Documentation</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Community</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white text-sm">Contact</a></li>
                    </ul>
                </div>
            </div>
            <div class="mt-8 pt-8 border-t border-gray-700 flex flex-col md:flex-row justify-between items-center">
                <p class="text-gray-400 text-sm">
                    &copy; 2023 SecureAI Platform. All rights reserved.
                </p>
                <div class="flex space-x-6 mt-4 md:mt-0">
                    <a href="#" class="text-gray-400 hover:text-white">
                        <i class="fab fa-github"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white">
                        <i class="fab fa-twitter"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white">
                        <i class="fab fa-discord"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white">
                        <i class="fab fa-medium"></i>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // Theme handling
        function toggleTheme() {
            if (document.documentElement.classList.contains('dark')) {
                document.documentElement.classList.remove('dark');
                localStorage.setItem('theme', 'light');
            } else {
                document.documentElement.classList.add('dark');
                localStorage.setItem('theme', 'dark');
            }
        }

        // Check for saved theme preference
        if (localStorage.getItem('theme') === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
            document.documentElement.classList.add('dark');
        } else {
            document.documentElement.classList.remove('dark');
        }

        // Auth modal handling
        function openAuthModal() {
            document.getElementById('authModal').classList.remove('hidden');
        }

        function closeAuthModal() {
            document.getElementById('authModal').classList.add('hidden');
        }

        // MFA modal handling
        function openMFAModal() {
            document.getElementById('mfaModal').classList.remove('hidden');
        }


</html>