File size: 36,726 Bytes
92021fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FF ENHANCER SUITE | Tactical Combat Enhancement Panel</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto+Mono:wght@300;400;600&display=swap');
        
        body {
            font-family: 'Roboto Mono', monospace;
            background-color: #0a0a12;
            color: #e0e0e0;
            overflow-x: hidden;
        }
        
        .header-font {
            font-family: 'Orbitron', sans-serif;
        }
        
        .weapon-tab.active {
            border-bottom-width: 3px;
        }
        
        .recoil-bar {
            height: 12px;
            border-radius: 6px;
            background: linear-gradient(90deg, #4ade80, #f59e0b, #ef4444);
        }
        
        .recoil-fill {
            height: 100%;
            border-radius: 6px;
            background-color: #3b82f6;
            transition: width 0.3s ease;
        }
        
        .canvas-container {
            position: relative;
        }
        
        .recoil-canvas {
            background-color: #1a1a2e;
            border-radius: 8px;
        }
        
        .combat-log-entry {
            animation: fadeIn 0.3s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(5px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .neural-node {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #10b981;
            position: absolute;
        }
        
        .neural-connection {
            position: absolute;
            height: 2px;
            background-color: rgba(16, 185, 129, 0.3);
            transform-origin: 0 0;
        }
        
        .threat-green { color: #10b981; }
        .threat-yellow { color: #f59e0b; }
        .threat-red { color: #ef4444; }
    </style>
</head>
<body class="min-h-screen">
    <div class="container mx-auto px-4 py-6">
        <!-- Header -->
        <div class="flex flex-col md:flex-row justify-between items-center mb-8">
            <div class="flex items-center mb-4 md:mb-0">
                <div class="w-12 h-12 bg-red-600 rounded-lg flex items-center justify-center mr-3">
                    <i class="fas fa-crosshairs text-white text-2xl"></i>
                </div>
                <h1 class="header-font text-2xl md:text-3xl font-bold text-white">FF ENHANCER SUITE</h1>
            </div>
            <div class="flex items-center space-x-4">
                <div class="flex items-center">
                    <span class="text-sm mr-2">BRIDGE:</span>
                    <span id="bridgeStatus" class="text-xl">🔴</span>
                </div>
                <button id="installBridge" class="bg-gradient-to-r from-purple-600 to-blue-500 hover:from-purple-700 hover:to-blue-600 text-white px-4 py-2 rounded-md font-semibold text-sm transition-all duration-300">
                    INSTALL FF_ENHANCER_SUITE
                </button>
            </div>
        </div>
        
        <!-- Disclaimer -->
        <div class="bg-yellow-900/30 border border-yellow-700 rounded-lg p-4 mb-6 flex items-start">
            <div class="text-yellow-400 mr-3 text-xl">⚠️</div>
            <div class="text-yellow-200 text-sm">
                <strong>REQUIRES LOCAL COMPONENTS - EXPERIMENTAL USE ONLY</strong><br>
                This panel requires the FF Enhancer Bridge to be installed and running locally. All features are experimental and provided for educational purposes only.
            </div>
        </div>
        
        <!-- Main Content -->
        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
            <!-- Left Column -->
            <div class="lg:col-span-2 space-y-6">
                <!-- Weapon Tabs -->
                <div class="bg-gray-900 rounded-xl p-1">
                    <div class="flex overflow-x-auto">
                        <button class="weapon-tab active px-6 py-3 font-medium text-sm flex-shrink-0 border-b-2 border-red-500 text-white bg-gray-800/50" data-weapon="AR">
                            <i class="fas fa-gun mr-2"></i> Assault Rifles
                        </button>
                        <button class="weapon-tab px-6 py-3 font-medium text-sm flex-shrink-0 border-b-2 border-transparent text-gray-400 hover:text-white" data-weapon="SMG">
                            <i class="fas fa-gun mr-2"></i> SMGs
                        </button>
                        <button class="weapon-tab px-6 py-3 font-medium text-sm flex-shrink-0 border-b-2 border-transparent text-gray-400 hover:text-white" data-weapon="Shotgun">
                            <i class="fas fa-gun mr-2"></i> Shotguns
                        </button>
                        <button class="weapon-tab px-6 py-3 font-medium text-sm flex-shrink-0 border-b-2 border-transparent text-gray-400 hover:text-white" data-weapon="Pistol">
                            <i class="fas fa-gun mr-2"></i> Pistols
                        </button>
                    </div>
                    
                    <!-- Weapon Content -->
                    <div class="p-4">
                        <!-- Weapon Selector -->
                        <div class="mb-6">
                            <label class="block text-sm font-medium mb-2">Select Weapon</label>
                            <select id="weaponSelect" class="w-full bg-gray-800 border border-gray-700 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
                                <option value="AK47">AK47</option>
                                <option value="M4A1">M4A1</option>
                                <option value="SCAR">SCAR</option>
                                <option value="XM8">XM8</option>
                                <option value="FAMAS">FAMAS</option>
                            </select>
                        </div>
                        
                        <!-- Recoil Compensation -->
                        <div class="mb-6">
                            <div class="flex justify-between items-center mb-2">
                                <label class="text-sm font-medium">Recoil Compensation</label>
                                <span id="recoilValue" class="text-sm font-mono">85%</span>
                            </div>
                            <div class="recoil-bar mb-2">
                                <div id="recoilFill" class="recoil-fill" style="width: 85%"></div>
                            </div>
                            <div class="flex justify-between text-xs text-gray-400">
                                <span>Light</span>
                                <span>Moderate</span>
                                <span>Heavy</span>
                            </div>
                        </div>
                        
                        <!-- Aimlock Precision -->
                        <div class="mb-6">
                            <label class="block text-sm font-medium mb-3">Aimlock Precision</label>
                            <div class="flex space-x-4">
                                <div class="flex-1 bg-gray-800 rounded-lg p-3 flex flex-col items-center cursor-pointer border-2 border-transparent hover:border-blue-500 aimlock-precision" data-precision="headshot">
                                    <i class="fas fa-skull text-xl mb-2 text-red-400"></i>
                                    <span class="text-xs">Headshot</span>
                                </div>
                                <div class="flex-1 bg-gray-800 rounded-lg p-3 flex flex-col items-center cursor-pointer border-2 border-blue-500 aimlock-precision" data-precision="center-mass">
                                    <i class="fas fa-bullseye text-xl mb-2 text-blue-400"></i>
                                    <span class="text-xs">Center Mass</span>
                                </div>
                                <div class="flex-1 bg-gray-800 rounded-lg p-3 flex flex-col items-center cursor-pointer border-2 border-transparent hover:border-purple-500 aimlock-precision" data-precision="dynamic">
                                    <i class="fas fa-brain text-xl mb-2 text-purple-400"></i>
                                    <span class="text-xs">Dynamic</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Recoil Pattern Visualizer -->
                        <div class="mb-6">
                            <label class="block text-sm font-medium mb-2">Recoil Pattern</label>
                            <div class="canvas-container bg-gray-900 rounded-lg p-4">
                                <canvas id="recoilCanvas" class="recoil-canvas w-full h-64"></canvas>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Weapon Settings -->
                <div class="bg-gray-900 rounded-xl p-6">
                    <h3 class="text-lg font-semibold mb-4">Weapon Configuration</h3>
                    
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <!-- Sensitivity Settings -->
                        <div>
                            <label class="block text-sm font-medium mb-2">Vertical Sensitivity</label>
                            <input type="range" min="0" max="100" value="75" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="verticalSensitivity">
                            <div class="flex justify-between text-xs text-gray-400 mt-1">
                                <span>0%</span>
                                <span>50%</span>
                                <span>100%</span>
                            </div>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium mb-2">Horizontal Sensitivity</label>
                            <input type="range" min="0" max="100" value="65" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="horizontalSensitivity">
                            <div class="flex justify-between text-xs text-gray-400 mt-1">
                                <span>0%</span>
                                <span>50%</span>
                                <span>100%</span>
                            </div>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium mb-2">Humanization Jitter</label>
                            <input type="range" min="0" max="100" value="30" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="humanizationJitter">
                            <div class="flex justify-between text-xs text-gray-400 mt-1">
                                <span>None</span>
                                <span>Moderate</span>
                                <span>High</span>
                            </div>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium mb-2">Trigger Delay (ms)</label>
                            <input type="range" min="0" max="500" value="150" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="triggerDelay">
                            <div class="flex justify-between text-xs text-gray-400 mt-1">
                                <span>0ms</span>
                                <span>250ms</span>
                                <span>500ms</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Right Column -->
            <div class="space-y-6">
                <!-- Performance Dashboard -->
                <div class="bg-gray-900 rounded-xl p-6">
                    <h3 class="text-lg font-semibold mb-4">Performance Dashboard</h3>
                    
                    <div class="space-y-4">
                        <div>
                            <div class="flex justify-between text-sm mb-1">
                                <span>System Latency</span>
                                <span id="latencyValue" class="font-mono">18ms</span>
                            </div>
                            <div class="w-full bg-gray-700 rounded-full h-2">
                                <div class="bg-green-500 h-2 rounded-full" style="width: 92%"></div>
                            </div>
                        </div>
                        
                        <div>
                            <div class="flex justify-between text-sm mb-1">
                                <span>Game FPS</span>
                                <span id="fpsValue" class="font-mono">59 FPS</span>
                            </div>
                            <div class="w-full bg-gray-700 rounded-full h-2">
                                <div class="bg-blue-500 h-2 rounded-full" style="width: 98%"></div>
                            </div>
                        </div>
                        
                        <div>
                            <div class="flex justify-between text-sm mb-1">
                                <span>Processing Load</span>
                                <span id="loadValue" class="font-mono">24%</span>
                            </div>
                            <div class="w-full bg-gray-700 rounded-full h-2">
                                <div class="bg-purple-500 h-2 rounded-full" style="width: 24%"></div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mt-6 pt-4 border-t border-gray-800">
                        <h4 class="text-sm font-medium mb-3">Battle Metrics</h4>
                        <div class="grid grid-cols-2 gap-4">
                            <div class="bg-gray-800 rounded-lg p-3">
                                <div class="text-xs text-gray-400 mb-1">Current Distance</div>
                                <div class="text-xl font-mono" id="currentDistance">87m</div>
                            </div>
                            <div class="bg-gray-800 rounded-lg p-3">
                                <div class="text-xs text-gray-400 mb-1">Hit Probability</div>
                                <div class="text-xl font-mono" id="hitProbability">92%</div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Safety Controls -->
                <div class="bg-gray-900 rounded-xl p-6">
                    <h3 class="text-lg font-semibold mb-4">Safety Controls</h3>
                    
                    <div class="space-y-4">
                        <div class="flex items-center justify-between">
                            <div>
                                <label class="text-sm font-medium">Auto-Disable</label>
                                <p class="text-xs text-gray-400">Disable after 5 kills</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" class="sr-only peer" checked>
                                <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-green-600"></div>
                            </label>
                        </div>
                        
                        <div class="flex items-center justify-between">
                            <div>
                                <label class="text-sm font-medium">Cooldown Timer</label>
                                <p class="text-xs text-gray-400">Random pauses</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" class="sr-only peer" checked>
                                <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        
                        <div class="flex items-center justify-between">
                            <div>
                                <label class="text-sm font-medium">Spectator Mode</label>
                                <p class="text-xs text-gray-400">Disable when spectated</p>
                            </div>
                            <label class="relative inline-flex items-center cursor-pointer">
                                <input type="checkbox" class="sr-only peer" checked>
                                <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600"></div>
                            </label>
                        </div>
                    </div>
                    
                    <button id="applySettings" class="mt-6 w-full bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white py-2 px-4 rounded-md font-medium text-sm transition-all duration-300">
                        APPLY SETTINGS
                    </button>
                </div>
                
                <!-- Neural Decision Display -->
                <div class="bg-gray-900 rounded-xl p-6">
                    <h3 class="text-lg font-semibold mb-4">Neural Targeting</h3>
                    
                    <div class="relative h-40 mb-4" id="neuralNetwork">
                        <!-- Neural network visualization will be generated here -->
                    </div>
                    
                    <div class="text-xs font-mono bg-gray-800 p-3 rounded-lg h-20 overflow-y-auto" id="neuralDecisionText">
                        Analyzing target at 87m...<br>
                        Calculating bullet drop...<br>
                        Adjusting for movement...<br>
                        Optimal aim point: upper chest (92% HS chance)
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Combat Log -->
        <div class="mt-6 bg-gray-900 rounded-xl p-6">
            <h3 class="text-lg font-semibold mb-4">Combat Log</h3>
            
            <div class="bg-gray-800 rounded-lg p-3 h-48 overflow-y-auto space-y-2" id="combatLog">
                <div class="combat-log-entry text-sm font-mono">
                    <span class="text-green-400">[12:45:23]</span> Target locked: <span class="threat-green">87m</span> | HS probability: 92%
                </div>
                <div class="combat-log-entry text-sm font-mono">
                    <span class="text-green-400">[12:45:24]</span> Recoil compensation active (vertical: 0.85)
                </div>
                <div class="combat-log-entry text-sm font-mono">
                    <span class="text-green-400">[12:45:25]</span> Firing sequence initiated (3-round burst)
                </div>
                <div class="combat-log-entry text-sm font-mono">
                    <span class="text-yellow-400">[12:45:26]</span> New threat detected: <span class="threat-yellow">112m</span> | Switching priority
                </div>
                <div class="combat-log-entry text-sm font-mono">
                    <span class="text-green-400">[12:45:27]</span> Target eliminated: <span class="threat-green">87m</span> | 2 headshots
                </div>
                <div class="combat-log-entry text-sm font-mono">
                    <span class="text-red-400">[12:45:28]</span> Warning: High threat detected: <span class="threat-red">153m</span> | Sniper
                </div>
            </div>
        </div>
    </div>

    <script>
        // Initialize canvas
        const canvas = document.getElementById('recoilCanvas');
        const ctx = canvas.getContext('2d');
        
        // Set canvas dimensions
        function resizeCanvas() {
            const container = canvas.parentElement;
            canvas.width = container.clientWidth;
            canvas.height = container.clientHeight;
            drawRecoilPattern();
        }
        
        // Draw recoil pattern
        function drawRecoilPattern() {
            ctx.clearRect(0, 0, canvas.width, canvas.height);
            
            // Draw crosshair
            ctx.strokeStyle = 'rgba(255, 255, 255, 0.2)';
            ctx.lineWidth = 1;
            ctx.beginPath();
            ctx.moveTo(canvas.width / 2, 0);
            ctx.lineTo(canvas.width / 2, canvas.height);
            ctx.moveTo(0, canvas.height / 2);
            ctx.lineTo(canvas.width, canvas.height / 2);
            ctx.stroke();
            
            // Draw recoil pattern (AK47 example)
            const centerX = canvas.width / 2;
            const centerY = canvas.height / 2;
            const scale = canvas.height / 30;
            
            ctx.strokeStyle = '#3b82f6';
            ctx.lineWidth = 2;
            ctx.beginPath();
            ctx.moveTo(centerX, centerY);
            
            // AK47 recoil pattern (simplified)
            const pattern = [
                {x: 0, y: 1}, {x: 0.2, y: 2}, {x: 0.5, y: 3}, 
                {x: 0.8, y: 4}, {x: 1.2, y: 5}, {x: 1.5, y: 6},
                {x: 1.2, y: 7}, {x: 0.8, y: 8}, {x: 0.5, y: 9},
                {x: 0.2, y: 10}, {x: -0.2, y: 11}, {x: -0.5, y: 12}
            ];
            
            pattern.forEach((point, i) => {
                ctx.lineTo(centerX + point.x * scale, centerY + point.y * scale);
            });
            
            ctx.stroke();
            
            // Draw dots at each bullet point
            ctx.fillStyle = '#ef4444';
            pattern.forEach((point, i) => {
                ctx.beginPath();
                ctx.arc(centerX + point.x * scale, centerY + point.y * scale, 3, 0, Math.PI * 2);
                ctx.fill();
            });
        }
        
        // Generate neural network visualization
        function generateNeuralNetwork() {
            const container = document.getElementById('neuralNetwork');
            container.innerHTML = '';
            
            const width = container.clientWidth;
            const height = container.clientHeight;
            
            // Create layers
            const layers = 5;
            const nodesPerLayer = [3, 4, 5, 4, 2];
            
            // Draw connections
            for (let l = 0; l < layers - 1; l++) {
                for (let n1 = 0; n1 < nodesPerLayer[l]; n1++) {
                    const x1 = (width / (layers - 1)) * l;
                    const y1 = (height / (nodesPerLayer[l] + 1)) * (n1 + 1);
                    
                    for (let n2 = 0; n2 < nodesPerLayer[l + 1]; n2++) {
                        const x2 = (width / (layers - 1)) * (l + 1);
                        const y2 = (height / (nodesPerLayer[l + 1] + 1)) * (n2 + 1);
                        
                        const line = document.createElement('div');
                        line.className = 'neural-connection';
                        
                        // Calculate line position and length
                        const length = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
                        const angle = Math.atan2(y2 - y1, x2 - x1) * 180 / Math.PI;
                        
                        line.style.width = `${length}px`;
                        line.style.left = `${x1}px`;
                        line.style.top = `${y1}px`;
                        line.style.transform = `rotate(${angle}deg)`;
                        
                        container.appendChild(line);
                    }
                }
            }
            
            // Draw nodes
            for (let l = 0; l < layers; l++) {
                for (let n = 0; n < nodesPerLayer[l]; n++) {
                    const x = (width / (layers - 1)) * l;
                    const y = (height / (nodesPerLayer[l] + 1)) * (n + 1);
                    
                    const node = document.createElement('div');
                    node.className = 'neural-node';
                    node.style.left = `${x - 4}px`;
                    node.style.top = `${y - 4}px`;
                    
                    // Animate nodes
                    node.style.animation = `pulse ${1 + Math.random()}s infinite alternate`;
                    
                    container.appendChild(node);
                }
            }
        }
        
        // Update combat log with random entries
        function updateCombatLog() {
            const log = document.getElementById('combatLog');
            const now = new Date();
            const timeStr = `[${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}]`;
            
            const actions = [
                {text: `Target locked: ${Math.floor(Math.random() * 150)}m`, class: 'green'},
                {text: `Recoil compensation adjusted`, class: 'green'},
                {text: `Firing sequence initiated (${Math.floor(Math.random() * 5) + 1}-round burst)`, class: 'green'},
                {text: `New threat detected: ${Math.floor(Math.random() * 150)}m | Switching priority`, class: 'yellow'},
                {text: `Target eliminated: ${Math.floor(Math.random() * 100)}m | ${Math.floor(Math.random() * 3) + 1} headshots`, class: 'green'},
                {text: `Warning: High threat detected: ${Math.floor(Math.random() * 200)}m | Sniper`, class: 'red'}
            ];
            
            const action = actions[Math.floor(Math.random() * actions.length)];
            const distance = action.text.match(/\d+m/);
            let distanceClass = 'threat-green';
            
            if (distance) {
                const dist = parseInt(distance[0]);
                if (dist > 100) distanceClass = 'threat-red';
                else if (dist > 50) distanceClass = 'threat-yellow';
            }
            
            const entry = document.createElement('div');
            entry.className = 'combat-log-entry text-sm font-mono';
            entry.innerHTML = `
                <span class="text-${action.class}-400">${timeStr}</span> ${action.text.replace(/\d+m/, `<span class="${distanceClass}">$&</span>`)}
            `;
            
            log.insertBefore(entry, log.firstChild);
            
            if (log.children.length > 20) {
                log.removeChild(log.lastChild);
            }
        }
        
        // Update performance metrics randomly
        function updatePerformanceMetrics() {
            document.getElementById('latencyValue').textContent = `${Math.floor(Math.random() * 10) + 15}ms`;
            document.getElementById('fpsValue').textContent = `${Math.floor(Math.random() * 5) + 55} FPS`;
            document.getElementById('loadValue').textContent = `${Math.floor(Math.random() * 15) + 20}%`;
            
            const distance = Math.floor(Math.random() * 200);
            document.getElementById('currentDistance').textContent = `${distance}m`;
            
            // Update threat color
            let threatClass = 'threat-green';
            if (distance > 100) threatClass = 'threat-red';
            else if (distance > 50) threatClass = 'threat-yellow';
            
            document.getElementById('currentDistance').className = `text-xl font-mono ${threatClass}`;
            
            // Update hit probability based on distance
            const hitProb = Math.max(10, 100 - distance / 3 + (Math.random() * 20 - 10));
            document.getElementById('hitProbability').textContent = `${Math.round(hitProb)}%`;
        }
        
        // Handle weapon tab switching
        document.querySelectorAll('.weapon-tab').forEach(tab => {
            tab.addEventListener('click', function() {
                document.querySelectorAll('.weapon-tab').forEach(t => t.classList.remove('active'));
                this.classList.add('active');
                
                // Change border color based on weapon class
                const weaponClass = this.dataset.weapon;
                let borderColor = 'border-red-500';
                
                if (weaponClass === 'SMG') borderColor = 'border-blue-500';
                else if (weaponClass === 'Shotgun') borderColor = 'border-orange-500';
                else if (weaponClass === 'Pistol') borderColor = 'border-purple-500';
                
                this.classList.add(borderColor);
                
                // Update weapon select options
                const weaponSelect = document.getElementById('weaponSelect');
                weaponSelect.innerHTML = '';
                
                let weapons = [];
                if (weaponClass === 'AR') {
                    weapons = ['AK47', 'M4A1', 'SCAR', 'XM8', 'FAMAS'];
                } else if (weaponClass === 'SMG') {
                    weapons = ['MP5', 'P90', 'UMP', 'Vector', 'Thompson'];
                } else if (weaponClass === 'Shotgun') {
                    weapons = ['M1014', 'SPAS12', 'KSG', 'AA12', 'M870'];
                } else if (weaponClass === 'Pistol') {
                    weapons = ['Desert Eagle', 'Glock', 'USP', 'P250', 'Five-Seven'];
                }
                
                weapons.forEach(weapon => {
                    const option = document.createElement('option');
                    option.value = weapon;
                    option.textContent = weapon;
                    weaponSelect.appendChild(option);
                });
                
                // Redraw recoil pattern for new weapon class
                drawRecoilPattern();
            });
        });
        
        // Handle aimlock precision selection
        document.querySelectorAll('.aimlock-precision').forEach(btn => {
            btn.addEventListener('click', function() {
                document.querySelectorAll('.aimlock-precision').forEach(b => {
                    b.classList.remove('border-blue-500');
                    b.classList.add('border-transparent');
                });
                this.classList.add('border-blue-500');
                this.classList.remove('border-transparent');
            });
        });
        
        // Handle sliders
        document.querySelectorAll('input[type="range"]').forEach(slider => {
            slider.addEventListener('input', function() {
                if (this.id === 'verticalSensitivity' || this.id === 'horizontalSensitivity') {
                    document.getElementById('recoilValue').textContent = `${this.value}%`;
                    document.getElementById('recoilFill').style.width = `${this.value}%`;
                }
            });
        });
        
        // Handle apply settings button
        document.getElementById('applySettings').addEventListener('click', function() {
            const weapon = document.getElementById('weaponSelect').value;
            const verticalSens = document.getElementById('verticalSensitivity').value;
            const horizontalSens = document.getElementById('horizontalSensitivity').value;
            const jitter = document.getElementById('humanizationJitter').value;
            const delay = document.getElementById('triggerDelay').value;
            
            const precision = document.querySelector('.aimlock-precision.border-blue-500').dataset.precision;
            
            // Create JSON command
            const command = {
                weapon: weapon,
                mode: "aimlock+recoil",
                params: {
                    vertical: parseFloat(verticalSens / 100).toFixed(2),
                    horizontal: parseFloat(horizontalSens / 100).toFixed(2),
                    jitter: parseFloat(jitter / 100).toFixed(2),
                    delay: parseInt(delay),
                    precision: precision
                }
            };
            
            // In a real app, this would send via WebSocket
            console.log("Sending command:", JSON.stringify(command, null, 2));
            
            // Show success message
            const log = document.getElementById('combatLog');
            const now = new Date();
            const timeStr = `[${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}]`;
            
            const entry = document.createElement('div');
            entry.className = 'combat-log-entry text-sm font-mono';
            entry.innerHTML = `
                <span class="text-green-400">${timeStr}</span> Settings applied for ${weapon} | ${precision} precision
            `;
            
            log.insertBefore(entry, log.firstChild);
        });
        
        // Handle bridge install button
        document.getElementById('installBridge').addEventListener('click', function() {
            // Simulate bridge connection
            document.getElementById('bridgeStatus').textContent = "🟢";
            this.textContent = "BRIDGE CONNECTED";
            this.classList.remove('from-purple-600', 'to-blue-500', 'hover:from-purple-700', 'hover:to-blue-600');
            this.classList.add('from-green-600', 'to-green-500', 'hover:from-green-700', 'hover:to-green-600');
            
            // Add to combat log
            const log = document.getElementById('combatLog');
            const now = new Date();
            const timeStr = `[${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}]`;
            
            const entry = document.createElement('div');
            entry.className = 'combat-log-entry text-sm font-mono';
            entry.innerHTML = `
                <span class="text-green-400">${timeStr}</span> Bridge connected successfully
            `;
            
            log.insertBefore(entry, log.firstChild);
        });
        
        // Initialize
        window.addEventListener('load', function() {
            resizeCanvas();
            generateNeuralNetwork();
            
            // Update metrics periodically
            setInterval(updatePerformanceMetrics, 3000);
            setInterval(updateCombatLog, 5000);
        });
        
        window.addEventListener('resize', function() {
            resizeCanvas();
            generateNeuralNetwork();
        });
    </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=Pnkj01/edu" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>