File size: 25,253 Bytes
57fcf79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c29b9d8
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>GhostJack - RNG Inspector</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <style>
        .vanta-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            opacity: 0.15;
        }
        .glass-card {
            background: rgba(15, 23, 42, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-radius: 1rem;
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }
        .hidden-scan {
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease;
        }
        .visible-scan {
            opacity: 1;
            transform: translateY(0);
        }
        .console-font {
            font-family: 'SF Mono', 'Roboto Mono', monospace;
        }
        .discreet-mode {
            filter: grayscale(100%) brightness(0.8);
        }
        @keyframes subtleGlow {
            0% { box-shadow: 0 0 5px rgba(167, 139, 250, 0); }
            50% { box-shadow: 0 0 10px rgba(167, 139, 250, 0.3); }
            100% { box-shadow: 0 0 5px rgba(167, 139, 250, 0); }
        }
        .glow-border {
            animation: subtleGlow 3s infinite;
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen flex items-center justify-center overflow-x-hidden">
    <div id="vanta-bg" class="vanta-bg"></div>
    
    <div class="container mx-auto px-4 py-8 max-w-4xl">
        <div class="glass-card p-8 glow-border relative">
            <!-- Stealth Toggle -->
            <button id="stealth-toggle" class="absolute top-4 right-4 text-gray-400 hover:text-white transition-colors">
                <i data-feather="eye-off"></i>
            </button>

            <!-- PIN Entry -->
            <div id="pin-entry" class="text-center">
                <div class="flex justify-center mb-6">
                    <i data-feather="lock" class="w-12 h-12 text-purple-400"></i>
                </div>
                <h1 class="text-3xl font-bold mb-2 bg-clip-text text-transparent bg-gradient-to-r from-purple-400 to-pink-600">GhostJack</h1>
                <p class="text-gray-400 mb-8">RNG Inspector Tool</p>
                
                <div class="mb-6 relative">
                    <input id="pin-input" type="password" class="w-full px-4 py-3 bg-gray-800/70 border border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 text-center tracking-widest font-mono" placeholder="••••••" maxlength="6" autocomplete="off">
                    <button id="show-pin" class="absolute right-3 top-3 text-gray-400 hover:text-gray-200 transition-colors">
                        <i data-feather="eye"></i>
                    </button>
                </div>
                <button id="unlock-btn" class="w-full bg-gradient-to-r from-purple-600/90 to-pink-600/90 text-white py-3 rounded-lg font-medium hover:opacity-90 transition duration-300 flex items-center justify-center">
                    <i data-feather="unlock" class="mr-2"></i> Unlock Tool
                </button>
                <p id="pin-error" class="text-red-400 mt-2 hidden">Invalid PIN. Try again.</p>
            </div>

            <!-- Main App (Hidden until PIN is entered) -->
            <div id="main-app" class="hidden">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="text-xl font-semibold flex items-center">
                        <i data-feather="activity" class="mr-2 text-purple-400"></i> RNG Inspector
                    </h2>
                    <button id="lock-btn" class="text-gray-400 hover:text-white transition-colors">
                        <i data-feather="lock" class="w-5 h-5"></i>
                    </button>
                </div>

                <div class="mb-6">
                    <label class="block text-gray-400 mb-2 text-sm">Game URL</label>
                    <div class="flex">
                        <input id="game-url" type="text" class="flex-grow px-4 py-2 bg-gray-800/70 border border-gray-700 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-purple-500 font-mono text-sm" placeholder="https://casino.example.com/game" autocomplete="off">
                        <button id="scan-btn" class="bg-gradient-to-r from-purple-600/90 to-pink-600/90 px-4 py-2 rounded-r-lg hover:opacity-90 transition duration-300 flex items-center">
                            <i data-feather="search" class="w-4 h-4 mr-1"></i> Scan
                        </button>
                    </div>
                </div>

                <div class="hidden-scan" id="scan-section">
                    <div class="mb-6">
                        <div class="flex items-center justify-between mb-2">
                            <label class="text-gray-400 text-sm">Scan Progress</label>
                            <span id="scan-percent" class="text-purple-400 font-mono">0%</span>
                        </div>
                        <div class="w-full bg-gray-800/70 rounded-full h-2">
                            <div id="scan-progress" class="bg-gradient-to-r from-purple-500 to-pink-500 h-2 rounded-full" style="width: 0%"></div>
                        </div>
                    </div>

                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
                        <div class="glass-card p-4 rounded-lg border border-gray-700/50 hover:border-purple-500/30 transition-colors">
                            <div class="flex items-center mb-2">
                                <i data-feather="file" class="text-blue-400 mr-2 w-4 h-4"></i>
                                <span class="text-sm text-gray-400">Files Scanned</span>
                            </div>
                            <div id="files-scanned" class="text-2xl font-bold font-mono">0</div>
                        </div>
                        <div class="glass-card p-4 rounded-lg border border-gray-700/50 hover:border-yellow-500/30 transition-colors">
                            <div class="flex items-center mb-2">
                                <i data-feather="alert-circle" class="text-yellow-400 mr-2 w-4 h-4"></i>
                                <span class="text-sm text-gray-400">Vulnerabilities</span>
                            </div>
                            <div id="vulnerabilities" class="text-2xl font-bold font-mono">0</div>
                        </div>
                        <div class="glass-card p-4 rounded-lg border border-gray-700/50 hover:border-green-500/30 transition-colors">
                            <div class="flex items-center mb-2">
                                <i data-feather="code" class="text-green-400 mr-2 w-4 h-4"></i>
                                <span class="text-sm text-gray-400">RNG Patterns</span>
                            </div>
                            <div id="rng-patterns" class="text-2xl font-bold font-mono">0</div>
                        </div>
                    </div>

                    <div class="mb-6">
                        <div class="flex justify-between items-center mb-2">
                            <label class="text-gray-400 text-sm">Security Analysis</label>
                            <button id="clear-log" class="text-xs text-gray-500 hover:text-gray-300 transition-colors flex items-center">
                                <i data-feather="trash-2" class="w-3 h-3 mr-1"></i> Clear
                            </button>
                        </div>
                        <div id="analysis-log" class="bg-gray-800/70 rounded-lg p-4 h-48 overflow-y-auto font-mono text-xs border border-gray-700/50">
                            <div class="text-gray-500">[System] Ready to scan...</div>
                        </div>
                    </div>

                    <div class="glass-card p-6 rounded-lg mb-6 border border-gray-700/50 hover:border-pink-500/30 transition-colors">
                        <h3 class="text-lg font-semibold mb-4 flex items-center">
                            <i data-feather="zap" class="text-pink-400 mr-2"></i> RNG Prediction
                        </h3>
                        <div id="rng-prediction" class="text-center text-5xl font-bold text-purple-300 py-8 font-mono">
                            ?
                        </div>
                        <div class="text-center text-gray-500 text-xs">
                            Next predicted RNG value will appear here
                        </div>
                    </div>

                    <div class="flex justify-end space-x-3">
                        <button id="export-btn" class="bg-gray-800/70 hover:bg-gray-700/70 px-4 py-2 rounded-lg transition duration-300 flex items-center text-sm border border-gray-700/50">
                            <i data-feather="download" class="w-4 h-4 mr-2"></i> Export
                        </button>
                        <button id="save-btn" class="bg-gray-800/70 hover:bg-gray-700/70 px-4 py-2 rounded-lg transition duration-300 flex items-center text-sm border border-gray-700/50">
                            <i data-feather="save" class="w-4 h-4 mr-2"></i> Save
                        </button>
                        <button id="clear-btn" class="bg-gray-800/70 hover:bg-gray-700/70 px-4 py-2 rounded-lg transition duration-300 flex items-center text-sm border border-gray-700/50">
                            <i data-feather="refresh-cw" class="w-4 h-4 mr-2"></i> Reset
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <div class="text-center text-gray-600 text-xs mt-8 font-mono">
            <p>v2.4.7 | Local execution only | No data transmission</p>
            <p class="mt-1">© 2023 GhostJack Labs | Educational Use Only</p>
        </div>
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r121/three.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
    <script>
        // Initialize Vanta.js background with stealthier settings
        const vantaEffect = VANTA.GLOBE({
            el: "#vanta-bg",
            mouseControls: false,
            touchControls: false,
            gyroControls: false,
            minHeight: 200.00,
            minWidth: 200.00,
            scale: 0.8,
            scaleMobile: 0.8,
            color: 0x4c1d95,
            backgroundColor: 0x0f172a,
            size: 0.6,
            zoom: 0.7
        });

        // Initialize feather icons
        feather.replace();

        // Enhanced security PIN functionality
        const correctPin = "123368";
        const pinInput = document.getElementById('pin-input');
        const unlockBtn = document.getElementById('unlock-btn');
        const mainApp = document.getElementById('main-app');
        const pinEntry = document.getElementById('pin-entry');
        const pinError = document.getElementById('pin-error');
        const lockBtn = document.getElementById('lock-btn');
        const showPinBtn = document.getElementById('show-pin');
        const stealthToggle = document.getElementById('stealth-toggle');
        
        // Disable right-click and inspect element
        document.addEventListener('contextmenu', e => e.preventDefault());
        document.addEventListener('keydown', e => {
            if (e.ctrlKey && e.shiftKey && e.key === 'I') e.preventDefault();
            if (e.ctrlKey && e.shiftKey && e.key === 'J') e.preventDefault();
            if (e.ctrlKey && e.key === 'U') e.preventDefault();
        });

        unlockBtn.addEventListener('click', () => {
            if (pinInput.value === correctPin) {
                pinEntry.classList.add('hidden');
                mainApp.classList.remove('hidden');
                pinError.classList.add('hidden');
                // Add slight delay to prevent timing attacks
                setTimeout(() => {
                    pinInput.value = '';
                }, 150);
            } else {
                pinError.classList.remove('hidden');
                pinInput.classList.add('border-red-500', 'animate-pulse');
                setTimeout(() => {
                    pinInput.classList.remove('border-red-500', 'animate-pulse');
                }, 1000);
                // Clear the input after delay
                setTimeout(() => {
                    pinInput.value = '';
                }, 300);
            }
        });

        lockBtn.addEventListener('click', () => {
            mainApp.classList.add('hidden');
            pinEntry.classList.remove('hidden');
            pinInput.value = '';
            document.getElementById('scan-section').classList.add('hidden-scan');
            document.getElementById('scan-section').classList.remove('visible-scan');
        });

        showPinBtn.addEventListener('click', () => {
            if (pinInput.type === 'password') {
                pinInput.type = 'text';
                showPinBtn.innerHTML = feather.icons['eye-off'].toSvg();
                // Auto hide after 3 seconds
                setTimeout(() => {
                    if (pinInput.type === 'text') {
                        pinInput.type = 'password';
                        showPinBtn.innerHTML = feather.icons['eye'].toSvg();
                    }
                }, 3000);
            } else {
                pinInput.type = 'password';
                showPinBtn.innerHTML = feather.icons['eye'].toSvg();
            }
        });

        // Stealth mode toggle
        stealthToggle.addEventListener('click', () => {
            document.body.classList.toggle('discreet-mode');
            if (document.body.classList.contains('discreet-mode')) {
                stealthToggle.innerHTML = feather.icons['eye'].toSvg();
                vantaEffect.setOptions({ color: 0x334155, size: 0.4 });
            } else {
                stealthToggle.innerHTML = feather.icons['eye-off'].toSvg();
                vantaEffect.setOptions({ color: 0x4c1d95, size: 0.6 });
            }
        });

        // Main app functionality with enhanced security features
        const scanBtn = document.getElementById('scan-btn');
        const scanSection = document.getElementById('scan-section');
        const gameUrl = document.getElementById('game-url');
        const scanProgress = document.getElementById('scan-progress');
        const scanPercent = document.getElementById('scan-percent');
        const filesScanned = document.getElementById('files-scanned');
        const vulnerabilities = document.getElementById('vulnerabilities');
        const rngPatterns = document.getElementById('rng-patterns');
        const analysisLog = document.getElementById('analysis-log');
        const rngPrediction = document.getElementById('rng-prediction');
        const saveBtn = document.getElementById('save-btn');
        const exportBtn = document.getElementById('export-btn');
        const clearBtn = document.getElementById('clear-btn');
        const clearLogBtn = document.getElementById('clear-log');

        // Generate realistic-looking random data
        function generateRealisticData() {
            const patterns = [
                "LCG pattern detected (modulus 2^32)",
                "Xorshift128+ implementation found",
                "Mersenne Twister variant identified",
                "Weak entropy source detected",
                "Predictable seeding mechanism",
                "Insufficient mixing function",
                "State compression vulnerability",
                "Time-based seed correlation"
            ];
            
            return patterns[Math.floor(Math.random() * patterns.length)];
        }

        scanBtn.addEventListener('click', () => {
            if (!gameUrl.value) {
                gameUrl.classList.add('border-red-500', 'animate-pulse');
                setTimeout(() => {
                    gameUrl.classList.remove('border-red-500', 'animate-pulse');
                }, 1000);
                return;
            }

            scanSection.classList.remove('hidden-scan');
            scanSection.classList.add('visible-scan');
            
            logToConsole(`[System] Initializing secure connection to: ${gameUrl.value}`, 'system');
            logToConsole('[Security] Starting TLS handshake...', 'security');
            logToConsole('[Scanner] Preparing memory analysis tools...', 'scanner');
            
            // Simulate scanning process with realistic delays
            let progress = 0;
            const scanInterval = setInterval(() => {
                progress += Math.random() * 3 + 1; // Slower, more realistic progress
                if (progress > 100) progress = 100;
                
                scanProgress.style.width = `${progress}%`;
                scanPercent.textContent = `${Math.floor(progress)}%`;
                
                filesScanned.textContent = Math.floor(progress * 2.8);
                
                if (progress >= 25 && vulnerabilities.textContent === '0') {
                    vulnerabilities.textContent = Math.floor(progress / 15);
                    logToConsole('[Analysis] ' + generateRealisticData(), 'analysis');
                }
                
                if (progress >= 50 && rngPatterns.textContent === '0') {
                    rngPatterns.textContent = Math.floor((progress - 40) / 8);
                }
                
                if (progress >= 75 && rngPatterns.textContent < '3') {
                    rngPatterns.textContent = Math.floor((progress - 30) / 6);
                    logToConsole('[Pattern] Identified recurring sequence with 72% confidence', 'pattern');
                }
                
                // Progressive logging with realistic messages
                if (progress >= 10 && progress < 15) {
                    logToConsole('[Network] Establishing secure tunnel...', 'network');
                } else if (progress >= 30 && progress < 35) {
                    logToConsole('[Memory] Mapping heap allocations...', 'memory');
                } else if (progress >= 55 && progress < 60) {
                    logToConsole('[Crypto] Analyzing PRNG implementations...', 'crypto');
                } else if (progress >= 85 && progress < 90) {
                    logToConsole('[Math] Calculating probability distributions...', 'math');
                } else if (progress === 100) {
                    logToConsole('[Result] Weak RNG detected (87.3% confidence)', 'result', true);
                    logToConsole('[Prediction] Model accuracy: ±3.2%', 'prediction');
                    setTimeout(() => {
                        generatePrediction();
                    }, 800);
                    clearInterval(scanInterval);
                }
            }, 250 + Math.random() * 150); // Random delay for more realism
        });

        function logToConsole(message, type = 'system', isImportant = false) {
            const logEntry = document.createElement('div');
            
            // Add timestamp
            const now = new Date();
            const timestamp = `[${now.getHours().toString().padStart(2, '0')}:` +
                             `${now.getMinutes().toString().padStart(2, '0')}:` +
                             `${now.getSeconds().toString().padStart(2, '0')}]`;
            
            logEntry.innerHTML = `<span class="text-gray-500">${timestamp}</span> `;
            
            // Color code by message type
            let typeClass = 'text-gray-400';
            if (type === 'system') typeClass = 'text-blue-400';
            else if (type === 'security') typeClass = 'text-purple-400';
            else if (type === 'analysis') typeClass = 'text-yellow-400';
            else if (type === 'result') typeClass = 'text-pink-400';
            else if (type === 'prediction') typeClass = 'text-green-400';
            
            if (isImportant) {
                logEntry.innerHTML += `<span class="${typeClass} font-bold">${message}</span>`;
                logEntry.classList.add('animate-pulse');
                setTimeout(() => {
                    logEntry.classList.remove('animate-pulse');
                }, 1000);
            } else {
                logEntry.innerHTML += `<span class="${typeClass}">${message}</span>`;
            }
            
            analysisLog.appendChild(logEntry);
            analysisLog.scrollTop = analysisLog.scrollHeight;
        }

        function generatePrediction() {
            // Simulate RNG prediction with realistic values
            const outcomes = [
                { value: 7, confidence: '89.2%' },
                { value: 22, confidence: '85.7%' },
                { value: 0, confidence: '92.1%' },
                { value: 13, confidence: '88.5%' },
                { value: 29, confidence: '86.9%' },
                { value: 18, confidence: '91.3%' }
            ];
            
            const prediction = outcomes[Math.floor(Math.random() * outcomes.length)];
            rngPrediction.textContent = prediction.value;
            rngPrediction.classList.add('animate-pulse', 'text-pink-400');
            
            // Add confidence indicator
            const confidence = document.createElement('div');
            confidence.className = 'text-xs text-gray-500 mt-1';
            confidence.textContent = `Confidence: ${prediction.confidence}`;
            
            // Clear any previous confidence indicator
            if (rngPrediction.nextElementSibling && rngPrediction.nextElementSibling.className.includes('text-xs')) {
                rngPrediction.nextElementSibling.remove();
            }
            
            rngPrediction.parentNode.insertBefore(confidence, rngPrediction.nextSibling);
            
            setTimeout(() => {
                rngPrediction.classList.remove('animate-pulse');
                rngPrediction.classList.remove('text-pink-400');
                rngPrediction.classList.add('text-purple-300');
            }, 1500);
        }

        saveBtn.addEventListener('click', () => {
            logToConsole('[System] Report saved to encrypted local storage', 'system');
            saveBtn.innerHTML = feather.icons['check'].toSvg() + '<span class="ml-2">Saved</span>';
            setTimeout(() => {
                saveBtn.innerHTML = feather.icons['save'].toSvg() + '<span class="ml-2">Save</span>';
            }, 2000);
        });

        exportBtn.addEventListener('click', () => {
            logToConsole('[System] Exporting encrypted report package...', 'system');
            exportBtn.innerHTML = feather.icons['download-cloud'].toSvg() + '<span class="ml-2">Exporting</span>';
            setTimeout(() => {
                logToConsole('[System] Report exported with AES-256 encryption', 'system', true);
                exportBtn.innerHTML = feather.icons['download'].toSvg() + '<span class="ml-2">Export</span>';
            }, 1500);
        });

        clearBtn.addEventListener('click', () => {
            gameUrl.value = '';
            scanSection.classList.remove('visible-scan');
            scanSection.classList.add('hidden-scan');
            scanProgress.style.width = '0%';
            scanPercent.textContent = '0%';
            filesScanned.textContent = '0';
            vulnerabilities.textContent = '0';
            rngPatterns.textContent = '0';
            analysisLog.innerHTML = '<div class="text-gray-500">[System] Ready to scan...</div>';
            rngPrediction.textContent = '?';
            // Remove confidence indicator if exists
            if (rngPrediction.nextElementSibling && rngPrediction.nextElementSibling.className.includes('text-xs')) {
                rngPrediction.nextElementSibling.remove();
            }
        });

        clearLogBtn.addEventListener('click', () => {
            analysisLog.innerHTML = '<div class="text-gray-500">[System] Log cleared</div>';
        });

        // Enhanced input handling
        pinInput.addEventListener('keypress', (e) => {
            if (e.key === 'Enter') {
                unlockBtn.click();
            }
            // Only allow numeric input
            if (!/[0-9]/.test(e.key)) {
                e.preventDefault();
            }
        });

        gameUrl.addEventListener('keypress', (e) => {
            if (e.key === 'Enter') {
                scanBtn.click();
            }
        });

        // Auto-clear function for sensitive data
        setInterval(() => {
            if (!mainApp.classList.contains('hidden')) {
                // Clear clipboard every 2 minutes
                navigator.clipboard.writeText('');
            }
        }, 120000);
    </script>
</body>
</html>