File size: 87,292 Bytes
50a7e4e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI SDL Digital Twin Dashboard</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>
        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }
        
        @keyframes pulse {
            0% { opacity: 0.7; }
            50% { opacity: 1; }
            100% { opacity: 0.7; }
        }
        
        @keyframes pulse-glow {
            0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
            70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
            100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        
        @keyframes data-flow {
            0% { stroke-dashoffset: 100; }
            100% { stroke-dashoffset: 0; }
        }
        
        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @keyframes scanning {
            0% { transform: translateX(-100%) rotate(45deg); }
            100% { transform: translateX(100%) rotate(45deg); }
        }
        
        @keyframes flicker {
            0% { opacity: 0.5; }
            50% { opacity: 1; }
            100% { opacity: 0.5; }
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }
        
        @keyframes flip {
            0% { transform: rotateX(0deg); }
            50% { transform: rotateX(90deg); }
            100% { transform: rotateX(0deg); }
        }
        
        @keyframes highlight {
            0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
            50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.3); }
        }
        
        .floating {
            animation: float 3s ease-in-out infinite;
        }
        
        .pulse {
            animation: pulse 2s ease-in-out infinite;
        }
        
        .pulse-glow {
            animation: pulse-glow 1.5s infinite;
        }
        
        .data-flow {
            stroke-dasharray: 10;
            animation: data-flow 2s linear infinite;
        }
        
        .rotate {
            animation: rotate 2s linear infinite;
        }
        
        .scanning {
            position: relative;
            overflow: hidden;
        }
        
        .scanning::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(
                to bottom,
                rgba(16, 185, 129, 0.1) 0%,
                rgba(16, 185, 129, 0.3) 50%,
                rgba(16, 185, 129, 0.1) 100%
            );
            transform: rotate(45deg);
            animation: scanning 3s linear infinite;
        }
        
        .flicker {
            animation: flicker 1.5s ease-in-out infinite alternate;
        }
        
        .bounce {
            animation: bounce 0.5s ease infinite;
        }
        
        .flip {
            animation: flip 0.6s ease-out;
        }
        
        .highlight {
            animation: highlight 1.5s ease-in-out infinite;
        }
        
        .code-block {
            font-family: 'Courier New', monospace;
            background-color: #1e293b;
            color: #f8fafc;
            padding: 1rem;
            border-radius: 0.5rem;
            overflow-x: auto;
        }
        
        .vulnerability-line {
            background-color: #7f1d1d;
            padding: 0.2rem;
            border-radius: 0.2rem;
        }
        
        .threat-model {
            background-color: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 0.5rem;
            padding: 1rem;
            position: relative;
        }
        
        .risk-tag {
            display: inline-block;
            padding: 0.2rem 0.5rem;
            border-radius: 1rem;
            font-size: 0.75rem;
            margin-right: 0.5rem;
            margin-bottom: 0.5rem;
        }
        
        .progress-ring__circle {
            transition: stroke-dashoffset 0.5s;
            transform: rotate(-90deg);
            transform-origin: 50% 50%;
        }
        
        .highlight-box {
            position: relative;
            border-left: 4px solid;
            padding-left: 1rem;
            margin-bottom: 1rem;
        }
        
        .highlight-box::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 0.25rem;
            z-index: -1;
        }
        
        .circular-node {
            position: absolute;
            width: 100px;
            height: 100px;
            border-radius: 50%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            transition: all 0.3s ease;
        }
        
        .circular-node:hover {
            transform: scale(1.1);
            z-index: 10;
        }
        
        .stats-card {
            transition: all 0.3s ease;
            position: relative;
        }
        
        .stats-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        
        .stats-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background-color: #10b981;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .stats-card:hover::before {
            opacity: 1;
        }
        
        .active-scan {
            position: relative;
        }
        
        .active-scan::after {
            content: "Analyzing...";
            position: absolute;
            bottom: -20px;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 0.75rem;
            color: #10b981;
            font-weight: 600;
        }
        
        .chat-bubble {
            position: absolute;
            background-color: white;
            border-radius: 1rem;
            padding: 0.75rem 1rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            max-width: 300px;
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 20;
        }
        
        .chat-bubble::after {
            content: "";
            position: absolute;
            bottom: -10px;
            left: 20px;
            border-width: 10px 10px 0;
            border-style: solid;
            border-color: white transparent transparent;
        }
        
        .alert-item {
            transition: all 0.3s ease;
            transform-origin: center bottom;
        }
        
        .alert-item.new {
            animation: bounce 0.5s ease;
        }
        
        .alert-item.focused {
            transform: scale(1.05);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            z-index: 10;
        }
        
        .alert-detail {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        
        .alert-detail.active {
            opacity: 1;
            pointer-events: all;
        }
        
        .alert-detail-content {
            background-color: white;
            border-radius: 0.5rem;
            padding: 1.5rem;
            max-width: 500px;
            width: 90%;
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }
        
        .alert-detail.active .alert-detail-content {
            transform: scale(1);
        }
        
        .flip-container {
            perspective: 1000px;
        }
        
        .flipper {
            transition: transform 0.6s;
            transform-style: preserve-3d;
            position: relative;
        }
        
        .flipper.flip {
            transform: rotateX(360deg);
        }
        
        .front, .back {
            backface-visibility: hidden;
            position: absolute;
            top: 0;
            left: 0;
        }
        
        .front {
            z-index: 2;
            transform: rotateX(0deg);
        }
        
        .back {
            transform: rotateX(180deg);
        }
        
        .typing-effect {
            overflow: hidden;
            white-space: nowrap;
            border-right: 2px solid #10b981;
            animation: blink-caret 0.75s step-end infinite;
        }
        
        @keyframes blink-caret {
            from, to { border-color: transparent; }
            50% { border-color: #10b981; }
        }
    </style>
</head>
<body class="bg-gray-50 min-h-screen">
    <!-- Navigation -->
    <nav class="bg-green-800 text-white shadow-lg">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between h-16 items-center">
                <div class="flex items-center">
                    <div class="flex-shrink-0 flex items-center">
                        <i class="fas fa-robot text-2xl mr-2"></i>
                        <span class="text-xl font-bold">AI SDL Digital Twin</span>
                    </div>
                </div>
                <div class="hidden md:block">
                    <div class="ml-10 flex items-baseline space-x-4">
                        <a href="#" class="bg-green-700 px-3 py-2 rounded-md text-sm font-medium">Dashboard</a>
                        <a href="#alerts" class="text-green-200 hover:bg-green-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Risk Alerts</a>
                        <a href="#projects" class="text-green-200 hover:bg-green-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Risk Projects</a>
                    </div>
                </div>
            </div>
        </div>
    </nav>

    <!-- Main Content -->
    <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
        <!-- Dashboard Section -->
        <section id="dashboard">
            <div class="mb-8">
                <h1 class="text-3xl font-bold text-gray-900">Security Risk Dashboard</h1>
                <p class="mt-2 text-gray-600">Comprehensive view of security risks across all projects</p>
            </div>
            
            <div class="flex flex-col lg:flex-row gap-8">
                <!-- Left Column - Stats and Visualization -->
                <div class="lg:w-2/3">
                    <!-- Real-time Stats Panel -->
                    <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 scanning">
                        <div class="p-6">
                            <div class="flex justify-between items-center mb-6">
                                <h2 class="text-xl font-bold text-gray-900">Real-time Analysis Dashboard</h2>
                                <div class="flex items-center">
                                    <div class="h-3 w-3 rounded-full bg-green-500 mr-2 pulse"></div>
                                    <span class="text-sm font-medium text-green-600">Active Scanning</span>
                                </div>
                            </div>
                            
                            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4">
                                <div class="stats-card bg-gray-50 p-4 rounded-lg active-scan">
                                    <div class="flex items-center">
                                        <div class="bg-green-100 rounded-full h-10 w-10 flex items-center justify-center text-green-600 mr-3 flicker">
                                            <i class="fas fa-file-alt"></i>
                                        </div>
                                        <div>
                                            <h4 class="text-sm font-medium text-gray-700">Requirements Analyzed</h4>
                                            <p class="text-xl font-bold text-gray-900 flip-container">
                                                <span class="flipper">
                                                    <span class="front">24</span>
                                                    <span class="back">24</span>
                                                </span>
                                            </p>
                                            <p class="text-xs text-gray-500">2 threats identified</p>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="stats-card bg-gray-50 p-4 rounded-lg active-scan">
                                    <div class="flex items-center">
                                        <div class="bg-green-100 rounded-full h-10 w-10 flex items-center justify-center text-green-600 mr-3 flicker">
                                            <i class="fas fa-code"></i>
                                        </div>
                                        <div>
                                            <h4 class="text-sm font-medium text-gray-700">Code Scanned</h4>
                                            <p class="text-xl font-bold text-gray-900 flip-container">
                                                <span class="flipper">
                                                    <span class="front">120,842</span>
                                                    <span class="back">120,842</span>
                                                </span>
                                                <span class="text-sm">lines</span>
                                            </p>
                                            <p class="text-xs text-gray-500">1 critical vulnerability</p>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="stats-card bg-gray-50 p-4 rounded-lg active-scan">
                                    <div class="flex items-center">
                                        <div class="bg-green-100 rounded-full h-10 w-10 flex items-center justify-center text-green-600 mr-3 flicker">
                                            <i class="fas fa-shield-alt"></i>
                                        </div>
                                        <div>
                                            <h4 class="text-sm font-medium text-gray-700">Tests Completed</h4>
                                            <p class="text-xl font-bold text-gray-900 flip-container">
                                                <span class="flipper">
                                                    <span class="front">18/42</span>
                                                    <span class="back">18/42</span>
                                                </span>
                                            </p>
                                            <p class="text-xs text-gray-500">1 medium risk found</p>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="stats-card bg-gray-50 p-4 rounded-lg active-scan">
                                    <div class="flex items-center">
                                        <div class="bg-green-100 rounded-full h-10 w-10 flex items-center justify-center text-green-600 mr-3 flicker">
                                            <i class="fas fa-rocket"></i>
                                        </div>
                                        <div>
                                            <h4 class="text-sm font-medium text-gray-700">Releases Verified</h4>
                                            <p class="text-xl font-bold text-gray-900 flip-container">
                                                <span class="flipper">
                                                    <span class="front">3</span>
                                                    <span class="back">3</span>
                                                </span>
                                            </p>
                                            <p class="text-xs text-gray-500">All checks passed</p>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="stats-card bg-gray-50 p-4 rounded-lg active-scan">
                                    <div class="flex items-center">
                                        <div class="bg-green-100 rounded-full h-10 w-10 flex items-center justify-center text-green-600 mr-3 flicker">
                                            <i class="fas fa-server"></i>
                                        </div>
                                        <div>
                                            <h4 class="text-sm font-medium text-gray-700">Production Services</h4>
                                            <p class="text-xl font-bold text-gray-900 flip-container">
                                                <span class="flipper">
                                                    <span class="front">5</span>
                                                    <span class="back">5</span>
                                                </span>
                                            </p>
                                            <p class="text-xs text-gray-500">No active incidents</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Circular SDL Process Visualization -->
                    <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 p-6 relative">
                        <!-- Chat Bubble -->
                        <div id="chatBubble" class="chat-bubble" style="top: 50px; left: 50px;">
                            <div id="chatText" class="text-sm text-gray-800"></div>
                        </div>
                        
                        <div class="relative h-96">
                            <div class="absolute inset-0 flex items-center justify-center">
                                <svg width="100%" height="100%" viewBox="0 0 500 500" class="absolute">
                                    <!-- Data flow arrows -->
                                    <defs>
                                        <marker id="arrowhead" markerWidth="10" markerHeight="7" 
                                        refX="0" refY="3.5" orient="auto">
                                            <polygon points="0 0, 10 3.5, 0 7" fill="#10b981" />
                                        </marker>
                                    </defs>
                                    
                                    <!-- Circular path for data flow -->
                                    <path id="data-path" d="M250,100 A150,150 0 1,1 250,400 A150,150 0 1,1 250,100" 
                                        fill="none" stroke="#10b981" stroke-width="2" stroke-dasharray="10,5"
                                        class="data-flow" />
                                    
                                    <!-- Animated arrow along the path -->
                                    <circle cx="250" cy="100" r="5" fill="#10b981">
                                        <animateMotion dur="10s" repeatCount="indefinite">
                                            <mpath xlink:href="#data-path"/>
                                        </animateMotion>
                                    </circle>
                                </svg>
                                
                                <!-- Requirement Design Node -->
                                <div id="requirementNode" class="circular-node bg-green-50 border-2 border-green-200" style="top: 10%; left: 50%; transform: translateX(-50%);">
                                    <div class="relative w-16 h-16 mb-2">
                                        <svg class="w-full h-full" viewBox="0 0 36 36">
                                            <path
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                                fill="none"
                                                stroke="#e2e8f0"
                                                stroke-width="3"
                                            />
                                            <path
                                                class="progress-ring__circle"
                                                stroke="#10b981"
                                                stroke-width="3"
                                                stroke-dasharray="78, 100"
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                            />
                                        </svg>
                                        <div class="absolute inset-0 flex items-center justify-center">
                                            <i class="fas fa-lightbulb text-green-600 text-xl"></i>
                                        </div>
                                    </div>
                                    <div class="text-xs font-medium text-gray-700">Requirement Design</div>
                                    <div class="text-xs text-gray-500 mt-1">78% analyzed</div>
                                    <div class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full h-6 w-6 flex items-center justify-center text-xs pulse-glow">2</div>
                                </div>
                                
                                <!-- Code Changes Node -->
                                <div id="codeNode" class="circular-node bg-green-50 border-2 border-green-200" style="top: 30%; right: 10%;">
                                    <div class="relative w-16 h-16 mb-2">
                                        <svg class="w-full h-full" viewBox="0 0 36 36">
                                            <path
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                                fill="none"
                                                stroke="#e2e8f0"
                                                stroke-width="3"
                                            />
                                            <path
                                                class="progress-ring__circle"
                                                stroke="#10b981"
                                                stroke-width="3"
                                                stroke-dasharray="45, 100"
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                            />
                                        </svg>
                                        <div class="absolute inset-0 flex items-center justify-center">
                                            <i class="fas fa-code text-green-600 text-xl"></i>
                                        </div>
                                    </div>
                                    <div class="text-xs font-medium text-gray-700">Code Changes</div>
                                    <div class="text-xs text-gray-500 mt-1">45% analyzed</div>
                                    <div class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full h-6 w-6 flex items-center justify-center text-xs pulse-glow">1</div>
                                </div>
                                
                                <!-- Security Testing Node -->
                                <div id="testingNode" class="circular-node bg-green-50 border-2 border-green-200" style="bottom: 20%; right: 20%;">
                                    <div class="relative w-16 h-16 mb-2">
                                        <svg class="w-full h-full" viewBox="0 0 36 36">
                                            <path
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                                fill="none"
                                                stroke="#e2e8f0"
                                                stroke-width="3"
                                            />
                                            <path
                                                class="progress-ring__circle"
                                                stroke="#10b981"
                                                stroke-width="3"
                                                stroke-dasharray="32, 100"
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                            />
                                        </svg>
                                        <div class="absolute inset-0 flex items-center justify-center">
                                            <i class="fas fa-shield-alt text-green-600 text-xl"></i>
                                        </div>
                                    </div>
                                    <div class="text-xs font-medium text-gray-700">Security Testing</div>
                                    <div class="text-xs text-gray-500 mt-1">32% analyzed</div>
                                    <div class="absolute -top-2 -right-2 bg-yellow-500 text-white rounded-full h-6 w-6 flex items-center justify-center text-xs">1</div>
                                </div>
                                
                                <!-- Release Node -->
                                <div id="releaseNode" class="circular-node bg-green-50 border-2 border-green-200" style="bottom: 20%; left: 20%;">
                                    <div class="relative w-16 h-16 mb-2">
                                        <svg class="w-full h-full" viewBox="0 0 36 36">
                                            <path
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                                fill="none"
                                                stroke="#e2e8f0"
                                                stroke-width="3"
                                            />
                                            <path
                                                class="progress-ring__circle"
                                                stroke="#10b981"
                                                stroke-width="3"
                                                stroke-dasharray="90, 100"
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                            />
                                        </svg>
                                        <div class="absolute inset-0 flex items-center justify-center">
                                            <i class="fas fa-rocket text-green-600 text-xl"></i>
                                        </div>
                                    </div>
                                    <div class="text-xs font-medium text-gray-700">Release</div>
                                    <div class="text-xs text-gray-500 mt-1">90% analyzed</div>
                                </div>
                                
                                <!-- Production Node -->
                                <div id="productionNode" class="circular-node bg-green-50 border-2 border-green-200" style="top: 30%; left: 10%;">
                                    <div class="relative w-16 h-16 mb-2">
                                        <svg class="w-full h-full" viewBox="0 0 36 36">
                                            <path
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                                fill="none"
                                                stroke="#e2e8f0"
                                                stroke-width="3"
                                            />
                                            <path
                                                class="progress-ring__circle"
                                                stroke="#10b981"
                                                stroke-width="3"
                                                stroke-dasharray="65, 100"
                                                d="M18 2.0845
                                                a 15.9155 15.9155 0 0 1 0 31.831
                                                a 15.9155 15.9155 0 0 1 0 -31.831"
                                            />
                                        </svg>
                                        <div class="absolute inset-0 flex items-center justify-center">
                                            <i class="fas fa-globe text-green-600 text-xl"></i>
                                        </div>
                                    </div>
                                    <div class="text-xs font-medium text-gray-700">Production</div>
                                    <div class="text-xs text-gray-500 mt-1">65% analyzed</div>
                                </div>
                                
                                <!-- Center AI Avatar -->
                                <div class="absolute inset-0 flex items-center justify-center">
                                    <div class="relative">
                                        <div class="floating">
                                            <img id="aiAvatar" class="h-24 w-24 object-contain" src="https://img.icons8.com/color/480/robot-3.png" alt="AI SDL Digital Twin">
                                        </div>
                                        <div class="absolute bottom-0 right-0 bg-green-500 text-white rounded-full h-8 w-8 flex items-center justify-center">
                                            <i class="fas fa-bolt"></i>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Risk Projects Section -->
                    <section id="projects" class="mb-8">
                        <h2 class="text-2xl font-bold text-gray-900 mb-4">Risk Projects List</h2>
                        
                        <div class="bg-white shadow overflow-hidden rounded-lg">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Project</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Progress</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Risks</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <!-- Project 1 -->
                                    <tr class="hover:bg-gray-50 cursor-pointer" onclick="showProjectDetail('alipay-subsidy')">
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="flex items-center">
                                                <div class="flex-shrink-0 h-10 w-10 bg-red-100 rounded-full flex items-center justify-center text-red-600">
                                                    <i class="fas fa-exclamation-triangle"></i>
                                                </div>
                                                <div class="ml-4">
                                                    <div class="text-sm font-medium text-gray-900">支付宝国补项目</div>
                                                    <div class="text-sm text-gray-500">Government subsidy system</div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">High Risk</span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="w-full bg-gray-200 rounded-full h-2">
                                            <div class="bg-red-500 h-2 rounded-full" style="width: 65%"></div>
                                            </div>
                                            <div class="text-xs text-gray-500 mt-1">65% analyzed</div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="risk-tag bg-red-100 text-red-800">SQL Injection</span>
                                            <span class="risk-tag bg-red-100 text-red-800">AuthZ Bypass</span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                            <button class="text-green-600 hover:text-green-900">View Details</button>
                                        </td>
                                    </tr>
                                    
                                    <!-- Project 2 -->
                                    <tr class="hover:bg-gray-50 cursor-pointer" onclick="showProjectDetail('merchant-portal')">
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="flex items-center">
                                                <div class="flex-shrink-0 h-10 w-10 bg-orange-100 rounded-full flex items-center justify-center text-orange-600">
                                                    <i class="fas fa-exclamation-circle"></i>
                                                </div>
                                                <div class="ml-4">
                                                    <div class="text-sm font-medium text-gray-900">Merchant Portal v2.0</div>
                                                    <div class="text-sm text-gray-500">Merchant management dashboard</div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-orange-100 text-orange-800">Medium Risk</span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="w-full bg-gray-200 rounded-full h-2">
                                                <div class="bg-orange-500 h-2 rounded-full" style="width: 42%"></div>
                                            </div>
                                            <div class="text-xs text-gray-500 mt-1">42% analyzed</div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="risk-tag bg-orange-100 text-orange-800">XSS</span>
                                            <span class="risk-tag bg-yellow-100 text-yellow-800">Input Validation</span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                            <button class="text-green-600 hover:text-green-900">View Details</button>
                                        </td>
                                    </tr>
                                    
                                    <!-- Project 3 -->
                                    <tr class="hover:bg-gray-50 cursor-pointer" onclick="showProjectDetail('payment-gateway')">
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="flex items-center">
                                                <div class="flex-shrink-0 h-10 w-10 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600">
                                                    <i class="fas fa-info-circle"></i>
                                                </div>
                                                <div class="ml-4">
                                                    <div class="text-sm font-medium text-gray-900">Payment Gateway</div>
                                                    <div class="text-sm text-gray-500">Microservice for payment processing</div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Low Risk</span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="w-full bg-gray-200 rounded-full h-2">
                                                <div class="bg-yellow-500 h-2 rounded-full" style="width: 88%"></div>
                                            </div>
                                            <div class="text-xs text-gray-500 mt-1">88% analyzed</div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="risk-tag bg-yellow-100 text-yellow-800">Hardcoded Creds</span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                            <button class="text-green-600 hover:text-green-900">View Details</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </section>
                </div>
                
                <!-- Right Column - Risk Alerts -->
                <div class="lg:w-1/3">
                    <section id="alerts" class="mb-8">
                        <div class="flex justify-between items-center mb-4">
                            <h2 class="text-2xl font-bold text-gray-900">Risk Alerts</h2>
                            <div class="flex items-center">
                                <span id="newAlertsCount" class="bg-red-500 text-white text-xs font-bold px-2 py-1 rounded-full mr-2">3 New</span>
                                <button class="text-sm text-green-600 hover:text-green-800">View All</button>
                            </div>
                        </div>
                        
                        <div class="bg-white shadow overflow-hidden rounded-lg">
                            <div id="alertStream" class="divide-y divide-gray-200 max-h-[600px] overflow-y-auto">
                                <!-- Critical Alert -->
                                <div class="alert-item new" data-project="alipay-subsidy" data-phase="requirements">
                                    <div class="p-4 hover:bg-gray-50 cursor-pointer transition" onclick="focusAlert(this)">
                                        <div class="flex items-start">
                                            <div class="flex-shrink-0 pt-1">
                                                <div class="bg-red-500 rounded-full h-8 w-8 flex items-center justify-center text-white pulse-glow">
                                                    <i class="fas fa-exclamation-triangle"></i>
                                                </div>
                                            </div>
                                            <div class="ml-3 flex-1">
                                                <div class="flex items-center justify-between">
                                                    <h3 class="text-sm font-medium text-red-700">支付宝国补项目 - 需求设计环节</h3>
                                                    <span class="text-xs text-gray-500">刚刚</span>
                                                </div>
                                                <div class="mt-1 text-sm text-gray-700">
                                                    <p>检测到需求设计中的权限配置风险</p>
                                                </div>
                                                <div class="mt-2">
                                                    <span class="risk-tag bg-red-100 text-red-800">SQL Injection</span>
                                                    <span class="risk-tag bg-red-100 text-red-800">Authorization Bypass</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <!-- High Alert -->
                                <div class="alert-item new" data-project="merchant-portal" data-phase="code">
                                    <div class="p-4 hover:bg-gray-50 cursor-pointer transition" onclick="focusAlert(this)">
                                        <div class="flex items-start">
                                            <div class="flex-shrink-0 pt-1">
                                                <div class="bg-orange-500 rounded-full h-8 w-8 flex items-center justify-center text-white pulse-glow">
                                                    <i class="fas fa-exclamation-circle"></i>
                                                </div>
                                            </div>
                                            <div class="ml-3 flex-1">
                                                <div class="flex items-center justify-between">
                                                    <h3 class="text-sm font-medium text-orange-700">Merchant Portal - 代码变更环节</h3>
                                                    <span class="text-xs text-gray-500">1分钟前</span>
                                                </div>
                                                <div class="mt-1 text-sm text-gray-700">
                                                    <p>检测到3个API端点存在XSS漏洞</p>
                                                </div>
                                                <div class="mt-2">
                                                    <span class="risk-tag bg-orange-100 text-orange-800">Cross-Site Scripting</span>
                                                    <span class="risk-tag bg-yellow-100 text-yellow-800">Input Validation</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <!-- Medium Alert -->
                                <div class="alert-item new" data-project="payment-gateway" data-phase="code">
                                    <div class="p-4 hover:bg-gray-50 cursor-pointer transition" onclick="focusAlert(this)">
                                        <div class="flex items-start">
                                            <div class="flex-shrink-0 pt-1">
                                                <div class="bg-yellow-500 rounded-full h-8 w-8 flex items-center justify-center text-white pulse-glow">
                                                    <i class="fas fa-info-circle"></i>
                                                </div>
                                            </div>
                                            <div class="ml-3 flex-1">
                                                <div class="flex items-center justify-between">
                                                    <h3 class="text-sm font-medium text-yellow-700">Payment Gateway - 代码变更环节</h3>
                                                    <span class="text-xs text-gray-500">5分钟前</span>
                                                </div>
                                                <div class="mt-1 text-sm text-gray-700">
                                                    <p>配置文件中发现硬编码凭据</p>
                                                </div>
                                                <div class="mt-2">
                                                    <span class="risk-tag bg-yellow-100 text-yellow-800">Sensitive Data Exposure</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <!-- Older alerts -->
                                <div class="alert-item" data-project="merchant-portal" data-phase="testing">
                                    <div class="p-4 hover:bg-gray-50 cursor-pointer transition" onclick="focusAlert(this)">
                                        <div class="flex items-start">
                                            <div class="flex-shrink-0 pt-1">
                                                <div class="bg-blue-500 rounded-full h-8 w-8 flex items-center justify-center text-white">
                                                    <i class="fas fa-shield-alt"></i>
                                                </div>
                                            </div>
                                            <div class="ml-3 flex-1">
                                                <div class="flex items-center justify-between">
                                                    <h3 class="text-sm font-medium text-blue-700">Merchant Portal - 安全测试环节</h3>
                                                    <span class="text-xs text-gray-500">15分钟前</span>
                                                </div>
                                                <div class="mt-1 text-sm text-gray-700">
                                                    <p>安全测试发现输入验证问题</p>
                                                </div>
                                                <div class="mt-2">
                                                    <span class="risk-tag bg-blue-100 text-blue-800">Input Validation</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                    
                    <!-- Analysis Details Panel -->
                    <div class="bg-gray-50 p-6 rounded-lg">
                        <h3 class="text-lg font-semibold text-gray-900 mb-4">Analysis Insights</h3>
                        
                        <div class="space-y-4">
                            <div class="bg-white p-4 rounded-lg shadow-sm border border-gray-200">
                                <h4 class="text-sm font-medium text-gray-700 mb-2">Current Focus</h4>
                                <div class="flex items-center">
                                    <div class="bg-green-100 rounded-full h-8 w-8 flex items-center justify-center text-green-600 mr-3">
                                        <i class="fas fa-code"></i>
                                    </div>
                                    <div>
                                        <p class="text-sm text-gray-900">Code Change Analysis</p>
                                        <p class="text-xs text-gray-500">Scanning payment processing module</p>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="bg-white p-4 rounded-lg shadow-sm border border-gray-200">
                                <h4 class="text-sm font-medium text-gray-700 mb-2">Recent Findings</h4>
                                <div class="space-y-3">
                                    <div class="flex items-start">
                                        <div class="bg-red-100 rounded-full h-6 w-6 flex items-center justify-center text-red-600 mr-2 mt-0.5">
                                            <i class="fas fa-exclamation-triangle text-xs"></i>
                                        </div>
                                        <div>
                                            <p class="text-sm text-gray-900">SQL Injection vulnerability</p>
                                            <p class="text-xs text-gray-500">In subsidy payment processing</p>
                                        </div>
                                    </div>
                                    <div class="flex items-start">
                                        <div class="bg-yellow-100 rounded-full h-6 w-6 flex items-center justify-center text-yellow-600 mr-2 mt-0.5">
                                            <i class="fas fa-info-circle text-xs"></i>
                                        </div>
                                        <div>
                                            <p class="text-sm text-gray-900">Hardcoded credentials</p>
                                            <p class="text-xs text-gray-500">In payment gateway config</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="bg-white p-4 rounded-lg shadow-sm border border-gray-200">
                                <h4 class="text-sm font-medium text-gray-700 mb-2">Next Steps</h4>
                                <div class="flex items-start">
                                    <div class="bg-blue-100 rounded-full h-6 w-6 flex items-center justify-center text-blue-600 mr-2 mt-0.5">
                                        <i class="fas fa-shield-alt text-xs"></i>
                                    </div>
                                    <div>
                                        <p class="text-sm text-gray-900">Security Testing Phase</p>
                                        <p class="text-xs text-gray-500">Starting in approx. 15 minutes</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <div class="mt-6 pt-4 border-t border-gray-200">
                            <button class="w-full bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-md flex items-center justify-center transition">
                                <i class="fas fa-bell mr-2"></i> Get Notifications
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>
    
    <!-- Project Detail Modal -->
    <div id="projectDetailModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full hidden z-50">
        <div class="relative top-20 mx-auto p-5 border w-11/12 max-w-6xl shadow-lg rounded-md bg-white max-h-screen overflow-y-auto">
            <div class="flex justify-between items-center pb-3 border-b">
                <h3 id="projectDetailTitle" class="text-2xl font-bold text-gray-900"></h3>
                <button onclick="hideProjectDetail()" class="text-gray-400 hover:text-gray-600">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            
            <div id="projectDetailContent" class="py-4">
                <!-- Content will be loaded dynamically -->
            </div>
        </div>
    </div>
    
    <!-- Alert Detail Modal -->
    <div id="alertDetailModal" class="alert-detail">
        <div class="alert-detail-content">
            <div class="flex justify-between items-center pb-3 border-b">
                <h3 id="alertDetailTitle" class="text-xl font-bold text-gray-900"></h3>
                <button onclick="hideAlertDetail()" class="text-gray-400 hover:text-gray-600">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div id="alertDetailContent" class="py-4">
                <div class="flex items-center mb-4">
                    <div id="alertDetailIcon" class="rounded-full h-10 w-10 flex items-center justify-center text-white mr-3"></div>
                    <div>
                        <p id="alertDetailTime" class="text-sm text-gray-500"></p>
                        <p id="alertDetailStatus" class="text-xs font-medium"></p>
                    </div>
                </div>
                <div id="alertDetailDescription" class="text-sm text-gray-700 mb-4"></div>
                <div id="alertDetailTags" class="mb-4"></div>
                <div class="bg-gray-50 p-3 rounded">
                    <h4 class="text-sm font-medium text-gray-700 mb-2">Recommended Actions</h4>
                    <ul id="alertDetailActions" class="text-sm text-gray-700 list-disc pl-5"></ul>
                </div>
            </div>
            <div class="pt-4 border-t">
                <button onclick="hideAlertDetail()" class="w-full bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-md">
                    Acknowledge
                </button>
            </div>
        </div>
    </div>
    
    <script>
        // Sample project data
        const projects = {
            'alipay-subsidy': {
                title: '支付宝国补项目 (Alipay Subsidy Project)',
                description: 'Government subsidy distribution system for Alipay platform',
                status: 'high-risk',
                progress: 65,
                risks: [
                    { type: 'SQL Injection', severity: 'high', phase: 'code' },
                    { type: 'Authorization Bypass', severity: 'high', phase: 'requirements' },
                    { type: 'Data Validation', severity: 'medium', phase: 'requirements' }
                ],
                requirements: {
                    content: `The system allows government agencies to distribute subsidies directly to citizens' Alipay accounts. Features include:
                    
                    - Bulk payment processing
                    - Recipient verification
                    - Reporting and analytics
                    
                    Architecture Diagram:
                    [Frontend] -> [API Gateway] -> [Subsidy Service] -> [Payment Service] -> [Alipay Integration]`,
                    analysis: [
                        {
                            scenario: 'Bulk payment processing',
                            riskPoint: 'No rate limiting on bulk operations',
                            riskType: 'Denial of Service',
                            recommendation: 'Implement rate limiting and batch size restrictions'
                        },
                        {
                            scenario: 'Recipient verification',
                            riskPoint: 'Relies solely on mobile number verification',
                            riskType: 'Authorization Bypass',
                            recommendation: 'Implement multi-factor verification for high-value transactions'
                        }
                    ]
                },
                code: {
                    content: `// SubsidyService.java - Process subsidy payment
public class SubsidyService {
    public void processPayment(String userId, BigDecimal amount) {
        // Vulnerable SQL query
        String query = "UPDATE accounts SET balance = balance + " + amount + 
                       " WHERE user_id = '" + userId + "'";
        
        // Execute query
        database.execute(query);
        
        // Log the transaction
        logger.log("Processed payment of " + amount + " to user " + userId);
    }
}`,
                    analysis: [
                        {
                            vulnerability: 'SQL Injection',
                            description: 'Concatenating user input directly into SQL query',
                            code: 'String query = "UPDATE accounts SET balance = balance + " + amount + " WHERE user_id = \'" + userId + "\'";',
                            recommendation: 'Use prepared statements with parameterized queries'
                        }
                    ]
                },
                securityTesting: {
                    content: `Tested API Endpoint: POST /api/subsidies
                    
                    Vulnerable Request:
                    POST /api/subsidies HTTP/1.1
                    Content-Type: application/json
                    
                    {
                        "recipient": "1234567890",
                        "amount": "1000.00",
                        "reference": "&lt;script&gt;alert(1)&lt;/script&gt;"
                    }`,
                    analysis: [
                        {
                            endpoint: 'POST /api/subsidies',
                            payload: 'XSS payload in reference field',
                            description: 'Reference field reflects user input without proper encoding'
                        }
                    ]
                },
                release: {
                    content: 'Release candidate v1.2.5 includes fixes for 3 of 5 identified vulnerabilities',
                    analysis: [
                        {
                            unresolved: 'Authorization bypass in recipient verification',
                            phase: 'requirements',
                            risk: 'Medium'
                        },
                        {
                            unresolved: 'SQL Injection in payment processing',
                            phase: 'code',
                            risk: 'High'
                        }
                    ]
                },
                production: {
                    content: 'Not yet deployed to production',
                    analysis: []
                }
            },
            'merchant-portal': {
                title: 'Merchant Portal v2.0',
                description: 'Dashboard for merchants to manage their Alipay integration',
                status: 'medium-risk',
                progress: 42,
                risks: [
                    { type: 'Cross-Site Scripting', severity: 'medium', phase: 'security-testing' },
                    { type: 'Input Validation', severity: 'low', phase: 'security-testing' }
                ],
                requirements: {
                    content: `The Merchant Portal provides:
                    
                    - Transaction history and reporting
                    - Payout management
                    - API key management
                    - Customer support integration
                    
                    Architecture:
                    [React Frontend] -> [Node.js API] -> [Various Microservices]`,
                    analysis: [
                        {
                            scenario: 'API key management',
                            riskPoint: 'No rate limiting on key generation',
                            riskType: 'Resource Exhaustion',
                            recommendation: 'Implement rate limiting and quotas'
                        }
                    ]
                },
                code: {
                    content: `// API Key generation endpoint
app.post('/api/keys', (req, res) => {
    const { merchantId } = req.body;
    
    // Generate API key
    const apiKey = generateApiKey();
    
    // Store in database
    db.query(\`INSERT INTO api_keys (merchant_id, key) VALUES (${merchantId}, '${apiKey}')\`);
    
    // Return to client
    res.json({ key: apiKey });
});`,
                    analysis: [
                        {
                            vulnerability: 'SQL Injection',
                            description: 'Concatenating user input directly into SQL query',
                            code: 'db.query(`INSERT INTO api_keys (merchant_id, key) VALUES (${merchantId}, \'${apiKey}\')`);',
                            recommendation: 'Use parameterized queries'
                        }
                    ]
                },
                securityTesting: {
                    content: `Tested API Endpoint: GET /api/transactions
                    
                    Vulnerable Request:
                    GET /api/transactions?search=&lt;script&gt;alert('XSS')&lt;/script&gt; HTTP/1.1`,
                    analysis: [
                        {
                            endpoint: 'GET /api/transactions',
                            payload: 'XSS payload in search parameter',
                            description: 'Search parameter reflects user input without proper encoding'
                        }
                    ]
                },
                release: {
                    content: 'Release candidate v2.0.0-rc3 includes fixes for XSS vulnerabilities',
                    analysis: []
                },
                production: {
                    content: 'Currently running v1.9.4 in production with no critical issues',
                    analysis: []
                }
            },
            'payment-gateway': {
                title: 'Payment Gateway Microservice',
                description: 'Core payment processing service',
                status: 'low-risk',
                progress: 88,
                risks: [
                    { type: 'Sensitive Data Exposure', severity: 'medium', phase: 'code' }
                ],
                requirements: {
                    content: `Payment Gateway handles:
                    
                    - Credit card processing
                    - Bank transfers
                    - Digital wallet payments
                    - Fraud detection
                    
                    Architecture:
                    [Clients] -> [Payment Gateway] -> [Processors] -> [Banks]`,
                    analysis: [
                        {
                            scenario: 'Fraud detection',
                            riskPoint: 'No logging of fraud detection rules',
                            riskType: 'Auditability',
                            recommendation: 'Implement detailed audit logging'
                        }
                    ]
                },
                code: {
                    content: `# config.py - Payment Gateway Configuration

DATABASE = {
    'host': 'payment-db.internal',
    'user': 'admin',
    'password': 'supersecret123',  # Hardcoded credentials
    'name': 'payment_gateway'
}

API_KEYS = {
    'stripe': 'sk_live_abcd1234',
    'alipay': 'live_xyz789'
}`,
                    analysis: [
                        {
                            vulnerability: 'Hardcoded Credentials',
                            description: 'Sensitive credentials stored in source code',
                            code: '\'password\': \'supersecret123\'',
                            recommendation: 'Use environment variables or secret management system'
                        }
                    ]
                },
                securityTesting: {
                    content: `Tested API Endpoint: POST /api/payments
                    
                    No vulnerabilities found in recent tests`,
                    analysis: []
                },
                release: {
                    content: 'Release candidate v3.1.2 includes fix for hardcoded credentials',
                    analysis: []
                },
                production: {
                    content: 'Currently running v3.0.9 in production with no active incidents',
                    analysis: []
                }
            }
        };
        
        // Alert data
        const alertDetails = {
            'alipay-subsidy-requirements': {
                title: '支付宝国补项目 - 需求设计环节',
                description: '在需求设计阶段检测到权限配置风险。批量支付处理功能缺乏速率限制,可能导致拒绝服务攻击。',
                actions: [
                    '为批量操作实施速率限制',
                    '添加批量大小限制',
                    '实施多因素验证机制'
                ],
                severity: 'high'
            },
            'merchant-portal-code': {
                title: 'Merchant Portal - 代码变更环节',
                description: '在3个API端点检测到XSS漏洞。搜索参数未正确编码用户输入,导致跨站脚本攻击风险。',
                actions: [
                    '对所有用户输入实施输出编码',
                    '添加内容安全策略(CSP)头',
                    '更新输入验证规则'
                ],
                severity: 'medium'
            },
            'payment-gateway-code': {
                title: 'Payment Gateway - 代码变更环节',
                description: '在配置文件中发现硬编码凭据。数据库密码和API密钥以明文形式存储在源代码中。',
                actions: [
                    '将敏感数据移至环境变量',
                    '实施密钥管理系统',
                    '轮换所有暴露的凭据'
                ],
                severity: 'medium'
            },
            'merchant-portal-testing': {
                title: 'Merchant Portal - 安全测试环节',
                description: '安全测试发现输入验证问题。某些字段未正确验证用户输入,可能导致业务逻辑绕过。',
                actions: [
                    '实施严格的输入验证规则',
                    '添加服务器端验证',
                    '更新API文档以反映验证要求'
                ],
                severity: 'low'
            }
        };
        
        // Show project detail
        function showProjectDetail(projectId) {
            const project = projects[projectId];
            if (!project) return;
            
            document.getElementById('projectDetailTitle').textContent = project.title;
            
            let content = `
                <div class="mb-6">
                    <p class="text-gray-700 mb-4">${escapeHtml(project.description)}</p>
                    
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
                        <div class="bg-gray-50 p-4 rounded-lg">
                            <h4 class="text-sm font-medium text-gray-500 mb-1">Status</h4>
                            <p class="font-medium ${project.status === 'high-risk' ? 'text-red-600' : project.status === 'medium-risk' ? 'text-orange-600' : 'text-yellow-600'}">
                                ${project.status === 'high-risk' ? 'High Risk' : project.status === 'medium-risk' ? 'Medium Risk' : 'Low Risk'}
                            </p>
                        </div>
                        
                        <div class="bg-gray-50 p-4 rounded-lg">
                            <h4 class="text-sm font-medium text-gray-500 mb-1">Progress</h4>
                            <div class="w-full bg-gray-200 rounded-full h-2 mt-2">
                                <div class="h-2 rounded-full ${project.status === 'high-risk' ? 'bg-red-500' : project.status === 'medium-risk' ? 'bg-orange-500' : 'bg-yellow-500'}" style="width: ${project.progress}%"></div>
                            </div>
                            <p class="text-xs text-gray-500 mt-1">${project.progress}% complete</p>
                        </div>
                        
                        <div class="bg-gray-50 p-4 rounded-lg">
                            <h4 class="text-sm font-medium text-gray-500 mb-1">Risks Detected</h4>
                            <div class="mt-1">
                                ${project.risks.map(risk => `
                                    <span class="risk-tag ${risk.severity === 'high' ? 'bg-red-100 text-red-800' : risk.severity === 'medium' ? 'bg-orange-100 text-orange-800' : 'bg-yellow-100 text-yellow-800'}">
                                        ${escapeHtml(risk.type)}
                                    </span>
                                `).join('')}
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="border-t pt-6">
                    <h3 class="text-lg font-bold text-gray-900 mb-4">SDL Phase Analysis</h3>
                    
                    <div class="space-y-8">
                        <!-- Requirements -->
                        <div>
                            <div class="flex items-center mb-3">
                                <div class="bg-green-600 rounded-full h-6 w-6 flex items-center justify-center text-white mr-3">
                                    <i class="fas fa-lightbulb text-xs"></i>
                                </div>
                                <h4 class="font-semibold text-gray-900">Requirement Design</h4>
                            </div>
                            
                            <div class="ml-9">
                                <div class="highlight-box border-green-500 mb-4">
                                    <h5 class="font-medium text-gray-900 mb-2">Content</h5>
                                    <div class="text-sm text-gray-700 whitespace-pre-line">${escapeHtml(project.requirements.content)}</div>
                                </div>
                                
                                <div class="highlight-box border-green-500">
                                    <h5 class="font-medium text-gray-900 mb-2">Security Analysis Results</h5>
                                    ${project.requirements.analysis.length > 0 ? `
                                        <div class="space-y-4">
                                            ${project.requirements.analysis.map(item => `
                                                <div class="bg-white p-3 rounded-lg border border-gray-200">
                                                    <div class="font-medium">${escapeHtml(item.scenario)}</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Risk:</span> ${escapeHtml(item.riskPoint)} (${escapeHtml(item.riskType)})</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Recommendation:</span> ${escapeHtml(item.recommendation)}</div>
                                                </div>
                                            `).join('')}
                                        </div>
                                    ` : '<p class="text-sm text-gray-500">No risks detected in this phase</p>'}
                                </div>
                            </div>
                        </div>
                        
                        <!-- Code -->
                        <div>
                            <div class="flex items-center mb-3">
                                <div class="bg-green-600 rounded-full h-6 w-6 flex items-center justify-center text-white mr-3">
                                    <i class="fas fa-code text-xs"></i>
                                </div>
                                <h4 class="font-semibold text-gray-900">Code Changes</h4>
                            </div>
                            
                            <div class="ml-9">
                                <div class="highlight-box border-green-500 mb-4">
                                    <h5 class="font-medium text-gray-900 mb-2">Content</h5>
                                    <div class="code-block">${escapeHtml(project.code.content)}</div>
                                </div>
                                
                                <div class="highlight-box border-green-500">
                                    <h5 class="font-medium text-gray-900 mb-2">Security Analysis Results</h5>
                                    ${project.code.analysis.length > 0 ? `
                                        <div class="space-y-4">
                                            ${project.code.analysis.map(item => `
                                                <div class="bg-white p-3 rounded-lg border border-gray-200">
                                                    <div class="font-medium">${escapeHtml(item.vulnerability)}</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Description:</span> ${escapeHtml(item.description)}</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Vulnerable Code:</span> <span class="code-block vulnerability-line">${escapeHtml(item.code)}</span></div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Recommendation:</span> ${escapeHtml(item.recommendation)}</div>
                                                </div>
                                            `).join('')}
                                        </div>
                                    ` : '<p class="text-sm text-gray-500">No risks detected in this phase</p>'}
                                </div>
                            </div>
                        </div>
                        
                        <!-- Security Testing -->
                        <div>
                            <div class="flex items-center mb-3">
                                <div class="bg-green-600 rounded-full h-6 w-6 flex items-center justify-center text-white mr-3">
                                    <i class="fas fa-shield-alt text-xs"></i>
                                </div>
                                <h4 class="font-semibold text-gray-900">Security Testing</h4>
                            </div>
                            
                            <div class="ml-9">
                                <div class="highlight-box border-green-500 mb-4">
                                    <h5 class="font-medium text-gray-900 mb-2">Content</h5>
                                    <div class="code-block">${escapeHtml(project.securityTesting.content)}</div>
                                </div>
                                
                                <div class="highlight-box border-green-500">
                                    <h5 class="font-medium text-gray-900 mb-2">Security Analysis Results</h5>
                                    ${project.securityTesting.analysis.length > 0 ? `
                                        <div class="space-y-4">
                                            ${project.securityTesting.analysis.map(item => `
                                                <div class="bg-white p-3 rounded-lg border border-gray-200">
                                                    <div class="font-medium">${escapeHtml(item.endpoint)}</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Payload:</span> <span class="code-block">${escapeHtml(item.payload)}</span></div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Description:</span> ${escapeHtml(item.description)}</div>
                                                </div>
                                            `).join('')}
                                        </div>
                                    ` : '<p class="text-sm text-gray-500">No risks detected in this phase</p>'}
                                </div>
                            </div>
                        </div>
                        
                        <!-- Release -->
                        <div>
                            <div class="flex items-center mb-3">
                                <div class="bg-green-600 rounded-full h-6 w-6 flex items-center justify-center text-white mr-3">
                                    <i class="fas fa-rocket text-xs"></i>
                                </div>
                                <h4 class="font-semibold text-gray-900">Release</h4>
                            </div>
                            
                            <div class="ml-9">
                                <div class="highlight-box border-green-500 mb-4">
                                    <h5 class="font-medium text-gray-900 mb-2">Content</h5>
                                    <p class="text-sm text-gray-700">${escapeHtml(project.release.content)}</p>
                                </div>
                                
                                <div class="highlight-box border-green-500">
                                    <h5 class="font-medium text-gray-900 mb-2">Security Analysis Results</h5>
                                    ${project.release.analysis.length > 0 ? `
                                        <div class="space-y-4">
                                            ${project.release.analysis.map(item => `
                                                <div class="bg-white p-3 rounded-lg border border-gray-200">
                                                    <div class="font-medium">Unresolved ${escapeHtml(item.phase)} risk</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Risk:</span> ${escapeHtml(item.unresolved)}</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Severity:</span> <span class="${item.risk === 'High' ? 'text-red-600' : item.risk === 'Medium' ? 'text-orange-600' : 'text-yellow-600'}">${escapeHtml(item.risk)}</span></div>
                                                </div>
                                            `).join('')}
                                        </div>
                                    ` : '<p class="text-sm text-gray-500">All identified risks have been resolved</p>'}
                                </div>
                            </div>
                        </div>
                        
                        <!-- Production -->
                        <div>
                            <div class="flex items-center mb-3">
                                <div class="bg-green-600 rounded-full h-6 w-6 flex items-center justify-center text-white mr-3">
                                    <i class="fas fa-globe text-xs"></i>
                                </div>
                                <h4 class="font-semibold text-gray-900">Production</h4>
                            </div>
                            
                            <div class="ml-9">
                                <div class="highlight-box border-green-500 mb-4">
                                    <h5 class="font-medium text-gray-900 mb-2">Content</h5>
                                    <p class="text-sm text-gray-700">${escapeHtml(project.production.content)}</p>
                                </div>
                                
                                <div class="highlight-box border-green-500">
                                    <h5 class="font-medium text-gray-900 mb-2">Security Analysis Results</h5>
                                    ${project.production.analysis.length > 0 ? `
                                        <div class="space-y-4">
                                            ${project.production.analysis.map(item => `
                                                <div class="bg-white p-3 rounded-lg border border-gray-200">
                                                    <div class="font-medium">${escapeHtml(item.vulnerability)}</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Status:</span> ${escapeHtml(item.status)}</div>
                                                    <div class="text-sm mt-1"><span class="font-medium">Recommendation:</span> ${escapeHtml(item.recommendation)}</div>
                                                </div>
                                            `).join('')}
                                        </div>
                                    ` : '<p class="text-sm text-gray-500">No active threats detected in production</p>'}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            `;
            
            document.getElementById('projectDetailContent').innerHTML = content;
            document.getElementById('projectDetailModal').classList.remove('hidden');
        }
        
        // Hide project detail
        function hideProjectDetail() {
            document.getElementById('projectDetailModal').classList.add('hidden');
        }
        
        // Show alert detail
        function showAlertDetail(alertId) {
            const alert = alertDetails[alertId];
            if (!alert) return;
            
            document.getElementById('alertDetailTitle').textContent = alert.title;
            document.getElementById('alertDetailDescription').textContent = alert.description;
            document.getElementById('alertDetailTime').textContent = '刚刚';
            
            // Set icon based on severity
            const icon = document.getElementById('alertDetailIcon');
            icon.className = 'rounded-full h-10 w-10 flex items-center justify-center text-white mr-3';
            
            if (alert.severity === 'high') {
                icon.classList.add('bg-red-500', 'pulse-glow');
                icon.innerHTML = '<i class="fas fa-exclamation-triangle"></i>';
                document.getElementById('alertDetailStatus').textContent = 'High Risk';
                document.getElementById('alertDetailStatus').className = 'text-xs font-medium text-red-600';
            } else if (alert.severity === 'medium') {
                icon.classList.add('bg-orange-500', 'pulse-glow');
                icon.innerHTML = '<i class="fas fa-exclamation-circle"></i
</html>