Spaces:
Running
Running
Update index.html
Browse files- index.html +157 -265
index.html
CHANGED
@@ -1,358 +1,250 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html>
|
3 |
<head>
|
4 |
-
<
|
|
|
|
|
5 |
<style>
|
6 |
body {
|
7 |
-
background-color: #000;
|
8 |
-
color: #0f0;
|
9 |
-
font-family: 'Share Tech Mono', monospace;
|
10 |
margin: 0;
|
11 |
padding: 0;
|
12 |
-
|
|
|
|
|
|
|
13 |
display: flex;
|
14 |
justify-content: center;
|
15 |
align-items: center;
|
16 |
-
|
17 |
}
|
18 |
|
19 |
#matrix {
|
20 |
-
position:
|
21 |
top: 0;
|
22 |
left: 0;
|
23 |
width: 100%;
|
24 |
height: 100%;
|
25 |
z-index: 1;
|
26 |
-
pointer-events: none;
|
27 |
}
|
28 |
|
29 |
-
#title
|
30 |
-
position:
|
|
|
|
|
|
|
|
|
|
|
31 |
z-index: 2;
|
|
|
32 |
text-align: center;
|
33 |
}
|
34 |
|
35 |
-
#
|
36 |
display: none;
|
37 |
position: relative;
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
border
|
42 |
-
|
43 |
-
height: 600px;
|
44 |
-
box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
|
45 |
-
border: 2px solid #00ff00;
|
46 |
-
}
|
47 |
-
|
48 |
-
.test-container {
|
49 |
-
background: rgba(0, 0, 0, 0.8);
|
50 |
padding: 20px;
|
51 |
-
|
52 |
-
border: 1px solid #00ff00;
|
53 |
-
display: flex;
|
54 |
-
flex-direction: column;
|
55 |
-
align-items: center;
|
56 |
-
overflow: hidden;
|
57 |
}
|
58 |
|
59 |
-
.
|
60 |
-
|
61 |
-
|
62 |
-
padding: 10px;
|
63 |
-
border-bottom: 1px solid #00ff00;
|
64 |
-
font-size: 18px;
|
65 |
}
|
66 |
|
67 |
-
.
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
animation: glitch 1s infinite;
|
72 |
}
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
border: none;
|
78 |
-
|
79 |
-
cursor: pointer;
|
80 |
-
animation: pulse 2s infinite;
|
81 |
-
}
|
82 |
-
|
83 |
-
.task {
|
84 |
-
color: #0f0;
|
85 |
-
font-size: 20px;
|
86 |
-
margin: 20px;
|
87 |
-
text-align: center;
|
88 |
-
}
|
89 |
-
|
90 |
-
.option {
|
91 |
-
padding: 10px 20px;
|
92 |
-
margin: 10px;
|
93 |
-
background: rgba(0, 0, 0, 0.8);
|
94 |
-
border: 1px solid #00ff00;
|
95 |
-
color: #0f0;
|
96 |
cursor: pointer;
|
|
|
|
|
97 |
transition: all 0.3s;
|
98 |
-
font-size: 16px;
|
99 |
-
min-width: 200px;
|
100 |
}
|
101 |
|
102 |
-
|
103 |
-
background:
|
|
|
104 |
}
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
109 |
}
|
110 |
|
111 |
-
.
|
112 |
-
|
113 |
-
grid-template-columns: repeat(3, 1fr);
|
114 |
-
gap: 10px;
|
115 |
-
margin: 20px;
|
116 |
}
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
align-items: center;
|
126 |
-
font-size: 40px;
|
127 |
}
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
136 |
}
|
137 |
|
138 |
-
@keyframes
|
139 |
-
0% {
|
140 |
-
|
141 |
-
100% { transform: scale(1); opacity: 1; }
|
142 |
}
|
143 |
</style>
|
144 |
</head>
|
145 |
<body>
|
146 |
<canvas id="matrix"></canvas>
|
147 |
-
|
148 |
-
|
149 |
-
<
|
150 |
-
<button id="start-btn">✓</button>
|
151 |
</div>
|
152 |
-
|
153 |
-
|
154 |
-
<div
|
155 |
-
|
156 |
-
|
157 |
-
</div>
|
158 |
-
<div class="test-container" id="test-container"></div>
|
159 |
</div>
|
160 |
|
161 |
<script>
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
{
|
167 |
-
task: "Select all squares with traffic lights",
|
168 |
-
type: "grid",
|
169 |
-
content: ["🚦", "🌳", "🚗", "🏠", "🚦", "🌲", "🚶", "🚦", "🏢"],
|
170 |
-
correct: [0, 4, 7]
|
171 |
-
},
|
172 |
-
{
|
173 |
-
task: "What would a robot never say?",
|
174 |
-
type: "multiple",
|
175 |
-
options: ["I compute therefore I am", "BEEP BOOP", "I'm feeling emotional today", "01001000"],
|
176 |
-
correct: 2
|
177 |
-
},
|
178 |
-
{
|
179 |
-
task: "Drag the slider to match human body temperature (37°C)",
|
180 |
-
type: "slider",
|
181 |
-
min: 35,
|
182 |
-
max: 39,
|
183 |
-
correct: 37
|
184 |
-
},
|
185 |
-
{
|
186 |
-
task: "Which of these is a CAPTCHA only a human could solve?",
|
187 |
-
type: "image",
|
188 |
-
options: ["🔡", "📊", "✏️", "💭"],
|
189 |
-
correct: 0
|
190 |
-
},
|
191 |
-
{
|
192 |
-
task: "Complete the human phrase: Time flies like an arrow, fruit flies like a...",
|
193 |
-
type: "multiple",
|
194 |
-
options: ["Boeing 747", "banana", "temporal paradox", "computational error"],
|
195 |
-
correct: 1
|
196 |
-
}
|
197 |
-
];
|
198 |
|
199 |
-
|
200 |
-
const
|
201 |
-
const
|
202 |
-
|
203 |
-
canvas.height = window.innerHeight;
|
204 |
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
const drops = Array(Math.floor(columns)).fill(1);
|
209 |
|
210 |
function drawMatrix() {
|
211 |
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
|
212 |
-
ctx.fillRect(0, 0,
|
213 |
ctx.fillStyle = '#0F0';
|
214 |
ctx.font = fontSize + 'px monospace';
|
215 |
|
216 |
for(let i = 0; i < drops.length; i++) {
|
217 |
-
const text =
|
218 |
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
|
219 |
-
if(drops[i] * fontSize >
|
220 |
drops[i] = 0;
|
221 |
}
|
222 |
drops[i]++;
|
223 |
}
|
224 |
}
|
225 |
|
226 |
-
setInterval(drawMatrix,
|
227 |
-
|
228 |
-
function createTest(level) {
|
229 |
-
const container = document.getElementById('test-container');
|
230 |
-
container.innerHTML = '';
|
231 |
-
const test = tests[level - 1];
|
232 |
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
}
|
252 |
-
|
253 |
-
|
254 |
-
function createGrid(test, container) {
|
255 |
-
const grid = document.createElement('div');
|
256 |
-
grid.className = 'image-grid';
|
257 |
-
let selected = [];
|
258 |
-
|
259 |
-
test.content.forEach((item, index) => {
|
260 |
-
const cell = document.createElement('div');
|
261 |
-
cell.className = 'image-cell';
|
262 |
-
cell.textContent = item;
|
263 |
-
cell.onclick = () => {
|
264 |
-
cell.style.background = cell.style.background ? '' : 'rgba(0, 255, 0, 0.2)';
|
265 |
-
if(selected.includes(index)) {
|
266 |
-
selected = selected.filter(i => i !== index);
|
267 |
-
} else {
|
268 |
-
selected.push(index);
|
269 |
-
}
|
270 |
-
};
|
271 |
-
grid.appendChild(cell);
|
272 |
-
});
|
273 |
|
274 |
-
|
275 |
-
submitBtn.className = 'option';
|
276 |
-
submitBtn.textContent = 'VERIFY';
|
277 |
-
submitBtn.onclick = () => checkAnswer(selected, test.correct);
|
278 |
|
279 |
-
|
280 |
-
|
|
|
|
|
281 |
}
|
282 |
|
283 |
-
function
|
284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
const button = document.createElement('button');
|
286 |
-
button.className = 'option';
|
287 |
button.textContent = option;
|
288 |
-
button.
|
289 |
-
|
290 |
});
|
291 |
}
|
292 |
|
293 |
-
function
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
slider.className = 'slider';
|
300 |
-
|
301 |
-
const value = document.createElement('div');
|
302 |
-
value.className = 'task';
|
303 |
-
slider.oninput = () => value.textContent = slider.value + '°C';
|
304 |
-
|
305 |
-
const submitBtn = document.createElement('button');
|
306 |
-
submitBtn.className = 'option';
|
307 |
-
submitBtn.textContent = 'VERIFY';
|
308 |
-
submitBtn.onclick = () => checkAnswer(parseFloat(slider.value), test.correct);
|
309 |
-
|
310 |
-
container.appendChild(slider);
|
311 |
-
container.appendChild(value);
|
312 |
-
container.appendChild(submitBtn);
|
313 |
-
}
|
314 |
-
|
315 |
-
function createImageChoice(test, container) {
|
316 |
-
const grid = document.createElement('div');
|
317 |
-
grid.className = 'image-grid';
|
318 |
-
|
319 |
-
test.options.forEach((option, index) => {
|
320 |
-
const cell = document.createElement('div');
|
321 |
-
cell.className = 'image-cell';
|
322 |
-
cell.textContent = option;
|
323 |
-
cell.onclick = () => checkAnswer(index, test.correct);
|
324 |
-
grid.appendChild(cell);
|
325 |
-
});
|
326 |
-
|
327 |
-
container.appendChild(grid);
|
328 |
-
}
|
329 |
-
|
330 |
-
function checkAnswer(answer, correct) {
|
331 |
-
if(Array.isArray(correct) ?
|
332 |
-
JSON.stringify(answer.sort()) === JSON.stringify(correct.sort()) :
|
333 |
-
answer === correct) {
|
334 |
-
level++;
|
335 |
-
if(level > tests.length) {
|
336 |
-
alert('HUMAN VERIFICATION COMPLETE - ACCESS GRANTED');
|
337 |
-
location.reload();
|
338 |
return;
|
339 |
}
|
340 |
-
createTest(level);
|
341 |
-
document.getElementById('level').textContent = level;
|
342 |
} else {
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
}
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
}
|
351 |
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
createTest(level);
|
356 |
});
|
357 |
</script>
|
358 |
</body>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>I'M NOT A ROBOT √</title>
|
7 |
<style>
|
8 |
body {
|
|
|
|
|
|
|
9 |
margin: 0;
|
10 |
padding: 0;
|
11 |
+
background: #000;
|
12 |
+
color: #0f0;
|
13 |
+
font-family: 'Courier New', monospace;
|
14 |
+
overflow: hidden;
|
15 |
display: flex;
|
16 |
justify-content: center;
|
17 |
align-items: center;
|
18 |
+
min-height: 100vh;
|
19 |
}
|
20 |
|
21 |
#matrix {
|
22 |
+
position: absolute;
|
23 |
top: 0;
|
24 |
left: 0;
|
25 |
width: 100%;
|
26 |
height: 100%;
|
27 |
z-index: 1;
|
|
|
28 |
}
|
29 |
|
30 |
+
#title {
|
31 |
+
position: absolute;
|
32 |
+
top: 50%;
|
33 |
+
left: 50%;
|
34 |
+
transform: translate(-50%, -50%);
|
35 |
+
font-size: 3em;
|
36 |
+
text-shadow: 0 0 10px #0f0;
|
37 |
z-index: 2;
|
38 |
+
cursor: pointer;
|
39 |
text-align: center;
|
40 |
}
|
41 |
|
42 |
+
#gameContainer {
|
43 |
display: none;
|
44 |
position: relative;
|
45 |
+
width: 80%;
|
46 |
+
max-width: 600px;
|
47 |
+
background: #107C10;
|
48 |
+
border: 2px solid #1ED760;
|
49 |
+
border-radius: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
padding: 20px;
|
51 |
+
z-index: 2;
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
+
.question {
|
55 |
+
margin-bottom: 20px;
|
56 |
+
font-size: 1.2em;
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
+
.options {
|
60 |
+
display: grid;
|
61 |
+
grid-template-columns: repeat(2, 1fr);
|
62 |
+
gap: 10px;
|
|
|
63 |
}
|
64 |
|
65 |
+
button {
|
66 |
+
background: #1ED760;
|
67 |
+
color: black;
|
68 |
border: none;
|
69 |
+
padding: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
cursor: pointer;
|
71 |
+
font-family: 'Courier New', monospace;
|
72 |
+
border-radius: 5px;
|
73 |
transition: all 0.3s;
|
|
|
|
|
74 |
}
|
75 |
|
76 |
+
button:hover {
|
77 |
+
background: #2EE770;
|
78 |
+
transform: scale(1.05);
|
79 |
}
|
80 |
|
81 |
+
#status {
|
82 |
+
position: absolute;
|
83 |
+
top: 10px;
|
84 |
+
right: 10px;
|
85 |
+
font-size: 1.2em;
|
86 |
}
|
87 |
|
88 |
+
.glitch {
|
89 |
+
animation: glitch 0.5s infinite;
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
+
@keyframes glitch {
|
93 |
+
0% { transform: translate(-50%, -50%) skew(0deg); }
|
94 |
+
20% { transform: translate(-52%, -50%) skew(2deg); }
|
95 |
+
40% { transform: translate(-48%, -50%) skew(-2deg); }
|
96 |
+
60% { transform: translate(-50%, -52%) skew(1deg); }
|
97 |
+
80% { transform: translate(-51%, -48%) skew(-1deg); }
|
98 |
+
100% { transform: translate(-50%, -50%) skew(0deg); }
|
|
|
|
|
99 |
}
|
100 |
|
101 |
+
.scanline {
|
102 |
+
position: absolute;
|
103 |
+
top: 0;
|
104 |
+
left: 0;
|
105 |
+
width: 100%;
|
106 |
+
height: 2px;
|
107 |
+
background: rgba(0, 255, 0, 0.2);
|
108 |
+
animation: scan 6s linear infinite;
|
109 |
}
|
110 |
|
111 |
+
@keyframes scan {
|
112 |
+
0% { top: 0; }
|
113 |
+
100% { top: 100%; }
|
|
|
114 |
}
|
115 |
</style>
|
116 |
</head>
|
117 |
<body>
|
118 |
<canvas id="matrix"></canvas>
|
119 |
+
<div id="title" class="glitch">
|
120 |
+
I'M NOT A ROBOT √<br>
|
121 |
+
<span style="font-size: 0.5em">Click √ to start</span>
|
|
|
122 |
</div>
|
123 |
+
<div id="gameContainer">
|
124 |
+
<div class="scanline"></div>
|
125 |
+
<div id="status">Score: 0 | Lives: 3</div>
|
126 |
+
<div id="question" class="question"></div>
|
127 |
+
<div id="options" class="options"></div>
|
|
|
|
|
128 |
</div>
|
129 |
|
130 |
<script>
|
131 |
+
const matrix = document.getElementById('matrix');
|
132 |
+
const ctx = matrix.getContext('2d');
|
133 |
+
let width = matrix.width = window.innerWidth;
|
134 |
+
let height = matrix.height = window.innerHeight;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
+
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()';
|
137 |
+
const drops = [];
|
138 |
+
const fontSize = 10;
|
139 |
+
const columns = width / fontSize;
|
|
|
140 |
|
141 |
+
for(let i = 0; i < columns; i++) {
|
142 |
+
drops[i] = 1;
|
143 |
+
}
|
|
|
144 |
|
145 |
function drawMatrix() {
|
146 |
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
|
147 |
+
ctx.fillRect(0, 0, width, height);
|
148 |
ctx.fillStyle = '#0F0';
|
149 |
ctx.font = fontSize + 'px monospace';
|
150 |
|
151 |
for(let i = 0; i < drops.length; i++) {
|
152 |
+
const text = chars[Math.floor(Math.random() * chars.length)];
|
153 |
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
|
154 |
+
if(drops[i] * fontSize > height && Math.random() > 0.975) {
|
155 |
drops[i] = 0;
|
156 |
}
|
157 |
drops[i]++;
|
158 |
}
|
159 |
}
|
160 |
|
161 |
+
setInterval(drawMatrix, 33);
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
+
let score = 0;
|
164 |
+
let lives = 3;
|
165 |
+
const questions = [
|
166 |
+
{
|
167 |
+
question: "Select the number that looks different",
|
168 |
+
options: ["1", "1", "1", "l"],
|
169 |
+
correct: 3
|
170 |
+
},
|
171 |
+
{
|
172 |
+
question: "Which color is NOT green?",
|
173 |
+
options: ["#00FF00", "#008000", "#FF0000", "#90EE90"],
|
174 |
+
correct: 2
|
175 |
+
},
|
176 |
+
{
|
177 |
+
question: "Complete the sequence: 2, 4, 8, 16, ?",
|
178 |
+
options: ["20", "32", "24", "28"],
|
179 |
+
correct: 1
|
180 |
+
},
|
181 |
+
{
|
182 |
+
question: "Which is not a prime number?",
|
183 |
+
options: ["2", "3", "4", "7"],
|
184 |
+
correct: 2
|
185 |
+
},
|
186 |
+
{
|
187 |
+
question: "Solve: (√144 × 2) ÷ 4",
|
188 |
+
options: ["6", "12", "24", "3"],
|
189 |
+
correct: 0
|
190 |
}
|
191 |
+
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
+
document.getElementById('title').addEventListener('click', startGame);
|
|
|
|
|
|
|
194 |
|
195 |
+
function startGame() {
|
196 |
+
document.getElementById('title').style.display = 'none';
|
197 |
+
document.getElementById('gameContainer').style.display = 'block';
|
198 |
+
showQuestion();
|
199 |
}
|
200 |
|
201 |
+
function showQuestion() {
|
202 |
+
const questionEl = document.getElementById('question');
|
203 |
+
const optionsEl = document.getElementById('options');
|
204 |
+
const currentQ = questions[Math.floor(Math.random() * questions.length)];
|
205 |
+
|
206 |
+
questionEl.textContent = currentQ.question;
|
207 |
+
optionsEl.innerHTML = '';
|
208 |
+
|
209 |
+
currentQ.options.forEach((option, index) => {
|
210 |
const button = document.createElement('button');
|
|
|
211 |
button.textContent = option;
|
212 |
+
button.addEventListener('click', () => checkAnswer(index === currentQ.correct));
|
213 |
+
optionsEl.appendChild(button);
|
214 |
});
|
215 |
}
|
216 |
|
217 |
+
function checkAnswer(correct) {
|
218 |
+
if(correct) {
|
219 |
+
score++;
|
220 |
+
if(score >= 10) {
|
221 |
+
alert('Congratulations! You proved you are human!');
|
222 |
+
resetGame();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
return;
|
224 |
}
|
|
|
|
|
225 |
} else {
|
226 |
+
lives--;
|
227 |
+
if(lives <= 0) {
|
228 |
+
alert('Game Over! You must be a robot!');
|
229 |
+
resetGame();
|
230 |
+
return;
|
231 |
}
|
232 |
}
|
233 |
+
document.getElementById('status').textContent = `Score: ${score} | Lives: ${lives}`;
|
234 |
+
showQuestion();
|
235 |
+
}
|
236 |
+
|
237 |
+
function resetGame() {
|
238 |
+
score = 0;
|
239 |
+
lives = 3;
|
240 |
+
document.getElementById('status').textContent = `Score: ${score} | Lives: ${lives}`;
|
241 |
+
document.getElementById('gameContainer').style.display = 'none';
|
242 |
+
document.getElementById('title').style.display = 'block';
|
243 |
}
|
244 |
|
245 |
+
window.addEventListener('resize', () => {
|
246 |
+
width = matrix.width = window.innerWidth;
|
247 |
+
height = matrix.height = window.innerHeight;
|
|
|
248 |
});
|
249 |
</script>
|
250 |
</body>
|