File size: 21,499 Bytes
48f2e42
89b02b3
48f2e42
 
 
89b02b3
48f2e42
d1dd303
89b02b3
 
 
 
 
 
88a5357
 
d1dd303
 
48f2e42
d1dd303
89b02b3
48f2e42
d1dd303
 
89b02b3
 
 
 
 
 
 
d1dd303
 
89b02b3
 
48f2e42
d1dd303
89b02b3
 
 
 
 
 
d1dd303
 
89b02b3
 
 
 
 
d1dd303
 
89b02b3
 
 
 
 
 
 
 
d1dd303
 
89b02b3
d1dd303
 
 
 
89b02b3
 
 
 
 
 
 
48f2e42
d1dd303
89b02b3
 
 
 
 
 
 
48f2e42
d1dd303
89b02b3
 
 
 
 
 
48f2e42
d1dd303
89b02b3
 
d1dd303
 
89b02b3
 
 
48f2e42
d1dd303
89b02b3
 
d1dd303
 
89b02b3
 
48f2e42
89b02b3
d1dd303
89b02b3
d1dd303
 
89b02b3
 
 
 
 
 
 
 
d1dd303
 
89b02b3
d1dd303
 
 
 
 
89b02b3
 
 
 
 
48f2e42
d1dd303
89b02b3
 
 
 
 
d1dd303
 
89b02b3
 
 
 
 
 
d1dd303
 
89b02b3
 
 
d1dd303
 
89b02b3
 
 
 
 
 
d1dd303
 
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d1dd303
 
89b02b3
 
d1dd303
 
89b02b3
 
 
d1dd303
 
 
89b02b3
 
d1dd303
 
89b02b3
 
 
 
 
 
 
 
 
d1dd303
 
89b02b3
 
 
 
 
d1dd303
 
89b02b3
d1dd303
 
89b02b3
d1dd303
 
89b02b3
 
 
 
 
 
d1dd303
 
89b02b3
 
 
d1dd303
 
89b02b3
 
 
d1dd303
 
89b02b3
 
 
cb42e0d
d1dd303
89b02b3
 
 
cb42e0d
d1dd303
89b02b3
 
 
d1dd303
 
89b02b3
 
 
 
88a5357
 
89b02b3
 
 
 
 
 
 
 
 
88a5357
89b02b3
88a5357
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88a5357
 
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88a5357
 
89b02b3
 
 
88a5357
 
89b02b3
 
 
88a5357
 
89b02b3
 
 
88a5357
 
89b02b3
 
 
88a5357
 
89b02b3
 
 
 
 
 
 
 
d1dd303
 
 
89b02b3
 
 
d1dd303
 
89b02b3
 
d1dd303
 
89b02b3
 
 
d1dd303
 
89b02b3
 
d1dd303
 
89b02b3
 
 
 
d1dd303
 
89b02b3
 
 
d1dd303
88a5357
89b02b3
 
88a5357
 
89b02b3
 
88a5357
cb42e0d
48f2e42
89b02b3
 
48f2e42
 
89b02b3
 
 
 
 
 
 
d1dd303
89b02b3
 
 
d1dd303
 
89b02b3
d1dd303
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
d1dd303
89b02b3
 
 
 
 
 
 
 
cb42e0d
d1dd303
89b02b3
 
 
 
cb42e0d
89b02b3
 
 
 
 
 
 
cb42e0d
89b02b3
 
 
 
 
 
 
 
 
 
 
48f2e42
 
 
89b02b3
 
 
 
