File size: 16,520 Bytes
e73ca08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hacker Terminal: The Idiot Test</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }
        .blink {
            animation: blink 1s step-end infinite;
        }
        .typewriter {
            overflow: hidden;
            white-space: nowrap;
            margin: 0 auto;
            letter-spacing: 1px;
            animation: typing 3.5s steps(40, end);
        }
        @keyframes typing {
            from { width: 0 }
            to { width: 100% }
        }
        .scanline {
            position: absolute;
            width: 100%;
            height: 100px;
            background: linear-gradient(
                0deg,
                rgba(0, 255, 0, 0) 0%,
                rgba(0, 255, 51, 0.1) 50%,
                rgba(0, 255, 0, 0) 100%
            );
            animation: scan 8s linear infinite;
            pointer-events: none;
        }
        @keyframes scan {
            0% {
                top: -100px;
            }
            100% {
                top: 100%;
            }
        }
        .glitch {
            position: relative;
        }
        .glitch::before, .glitch::after {
            content: attr(data-text);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        .glitch::before {
            color: #0ff;
            z-index: -1;
            animation: glitch-effect 3s infinite;
        }
        .glitch::after {
            color: #f0f;
            z-index: -2;
            animation: glitch-effect 2s infinite reverse;
        }
        @keyframes glitch-effect {
            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); }
        }
        .console-text {
            font-family: 'Courier New', monospace;
            text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
        }
    </style>
