Spaces:
Running

File size: 22,936 Bytes
c5fcc06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f14ed43
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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CyberSphere Activation Nexus</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/animejs/lib/anime.min.js"></script>
    <script src="https://unpkg.com/particles.js@2.0.0/particles.min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Montserrat', sans-serif;
            background-color: #050B10;
            color: #FFFFFF;
            overflow: hidden;
            height: 100vh;
            width: 100vw;
            cursor: none;
        }
        .mono-font {
            font-family: 'JetBrains Mono', monospace;
        }
        #vanta-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -2;
        }
        #particles-js {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }
        .zone {
            position: absolute;
            opacity: 0;
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
            text-shadow: 0 0 10px rgba(18, 230, 255, 0.7);
        }
        .zone-a { top: 8%; left: 5%; width: 35%; }
        .zone-b { top: 8%; right: 5%; width: 35%; text-align: right; }
        .zone-c { bottom: 8%; left: 5%; width: 35%; }
        .zone-d { bottom: 8%; right: 5%; width: 35%; text-align: right; }
        .zone-center { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 60%; }
        .cursor-ring {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80px;
            height: 80px;
            border: 2px solid #12E6FF;
            border-radius: 50%;
            animation: pulse 3s infinite;
            pointer-events: none;
            z-index: 1000;
        }
        @keyframes pulse {
            0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
            50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
            100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        }
        .scanlines {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.03) 50%);
            background-size: 100% 4px;
            pointer-events: none;
            z-index: 10;
        }
        .volumetric-glow {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, rgba(18, 230, 255, 0.1) 0%, transparent 70%);
            pointer-events: none;
        }
        .grid-3d {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
        }
        .network-web {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }
        .threat-matrix {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
        }
        .shield-3d {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }
        .crosshair {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0;
            pointer-events: none;
        }
        .key-lock {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        .capability-montage {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }
        .hero-final {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            pointer-events: none;
        }
        .text-cyan { color: #12E6FF; }
        .text-amber { color: #FFB400; }
        .text-teal { color: #0E3A46; }
        .bg-cyan { background-color: #12E6FF; }
        .bg-amber { background-color: #FFB400; }
        .glitch {
            animation: glitch 0.3s linear;
        }
        @keyframes glitch {
            0% { transform: translate(0); }
            20% { transform: translate(-2px, 2px); }
            40% { transform: translate(-2px, -2px); }
            60% { transform: translate(2px, 2px); }
            80% { transform: translate(2px, -2px); }
            100% { transform: translate(0); }
        }
        .pulse-glow {
            animation: pulse-glow 2s infinite;
        }
        @keyframes pulse-glow {
            0% { box-shadow: 0 0 20px rgba(18, 230, 255, 0.3); }
            50% { box-shadow: 0 0 40px rgba(18, 230, 255, 0.6); }
            100% { box-shadow: 0 0 20px rgba(18, 230, 255, 0.3); }
        }
    </style>
</head>
<body class="relative">
    <!-- Background Layers -->
    <div id="vanta-bg"></div>
    <div id="particles-js"></div>
    <div class="scanlines"></div>
    <div class="volumetric-glow"></div>
    
    <!-- 3D Grid -->
    <div id="grid-3d" class="grid-3d"></div>
    
    <!-- Network Web -->
    <div id="network-web" class="network-web"></div>
    
    <!-- Threat Matrix -->
    <div id="threat-matrix" class="threat-matrix"></div>
    
    <!-- Shield 3D -->
    <div id="shield-3d" class="shield-3d"></div>
    
    <!-- Crosshair -->
    <div id="crosshair" class="crosshair">
        <svg width="40" height="40" viewBox="0 0 40 40">
            <circle cx="20" cy="20" r="18" fill="none" stroke="#12E6FF" stroke-width="2" opacity="0.8"/>
            <line x1="20" y1="0" x2="20" y2="40" stroke="#12E6FF" stroke-width="1"/>
            <line x1="0" y1="20" x2="40" y2="20" stroke="#12E6FF" stroke-width="1"/>
        </svg>
    </div>
    
    <!-- Key Lock Animation -->
    <div id="key-lock" class="key-lock">
        <svg width="100" height="100" viewBox="0 0 100 100">
            <path id="key-left" d="M30,50 L20,50 L20,60 L30,60 L30,50 Z" fill="#FFB400" opacity="0"/>
            <path id="key-right" d="M70,50 L80,50 L80,60 L70,60 L70,50 Z" fill="#12E6FF" opacity="0"/>
        </svg>
    </div>
    
    <!-- Capability Montage -->
    <div id="capability-montage" class="capability-montage"></div>
    
    <!-- Hero Final -->
    <div id="hero-final" class="hero-final">
        <h1 class="text-4xl font-bold text-cyan mb-6">HADATHA CENTRE FOR CYBER SECURITY INDUSTRY</h1>
        <p class="text-2xl text-amber font-semibold">NOW LIVE AT MIDDLE EAST COLLEGE</p>
    </div>

    <!-- Text Zones -->
    <div id="zone-a" class="zone zone-a mono-font text-sm text-cyan space-y-1"></div>
    <div id="zone-b" class="zone zone-b mono-font text-sm text-cyan space-y-1"></div>
    <div id="zone-c" class="zone zone-c mono-font text-sm text-cyan space-y-1"></div>
    <div id="zone-d" class="zone zone-d mono-font text-sm text-cyan space-y-1"></div>
    <div id="zone-center" class="zone zone-center"></div>

    <!-- Cursor Ring -->
    <div id="cursor-ring" class="cursor-ring"></div>
<script>
        // Enhanced State Management
        const STATE = {
            IDLE: 'idle',
            WAKE: 'wake',
            CORE_LINK: 'core_link',
            NETWORK_IGNITION: 'network_ignition',
            THREAT_DETECTION: 'threat_detection',
            TRUST_FABRIC: 'trust_fabric',
            CAPABILITIES: 'capabilities',
            HERO: 'hero'
        };

        let currentState = STATE.IDLE;
        let textMutex = false;
        let animationTimeline = [];
        let audioContext;
        let masterGain;
        let idlePulseInterval;

        // Color variables
        const VAR_COLOR_CYAN = '#12E6FF';
        const VAR_COLOR_AMBER = '#FFB400';
        const VAR_DURATION = 30.0;
        const VAR_RESET_KEY = 'R';

        // Enhanced Audio Setup
        function initAudio() {
            audioContext = new (window.AudioContext || window.webkitAudioContext)();
            masterGain = audioContext.createGain();
            masterGain.gain.value = 0.2;
            masterGain.connect(audioContext.destination);
        }

        // Enhanced Sound Effects
        const SFX = {
            // Base ambient hum
            hum: () => {
                const oscillator = audioContext.createOscillator();
                const gain = audioContext.createGain();
                const filter = audioContext.createBiquadFilter();
                
                oscillator.type = 'sine';
                oscillator.frequency.value = 45;
                gain.gain.value = 0.08;
                filter.type = 'lowpass';
                filter.frequency.value = 200;
                
                oscillator.connect(filter);
                filter.connect(gain);
                gain.connect(masterGain);
                oscillator.start();
                
                return { oscillator, gain, filter };
            },
            
            // System ticks for data motion
            tick: () => {
                const oscillator = audioContext.createOscillator();
                const gain = audioContext.createGain();
                
                oscillator.type = 'square';
                oscillator.frequency.value = 1200;
                gain.gain.value = 0.1;
                gain.gain.exponentialRampToValueAtTime(0.001, audioContext.currentTime + 0.08);
                oscillator.connect(gain);
                gain.connect(masterGain);
                oscillator.start();
                oscillator.stop(audioContext.currentTime + 0.08);
            },
            
            // Energy pulses for transitions
            pulse: (frequency = 150, duration = 0.3) => {
                const oscillator = audioContext.createOscillator();
                const gain = audioContext.createGain();
                
                oscillator.type = 'sine';
                oscillator.frequency.value = frequency;
                gain.gain.value = 0.15;
                gain.gain.exponentialRampToValueAtTime(0.001, audioContext.currentTime + duration);
                oscillator.connect(gain);
                gain.connect(masterGain);
                oscillator.start();
                oscillator.stop(audioContext.currentTime + duration);
            },
            
            // Lock sound for shield formation
            lock: () => {
                const oscillator1 = audioContext.createOscillator();
                const oscillator2 = audioContext.createOscillator();
                const gain = audioContext.createGain();
                
                oscillator1.type = 'sine';
                oscillator2.type = 'sine';
                oscillator1.frequency.value = 300;
                oscillator2.frequency.value = 600;
                gain.gain.value = 0.2;
                gain.gain.exponentialRampToValueAtTime(0.001, audioContext.currentTime + 0.5);
                oscillator1.connect(gain);
                oscillator2.connect(gain);
                gain.connect(masterGain);
                oscillator1.start();
                oscillator2.start();
                oscillator1.stop(audioContext.currentTime + 0.5);
                oscillator2.stop(audioContext.currentTime + 0.5);
            },
            
            // Final chime for hero reveal
            chime: () => {
                const oscillator = audioContext.createOscillator();
                const gain = audioContext.createGain();
                
                oscillator.type = 'sine';
                oscillator.frequency.setValueAtTime(800, audioContext.currentTime);
                oscillator.frequency.exponentialRampToValueAtTime(1200, audioContext.currentTime + 0.3);
                oscillator.frequency.exponentialRampToValueAtTime(600, audioContext.currentTime + 0.6);
                gain.gain.value = 0.3;
                gain.gain.exponentialRampToValueAtTime(0.001, audioContext.currentTime + 1);
                oscillator.connect(gain);
                gain.connect(masterGain);
                oscillator.start();
                oscillator.stop(audioContext.currentTime + 1);
            },
            
            // Digital whoosh for capability transitions
            whoosh: () => {
                const oscillator = audioContext.createOscillator();
                const gain = audioContext.createGain();
                
                oscillator.type = 'triangle';
                oscillator.frequency.setValueAtTime(400, audioContext.currentTime);
                oscillator.frequency.exponentialRampToValueAtTime(100, audioContext.currentTime + 0.2);
                gain.gain.value = 0.12;
                gain.gain.exponentialRampToValueAtTime(0.001, audioContext.currentTime + 0.2);
                oscillator.connect(gain);
                gain.connect(masterGain);
                oscillator.start();
                oscillator.stop(audioContext.currentTime + 0.2);
            },
            
            // Alarm for threat detection
            alarm: () => {
                const oscillator = audioContext.createOscillator();
                const gain = audioContext.createGain();
                
                oscillator.type = 'square';
                oscillator.frequency.value = 800;
                gain.gain.value = 0.15;
                gain.gain.exponentialRampToValueAtTime(0.001, audioContext.currentTime + 0.1);
                oscillator.connect(gain);
                gain.connect(masterGain);
                oscillator.start();
                oscillator.stop(audioContext.currentTime + 0.1);
            }
        };

        // Initialize Vanta.js background with enhanced settings
        VANTA.GLOBE({
            el: "#vanta-bg",
            mouseControls: false,
            touchControls: false,
            gyroControls: false,
            minHeight: 200.00,
            minWidth: 200.00,
            scale: 1.00,
            scaleMobile: 1.00,
            color: 0x12e6ff,
            backgroundColor: 0x050b10,
            size: 1.00
        });

        // Initialize Particles.js
        function initParticles() {
            particlesJS('particles-js', {
                particles: {
                    number: { value: 80, density: { enable: true, value_area: 800 } },
                    color: { value: "#12E6FF" },
                    shape: { type: "circle" },
                    opacity: { value: 0.1, random: true },
                    size: { value: 2, random: true },
                    line_linked: {
                        enable: true,
                        distance: 150,
                        color: "#12E6FF",
                        opacity: 0.2,
                        width: 1
                    },
                    move: {
                        enable: true,
                        speed: 1,
                        direction: "none",
                        random: true,
                        straight: false,
                        out_mode: "out",
                        bounce: false
                }
            },
            interactivity: {
                detect_on: "canvas",
                events: {
                    onhover: { enable: false },
                    onclick: { enable: false },
                    resize: true
            }
        });
        }

        // Enhanced Text Zone Management
        function showText(zone, text, duration = 2000) {
            if (textMutex) return Promise.reject('Text mutex locked');
            
            textMutex = true;
            
            return new Promise((resolve) => {
                // Hide all zones first
                document.querySelectorAll('.zone').forEach(zone => {
                    zone.style.opacity = '0';
                });

                setTimeout(() => {
                    const element = document.getElementById(`zone-${zone}`);
                    if (typeof text === 'string') {
                        element.innerHTML = text;
                    } else {
                        element.innerHTML = text.join('<br>');
                    }
                    
                    element.style.opacity = '1';
                    
                    setTimeout(() => {
                        element.style.opacity = '0';
                        setTimeout(() => {
                            textMutex = false;
                            resolve();
                        }, 300);
                    }, duration - 300);
                }, 200);
            });
        }

        // Enhanced Visual Effects
        function createGrid3D() {
            const grid = document.getElementById('grid-3d');
            grid.innerHTML = '';
            
            // Create animated grid lines
            for (let i = 0; i < 20; i++) {
                const line = document.createElement('div');
                line.className = 'absolute bg-cyan opacity-10';
                line.style.width = '100%';
                line.style.height = '1px';
                line.style.top = `${i * 5}%`;
                line.style.left = '0';
                grid.appendChild(line);
            }
        }

        // Enhanced Boot Sequence Timeline
        async function runBootSequence() {
            const hum = SFX.hum();
            
            try {
                // STATE 1 - WAKE (0-4s)
                currentState = STATE.WAKE;
                await showText('a', 'SYSTEM WAKE SEQUENCE INITIATED', 4000);
                SFX.pulse(200, 0.5);
                
                // STATE 2 - CORE LINK (4-9s)
                currentState = STATE.CORE_LINK;
                await showText('d', 'LINKING SECURE NETWORK FABRIC...', 5000);
                SFX.tick(); SFX.tick(); SFX.tick();
                
                // STATE 3 - NETWORK IGNITION (9-14s)
                currentState = STATE.NETWORK_IGNITION;
                await showText('center', 'GLOBAL NODE CONNECTIONS ONLINE', 5000);
                SFX.pulse(300, 0.4);
                
                // STATE 4 - THREAT DETECTION (14-19s)
                currentState = STATE.THREAT_DETECTION;
                await showText('c', 'THREAT MATRIX ACTIVE — INTERCEPTING', 5000);
                SFX.alarm();
                SFX.pulse(400, 0.3);
                
                // STATE 5 - TRUST FABRIC (19-23s)
                currentState = STATE.TRUST_FABRIC;
                await showText('center', 'TRUST FABRIC VERIFIED', 4000);
                SFX.lock();
                
                // STATE 6 - CAPABILITIES (23-27s)
                currentState = STATE.CAPABILITIES;
                const capabilities = ['TRAINING', 'LABS', 'THREAT ANALYTICS', 'INDUSTRIAL CYBER', 'TALENT PIPELINE'];
                for (const cap of capabilities) {
                    await showText('b', cap, 800);
                    SFX.whoosh();
                }
                
                // STATE 7 - HERO REVEAL (27-30s)
                currentState = STATE.HERO;
                document.getElementById('hero-final').style.opacity = '1';
                SFX.chime();
                
                setTimeout(() => {
                    hum.oscillator.stop();
                }, 3000);

            } catch (error) {
                console.error('Boot sequence error:', error);
            }
        }

        // Enhanced Event Handlers
        function handleInteraction() {
            if (currentState === STATE.IDLE) {
                currentState = STATE.WAKE;
                document.getElementById('cursor-ring').style.display = 'none';
                document.body.style.cursor = 'none';
                runBootSequence();
            }
        }

        function handleReset() {
            if (currentState !== STATE.IDLE) {
                currentState = STATE.IDLE;
                textMutex = false;
                
                // Reset all visual elements
                document.querySelectorAll('.zone, #hero-final, #grid-3d, #network-web, #threat-matrix, #shield-3d, #crosshair').forEach(element => {
                    element.style.opacity = '0';
                });
                
                document.getElementById('zone-center').innerHTML = 'PRESS TO ACTIVATE HADATHA';
                document.getElementById('zone-center').style.opacity = '1';
                document.getElementById('cursor-ring').style.display = 'block';
                document.body.style.cursor = 'none';
            }
        }

        // Idle state animation
        function startIdleAnimation() {
            document.getElementById('zone-center').innerHTML = 'PRESS TO ACTIVATE HADATHA';
                document.getElementById('zone-center').style.opacity = '1';
        }

        // Initialize
        document.addEventListener('DOMContentLoaded', () => {
            initAudio();
            initParticles();
            createGrid3D();
            startIdleAnimation();
            
            // Event listeners
            document.addEventListener('click', handleInteraction);
            document.addEventListener('keydown', (e) => {
                if (e.code === 'Space' && currentState === STATE.IDLE) {
                    handleInteraction();
                }
                if (e.key.toUpperCase() === VAR_RESET_KEY) {
                    handleReset();
                }
            });
            
            // Idle pulse effect
            idlePulseInterval = setInterval(() => {
                if (currentState === STATE.IDLE) {
                    SFX.pulse(80, 0.2);
            }, 3000);
        });
feather.replace();
    </script>
</body>
</html>