88a5357
89b02b3
 
 
 
 
88a5357
89b02b3
 
 
88a5357
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88a5357
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88a5357
89b02b3
 
 
 
 
cb42e0d
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
cb42e0d
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cb42e0d
 
 
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cb42e0d
89b02b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cb42e0d
48f2e42
89b02b3
48f2e42
89b02b3
48f2e42
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TERMINAL_ACCESS: Western Wall Surveillance</title>
    <style>
        :root {
            --neon-green: #0f0;
            --dark-bg: #000;
            --terminal-bg: rgba(0, 10, 2, 0.9);
            --grid-color: rgba(0, 255, 0, 0.05);
            --text-glow: 0 0 5px rgba(0, 255, 0, 0.7);
            --border-glow: 0 0 10px rgba(0, 255, 0, 0.5);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Courier New', monospace;
        }

        body {
            background-color: var(--dark-bg);
            color: var(--neon-green);
            background-image:
                linear-gradient(var(--grid-color) 1px, transparent 1px),
                linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
            background-size: 20px 20px;
            padding: 20px;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

        header {
            text-align: center;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--neon-green);
            padding-bottom: 15px;
            text-shadow: var(--text-glow);
        }

        .glitch-text {
            font-size: 2rem;
            font-weight: bold;
            letter-spacing: 2px;
            animation: glitch 3s infinite alternate;
        }

        .status-bar {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 0.8rem;
            padding: 5px;
            border: 1px solid var(--neon-green);
            box-shadow: var(--border-glow);
        }

        .status-item {
            display: flex;
            align-items: center;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: var(--neon-green);
            margin-right: 5px;
            animation: blink 1.5s infinite;
        }

        .terminal-window {
            background-color: var(--terminal-bg);
            border: 1px solid var(--neon-green);
            border-radius: 5px;
            padding: 15px;
            margin-bottom: 20px;
            box-shadow: var(--border-glow);
        }

        .terminal-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            border-bottom: 1px dashed var(--neon-green);
            padding-bottom: 5px;
        }

        .terminal-title {
            font-weight: bold;
        }

        .terminal-content {
            font-size: 0.9rem;
            margin-bottom: 10px;
        }

        .terminal-prompt::before {
            content: "root@surveillance:~$ ";
        }

        .terminal-prompt {
            display: inline-block;
            width: 100%;
            white-space: nowrap;
            overflow: hidden;
            animation: typing 3s steps(60, end);
        }

        .webcam-container {
            position: relative;
            width: 100%;
            padding-top: 10px;
            overflow: hidden;
            border: 1px solid var(--neon-green);
            border-radius: 5px;
            box-shadow: var(--border-glow);
        }

        .webcam-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            background:
                linear-gradient(rgba(0, 255, 0, 0.1), rgba(0, 255, 0, 0.1)),
                repeating-linear-gradient(transparent, transparent 2px, rgba(0, 0, 0, 0.1) 3px, rgba(0, 0, 0, 0.1) 3px);
            z-index: 10;
        }

        .webcam-frame {
            width: 100%;
            height: 70vh;
            border: none;
            display: block;
        }

        .data-stream {
            height: 80px;
            overflow: hidden;
            margin-top: 20px;
            font-size: 0.7rem;
            opacity: 0.8;
        }

        .data-line {
            white-space: nowrap;
            animation: scrollLeft 20s linear infinite;
        }

        footer {
            margin-top: auto;
            text-align: center;
            font-size: 0.8rem;
            padding: 10px;
            border-top: 1px solid var(--neon-green);
        }

        /* Audio control button */
        .audio-control {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 100;
            display: flex;
            align-items: center;
            gap: 10px;
            background-color: var(--terminal-bg);
            border: 1px solid var(--neon-green);
            border-radius: 5px;
            padding: 8px 12px;
            box-shadow: var(--border-glow);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .audio-control:hover {
            background-color: rgba(0, 20, 5, 0.9);
        }

        .audio-icon {
            width: 20px;
            height: 20px;
            position: relative;
        }

        .audio-icon::before,
        .audio-icon::after {
            content: '';
            position: absolute;
            background-color: var(--neon-green);
        }

        .audio-icon::before {
            width: 8px;
            height: 8px;
            border-radius: 0 8px 8px 0;
            left: 0;
            top: 6px;
        }

        .audio-icon::after {
            width: 2px;
            height: 12px;
            left: 0;
            top: 4px;
        }

        .audio-waves {
            display: flex;
            align-items: center;
            height: 16px;
        }

        .audio-wave {
            width: 2px;
            background-color: var(--neon-green);
            margin-right: 2px;
            border-radius: 1px;
            animation: soundWave 1s infinite alternate;
        }

        .audio-wave:nth-child(1) {
            height: 8px;
            animation-delay: 0.1s;
        }

        .audio-wave:nth-child(2) {
            height: 12px;
            animation-delay: 0.2s;
        }

        .audio-wave:nth-child(3) {
            height: 16px;
            animation-delay: 0.3s;
        }

        .audio-wave:nth-child(4) {
            height: 10px;
            animation-delay: 0.4s;
        }

        .audio-control.muted .audio-wave {
            animation: none;
            height: 2px;
        }

        .audio-label {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        /* Loading screen */
        .loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #000;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: opacity 1s ease-out;
        }

        .loading-content {
            text-align: center;
            color: var(--neon-green);
        }

        .loading-image {
            width: 200px;
            height: 200px;
            border-radius: 50%;
            border: 3px solid var(--neon-green);
            margin-bottom: 20px;
            box-shadow: 0 0 20px rgba(0, 255, 0, 0.7);
            object-fit: cover;
        }

        .loading-text {
            font-family: 'Amiri', 'Arial', sans-serif;
            font-size: 2rem;
            margin-bottom: 30px;
            text-shadow: var(--text-glow);
            direction: rtl;
        }

        .loading-progress-container {
    width: 300px;
    height: 10px;
    background-color: rgba(0, 255, 0, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
    margin-left: auto; /* Add this line */
    margin-right: auto; /* Add this line */
}

        .loading-progress-bar {
            height: 100%;
            width: 0%;
            background-color: var(--neon-green);
            transition: width 0.5s;
        }

        .loading-percentage {
    font-size: 1rem;
    letter-spacing: 2px;
    text-align: center; /* Add this line */
    width: 100%; /* Add this line */
}

        .loading-message {
            margin-top: 20px;
            font-size: 0.9rem;
            opacity: 0.8;
            max-width: 80%;
            text-align: center;
        }

        @keyframes soundWave {
            0% { height: 4px; }
            100% { height: 16px; }
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }

        @keyframes typing {
            from { width: 0; }
            to { width: 100%; }
        }

        @keyframes scrollLeft {
            0% { transform: translateX(100%); }
            100% { transform: translateX(-100%); }
        }

        @keyframes glitch {
            0% { text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em 0.05em 0 rgba(0, 0, 255, 0.75); }
            14% { text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em 0.05em 0 rgba(0, 0, 255, 0.75); }
            15% { text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); }
            49% { text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); }
            50% { text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); }
            99% { text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); }
            100% { text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em -0.05em 0 rgba(0, 0, 255, 0.75); }
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .glitch-text {
                font-size: 1.5rem;
            }

            .webcam-frame {
                height: 50vh;
            }

            .status-bar {
                flex-direction: column;
                gap: 5px;
            }

            .terminal-content {
                font-size: 0.8rem;
            }

            .audio-control {
                top: 10px;
                right: 10px;
                padding: 5px 8px;
            }

            .loading-image {
                width: 150px;
                height: 150px;
            }

            .loading-text {
                font-size: 1.5rem;
            }

            .loading-progress-container {
                width: 250px;
            }
        }
    </style>
    <!-- Add Amiri font for Arabic text -->
    <link href="https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
    <!-- Loading Screen -->
    <div id="loadingScreen" class="loading-screen">
        <div class="loading-content">
            <img src="abu_aubida.png" alt="Abu Aubida" class="loading-image">
            <div class="loading-text">جاري تحميل نظام المراقبة</div>
            <div class="loading-progress-container">
                <div id="loadingProgressBar" class="loading-progress-bar"></div>
            </div>
            <div id="loadingPercentage" class="loading-percentage">0%</div>
            <div class="loading-message">
                تحميل وحدات المراقبة... إنشاء اتصال آمن... تجاوز بروتوكولات الأمان...
            </div>
        </div>
    </div>

    <header>
        <h1 class="glitch-text">SURVEILLANCE SYSTEM</h1>
        <p>ACCESS LEVEL: CLASSIFIED</p>
    </header>

    <!-- Audio Control Button -->
    <div id="audioControl" class="audio-control">
        <div class="audio-icon"></div>
        <div class="audio-waves">
            <div class="audio-wave"></div>
            <div class="audio-wave"></div>
            <div class="audio-wave"></div>
            <div class="audio-wave"></div>
        </div>
        <span class="audio-label">AUDIO</span>
    </div>

    <!-- Background Audio -->
    <audio id="bgAudio" autoplay loop>
    <source src="torabora__1727352333.m4a" type="audio/mp4">
    Your browser does not support the audio element.
