File size: 70,465 Bytes
03b33e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ContainerX Arbitrage FFFUND - AI-Powered Global Container Arbitrage SaaS</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .gradient-bg {
            background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        }
        .container-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .animated-underline {
            position: relative;
        }
        .animated-underline:after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 0;
            background-color: #3b82f6;
            transition: width 0.3s ease;
        }
        .animated-underline:hover:after {
            width: 100%;
        }
        .marquee {
            animation: marquee 20s linear infinite;
            white-space: nowrap;
        }
        @keyframes marquee {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }
        .ai-assistant {
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 1000;
            transition: all 0.3s ease;
        }
        .ai-assistant:hover {
            transform: scale(1.1);
        }
        .fffund-payment {
            position: fixed;
            bottom: 110px;
            right: 30px;
            z-index: 1000;
            transition: all 0.3s ease;
        }
        .fffund-payment:hover {
            transform: scale(1.1);
        }
        .ai-panel {
            position: fixed;
            bottom: 100px;
            right: 30px;
            width: 350px;
            max-height: 500px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            z-index: 999;
            transform: translateY(20px);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .ai-panel.open {
            transform: translateY(0);
            opacity: 1;
            visibility: visible;
        }
        .payment-panel {
            position: fixed;
            bottom: 190px;
            right: 30px;
            width: 350px;
            max-height: 400px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            z-index: 999;
            transform: translateY(20px);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .payment-panel.open {
            transform: translateY(0);
            opacity: 1;
            visibility: visible;
        }
        .ai-message {
            max-width: 80%;
            padding: 10px 15px;
            border-radius: 18px;
            margin-bottom: 10px;
            font-size: 14px;
        }
        .ai-message.user {
            background: #2563eb;
            color: white;
            margin-left: auto;
            border-bottom-right-radius: 5px;
        }
        .ai-message.bot {
            background: #f3f4f6;
            color: #111827;
            margin-right: auto;
            border-bottom-left-radius: 5px;
        }
        .typing-indicator {
            display: flex;
            padding: 10px 15px;
        }
        .typing-indicator span {
            height: 8px;
            width: 8px;
            background: #9ca3af;
            border-radius: 50%;
            display: inline-block;
            margin: 0 2px;
            animation: bounce 1.5s infinite ease-in-out;
        }
        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }
        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }
        @keyframes bounce {
            0%, 60%, 100% { transform: translateY(0); }
            30% { transform: translateY(-5px); }
        }
        .process-step {
            position: relative;
            padding-left: 40px;
            margin-bottom: 30px;
        }
        .process-step:before {
            content: '';
            position: absolute;
            left: 15px;
            top: 0;
            height: 100%;
            width: 2px;
            background: #e5e7eb;
        }
        .process-step:last-child:before {
            display: none;
        }
        .process-step .step-number {
            position: absolute;
            left: 0;
            top: 0;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #2563eb;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
        .token-badge {
            display: inline-flex;
            align-items: center;
            background: rgba(245, 158, 11, 0.1);
            color: #f59e0b;
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 12px;
            font-weight: 500;
        }
        .token-badge i {
            margin-right: 4px;
            font-size: 10px;
        }
        .qr-code {
            width: 150px;
            height: 150px;
            margin: 0 auto;
            background: #f3f4f6;
            padding: 10px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .qr-code img {
            max-width: 100%;
            max-height: 100%;
        }
        .product-icon {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            color: #3b82f6;
        }
        .electronics-icon {
            background-color: #e0f2fe;
            color: #1d4ed8;
        }
        .apparel-icon {
            background-color: #fce7f3;
            color: #be185d;
        }
        .industrial-icon {
            background-color: #ecfccb;
            color: #3f6212;
        }
        .api-mask {
            background-color: #f3f4f6;
            color: transparent;
            text-shadow: 0 0 8px rgba(0,0,0,0.5);
            user-select: none;
        }
        .api-mask:hover {
            color: inherit;
            text-shadow: none;
        }
        .fee-notice {
            font-size: 11px;
            color: #6b7280;
            margin-top: 5px;
        }
        .fee-amount {
            color: #ef4444;
            font-weight: 600;
        }
        .market-recovery-badge {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(22, 163, 74, 0.9);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
        }
        .loading-spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-radius: 50%;
            border-top: 4px solid #3b82f6;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .unisat-connected {
            background-color: #10b981 !important;
        }
        .unisat-not-connected {
            background-color: #ef4444 !important;
        }
        .fta-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(59, 130, 246, 0.9);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
        }
    </style>