</head>
<body class="bg-black text-green-500 min-h-screen" onload="startTerminal()">
    <div class="scanline"></div>
    <div class="container mx-auto px-4 py-8 max-w-4xl">
        <div class="border-2 border-green-500 rounded-lg p-4 bg-black bg-opacity-80 shadow-lg shadow-green-500/20">
            <!-- Terminal Header -->
            <div class="flex items-center mb-4 border-b border-green-800 pb-2">
                <div class="flex space-x-1 mr-4">
                    <div class="w-3 h-3 rounded-full bg-red-500"></div>
                    <div class="w-3 h-3 rounded-full bg-yellow-500"></div>
                    <div class="w-3 h-3 rounded-full bg-green-500"></div>
                </div>
                <div class="flex-1 text-center">
                    <h1 class="glitch font-bold text-xl console-text" data-text="IDIOT_TEST.EXE">IDIOT_TEST.EXE</h1>
                </div>
                <div class="text-xs opacity-70">
                    <span id="time"></span>
                </div>
            </div>

            <!-- Terminal Content -->
            <div id="terminal" class="console-text overflow-y-auto max-h-96 mb-4 text-sm leading-relaxed">
                <!-- Content will be dynamically generated by JavaScript -->
            </div>

            <!-- Input Area -->
            <div class="flex items-center border-t border-green-800 pt-3">
                <span class="mr-2">><span class="blink">_</span></span>
                <input type="text" id="commandInput" class="flex-1 bg-black text-green-500 outline-none console-text px-2" 
                       autocomplete="off" spellcheck="false" onkeypress="handleCommand(event)">
                <button onclick="submitCommand()" class="ml-2 bg-green-900 hover:bg-green-800 text-green-300 px-3 py-1 rounded">
                    <i class="fas fa-arrow-right"></i>
                </button>
            </div>
        </div>

        <div class="mt-4 text-xs text-green-700 text-center">
            <p>WARNING: This system is protected. Unauthorized access is prohibited.</p>
        </div>
    </div>

    <script>
        // Questions database
        const questions = [
            "What color is a red apple? (red/blue/green/yellow)",
            "If you have 2 apples and eat 1, how many apples do you have left?",
            "Which is heavier: a pound of feathers or a pound of bricks?",
            "Does a dog meow? (yes/no)",
            "How many legs does a typical chair have?",
            "What do you call the white part of an egg?",
            "Is the sky below the ground? (yes/no)",
            "What is 1+1? (be careful!)",
            "Which month comes after April?",
            "Do fish live in water? (yes/no)",
            "How many sides does a triangle have?",
            "What is the opposite of 'up'?",
            "Is fire hot or cold?",
            "What sound does a cow make?",
            "What do you wear on your feet?",
            "How many hours are in a day?",
            "What do you call the person who drives a bus?",
            "Which is bigger: an elephant or a mouse?",
            "What is the name of the planet we live on?",
            "Do plants need sunlight to grow? (yes/no)"
        ];

        // Answers database
        const answers = [
            "red", "1", "they weigh the same", "no", "4", "egg white", "no", "2", "May", "yes", 
            "3", "down", "hot", "moo", "shoes", "24", "bus driver", "elephant", "Earth", "yes"
        ];

        let currentQuestion = {};
        let score = 0;
        let questionsAnswered = 0;
        let username = "";
        let terminalState = "initial"; // initial, asking_name, test_in_progress, test_complete

        function updateClock() {
            const now = new Date();
            document.getElementById('time').textContent = now.toLocaleTimeString();
        }
        setInterval(updateClock, 1000);
        updateClock();

        function startTerminal() {
            const terminal = document.getElementById('terminal');
            terminal.innerHTML = `
                <div class="typewriter mb-4">
                    > INITIALIZING SYSTEM...<br>
                    > LOADING IDIOT TEST PROTOCOL...<br>
                    > CONNECTING TO MATRIX...<br>
                    > SYSTEM READY<br><br>
                </div>
                <div class="mb-2">
                    <span class="text-yellow-400">WELCOME TO THE ULTIMATE IDIOT TEST</span><br>
                    This test will determine your intellectual capacity.<br>
                    Answer carefully - your IQ rating depends on it.
                </div>
                <div class="mt-4 text-green-300">
                    Type <span class="text-yellow-400">'start'</span> to begin the test.
                </div>
            `;
            terminal.scrollTop = terminal.scrollHeight;
        }

        function handleCommand(e) {
            if (e.key === 'Enter') {
                submitCommand();
            }
        }

        function submitCommand() {
            const input = document.getElementById('commandInput');
            const command = input.value.trim();
            input.value = '';
            
            // Add command to terminal
            addToTerminal(`> ${command}`);
            
            // Process command
            switch(terminalState) {
                case "initial":
                    if (command.toLowerCase() === 'start') {
                        askForUsername();
                    } else if (command.toLowerCase() === 'help') {
                        showHelp();
                    } else {
                        addToTerminal('<span class="text-red-400">Invalid command. Type \'start\' to begin or \'help\' for assistance.</span>');
                    }
                    break;
                case "asking_name":
                    if (command.length > 0) {
                        username = command;
                        startTest();
                    } else {
                        addToTerminal('<span class="text-red-400">Please enter a valid name.</span>');
                    }
                    break;
                case "test_in_progress":
                    processAnswer(command);
                    break;
                case "test_complete":
                    if (command.toLowerCase() === 'restart') {
                        resetTest();
                    } else if (command.toLowerCase() === 'exit') {
                        addToTerminal('> TERMINATING SESSION...');
                        setTimeout(() => {
                            document.getElementById('terminal').innerHTML = '<div class="text-center py-4">TERMINAL SESSION ENDED</div>';
                        }, 1000);
                    } else {
                        addToTerminal('<span class="text-red-400">Type \'restart\' to take the test again or \'exit\' to quit.</span>');
                    }
                    break;
            }
        }

        function addToTerminal(text) {
            const terminal = document.getElementById('terminal');
            const newLine = document.createElement('div');
            newLine.innerHTML = text;
            terminal.appendChild(newLine);
            terminal.scrollTop = terminal.scrollHeight;
        }

        function askForUsername() {
            terminalState = "asking_name";
            addToTerminal('<br><span class="text-yellow-400">Please enter your name to begin the test:</span>');
        }

        function showHelp() {
            addToTerminal(`
                <br><span class="text-yellow-400">HELP MENU:</span><br>
                <span class="text-green-300">Commands available:</span><br>
                - start: Begin the idiot test<br>
                - help: Show this help menu<br><br>
                <span class="text-green-300">Test instructions:</span><br>
                - Answer each question when prompted<br>
                - Your score will be calculated at the end<br>
                - Good luck... you'll need it
            `);
        }

        function startTest() {
            terminalState = "test_in_progress";
            addToTerminal(`<br><span class="text-green-300">Welcome, ${username}.</span>`);
            addToTerminal('<span class="text-yellow-400">Starting test... prepare yourself.</span><br>');
            askRandomQuestion();
        }

        function askRandomQuestion() {
            const randomIndex = Math.floor(Math.random() * questions.length);
            currentQuestion = {
                index: randomIndex,
                text: questions[randomIndex]
            };
            
            // Typewriter effect for question
            addToTerminal('<br>');
            const questionLine = document.createElement('div');
            questionLine.innerHTML = `<span class="text-cyan-300">${currentQuestion.text}</span>`;
            document.getElementById('terminal').appendChild(questionLine);
            terminal.scrollTop = terminal.scrollHeight;
        }

        function processAnswer(answer) {
            const correctAnswer = answers[currentQuestion.index].toString().toLowerCase();
            const userAnswer = answer.toString().toLowerCase();
            
            if (userAnswer === correctAnswer) {
                score++;
                addToTerminal('<span class="text-green-400">βœ“ Correct answer. You may not be a complete idiot.</span>');
            } else {
                addToTerminal(`<span class="text-red-400">βœ— Incorrect. The right answer was: ${correctAnswer}</span>`);
            }
            
            questionsAnswered++;
            
            // Remove asked question from pool
            questions.splice(currentQuestion.index, 1);
            answers.splice(currentQuestion.index, 1);
            
            if (questionsAnswered < 5 && questions.length > 0) {
                setTimeout(() => askRandomQuestion(), 1000);
            } else {
                finishTest();
            }
        }

        function finishTest() {
            terminalState = "test_complete";
            const percentage = Math.floor((score / questionsAnswered) * 100);
            
            let rating, ratingColor;
            if (percentage === 100) {
                rating = "GENIUS";
                ratingColor = "text-blue-400";
            } else if (percentage >= 80) {
                rating = "SMART";
                ratingColor = "text-green-400";
            } else if (percentage >= 50) {
                rating = "AVERAGE";
                ratingColor = "text-yellow-400";
            } else if (percentage >= 20) {
                rating = "BELOW AVERAGE";
                ratingColor = "text-orange-400";
            } else {
                rating = "IDIOT";
                ratingColor = "text-red-400";
            }
            
            addToTerminal(`
                <br><span class="text-yellow-400">TEST COMPLETE</span><br>
                <span class="text-green-300">Final score for ${username}:</span><br>
                - Correct answers: <span class="text-green-400">${score} out of ${questionsAnswered}</span><br>
                - Success rate: <span class="text-green-400">${percentage}%</span><br>
                - IQ rating: <span class="${ratingColor} font-bold">${rating}</span><br><br>
                <span class="text-yellow-400">Type 'restart' to try again or 'exit' to quit.</span>
            `);
        }

        function resetTest() {
            // Reset variables
            score = 0;
            questionsAnswered = 0;
            username = "";
            
            // Reset questions (since we removed them during testing)
            questions = [
                "What color is a red apple? (red/blue/green/yellow)",
                "If you have 2 apples and eat 1, how many apples do you have left?",
                "Which is heavier: a pound of feathers or a pound of bricks?",
                "Does a dog meow? (yes/no)",
                "How many legs does a typical chair have?",
                "What do you call the white part of an egg?",
                "Is the sky below the ground? (yes/no)",
                "What is 1+1? (be careful!)",
                "Which month comes after April?",
                "Do fish live in water? (yes/no)",
                "How many sides does a triangle have?",
                "What is the opposite of 'up'?",
                "Is fire hot or cold?",
                "What sound does a cow make?",
                "What do you wear on your feet?",
                "How many hours are in a day?",
                "What do you call the person who drives a bus?",
                "Which is bigger: an elephant or a mouse?",
                "What is the name of the planet we live on?",
                "Do plants need sunlight to grow? (yes/no)"
            ];
            
            answers = [
                "red", "1", "they weigh the same", "no", "4", "egg white", "no", "2", "May", "yes", 
                "3", "down", "hot", "moo", "shoes", "24", "bus driver", "elephant", "Earth", "yes"
            ];
            
            terminalState = "initial";
            document.getElementById('terminal').innerHTML = '';
            startTerminal();
        }
    </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=LULDev/idiot-test-web" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>