</audio>


    <div class="status-bar">
        <div class="status-item">
            <div class="status-indicator"></div>
            <span>LIVE FEED</span>
        </div>
        <div class="status-item">
            <span id="current-time">--:--:--</span>
        </div>
        <div class="status-item">
            <span>ENCRYPTION: ACTIVE</span>
        </div>
    </div>

    <div class="terminal-window">
        <div class="terminal-header">
            <div class="terminal-title">TERMINAL ACCESS</div>
            <div class="terminal-controls">SESSION: #7F3D2A9B</div>
        </div>
        <div class="terminal-content">
            <p class="terminal-prompt">initializing surveillance module...</p>
            <p class="terminal-prompt">establishing secure connection to target location...</p>
            <p class="terminal-prompt">bypassing security protocols...</p>
            <p class="terminal-prompt">accessing Western Wall live feed...</p>
            <p class="terminal-prompt">connection established. rendering visual data...</p>
        </div>
    </div>

    <div class="webcam-container">
        <div class="webcam-overlay"></div>
        <iframe class="webcam-frame" src="https://share.earthcam.net/tJ90CoLmq7TzrY396Yd88FszUBQXSsaa2UfVVJUL4rU!.tJ90CoLmq7TzrY396Yd88Oz5cQ2aIzlk7JZQa_rfG-I!/aish_hatorah_western_wall_webcam/western_wall_cam/live" allowfullscreen></iframe>
    </div>

    <div class="data-stream">
        <div class="data-line">
            01001001 01101110 01110100 01100101 01110010 01100011 01100101 01110000 01110100 01101001 01101110 01100111 00100000 01100100 01100001 01110100 01100001 00100000 01110011 01110100 01110010 01100101 01100001 01101101 00100000 01100110 01110010 01101111 01101101 00100000 01110100 01100001 01110010 01100111 01100101 01110100 00100000 01101100 01101111 01100011 01100001 01110100 01101001 01101111 01101110 00101110 00100000 01000001 01101110 01100001 01101100 01111001 01111010 01101001 01101110 01100111 00100000 01110000 01100001 01110100 01110100 01100101 01110010 01101110 01110011 00101110 00100000 01010011 01100101 01100011 01110101 01110010 01101001 01110100 01111001 00100000 01101100 01100101 01110110 01100101 01101100 00111010 00100000 01000001 01101100 01110000 01101000 01100001 00101110
        </div>
    </div>

    <footer>
        <p>SECURE CONNECTION ESTABLISHED | LOCATION: 31.7767° N, 35.2345° E | SYSTEM v3.1.4</p>
    </footer>

    <script>
        const loadingScreen = document.getElementById('loadingScreen');
        const progressBar = document.getElementById('loadingProgressBar');
        const percentageText = document.getElementById('loadingPercentage');
        const audioControl = document.getElementById('audioControl');
        const bgAudio = document.getElementById('bgAudio');
        const terminalContent = document.querySelector('.terminal-content');
    
        let audioPlaying = false;
    
        // Set initial volume and force autoplay muted
        bgAudio.volume = 0.6;
        bgAudio.muted = true;
        bgAudio.play().catch(e => {
            console.log("Muted autoplay might be blocked in some browsers:", e);
        });
    
        // Function to unmute and play audio on first user interaction
        function unmuteAudioOnInteraction() {
            if (!audioPlaying) {
                bgAudio.muted = false;
                bgAudio.volume = 0.6;
                bgAudio.play().then(() => {
                    audioPlaying = true;
                    audioControl.classList.remove('muted');
                    if (!loadingScreen || loadingScreen.style.display === 'none') {
                        addAudioMessage('on');
                    }
                }).catch(e => {
                    console.log("Auto-play prevented after unmute:", e);
                });
            }
    
            // Remove all user interaction listeners after first interaction
            document.body.removeEventListener('mousemove', unmuteAudioOnInteraction);
            document.body.removeEventListener('touchstart', unmuteAudioOnInteraction);
            document.body.removeEventListener('keydown', unmuteAudioOnInteraction);
            document.body.removeEventListener('click', unmuteAudioOnInteraction);
        }
    
        // Run when page is ready
        document.addEventListener('DOMContentLoaded', function () {
            // Set up unmute triggers
            document.body.addEventListener('mousemove', unmuteAudioOnInteraction, { once: true });
            document.body.addEventListener('touchstart', unmuteAudioOnInteraction, { once: true });
            document.body.addEventListener('keydown', unmuteAudioOnInteraction, { once: true });
            document.body.addEventListener('click', unmuteAudioOnInteraction, { once: true });
    
            // Try unmuting shortly after load (some browsers may allow it)
            setTimeout(() => {
                unmuteAudioOnInteraction();
            }, 500);
        });
    
        // Force audio to play on iOS when user taps screen
        window.addEventListener('touchend', function () {
            if (!audioPlaying) {
                unmuteAudioOnInteraction();
            }
        }, { once: true });
    
        // Add terminal message about audio status
        function addAudioMessage(status) {
            const p = document.createElement('p');
            p.className = 'terminal-prompt';
            p.textContent = status === 'on'
                ? "ambient audio module activated..."
                : "ambient audio module deactivated...";
            terminalContent.appendChild(p);
    
            if (terminalContent.children.length > 10) {
                terminalContent.removeChild(terminalContent.children[0]);
            }
        }
    
        // Toggle audio on control button click
        audioControl.addEventListener('click', function () {
            if (audioPlaying) {
                bgAudio.pause();
                audioControl.classList.add('muted');
                addAudioMessage('off');
                audioPlaying = false;
            } else {
                bgAudio.play().then(() => {
                    bgAudio.muted = false;
                    audioControl.classList.remove('muted');
                    addAudioMessage('on');
                    audioPlaying = true;
                }).catch(e => {
                    console.log("Audio playback failed:", e);
                    const p = document.createElement('p');
                    p.className = 'terminal-prompt';
                    p.textContent = "audio module requires user interaction to activate...";
                    terminalContent.appendChild(p);
                });
            }
        });
    
        // Loading screen progress simulation
        let progress = 0;
        const loadingInterval = setInterval(() => {
            progress += Math.random() * 5;
            if (progress >= 100) {
                progress = 100;
                clearInterval(loadingInterval);
    
                setTimeout(() => {
                    loadingScreen.style.opacity = '0';
                    setTimeout(() => {
                        loadingScreen.style.display = 'none';
                        if (audioPlaying) {
                            addAudioMessage('on');
                        }
                    }, 1000);
                }, 500);
            }
    
            progressBar.style.width = `${progress}%`;
            percentageText.textContent = `${Math.floor(progress)}%`;
        }, 200);
    
        // Clock update
        function updateTime() {
            const now = new Date();
            const timeElement = document.getElementById('current-time');
            timeElement.textContent = now.toTimeString().split(' ')[0];
        }
        setInterval(updateTime, 1000);
        updateTime();
    
        // Random terminal messages
        const messages = [
            "analyzing crowd patterns...",
            "facial recognition active...",
            "monitoring movement at coordinates 31.7767° N, 35.2345° E...",
            "satellite uplink stable...",
            "processing visual data...",
            "enhancing image quality...",
            "tracking target area...",
            "maintaining secure connection..."
        ];
    
        setInterval(() => {
            if (Math.random() > 0.7) {
                const p = document.createElement('p');
                p.className = 'terminal-prompt';
                p.textContent = messages[Math.floor(Math.random() * messages.length)];
                terminalContent.appendChild(p);
                if (terminalContent.children.length > 10) {
                    terminalContent.removeChild(terminalContent.children[0]);
                }
            }
        }, 3000);
    </script>
    
</body>
</html>