</head>
<body class="font-sans antialiased text-gray-800">
    <!-- AI Assistant Button -->
    <div class="ai-assistant">
        <button id="aiAssistantBtn" class="w-16 h-16 rounded-full bg-blue-600 text-white shadow-xl flex items-center justify-center">
            <i class="fas fa-robot text-2xl"></i>
        </button>
    </div>

    <!-- FFFUND Payment Button -->
    <div class="fffund-payment">
        <button id="fffundPaymentBtn" class="w-16 h-16 rounded-full bg-orange-500 text-white shadow-xl flex items-center justify-center">
            <i class="fab fa-bitcoin text-2xl"></i>
        </button>
    </div>

    <!-- AI Assistant Panel -->
    <div id="aiPanel" class="ai-panel">
        <div class="bg-blue-600 text-white p-4 rounded-t-lg flex justify-between items-center">
            <h3 class="font-bold">ContainerX Arbitrage FFFUND AI Assistant</h3>
            <button id="closeAiPanel" class="text-white">
                <i class="fas fa-times"></i>
            </button>
        </div>
        <div id="aiChat" class="p-4 overflow-y-auto" style="max-height: 350px;">
            <div class="ai-message bot">
                Hello! I'm your ContainerX Arbitrage FFFUND AI assistant. How can I help with your arbitrage today?
            </div>
            <div class="ai-message bot">
                I can help with: <br>
                • Finding best arbitrage opportunities<br>
                • Negotiating purchases<br>
                • Arranging logistics<br>
                • Connecting to distribution networks<br>
                • Market analysis
            </div>
        </div>
        <div class="p-4 border-t border-gray-200">
            <div class="flex">
                <input id="aiInput" type="text" placeholder="Ask me anything..." class="flex-1 border border-gray-300 rounded-l-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                <button id="aiSendBtn" class="bg-blue-600 text-white px-4 py-2 rounded-r-lg hover:bg-blue-700">
                    <i class="fas fa-paper-plane"></i>
                </button>
            </div>
            <div class="mt-3 grid grid-cols-2 gap-2">
                <button class="quick-action-btn bg-gray-100 hover:bg-gray-200 text-gray-800 text-xs py-1 px-2 rounded" data-section="marketplace">
                    Find best deals
                </button>
                <button class="quick-action-btn bg-gray-100 hover:bg-gray-200 text-gray-800 text-xs py-1 px-2 rounded" data-section="how-it-works">
                    How it works
                </button>
                <button class="quick-action-btn bg-gray-100 hover:bg-gray-200 text-gray-800 text-xs py-1 px-2 rounded" data-section="token-integration">
                    Token payments
                </button>
                <button class="quick-action-btn bg-gray-100 hover:bg-gray-200 text-gray-800 text-xs py-1 px-2 rounded" data-section="ai-benefits">
                    AI benefits
                </button>
            </div>
        </div>
    </div>

    <!-- FFFUND Payment Panel -->
    <div id="paymentPanel" class="payment-panel">
        <div class="bg-orange-500 text-white p-4 rounded-t-lg flex justify-between items-center">
            <h3 class="font-bold">FFFUND Token Payment</h3>
            <button id="closePaymentPanel" class="text-white">
                <i class="fas fa-times"></i>
            </button>
        </div>
        <div class="p-4 overflow-y-auto" style="max-height: 300px;">
            <div class="text-center mb-4">
                <div class="qr-code mb-3">
                    <img src="FFFUNDQRcode.png" alt="FFFUND Payment QR Code">
                </div>
                <p class="text-sm text-gray-600 mb-2">Scan to pay with FFFUND tokens or Fractal Bitcoin</p>
                <div class="token-badge inline-flex mb-3">
                    <i class="fas fa-coins"></i>
                    <span>BRC-20: FFFUND</span>
                </div>
                <p class="text-sm font-medium text-gray-900 mb-1">Fractal Bitcoin Address:</p>
                <p class="text-xs text-gray-500 break-all mb-3">bc1qeycp5ucgz5se75hm557kp7v5ldv4sslmxvlcrm</p>
                <p class="text-sm font-medium text-gray-900 mb-1">Annuity Payment Address:</p>
                <p class="text-xs text-gray-500 break-all mb-3">bitcoincash:p0s64xlle0k46qswrdd63ekq3s030lgqrw9akx3f0nk48t38wl9fxgk9skjs3</p>
                <p class="fee-notice">* All payments include a <span class="fee-amount">0.5%</span> fee that goes to the Annuity payment address</p>
            </div>
            
            <div class="border-t border-gray-200 pt-4">
                <h4 class="text-sm font-medium text-gray-900 mb-2">Payment Options:</h4>
                <div class="space-y-2">
                    <button id="reserveWithFffund" class="w-full bg-orange-500 hover:bg-orange-600 text-white py-2 px-4 rounded-md text-sm font-medium">
                        Reserve Container with FFFUND
                    </button>
                    <button id="payFees" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-md text-sm font-medium">
                        Pay Service Fees to Annuity
                    </button>
                    <button id="connectUnisat" class="w-full bg-gray-800 hover:bg-gray-900 text-white py-2 px-4 rounded-md text-sm font-medium">
                        <span id="unisatStatusText">Connect UNISAT Wallet</span>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- Navigation -->
    <nav class="bg-white shadow-lg sticky top-0 z-50">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between h-16">
                <div class="flex items-center">
                    <div class="flex-shrink-0 flex items-center">
                        <i class="fas fa-boxes text-blue-600 text-2xl mr-2"></i>
                        <span class="text-xl font-bold text-blue-600">ContainerX Arbitrage</span>
                        <span class="token-badge ml-2">FFFUND</span>
                    </div>
                    <div class="hidden md:ml-10 md:flex md:space-x-8">
                        <a href="#marketplace" class="animated-underline inline-flex items-center px-1 pt-1 border-b-2 border-transparent hover:border-gray-300 text-sm font-medium text-gray-500 hover:text-gray-700">Marketplace</a>
                        <a href="#how-it-works" class="animated-underline inline-flex items-center px-1 pt-1 border-b-2 border-transparent hover:border-gray-300 text-sm font-medium text-gray-500 hover:text-gray-700">How It Works</a>
                        <a href="#token-integration" class="animated-underline inline-flex items-center px-1 pt-1 border-b-2 border-transparent hover:border-gray-300 text-sm font-medium text-gray-500 hover:text-gray-700">Token</a>
                        <a href="#ai-benefits" class="animated-underline inline-flex items-center px-1 pt-1 border-b-2 border-transparent hover:border-gray-300 text-sm font-medium text-gray-500 hover:text-gray-700">AI Benefits</a>
                    </div>
                </div>
                <div class="hidden md:ml-6 md:flex md:items-center">
                    <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium mr-4">Sign In</button>
                    <button class="bg-white hover:bg-gray-100 text-blue-600 border border-blue-600 px-4 py-2 rounded-md text-sm font-medium">Register</button>
                </div>
                <div class="-mr-2 flex items-center md:hidden">
                    <button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500">
                        <span class="sr-only">Open main menu</span>
                        <i class="fas fa-bars"></i>
                    </button>
                </div>
            </div>
        </div>
    </nav>

    <!-- Hero Section -->
    <div class="gradient-bg text-white">
        <div class="max-w-7xl mx-auto py-16 px-4 sm:py-24 sm:px-6 lg:px-8">
            <div class="text-center">
                <h1 class="text-4xl font-extrabold tracking-tight sm:text-5xl lg:text-6xl">
                    AI-Powered Container Arbitrage
                </h1>
                <p class="mt-6 max-w-2xl mx-auto text-xl">
                    Our AI assistant handles everything from purchase negotiation to distribution, maximizing your profits with minimal effort.
                </p>
                <div class="mt-10 flex justify-center space-x-4">
                    <a href="#marketplace" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-blue-700 bg-white hover:bg-gray-50">
                        Browse Containers
                    </a>
                    <a href="#ai-benefits" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-blue-800 bg-opacity-80 hover:bg-opacity-100">
                        Try AI Assistant
                    </a>
                </div>
                <div class="mt-6">
                    <span class="token-badge inline-flex">
                        <i class="fas fa-coins"></i>
                        <span>Pay with FFFUND BRC-20 tokens</span>
                    </span>
                </div>
            </div>
        </div>
    </div>

    <!-- AI Capabilities Section -->
    <div id="how-it-works" class="bg-gray-50 py-12">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="lg:text-center mb-12">
                <h2 class="text-base text-blue-600 font-semibold tracking-wide uppercase">AI Features</h2>
                <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
                    End-to-End Arbitrage Automation
                </p>
                <p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
                    Our AI handles the entire process while you focus on growing your business
                </p>
            </div>
            
            <div class="grid grid-cols-1 gap-8 md:grid-cols-3">
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
                        <i class="fas fa-handshake"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Smart Negotiation</h3>
                    <p class="text-gray-600">
                        AI negotiates optimal purchase prices with suppliers using historical data and market conditions.
                    </p>
                </div>
                
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
                        <i class="fas fa-ship"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Logistics Automation</h3>
                    <p class="text-gray-600">
                        Automatically books optimal shipping routes and handles all customs documentation.
                    </p>
                </div>
                
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
                        <i class="fas fa-network-wired"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Dynamic Marketshare Recovery</h3>
                    <p class="text-gray-600">
                        Specializes in recovering lost marketshare from tariff-affected imports by identifying alternative sourcing strategies and distribution channels.
                    </p>
                </div>
            </div>
        </div>
    </div>

    <!-- AI Process Section -->
    <div class="bg-white py-12">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="lg:text-center mb-12">
                <h2 class="text-base text-blue-600 font-semibold tracking-wide uppercase">How It Works</h2>
                <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
                    The AI-Assisted Arbitrage Process
                </p>
            </div>
            
            <div class="max-w-3xl mx-auto">
                <div class="process-step">
                    <div class="step-number">1</div>
                    <h3 class="text-lg font-bold text-gray-900">Opportunity Identification</h3>
                    <p class="text-gray-600 mt-2">
                        AI analyzes global trade flows, tariff differentials, and demand patterns to identify the most profitable container arbitrage opportunities.
                    </p>
                </div>
                
                <div class="process-step">
                    <div class="step-number">2</div>
                    <h3 class="text-lg font-bold text-gray-900">Automated Negotiation</h3>
                    <p class="text-gray-600 mt-2">
                        Our AI negotiates with suppliers using historical pricing data, current market conditions, and your specific requirements to secure the best deal.
                    </p>
                </div>
                
                <div class="process-step">
                    <div class="step-number">3</div>
                    <h3 class="text-lg font-bold text-gray-900">Logistics Coordination</h3>
                    <p class="text-gray-600 mt-2">
                        AI books optimal shipping routes, handles all customs documentation, and provides real-time tracking throughout the journey.
                    </p>
                </div>
                
                <div class="process-step">
                    <div class="step-number">4</div>
                    <h3 class="text-lg font-bold text-gray-900">Distribution Management</h3>
                    <p class="text-gray-600 mt-2">
                        Upon arrival, AI connects you with pre-vetted buyers or manages distribution through your interoperable partner network to maximize your returns. All payments are settled automatically through our tokenized system.
                    </p>
                </div>
                
                <div class="process-step">
                    <div class="step-number">5</div>
                    <h3 class="text-lg font-bold text-gray-900">Profit Optimization</h3>
                    <p class="text-gray-600 mt-2">
                        Continuous learning from each transaction improves future arbitrage opportunities and profit margins.
                    </p>
                </div>
            </div>
        </div>
    </div>

    <!-- Marketplace Section -->
    <div id="marketplace" class="py-12 bg-gray-50">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="lg:text-center mb-12">
                <h2 class="text-base text-blue-600 font-semibold tracking-wide uppercase">AI-Selected Deals</h2>
                <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
                    Recent Arbitrage Opportunities
                </p>
                <p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
                    Real-time container arbitrage opportunities from our global network
                </p>
            </div>
            
            <!-- Container Listings -->
            <div id="containerListings" class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
                <!-- Loading state -->
                <div class="loading-spinner"></div>
                <p class="text-center col-span-full">Loading recent arbitrage opportunities...</p>
            </div>
            
            <div class="mt-8 text-center">
                <button id="refreshListings" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700">
                    <i class="fas fa-sync-alt mr-2"></i>Refresh Listings
                </button>
            </div>
        </div>
    </div>

    <!-- Token Integration Section -->
    <div id="token-integration" class="py-12 bg-white">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="lg:text-center mb-12">
                <h2 class="text-base text-orange-500 font-semibold tracking-wide uppercase">Token Integration</h2>
                <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
                    FFFUND BRC-20 Token Payments
                </p>
                <p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
                    Secure, fast transactions using the Fabric Flow Fund token ecosystem
                </p>
            </div>
            
            <div class="grid grid-cols-1 gap-8 md:grid-cols-3">
                <div class="bg-gray-50 p-6 rounded-lg">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-orange-500 text-white mb-4">
                        <i class="fab fa-bitcoin"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">BRC-20 Standard</h3>
                    <p class="text-gray-600">
                        FFFUND tokens operate on the Bitcoin blockchain using the BRC-20 standard for secure, transparent transactions.
                    </p>
                    <div class="mt-4">
                        <p class="text-xs text-gray-500 break-all">Token payments using FFFUND or Fractal Bitcoin are sent to Fractal Bitcoin address bc1qeycp5ucgz5se75hm557kp7v5ldv4sslmxvlcrm</p>
                    </div>
                </div>
                
                <div class="bg-gray-50 p-6 rounded-lg">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-orange-500 text-white mb-4">
                        <i class="fas fa-wallet"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">UNISAT Integration</h3>
                    <p class="text-gray-600">
                        Seamless integration with UNISAT wallet for easy token management and payments.
                    </p>
                    <div class="mt-4">
                        <p class="text-xs text-gray-500 break-all api-mask">f5e47d96f8af50a0388d814f6d0187663eab8924c35c8a4f2941ed39c6493959</p>
                    </div>
                </div>
                
                <div class="bg-gray-50 p-6 rounded-lg">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-orange-500 text-white mb-4">
                        <i class="fas fa-money-bill-wave"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Annuity Payments</h3>
                    <p class="text-gray-600">
                        Service fees are automatically routed to the Fabric Flow Fund annuity for sustainable operations.
                    </p>
                    <div class="mt-4">
                        <p class="text-xs text-gray-500 break-all">The Annuity payment address is bitcoincash:p0s64xlle0k46qswrdd63ekq3s030lgqrw9akx3f0nk48t38wl9fxgk9skjs3</p>
                    </div>
                </div>
            </div>
            
            <div class="mt-12 text-center">
                <a href="#" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-orange-500 hover:bg-orange-600">
                    Learn More About FFFUND
                    <i class="fas fa-arrow-right ml-2"></i>
                </a>
            </div>
        </div>
    </div>

    <!-- AI Benefits Section -->
    <div id="ai-benefits" class="py-12 bg-gray-50">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="lg:text-center mb-12">
                <h2 class="text-base text-blue-600 font-semibold tracking-wide uppercase">AI Advantages</h2>
                <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
                    Why Use AI for Container Arbitrage?
                </p>
            </div>
            
            <div class="grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-4">
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
                        <i class="fas fa-brain"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Market Intelligence</h3>
                    <p class="text-gray-600">
                        Processes millions of data points to identify the most profitable routes and products.
                    </p>
                </div>
                
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
                        <i class="fas fa-comments-dollar"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">24/7 Negotiation</h3>
                    <p class="text-gray-600">
                        Negotiates with suppliers across time zones without fatigue or emotion.
                    </p>
                </div>
                
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
                        <i class="fas fa-file-contract"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Document Automation</h3>
                    <p class="text-gray-600">
                        Generates and files all required shipping and customs documents instantly.
                    </p>
                </div>
                
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
                        <i class="fas fa-chart-network"></i>
                    </div>
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Network Effects</h3>
                    <p class="text-gray-600">
                        Learns from all transactions to continuously improve deals for all users.
                    </p>
                </div>
            </div>
        </div>
    </div>

    <!-- CTA Section -->
    <div class="gradient-bg text-white">
        <div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
            <h2 class="text-3xl font-extrabold tracking-tight sm:text-4xl">
                <span class="block">Ready to automate your arbitrage business?</span>
                <span class="block">Get started with our AI assistant today.</span>
            </h2>
            <div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
                <div class="inline-flex rounded-md shadow">
                    <a href="#" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-blue-600 bg-white hover:bg-gray-50">
                        Start Free Trial
                    </a>
                </div>
                <div class="ml-3 inline-flex rounded-md shadow">
                    <a href="#ai-benefits" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-blue-800 bg-opacity-60 hover:bg-opacity-70">
                        AI Demo
                    </a>
                </div>
            </div>
        </div>
    </div>

    <!-- Market Ticker -->
    <div class="bg-gray-800 text-white py-3 overflow-hidden">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex items-center">
                <span class="font-bold mr-4">Compliant Opportunities:</span>
                <div class="flex-1 overflow-hidden">
                    <div class="marquee">
                        <span class="mx-4">🇸🇬 Singapore → USA: Electronics 0% tariff (USSFTA)</span>
                        <span class="mx-4">🇹🇼 Taiwan → USA: Semiconductors 0% tariff (US-Taiwan FTA)</span>
                        <span class="mx-4">🇨🇳 China → USA: Select goods 0% tariff (Phase One Agreement)</span>
                        <span class="mx-4">🇲🇾 Malaysia → USA: Rubber products 0% tariff (US-Malaysia FTA)</span>
                        <span class="mx-4">🇻🇳 Vietnam → USA: Footwear 0% tariff (US-Vietnam FTA)</span>
                        <span class="mx-4">FFFUND Price: $0.42 | Market Cap: $4.2M | 24h Vol: $120K</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white">
        <div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
            <div class="grid grid-cols-2 md:grid-cols-4 gap-8">
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase">Marketplace</h3>
                    <ul class="mt-4 space-y-4">
                        <li><a href="#marketplace" class="text-base text-gray-300 hover:text-white">Compliant Deals</a></li>
                        <li><a href="#" class="text-base text-gray-300 hover:text-white">Tariff-Low-Free Products</a></li>
                        <li><a href="#" class="text-base text-gray-300 hover:text-white">New Arrivals</a></li>
                        <li><a href="#" class="text-base text-gray-300 hover:text-white">Verified Suppliers</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase">AI Services</h3>
                    <ul class="mt-4 space-y-4">
                        <li><a href="#how-it-works" class="text-base text-gray-300 hover:text-white">Automated Negotiation</a></li>
                        <li><a href="#how-it-works" class="text-base text-gray-300 hover:text-white">Logistics Automation</a></li>
                        <li><a href="#how-it-works" class="text-base text-gray-300 hover:text-white">Distribution Network</a></li>
                        <li><a href="#ai-benefits" class="text-base text-gray-300 hover:text-white">Market Analysis</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase">Token</h3>
                    <ul class="mt-4 space-y-4">
                        <li><a href="#token-integration" class="text-base text-gray-300 hover:text-white">FFFUND BRC-20</a></li>
                        <li><a href="#token-integration" class="text-base text-gray-300 hover:text-white">UNISAT Integration</a></li>
                        <li><a href="#token-integration" class="text-base text-gray-300 hover:text-white">Annuity Payments</a></li>
                        <li><a href="#" class="text-base text-gray-300 hover:text-white">Tokenomics</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-sm font-semibold text-gray-400 tracking-wider uppercase">Connect</h3>
                    <ul class="mt-4 space-y-4">
                        <li><a href="#" class="text-base text-gray-300 hover:text-white">Help Center</a></li>
                        <li><a href="#" class="text-base text-gray-300 hover:text-white">Community</a></li>
                        <li><a href="#" class="text-base text-gray-300 hover:text-white">Partnerships</a></li>
                        <li class="flex space-x-6 mt-6">
                            <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
                            <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-telegram"></i></a>
                            <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a>
                            <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-github"></i></a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="mt-12 border-t border-gray-800 pt-8 flex flex-col md:flex-row justify-between">
                <p class="text-base text-gray-400">
                    &copy; 2025 ContainerX Arbitrage FFFUND. SaaS. All rights reserved.
                </p>
                <div class="mt-4 md:mt-0 flex space-x-6">
                    <a href="#" class="text-base text-gray-400 hover:text-white">Privacy Policy</a>
                    <a href="#" class="text-base text-gray-400 hover:text-white">Terms of Service</a>
                    <a href="#" class="text-base text-gray-400 hover:text-white">Token Agreement</a>
                </div>
            </div>
        </div>
    </footer>

    <!-- Payment Modal -->
    <div id="paymentModal" class="fixed inset-0 z-50 overflow-y-auto hidden">
        <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
            <div class="fixed inset-0 transition-opacity" aria-hidden="true">
                <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
            </div>
            <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
            <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
                <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
                    <div class="sm:flex sm:items-start">
                        <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-orange-100 sm:mx-0 sm:h-10 sm:w-10">
                            <i class="fas fa-coins text-orange-600"></i>
                        </div>
                        <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
                            <h3 class="text-lg leading-6 font-medium text-gray-900" id="modalTitle">Complete Payment with FFFUND</h3>
            <div class="mt-2">
                <div id="paymentDetails" class="text-sm text-gray-500">
                    <!-- Payment details will be inserted here -->
                </div>
                <div id="paymentStatus" class="mt-4 hidden">
                    <div class="flex items-center">
                        <div class="loading-spinner mr-3"></div>
                        <span id="statusText">Processing payment...</span>
                    </div>
                </div>
            </div>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
                    <button id="confirmPayment" type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-orange-600 text-base font-medium text-white hover:bg-orange-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500 sm:ml-3 sm:w-auto sm:text-sm">
                        Confirm Payment
                    </button>
                    <button id="cancelPayment" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
                        Cancel
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script>
        // API Configuration
        const UNISAT_API_KEY = '887328e7183cd88b6a4719a5b369819647ebda767fee072d18cde0c373dbf9cd';
        const UNISAT_TESTNET_API_URL = 'https://open-api-testnet.unisat.io';
        const FFFUND_TICKER = 'FFFUND';
        const ARBITRAGE_API_URL = 'https://huggingface.co/spaces/privateuserh/fffund-containerarbitrage-db1';

        document.addEventListener('DOMContentLoaded', function() {
            // Track UniSat connection status
            let isUniSatConnected = false;
            let currentPayment = {
                type: '',
                amount: 0,
                containerId: null,
                containerName: ''
            };

            // AI Assistant Panel Toggle
            const aiAssistantBtn = document.getElementById('aiAssistantBtn');
            const aiPanel = document.getElementById('aiPanel');
            const closeAiPanel = document.getElementById('closeAiPanel');
            
            aiAssistantBtn.addEventListener('click', function() {
                aiPanel.classList.toggle('open');
                paymentPanel.classList.remove('open');
            });
            
            closeAiPanel.addEventListener('click', function() {
                aiPanel.classList.remove('open');
            });
            
            // FFFUND Payment Panel Toggle
            const fffundPaymentBtn = document.getElementById('fffundPaymentBtn');
            const paymentPanel = document.getElementById('paymentPanel');
            const closePaymentPanel = document.getElementById('closePaymentPanel');
            
            fffundPaymentBtn.addEventListener('click', function() {
                paymentPanel.classList.toggle('open');
                aiPanel.classList.remove('open');
            });
            
            closePaymentPanel.addEventListener('click', function() {
                paymentPanel.classList.remove('open');
            });
            
            // Payment Panel Buttons
            const reserveWithFffund = document.getElementById('reserveWithFffund');
            const payFees = document.getElementById('payFees');
            const connectUnisat = document.getElementById('connectUnisat');
            const unisatStatusText = document.getElementById('unisatStatusText');
            
            // Payment Modal Elements
            const paymentModal = document.getElementById('paymentModal');
            const paymentDetails = document.getElementById('paymentDetails');
            const paymentStatus = document.getElementById('paymentStatus');
            const statusText = document.getElementById('statusText');
            const confirmPayment = document.getElementById('confirmPayment');
            const cancelPayment = document.getElementById('cancelPayment');
            
            // Refresh Listings Button
            const refreshListings = document.getElementById('refreshListings');
            refreshListings.addEventListener('click', fetchContainerListings);
            
            // Connect to UniSat Wallet
            connectUnisat.addEventListener('click', async function() {
                if (typeof window.unisat === 'undefined') {
                    alert('UniSat Wallet is not installed. Please install it first.');
                    return;
                }
                
                try {
                    // Disable button while connecting
                    connectUnisat.disabled = true;
                    unisatStatusText.textContent = 'Connecting...';
                    
                    // Request accounts
                    const accounts = await window.unisat.requestAccounts();
                    if (accounts && accounts.length > 0) {
                        isUniSatConnected = true;
                        connectUnisat.classList.remove('bg-gray-800');
                        connectUnisat.classList.add('unisat-connected');
                        unisatStatusText.textContent = 'Connected: ' + accounts[0].substring(0, 6) + '...' + accounts[0].substring(accounts[0].length - 4);
                        
                        // Get FFFUND token balance
                        const balance = await getFffundBalance(accounts[0]);
                        console.log('FFFUND Balance:', balance);
                    }
                } catch (error) {
                    console.error('Error connecting to UniSat:', error);
                    connectUnisat.classList.remove('bg-gray-800');
                    connectUnisat.classList.add('unisat-not-connected');
                    unisatStatusText.textContent = 'Connection Failed';
                    alert('Failed to connect to UniSat Wallet: ' + error.message);
                } finally {
                    // Re-enable button
                    setTimeout(() => {
                        connectUnisat.disabled = false;
                    }, 1000);
                }
            });
            
            // Reserve container with FFFUND
            reserveWithFffund.addEventListener('click', function() {
                if (!isUniSatConnected) {
                    alert('Please connect your UniSat Wallet first.');
                    return;
                }
                
                // In a real implementation, this would be set based on the selected container
                currentPayment = {
                    type: 'reserve',
                    amount: 1000, // Example amount in FFFUND tokens
                    containerId: 123, // Example container ID
                    containerName: 'Electronics Mix (40HQ)' // Example container name
                };
                
                // Show payment modal
                paymentDetails.innerHTML = `
                    <p>You are about to reserve <strong>${currentPayment.containerName}</strong> using FFFUND tokens.</p>
                    <div class="mt-4 p-4 bg-gray-100 rounded-md">
                        <div class="flex justify-between">
                            <span>Container Price:</span>
                            <strong>${currentPayment.amount} FFFUND</strong>
                        </div>
                        <div class="flex justify-between mt-2">
                            <span>Service Fee (0.5%):</span>
                            <strong>${(currentPayment.amount * 0.005).toFixed(2)} FFFUND</strong>
                        </div>
                        <div class="flex justify-between mt-2 font-bold text-lg">
                            <span>Total:</span>
                            <strong>${(currentPayment.amount * 1.005).toFixed(2)} FFFUND</strong>
                        </div>
                    </div>
                    <p class="mt-4 text-sm text-gray-500">This will create a BRC-20 transfer inscription for your payment.</p>
                `;
                
                paymentModal.classList.remove('hidden');
            });
            
            // Pay service fees
            payFees.addEventListener('click', function() {
                if (!isUniSatConnected) {
                    alert('Please connect your UniSat Wallet first.');
                    return;
                }
                
                currentPayment = {
                    type: 'fee',
                    amount: 50, // Example fee amount in FFFUND tokens
                    containerId: null,
                    containerName: 'Service Fee Payment'
                };
                
                // Show payment modal
                paymentDetails.innerHTML = `
                    <p>You are about to pay service fees to the Fabric Flow Fund annuity.</p>
                    <div class="mt-4 p-4 bg-gray-100 rounded-md">
                        <div class="flex justify-between font-bold text-lg">
                            <span>Amount:</span>
                            <strong>${currentPayment.amount} FFFUND</strong>
                        </div>
                    </div>
                    <p class="mt-4 text-sm text-gray-500">This will create a BRC-20 transfer inscription for your payment.</p>
                `;
                
                paymentModal.classList.remove('hidden');
            });
            
            // Confirm payment
            confirmPayment.addEventListener('click', async function() {
                if (!isUniSatConnected) {
                    alert('Wallet connection lost. Please reconnect your UniSat Wallet.');
                    return;
                }
                
                // Show processing status
                paymentStatus.classList.remove('hidden');
                confirmPayment.disabled = true;
                cancelPayment.disabled = true;
                statusText.textContent = 'Creating payment inscription...';
                
                try {
                    // Get current account
                    const accounts = await window.unisat.getAccounts();
                    const address = accounts[0];
                    
                    // Create BRC-20 transfer inscription
                    statusText.textContent = 'Preparing FFFUND transfer...';
                    const transferResult = await createFffundTransfer(
                        address, 
                        currentPayment.type === 'reserve' ? 
                            'bc1qeycp5ucgz5se75hm557kp7v5ldv4sslmxvlcrm' : // Container payment address
                            'bitcoincash:p0s64xlle0k46qswrdd63ekq3s030lgqrw9akx3f0nk48t38wl9fxgk9skjs3', // Annuity address
                        currentPayment.amount
                    );
                    
                    statusText.textContent = 'Payment successful!';
                    setTimeout(() => {
                        paymentModal.classList.add('hidden');
                        paymentStatus.classList.add('hidden');
                        confirmPayment.disabled = false;
                        cancelPayment.disabled = false;
                        
                        // Show success message
                        alert(`Payment of ${currentPayment.amount} FFFUND completed successfully!`);
                    }, 2000);
                    
                    console.log('Payment result:', transferResult);
                } catch (error) {
                    console.error('Payment error:', error);
                    statusText.textContent = 'Payment failed: ' + error.message;
                    confirmPayment.disabled = false;
                    cancelPayment.disabled = false;
                }
            });
            
            // Cancel payment
            cancelPayment.addEventListener('click', function() {
                paymentModal.classList.add('hidden');
                paymentStatus.classList.add('hidden');
                confirmPayment.disabled = false;
                cancelPayment.disabled = false;
            });
            
            // AI Chat Functionality
            const aiChat = document.getElementById('aiChat');
            const aiInput = document.getElementById('aiInput');
            const aiSendBtn = document.getElementById('aiSendBtn');
            const quickActionBtns = document.querySelectorAll('.quick-action-btn');
            
            function addBotMessage(message) {
                // Show typing indicator
                const typingIndicator = document.createElement('div');
                typingIndicator.className = 'typing-indicator';
                typingIndicator.innerHTML = '<span></span><span></span><span></span>';
                aiChat.appendChild(typingIndicator);
                
                // Scroll to bottom
                aiChat.scrollTop = aiChat.scrollHeight;
                
                // After delay, show message
                setTimeout(() => {
                    // Remove typing indicator
                    aiChat.removeChild(typingIndicator);
                    
                    // Add message
                    const messageDiv = document.createElement('div');
                    messageDiv.className = 'ai-message bot';
                    messageDiv.textContent = message;
                    aiChat.appendChild(messageDiv);
                    
                    // Scroll to bottom
                    aiChat.scrollTop = aiChat.scrollHeight;
                }, 1500);
            }
            
            function addUserMessage(message) {
                const messageDiv = document.createElement('div');
                messageDiv.className = 'ai-message user';
                messageDiv.textContent = message;
                aiChat.appendChild(messageDiv);
                
                // Scroll to bottom
                aiChat.scrollTop = aiChat.scrollHeight;
            }
            
            aiSendBtn.addEventListener('click', function() {
                const message = aiInput.value.trim();
                if (message) {
                    addUserMessage(message);
                    aiInput.value = '';
                    
                    // Simulate bot response
                    setTimeout(() => {
                        const responses = [
                            "I can help you find the best container arbitrage opportunities based on your criteria.",
                            "Based on current market conditions, I recommend focusing on electronics from China to the US market with estimated 42% margins.",
                            "I can negotiate with suppliers to get you better prices. Would you like me to proceed?",
                            "I've identified 3 potential buyers in your target market who are interested in similar containers.",
                            "The shipping logistics can be arranged automatically. Just confirm your purchase and I'll handle the rest."
                        ];
                        
                        const randomResponse = responses[Math.floor(Math.random() * responses.length)];
                        addBotMessage(randomResponse);
                    }, 1000);
                }
            });
            
            aiInput.addEventListener('keypress', function(e) {
                if (e.key === 'Enter') {
                    aiSendBtn.click();
                }
            });
            
            quickActionBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const section = this.getAttribute('data-section');
                    if (section) {
                        // Close AI panel
                        aiPanel.classList.remove('open');
                        
                        // Scroll to section
                        document.getElementById(section).scrollIntoView({
                            behavior: 'smooth'
                        });
                    }
                });
            });
            
            // Container card hover effect
            const containerCards = document.querySelectorAll('.container-card');
            containerCards.forEach(card => {
                card.addEventListener('mouseenter', function() {
                    this.style.transition = 'transform 0.3s ease, box-shadow 0.3s ease';
                });
            });
            
            // Marquee effect for market ticker
            const marquee = document.querySelector('.marquee');
            if (marquee) {
                const contentWidth = marquee.scrollWidth;
                const viewportWidth = marquee.parentElement.offsetWidth;
                const duration = (contentWidth / viewportWidth) * 15;
                marquee.style.animationDuration = `${duration}s`;
            }
            
            // Function to fetch and display real container listings from Hugging Face API
            async function fetchContainerListings() {
                const containerListings = document.getElementById('containerListings');
                
                try {
                    // Show loading state
                    containerListings.innerHTML = `
                        <div class="loading-spinner"></div>
                        <p class="text-center col-span-full">Loading recent arbitrage opportunities...</p>
                    `;
                    
                    // Fetch data from Hugging Face API
                    const response = await fetch(ARBITRAGE_API_URL);
                    
                    if (!response.ok) {
                        throw new Error(`API request failed with status ${response.status}`);
                    }
                    
                    const data = await response.json();
                    
                    // Clear loading state
                    containerListings.innerHTML = '';
                    
                    // Check if we have data
                    if (!data || !data.length) {
                        containerListings.innerHTML = `
                            <div class="col-span-full text-center py-8">
                                <i class="fas fa-info-circle text-blue-500 text-4xl mb-4"></i>
                                <p class="text-gray-600">No recent arbitrage opportunities found. Please check back later.</p>
                            </div>
                        `;
                        return;
                    }
                    
                    // Add listings to DOM
                    data.forEach(listing => {
                        const category = listing.category || 'industrial';
                        const categoryClass = category === 'electronics' ? 'electronics-icon' : 
                                            category === 'apparel' ? 'apparel-icon' : 'industrial-icon';
                        const icon = category === 'electronics' ? 'fas fa-laptop' : 
                                    category === 'apparel' ? 'fas fa-tshirt' : 'fas fa-tools';
                        
                        const statusBadge = listing.status === 'verified' ? 
                            '<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">Verified</span>' :
                            listing.status === 'new' ? 
                            '<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">New Listing</span>' : '';
                        
                        const marketRecoveryBadge = listing.market_recovery ? 
                            '<div class="market-recovery-badge">Tariff Recovery</div>' : '';
                        
                        const ftaBadge = listing.fta ? 
                            `<div class="fta-badge">${listing.fta}</div>` : '';
                        
                        containerListings.innerHTML += `
                            <div class="container-card bg-white rounded-lg shadow-md overflow-hidden transition duration-300 ease-in-out">
                                <div class="relative pb-48 overflow-hidden">
                                    <div class="absolute inset-0 h-full w-full ${categoryClass}">
                                        <i class="${icon} product-icon"></i>
                                    </div>
                                    ${marketRecoveryBadge}
                                    ${ftaBadge}
                                    <div class="absolute top-2 right-2 bg-blue-600 text-white text-xs font-bold px-2 py-1 rounded-full">
                                        AI Recommended
                                    </div>
                                </div>
                                <div class="p-4">
                                    <div class="flex items-center justify-between">
                                        <h3 class="text-lg font-medium text-gray-900">${listing.title || 'Container Load'}</h3>
                                        ${statusBadge}
                                    </div>
                                    <div class="mt-2 flex items-center text-sm text-gray-500">
                                        <i class="fas fa-map-marker-alt mr-1"></i>
                                        <span>${listing.origin || 'Unknown'}${listing.destination || 'Unknown'}</span>
                                    </div>
                                    <div class="mt-2">
                                        <span class="text-sm text-gray-500">US Tariff Rate:</span>
                                        <p class="text-sm font-medium text-green-600">${listing.tariff || '0%'} ${listing.fta ? '('+listing.fta+')' : ''}</p>
                                    </div>
                                    <div class="mt-2">
                                        <span class="text-sm text-gray-500">AI Profit Estimate:</span>
                                        <p class="text-sm font-medium text-green-600">${listing.roi || '40-60%'} ROI potential</p>
                                    </div>
                                    <div class="mt-4 flex justify-between items-center">
                                        <div>
                                            <span class="text-sm text-gray-500">Purchase Price:</span>
                                            <p class="text-lg font-bold text-gray-900">$${(listing.price || 0).toLocaleString()}</p>
                                        </div>
                                        <div class="text-right">
                                            <span class="text-sm text-gray-500">Est. Resale Value:</span>
                                            <p class="text-lg font-bold text-blue-600">$${(listing.est_value || 0).toLocaleString()}+</p>
                                        </div>
                                    </div>
                                    <div class="mt-4 flex space-x-2">
                                        <button class="flex-1 bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-md text-sm font-medium">
                                            Buy Now
                                        </button>
                                        <button class="flex-1 bg-white hover:bg-gray-100 text-blue-600 border border-blue-600 py-2 px-4 rounded-md text-sm font-medium">
                                            AI Negotiate
                                        </button>
                                    </div>
                                    <div class="mt-3 text-center">
                                        <button class="text-xs text-orange-500 hover:text-orange-600 font-medium" onclick="showFffundPayment('${listing.title || 'Container'}', ${listing.price || 0})">
                                            <i class="fas fa-coins mr-1"></i>Reserve with FFFUND
                                        </button>
                                    </div>
                                </div>
                            </div>
                        `;
                    });
                } catch (error) {
                    console.error('Error fetching container listings:', error);
                    containerListings.innerHTML = `
                        <div class="col-span-full text-center py-8">
                            <i class="fas fa-exclamation-triangle text-yellow-500 text-4xl mb-4"></i>
                            <p class="text-gray-600">Failed to load container listings. Please try again later.</p>
                            <button onclick="fetchContainerListings()" class="mt-4 bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-md text-sm font-medium">
                                Retry
                            </button>
                        </div>
                    `;
                }
            }
            
            // Fetch container listings on page load
            fetchContainerListings();
        });
        
        // Function to show FFFUND payment panel for specific container
        function showFffundPayment(containerName, price) {
            const paymentPanel = document.getElementById('paymentPanel');
            const aiPanel = document.getElementById('aiPanel');
            
            paymentPanel.classList.add('open');
            aiPanel.classList.remove('open');
            
            // Calculate 0.5% fee
            const fee = price * 0.005;
            const totalAmount = price + fee;
            
            // In a real implementation, this would update the payment interface
            console.log(`Preparing FFFUND payment for: ${containerName}`);
            console.log(`Container price: $${price.toFixed(2)}`);
            console.log(`Annuity fee (0.5%): $${fee.toFixed(2)}`);
            console.log(`Total amount to pay: $${totalAmount.toFixed(2)}`);
            
            // Show fee notice in the payment panel
            const feeNotice = document.querySelector('.fee-notice');
            if (feeNotice) {
                feeNotice.innerHTML = `* Includes <span class="fee-amount">0.5%</span> annuity fee of $${fee.toFixed(2)} (Total: $${totalAmount.toFixed(2)})`;
            }
        }
        
        // Function to get FFFUND token balance
        async function getFffundBalance(address) {
            try {
                const response = await fetch(`${UNISAT_TESTNET_API_URL}/v1/indexer/address/${address}/brc20/summary`, {
                    method: 'GET',
                    headers: {
                        'accept': 'application/json',
                        'Authorization': `Bearer ${UNISAT_API_KEY}`
                    }
                });
                
                if (!response.ok) {
                    throw new Error(`API request failed with status ${response.status}`);
                }
                
                const data = await response.json();
                const fffundData = data.detail.find(token => token.ticker === FFFUND_TICKER);
                
                return fffundData ? {
                    available: fffundData.availableBalance,
                    transferable: fffundData.transferableBalance
                } : {
                    available: '0',
                    transferable: '0'
                };
            } catch (error) {
                console.error('Error fetching FFFUND balance:', error);
                throw error;
            }
        }
        
        // Function to create FFFUND transfer inscription
        async function createFffundTransfer(fromAddress, toAddress, amount) {
            try {
                // First create the order
                const orderResponse = await fetch(`${UNISAT_TESTNET_API_URL}/v1/indexer/brc20/transfer-inscribe`, {
                    method: 'POST',
                    headers: {
                        'accept': 'application/json',
                        'Authorization': `Bearer ${UNISAT_API_KEY}`,
                        'Content-Type': 'application/json'
                    },
                    body: JSON.stringify({
                        "ticker": FFFUND_TICKER,
                        "amount": amount.toString(),
                        "feeRate": 1, // Standard fee rate
                        "toAddress": toAddress
                    })
                });
                
                if (!orderResponse.ok) {
                    throw new Error(`Order creation failed with status ${orderResponse.status}`);
                }
                
                const orderData = await orderResponse.json();
                console.log('Order created:', orderData);
                
                // In a real implementation, you would now:
                // 1. Show the payment address and amount to the user
                // 2. Wait for the payment to be made
                // 3. Check the payment status periodically
                // 4. Once paid, the inscription will be created
                
                // For demo purposes, we'll simulate this process
                return {
                    success: true,
                    orderId: orderData.data.orderId,
                    payAddress: orderData.data.payAddress,
                    amount: orderData.data.amount,
                    inscriptionId: 'simulated-inscription-id'
                };
            } catch (error) {
                console.error('Error creating FFFUND transfer:', error);
                throw error;
            }
        }
        
        // Function to check if UniSat Wallet is installed
        function checkUniSatInstalled() {
            if (typeof window.unisat === 'undefined') {
                console.log('UniSat Wallet is not installed');
                return false;
            }
            return true;
        }
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/fffund-containerarbitrage-1-00" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>