Rubentnoda commited on
Commit
e5bb556
·
verified ·
1 Parent(s): 4f03d69

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +790 -19
index.html CHANGED
@@ -1,19 +1,790 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>¿DONDE ESTÁ LA APP¿? 🤔</title>
8
+ <style>
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ :root {
16
+ --primary: #6366f1;
17
+ --secondary: #ec4899;
18
+ --accent: #10b981;
19
+ --dark: #1f2937;
20
+ --light: #f3f4f6;
21
+ --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
22
+ --mystery: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
23
+ }
24
+
25
+ body {
26
+ font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
27
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
28
+ min-height: 100vh;
29
+ overflow-x: hidden;
30
+ position: relative;
31
+ }
32
+
33
+ /* Animated background */
34
+ .bg-animation {
35
+ position: fixed;
36
+ width: 100%;
37
+ height: 100%;
38
+ top: 0;
39
+ left: 0;
40
+ z-index: -1;
41
+ opacity: 0.3;
42
+ }
43
+
44
+ .floating-shape {
45
+ position: absolute;
46
+ border-radius: 50%;
47
+ background: rgba(255, 255, 255, 0.1);
48
+ backdrop-filter: blur(10px);
49
+ animation: float 20s infinite ease-in-out;
50
+ }
51
+
52
+ @keyframes float {
53
+
54
+ 0%,
55
+ 100% {
56
+ transform: translateY(0) rotate(0deg);
57
+ }
58
+
59
+ 33% {
60
+ transform: translateY(-30px) rotate(120deg);
61
+ }
62
+
63
+ 66% {
64
+ transform: translateY(30px) rotate(240deg);
65
+ }
66
+ }
67
+
68
+ /* Header */
69
+ header {
70
+ background: rgba(255, 255, 255, 0.95);
71
+ backdrop-filter: blur(20px);
72
+ padding: 1.5rem;
73
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
74
+ position: sticky;
75
+ top: 0;
76
+ z-index: 100;
77
+ animation: slideDown 0.5s ease-out;
78
+ }
79
+
80
+ @keyframes slideDown {
81
+ from {
82
+ transform: translateY(-100%);
83
+ opacity: 0;
84
+ }
85
+
86
+ to {
87
+ transform: translateY(0);
88
+ opacity: 1;
89
+ }
90
+ }
91
+
92
+ .header-content {
93
+ max-width: 1200px;
94
+ margin: 0 auto;
95
+ display: flex;
96
+ justify-content: space-between;
97
+ align-items: center;
98
+ flex-wrap: wrap;
99
+ gap: 1rem;
100
+ }
101
+
102
+ h1 {
103
+ font-size: 2rem;
104
+ background: var(--gradient);
105
+ -webkit-background-clip: text;
106
+ -webkit-text-fill-color: transparent;
107
+ background-clip: text;
108
+ animation: pulse 2s infinite;
109
+ }
110
+
111
+ @keyframes pulse {
112
+
113
+ 0%,
114
+ 100% {
115
+ transform: scale(1);
116
+ }
117
+
118
+ 50% {
119
+ transform: scale(1.05);
120
+ }
121
+ }
122
+
123
+ .score-board {
124
+ display: flex;
125
+ gap: 2rem;
126
+ align-items: center;
127
+ font-weight: 600;
128
+ }
129
+
130
+ .score-item {
131
+ display: flex;
132
+ align-items: center;
133
+ gap: 0.5rem;
134
+ padding: 0.5rem 1rem;
135
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
136
+ color: white;
137
+ border-radius: 25px;
138
+ transition: transform 0.3s;
139
+ }
140
+
141
+ .score-item:hover {
142
+ transform: translateY(-2px);
143
+ }
144
+
145
+ /* Main container */
146
+ .container {
147
+ max-width: 1200px;
148
+ margin: 2rem auto;
149
+ padding: 0 1rem;
150
+ }
151
+
152
+ /* Search area */
153
+ .search-area {
154
+ background: rgba(255, 255, 255, 0.95);
155
+ border-radius: 20px;
156
+ padding: 2rem;
157
+ margin-bottom: 2rem;
158
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
159
+ animation: fadeInUp 0.6s ease-out;
160
+ }
161
+
162
+ @keyframes fadeInUp {
163
+ from {
164
+ transform: translateY(30px);
165
+ opacity: 0;
166
+ }
167
+
168
+ to {
169
+ transform: translateY(0);
170
+ opacity: 1;
171
+ }
172
+ }
173
+
174
+ .search-container {
175
+ position: relative;
176
+ margin-bottom: 1.5rem;
177
+ }
178
+
179
+ #searchInput {
180
+ width: 100%;
181
+ padding: 1rem 3rem 1rem 1.5rem;
182
+ font-size: 1.1rem;
183
+ border: 3px solid transparent;
184
+ border-radius: 15px;
185
+ background: linear-gradient(white, white) padding-box,
186
+ var(--gradient) border-box;
187
+ transition: all 0.3s;
188
+ }
189
+
190
+ #searchInput:focus {
191
+ outline: none;
192
+ box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
193
+ transform: translateY(-2px);
194
+ }
195
+
196
+ .search-hint {
197
+ position: absolute;
198
+ right: 1rem;
199
+ top: 50%;
200
+ transform: translateY(-50%);
201
+ font-size: 1.5rem;
202
+ animation: bounce 2s infinite;
203
+ }
204
+
205
+ @keyframes bounce {
206
+
207
+ 0%,
208
+ 100% {
209
+ transform: translateY(-50%);
210
+ }
211
+
212
+ 50% {
213
+ transform: translateY(-60%);
214
+ }
215
+ }
216
+
217
+ /* Buttons */
218
+ .button-group {
219
+ display: flex;
220
+ gap: 1rem;
221
+ flex-wrap: wrap;
222
+ justify-content: center;
223
+ }
224
+
225
+ .btn {
226
+ padding: 0.8rem 2rem;
227
+ font-size: 1rem;
228
+ font-weight: 600;
229
+ border: none;
230
+ border-radius: 10px;
231
+ cursor: pointer;
232
+ transition: all 0.3s;
233
+ text-transform: uppercase;
234
+ letter-spacing: 1px;
235
+ }
236
+
237
+ .btn-primary {
238
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
239
+ color: white;
240
+ }
241
+
242
+ .btn-secondary {
243
+ background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
244
+ color: white;
245
+ }
246
+
247
+ .btn:hover {
248
+ transform: translateY(-3px);
249
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
250
+ }
251
+
252
+ .btn:active {
253
+ transform: translateY(-1px);
254
+ }
255
+
256
+ /* App grid */
257
+ .app-grid {
258
+ display: grid;
259
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
260
+ gap: 1.5rem;
261
+ margin-bottom: 2rem;
262
+ }
263
+
264
+ .app-card {
265
+ background: rgba(255, 255, 255, 0.95);
266
+ border-radius: 15px;
267
+ padding: 1.5rem;
268
+ text-align: center;
269
+ cursor: pointer;
270
+ transition: all 0.3s;
271
+ position: relative;
272
+ overflow: hidden;
273
+ animation: fadeIn 0.5s ease-out;
274
+ }
275
+
276
+ @keyframes fadeIn {
277
+ from {
278
+ opacity: 0;
279
+ transform: scale(0.9);
280
+ }
281
+
282
+ to {
283
+ opacity: 1;
284
+ transform: scale(1);
285
+ }
286
+ }
287
+
288
+ .app-card:hover {
289
+ transform: translateY(-5px) scale(1.05);
290
+ box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
291
+ }
292
+
293
+ .app-card.found {
294
+ background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
295
+ animation: celebrate 0.5s ease-out;
296
+ }
297
+
298
+ @keyframes celebrate {
299
+ 0% {
300
+ transform: scale(1) rotate(0deg);
301
+ }
302
+
303
+ 50% {
304
+ transform: scale(1.1) rotate(5deg);
305
+ }
306
+
307
+ 100% {
308
+ transform: scale(1) rotate(0deg);
309
+ }
310
+ }
311
+
312
+ .app-icon {
313
+ font-size: 3rem;
314
+ margin-bottom: 0.5rem;
315
+ }
316
+
317
+ .app-name {
318
+ font-weight: 600;
319
+ color: var(--dark);
320
+ margin-bottom: 0.3rem;
321
+ }
322
+
323
+ .app-hint {
324
+ font-size: 0.85rem;
325
+ color: #6b7280;
326
+ font-style: italic;
327
+ }
328
+
329
+ /* Hidden apps */
330
+ .hidden-app {
331
+ position: absolute;
332
+ cursor: pointer;
333
+ font-size: 2rem;
334
+ transition: all 0.3s;
335
+ animation: wiggle 3s infinite;
336
+ }
337
+
338
+ @keyframes wiggle {
339
+
340
+ 0%,
341
+ 100% {
342
+ transform: rotate(0deg);
343
+ }
344
+
345
+ 25% {
346
+ transform: rotate(5deg);
347
+ }
348
+
349
+ 75% {
350
+ transform: rotate(-5deg);
351
+ }
352
+ }
353
+
354
+ .hidden-app:hover {
355
+ transform: scale(1.2);
356
+ filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
357
+ }
358
+
359
+ /* Message area */
360
+ .message-area {
361
+ position: fixed;
362
+ top: 50%;
363
+ left: 50%;
364
+ transform: translate(-50%, -50%);
365
+ background: white;
366
+ padding: 2rem 3rem;
367
+ border-radius: 20px;
368
+ box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
369
+ z-index: 1000;
370
+ display: none;
371
+ text-align: center;
372
+ }
373
+
374
+ .message-area.show {
375
+ display: block;
376
+ animation: popIn 0.5s ease-out;
377
+ }
378
+
379
+ @keyframes popIn {
380
+ from {
381
+ transform: translate(-50%, -50%) scale(0);
382
+ }
383
+
384
+ to {
385
+ transform: translate(-50%, -50%) scale(1);
386
+ }
387
+ }
388
+
389
+ .message-title {
390
+ font-size: 2rem;
391
+ margin-bottom: 1rem;
392
+ background: var(--gradient);
393
+ -webkit-background-clip: text;
394
+ -webkit-text-fill-color: transparent;
395
+ background-clip: text;
396
+ }
397
+
398
+ .message-text {
399
+ color: var(--dark);
400
+ margin-bottom: 1.5rem;
401
+ }
402
+
403
+ /* Progress bar */
404
+ .progress-container {
405
+ background: rgba(255, 255, 255, 0.95);
406
+ border-radius: 15px;
407
+ padding: 1.5rem;
408
+ margin-bottom: 2rem;
409
+ }
410
+
411
+ .progress-bar {
412
+ width: 100%;
413
+ height: 30px;
414
+ background: #e5e7eb;
415
+ border-radius: 15px;
416
+ overflow: hidden;
417
+ position: relative;
418
+ }
419
+
420
+ .progress-fill {
421
+ height: 100%;
422
+ background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
423
+ border-radius: 15px;
424
+ transition: width 0.5s ease-out;
425
+ display: flex;
426
+ align-items: center;
427
+ justify-content: center;
428
+ color: white;
429
+ font-weight: 600;
430
+ }
431
+
432
+ /* Footer */
433
+ footer {
434
+ text-align: center;
435
+ padding: 2rem;
436
+ color: white;
437
+ margin-top: 3rem;
438
+ }
439
+
440
+ .built-with {
441
+ color: white;
442
+ text-decoration: none;
443
+ font-weight: 600;
444
+ background: rgba(255, 255, 255, 0.2);
445
+ padding: 0.5rem 1rem;
446
+ border-radius: 10px;
447
+ display: inline-block;
448
+ transition: all 0.3s;
449
+ }
450
+
451
+ .built-with:hover {
452
+ background: rgba(255, 255, 255, 0.3);
453
+ transform: translateY(-2px);
454
+ }
455
+
456
+ /* Responsive */
457
+ @media (max-width: 768px) {
458
+ h1 {
459
+ font-size: 1.5rem;
460
+ }
461
+
462
+ .score-board {
463
+ gap: 1rem;
464
+ }
465
+
466
+ .app-grid {
467
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
468
+ }
469
+ }
470
+
471
+ /* Confetti */
472
+ .confetti {
473
+ position: fixed;
474
+ width: 10px;
475
+ height: 10px;
476
+ background: #f0f;
477
+ position: absolute;
478
+ animation: confetti-fall 3s linear;
479
+ }
480
+
481
+ @keyframes confetti-fall {
482
+ to {
483
+ transform: translateY(100vh) rotate(360deg);
484
+ opacity: 0;
485
+ }
486
+ }
487
+ </style>
488
+ </head>
489
+
490
+ <body>
491
+ <!-- Animated background -->
492
+ <div class="bg-animation">
493
+ <div class="floating-shape" style="width: 100px; height: 100px; top: 10%; left: 10%; animation-delay: 0s;"></div>
494
+ <div class="floating-shape" style="width: 150px; height: 150px; top: 70%; right: 10%; animation-delay: 5s;"></div>
495
+ <div class="floating-shape" style="width: 80px; height: 80px; bottom: 20%; left: 50%; animation-delay: 10s;"></div>
496
+ </div>
497
+
498
+ <!-- Header -->
499
+ <header>
500
+ <div class="header-content">
501
+ <h1>🔍 ¿DONDE ESTÁ LA APP¿? 🤔</h1>
502
+ <div class="score-board">
503
+ <div class="score-item">
504
+ <span>🎯 Apps Encontradas:</span>
505
+ <span id="foundCount">0</span>
506
+ </div>
507
+ <div class="score-item">
508
+ <span>⏱️ Tiempo:</span>
509
+ <span id="timer">00:00</span>
510
+ </div>
511
+ </div>
512
+ </div>
513
+ </header>
514
+
515
+ <!-- Main container -->
516
+ <div class="container">
517
+ <!-- Progress -->
518
+ <div class="progress-container">
519
+ <div class="progress-bar">
520
+ <div class="progress-fill" id="progressFill" style="width: 0%">
521
+ <span id="progressText">0%</span>
522
+ </div>
523
+ </div>
524
+ </div>
525
+
526
+ <!-- Search area -->
527
+ <div class="search-area">
528
+ <div class="search-container">
529
+ <input type="text" id="searchInput" placeholder="🔍 Busca la app secreta... (intenta: 'magia', 'oculta', 'secreta')">
530
+ <span class="search-hint">👆</span>
531
+ </div>
532
+ <div class="button-group">
533
+ <button class="btn btn-primary" onclick="revealHint()">💡 Dar Pista</button>
534
+ <button class="btn btn-secondary" onclick="shuffleApps()">🔀 Reorganizar</button>
535
+ <button class="btn btn-primary" onclick="startNewGame()">🎮 Nuevo Juego</button>
536
+ </div>
537
+ </div>
538
+
539
+ <!-- App grid -->
540
+ <div class="app-grid" id="appGrid">
541
+ <!-- Apps will be generated here -->
542
+ </div>
543
+ </div>
544
+
545
+ <!-- Hidden apps in the page -->
546
+ <div class="hidden-app" style="top: 20%; right: 5%;" onclick="findHiddenApp(this, '🌟')">🌟</div>
547
+ <div class="hidden-app" style="bottom: 30%; left: 2%;" onclick="findHiddenApp(this, '🎨')">🎨</div>
548
+ <div class="hidden-app" style="top: 60%; right: 8%;" onclick="findHiddenApp(this, '🚀')">🚀</div>
549
+
550
+ <!-- Message area -->
551
+ <div class="message-area" id="messageArea">
552
+ <h2 class="message-title">🎉 ¡Felicidades!</h2>
553
+ <p class="message-text" id="messageText">¡Encontraste una app!</p>
554
+ <button class="btn btn-primary" onclick="closeMessage()">Continuar</button>
555
+ </div>
556
+
557
+ <!-- Footer -->
558
+ <footer>
559
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
560
+ Built with anycoder
561
+ </a>
562
+ </footer>
563
+
564
+ <script>
565
+ // Game state
566
+ let foundApps = 0;
567
+ let totalApps = 9;
568
+ let startTime = Date.now();
569
+ let timerInterval;
570
+
571
+ // App data
572
+ const apps = [
573
+ { icon: '📱', name: 'App Móvil', hint: 'La usas todos los días', found: false },
574
+ { icon: '💻', name: 'App Desktop', hint: 'Para trabajar', found: false },
575
+ { icon: '🎮', name: 'App Gaming', hint: 'Diviértete', found: false },
576
+ { icon: '📚', name: 'App Estudio', hint: 'Aprende algo nuevo', found: false },
577
+ { icon: '🎵', name: 'App Música', hint: 'Suena bien', found: false },
578
+ { icon: '📷', name: 'App Foto', hint: 'Captura momentos', found: false },
579
+ { icon: '💬', name: 'App Chat', hint: 'Conecta con amigos', found: false },
580
+ { icon: '🗺️', name: 'App Maps', hint: 'No te pierdas', found: false },
581
+ { icon: '☁️', name: 'App Cloud', hint: 'Guarda en el cielo', found: false }
582
+ ];
583
+
584
+ // Initialize game
585
+ function initGame() {
586
+ renderApps();
587
+ startTimer();
588
+ setupSearch();
589
+ }
590
+
591
+ // Render apps
592
+ function renderApps() {
593
+ const grid = document.getElementById('appGrid');
594
+ grid.innerHTML = '';
595
+
596
+ apps.forEach((app, index) => {
597
+ const card = document.createElement('div');
598
+ card.className = `app-card ${app.found ? 'found' : ''}`;
599
+ card.innerHTML = `
600
+ <div class="app-icon">${app.icon}</div>
601
+ <div class="app-name">${app.name}</div>
602
+ <div class="app-hint">${app.hint}</div>
603
+ `;
604
+ card.onclick = () => findApp(index);
605
+ card.style.animationDelay = `${index * 0.1}s`;
606
+ grid.appendChild(card);
607
+ });
608
+ }
609
+
610
+ // Find app
611
+ function findApp(index) {
612
+ if (!apps[index].found) {
613
+ apps[index].found = true;
614
+ foundApps++;
615
+ updateScore();
616
+ showMessage(`¡Encontraste ${apps[index].name}! 🎉`);
617
+ renderApps();
618
+
619
+ if (foundApps === totalApps) {
620
+ endGame();
621
+ }
622
+ }
623
+ }
624
+
625
+ // Find hidden app
626
+ function findHiddenApp(element, icon) {
627
+ element.style.display = 'none';
628
+ foundApps++;
629
+ totalApps++;
630
+ updateScore();
631
+ showMessage(`¡Encontraste una app oculta ${icon}! ✨`);
632
+ createConfetti(element);
633
+
634
+ if (foundApps >= totalApps) {
635
+ endGame();
636
+ }
637
+ }
638
+
639
+ // Update score
640
+ function updateScore() {
641
+ document.getElementById('foundCount').textContent = foundApps;
642
+ const progress = (foundApps / totalApps) * 100;
643
+ document.getElementById('progressFill').style.width = `${progress}%`;
644
+ document.getElementById('progressText').textContent = `${Math.round(progress)}%`;
645
+ }
646
+
647
+ // Timer
648
+ function startTimer() {
649
+ timerInterval = setInterval(() => {
650
+ const elapsed = Math.floor((Date.now() - startTime) / 1000);
651
+ const minutes = Math.floor(elapsed / 60);
652
+ const seconds = elapsed % 60;
653
+ document.getElementById('timer').textContent =
654
+ `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
655
+ }, 1000);
656
+ }
657
+
658
+ // Search functionality
659
+ function setupSearch() {
660
+ const input = document.getElementById('searchInput');
661
+ input.addEventListener('input', (e) => {
662
+ const value = e.target.value.toLowerCase();
663
+ if (value.includes('magia') || value.includes('oculta') || value.includes('secreta')) {
664
+ revealSecretApp();
665
+ }
666
+ });
667
+ }
668
+
669
+ // Reveal secret app
670
+ function revealSecretApp() {
671
+ const grid = document.getElementById('appGrid');
672
+ const secretCard = document.createElement('div');
673
+ secretCard.className = 'app-card';
674
+ secretCard.innerHTML = `
675
+ <div class="app-icon">🔮</div>
676
+ <div class="app-name">App Secreta</div>
677
+ <div class="app-hint">¡La encontraste!</div>
678
+ `;
679
+ secretCard.onclick = () => {
680
+ foundApps++;
681
+ totalApps++;
682
+ updateScore();
683
+ showMessage('¡Descubriste la app secreta! 🎊');
684
+ createConfetti(secretCard);
685
+ secretCard.remove();
686
+ };
687
+ grid.appendChild(secretCard);
688
+ document.getElementById('searchInput').value = '';
689
+ }
690
+
691
+ // Reveal hint
692
+ function revealHint() {
693
+ const hints = [
694
+ '👀 Busca en las esquinas...',
695
+ '💫 Hay apps ocultas en la página',
696
+ '🔍 Escribe palabras mágicas en el buscador',
697
+ '🌟 Las estrellas brillan para ti',
698
+ '🎨 El arte está en todas partes'
699
+ ];
700
+ const randomHint = hints[Math.floor(Math.random() * hints.length)];
701
+ showMessage(`💡 Pista: ${randomHint}`);
702
+ }
703
+
704
+ // Shuffle apps
705
+ function shuffleApps() {
706
+ apps.sort(() => Math.random() - 0.5);
707
+ renderApps();
708
+ showMessage('🔀 Apps reorganizadas!');
709
+ }
710
+
711
+ // Start new game
712
+ function startNewGame() {
713
+ foundApps = 0;
714
+ totalApps = 9;
715
+ startTime = Date.now();
716
+ apps.forEach(app => app.found = false);
717
+
718
+ // Reset hidden apps
719
+ document.querySelectorAll('.hidden-app').forEach(app => {
720
+ app.style.display = 'block';
721
+ });
722
+
723
+ updateScore();
724
+ renderApps();
725
+ showMessage('🎮 Nuevo juego iniciado!');
726
+ }
727
+
728
+ // Show message
729
+ function showMessage(text) {
730
+ const messageArea = document.getElementById('messageArea');
731
+ document.getElementById('messageText').textContent = text;
732
+ messageArea.classList.add('show');
733
+
734
+ setTimeout(() => {
735
+ messageArea.classList.remove('show');
736
+ }, 3000);
737
+ }
738
+
739
+ // Close message
740
+ function closeMessage() {
741
+ document.getElementById('messageArea').classList.remove('show');
742
+ }
743
+
744
+ // End game
745
+ function endGame() {
746
+ clearInterval(timerInterval);
747
+ const time = document.getElementById('timer').textContent;
748
+ showMessage(`🏆 ¡GANASTE! Tiempo: ${time}`);
749
+ createMassiveConfetti();
750
+ }
751
+
752
+ // Create confetti
753
+ function createConfetti(element) {
754
+ const rect = element.getBoundingClientRect();
755
+ for (let i = 0; i < 20; i++) {
756
+ const confetti = document.createElement('div');
757
+ confetti.className = 'confetti';
758
+ confetti.style.left = `${rect.left + rect.width / 2}px`;
759
+ confetti.style.top = `${rect.top}px`;
760
+ confetti.style.background = `hsl(${Math.random() * 360}, 100%, 50%)`;
761
+ document.body.appendChild(confetti);
762
+
763
+ setTimeout(() => confetti.remove(), 3000);
764
+ }
765
+ }
766
+
767
+ // Create massive confetti
768
+ function createMassiveConfetti() {
769
+ for (let i = 0; i < 100; i++) {
770
+ setTimeout(() => {
771
+ const confetti = document.createElement('div');
772
+ confetti.className = 'confetti';
773
+ confetti.style.left = `${Math.random() * 100}%`;
774
+ confetti.style.top = `-10px`;
775
+ confetti.style.background = `hsl(${Math.random() * 360}, 100%, 50%)`;
776
+ confetti.style.width = `${Math.random() * 10 + 5}px`;
777
+ confetti.style.height = confetti.style.width;
778
+ document.body.appendChild(confetti);
779
+
780
+ setTimeout(() => confetti.remove(), 3000);
781
+ }, i * 30);
782
+ }
783
+ }
784
+
785
+ // Initialize on load
786
+ window.addEventListener('load', initGame);
787
+ </script>
788
+ </body>
789
+
790
+ </html>