-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2677 lines (2554 loc) · 168 KB
/
index.html
File metadata and controls
2677 lines (2554 loc) · 168 KB
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
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>CyberPath — Dragon Edition</title>
<meta name="description" content="Interactive cybersecurity roadmap with 18 platforms, 5 labs, ES/EN language switching, and an in-browser PDF companion.">
<meta name="keywords" content="cybersecurity, ethical hacking, pentesting, CTF, Three.js, interactive roadmap, bilingual UI, PDF viewer">
<meta name="author" content="devcop95">
<meta name="theme-color" content="#050510">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta property="og:type" content="website">
<meta property="og:title" content="CyberPath — Dragon Edition">
<meta property="og:description" content="Interactive cybersecurity roadmap with 18 platforms, 5 labs, bilingual UI, and an embedded PDF companion.">
<meta property="og:url" content="https://devcop95.github.io/cyberpath/">
<meta property="og:image" content="https://devcop95.github.io/cyberpath/assets/cyberpath-social.svg">
<meta property="og:image:type" content="image/svg+xml">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="CyberPath — Dragon Edition">
<meta name="twitter:description" content="Explore the interactive offensive security roadmap, launch labs, switch ES/EN, and open the PDF without leaving the site.">
<meta name="twitter:image" content="https://devcop95.github.io/cyberpath/assets/cyberpath-social.svg">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' rx='18' fill='%23050510'/><text x='50' y='68' font-size='58' text-anchor='middle' font-family='monospace' fill='%2300ff88'>%3E_</text></svg>">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Grotesk:wght@700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<style>
:root{
--safe-top: env(safe-area-inset-top, 0px);
--safe-right: env(safe-area-inset-right, 0px);
--safe-bottom: env(safe-area-inset-bottom, 0px);
--safe-left: env(safe-area-inset-left, 0px);
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body{background:#050510;overflow:hidden;font-family:'JetBrains Mono',monospace;touch-action:none;color:#e0e0e8}
canvas{display:block}
#ui{position:fixed;inset:0;pointer-events:none;z-index:10}
.header{position:absolute;top:calc(12px + var(--safe-top));left:50%;transform:translateX(-50%);text-align:center;pointer-events:none;width:100%;max-width:90vw}
.header h1{font-family:'Space Grotesk',sans-serif;font-size:clamp(1.2rem,4vw,1.8rem);color:#00ff88;text-shadow:0 0 20px rgba(0,255,136,0.5);letter-spacing:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header p{color:#505060;font-size:0.7rem;margin-top:2px}
#tooltip{position:absolute;background:rgba(5,5,16,0.98);border:1px solid rgba(0,255,136,0.35);border-radius:12px;padding:12px 16px;min-width:200px;max-width:280px;opacity:0;transition:opacity 0.15s;pointer-events:none;box-shadow:0 0 20px rgba(0,255,136,0.15);z-index:20}
#tooltip.visible{opacity:1}
.tt-num{font-size:0.65rem;color:#505060;margin-bottom:2px;letter-spacing:1px}
.tt-name{font-family:'Space Grotesk',sans-serif;font-size:0.95rem;color:#e0e0e8;margin-bottom:4px}
.tt-badge{display:inline-block;font-size:0.6rem;font-weight:700;padding:2px 8px;border-radius:20px;margin-bottom:6px;letter-spacing:1px}
.tt-url{font-size:0.68rem;color:#404055;word-break:break-all}
.tt-desc{font-size:0.65rem;color:#808090;margin:6px 0;line-height:1.3}
.tt-features{font-size:0.6rem;color:#606070;margin-top:4px}
.tt-features span{display:inline-block;margin:2px 4px 2px 0;padding:2px 6px;background:rgba(0,255,136,0.1);border-radius:4px;color:#00cc66}
.tt-click{font-size:0.65rem;margin-top:8px;color:#00ff88;display:flex;align-items:center;gap:6px}
#speechBubble{position:fixed;background:rgba(4,4,14,0.55);border:1px solid rgba(0,255,136,0.2);border-radius:14px;padding:14px 18px;max-width:240px;pointer-events:none;opacity:0;transition:opacity 0.35s;z-index:50;box-shadow:0 0 16px rgba(0,255,136,0.08)}
#speechBubble.visible{opacity:1}
#speechBubble::after{content:'';position:absolute;bottom:-9px;left:24px;width:16px;height:16px;background:rgba(4,4,14,0.55);border-right:1px solid rgba(0,255,136,0.2);border-bottom:1px solid rgba(0,255,136,0.2);transform:rotate(45deg)}
.sb-dragon{font-size:0.6rem;color:#606070;letter-spacing:2px;margin-bottom:4px;display:flex;align-items:center;gap:6px}
.sb-dragon-dot{width:6px;height:6px;border-radius:50%;background:#00ff88;animation:sbPulse 1s infinite}
@keyframes sbPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:0.4;transform:scale(0.7)}}
.sb-name{font-family:'Space Grotesk',sans-serif;color:#e0e0e8;font-size:1rem;margin-bottom:5px}
.sb-badge{display:inline-block;font-size:0.58rem;font-weight:700;padding:2px 8px;border-radius:20px;margin-bottom:8px;letter-spacing:1px}
.sb-cmd{font-size:0.62rem;color:#00ff88;font-family:'JetBrains Mono',monospace;margin-bottom:0;padding:4px 8px;background:rgba(0,255,136,0.07);border-radius:6px;border-left:2px solid #00ff88}
.sb-desc{display:none}
#dragonInfo{position:absolute;bottom:calc(70px + var(--safe-bottom));right:calc(12px + var(--safe-right));background:rgba(5,5,16,0.85);border:1px solid rgba(0,255,136,0.2);border-radius:10px;padding:8px 12px;pointer-events:none;font-size:0.65rem;color:#505060;text-align:right;min-width:120px}
#dragonInfo .di-name{color:#00ff88;font-family:'Space Grotesk',sans-serif;font-size:0.75rem;margin-bottom:2px}
#dragonInfo .di-status{color:#404050;font-size:0.6rem}
.modal-overlay{position:fixed;inset:0;background:rgba(2,2,12,0.82);backdrop-filter:blur(6px);z-index:100;display:none;align-items:center;justify-content:center;padding:calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left));pointer-events:all}
.modal-overlay.active{display:flex}
.modal-card{background:rgba(8,8,22,0.98);border:1px solid rgba(0,255,136,0.22);border-radius:18px;width:100%;max-width:480px;max-height:88vh;overflow-y:auto;padding:22px 22px 26px;box-shadow:0 0 60px rgba(0,255,136,0.08),0 30px 80px rgba(0,0,0,0.7);animation:modalIn 0.22s cubic-bezier(.16,1,.3,1);scrollbar-width:thin;scrollbar-color:#1a2a1a transparent}
.modal-card::-webkit-scrollbar{width:4px}
.modal-card::-webkit-scrollbar-thumb{background:#1a3a1a;border-radius:4px}
@keyframes modalIn{from{opacity:0;transform:translateY(18px) scale(0.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.modal-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px;border-bottom:1px solid rgba(0,255,136,0.15);margin-bottom:18px}
.modal-header h2{font-family:'Space Grotesk',sans-serif;color:#00ff88;font-size:1.15rem;display:flex;align-items:center;gap:8px}
.modal-close{background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);color:#808090;width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:1.1rem;display:flex;align-items:center;justify-content:center;transition:all 0.15s;flex-shrink:0}
.modal-close:hover{border-color:#00ff88;color:#00ff88}
.level-card{background:rgba(10,10,26,0.8);border:1px solid rgba(255,255,255,0.07);border-radius:12px;padding:14px;margin-bottom:14px}
.level-card h3{font-family:'Space Grotesk',sans-serif;font-size:0.95rem;margin-bottom:7px;display:flex;align-items:center;gap:8px}
.level-card h3 .dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.level-card p{font-size:0.73rem;color:#808090;line-height:1.5;margin-bottom:7px}
.level-card ul{font-size:0.68rem;color:#606070;padding-left:16px}
.level-card li{margin:3px 0}
.preview-header{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,0.09);margin-bottom:16px}
.preview-title{font-family:'Space Grotesk',sans-serif;color:#e0e0e8;font-size:1.15rem}
.preview-badge{font-size:0.62rem;font-weight:700;padding:3px 10px;border-radius:20px;margin-top:5px;display:inline-block}
.preview-content{display:grid;gap:14px}
.preview-section h4{font-family:'Space Grotesk',sans-serif;color:#00ff88;font-size:0.82rem;margin-bottom:7px;display:flex;align-items:center;gap:6px}
.preview-section p,.preview-section li{font-size:0.73rem;color:#808090;line-height:1.5}
.preview-section ul{padding-left:16px}
.preview-section li{margin:3px 0}
.preview-meta{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:6px}
.preview-meta-item{background:rgba(0,255,136,0.07);border-radius:8px;padding:9px 10px;font-size:0.68rem}
.preview-meta-label{color:#505060;font-size:0.62rem;display:block;margin-bottom:3px}
.preview-meta-value{color:#00ff88;font-weight:700}
.preview-cta{margin-top:18px;display:flex;gap:8px}
.preview-cta a{flex:1;text-align:center;padding:11px;background:#00ff88;color:#050510;text-decoration:none;border-radius:10px;font-weight:700;font-size:0.82rem;transition:transform 0.15s,box-shadow 0.15s;display:flex;align-items:center;justify-content:center;gap:6px}
.preview-cta a:hover{transform:scale(1.03);box-shadow:0 4px 20px rgba(0,255,136,0.3)}
.preview-cta a.secondary{background:rgba(255,255,255,0.08);color:#c0c0d0;border:1px solid rgba(255,255,255,0.1)}
.preview-cta a.secondary:hover{background:rgba(255,255,255,0.13);box-shadow:none}
.pdf-card{max-width:min(1080px,96vw);height:min(90vh,900px);height:min(90dvh,900px);display:flex;flex-direction:column;overflow:hidden}
.pdf-intro{font-size:0.73rem;color:#8a8aa0;line-height:1.5;margin:-4px 0 14px}
.pdf-frame-wrap{flex:1;min-height:320px;border:1px solid rgba(255,255,255,0.08);border-radius:14px;overflow:hidden;background:rgba(255,255,255,0.03);display:flex;flex-direction:column}
.pdf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,0.06);background:rgba(6,6,18,0.88)}
.pdf-status{font-size:0.65rem;color:#7c7c94;letter-spacing:0.4px}
.pdf-toolbar-actions{display:flex;align-items:center;gap:6px}
.pdf-tool-btn{width:34px;height:34px;border-radius:10px;border:1px solid rgba(0,255,136,0.16);background:rgba(255,255,255,0.04);color:#b5b5c8;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.16s}
.pdf-tool-btn:hover{border-color:#00ff88;color:#00ff88;background:rgba(0,255,136,0.08)}
.pdf-tool-btn:disabled{opacity:0.38;cursor:not-allowed}
.pdf-viewer{position:relative;flex:1;overflow:auto;padding:14px;background:
radial-gradient(circle at top, rgba(0,255,136,0.08), transparent 34%),
linear-gradient(180deg, rgba(5,5,16,0.98), rgba(3,3,12,1))}
.pdf-pages{position:relative;z-index:1;display:grid;gap:14px;justify-items:center}
.pdf-page{width:min(100%,920px);background:#f5f5f5;border-radius:16px;padding:10px 10px 12px;box-shadow:0 20px 40px rgba(0,0,0,0.35)}
.pdf-page canvas{display:block;width:100%;height:auto;border-radius:10px}
.pdf-page-label{font-size:0.64rem;color:#4f4f63;text-transform:uppercase;letter-spacing:1px;margin-bottom:8px}
.pdf-loading,.pdf-fallback{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center;background:
radial-gradient(circle at top, rgba(0,255,136,0.08), transparent 34%),
linear-gradient(180deg, rgba(5,5,16,0.96), rgba(3,3,12,0.98))}
.pdf-loading i,.pdf-fallback i{font-size:2rem;color:#00ff88}
.pdf-loading p,.pdf-fallback p{font-size:0.78rem;color:#d7d7e6;line-height:1.55;max-width:560px}
.pdf-note{font-size:0.67rem;color:#707086;line-height:1.5;max-width:560px}
.pdf-loading[hidden],.pdf-fallback[hidden],.pdf-pages[hidden]{display:none!important}
.pdf-card .preview-cta{margin-top:14px;flex-wrap:wrap}
.pdf-card .preview-cta a{min-height:50px}
.legend{position:absolute;bottom:calc(16px + var(--safe-bottom));left:50%;transform:translateX(-50%);display:flex;gap:14px;background:rgba(5,5,16,0.85);border:1px solid rgba(0,255,136,0.12);border-radius:24px;padding:8px 16px;pointer-events:none}
.leg-item{display:flex;align-items:center;gap:6px;font-size:0.7rem;color:#707080}
.leg-dot{width:8px;height:8px;border-radius:50%}
.hint{position:absolute;bottom:calc(64px + var(--safe-bottom));left:50%;transform:translateX(-50%);color:#303040;font-size:0.68rem;white-space:nowrap;text-align:center;padding:0 10px}
.controls{position:absolute;top:calc(12px + var(--safe-top));right:calc(12px + var(--safe-right));display:flex;flex-direction:column;align-items:flex-end;gap:6px;pointer-events:all}
.ctrl-btn{background:rgba(5,5,16,0.85);border:1px solid rgba(0,255,136,0.18);color:#808090;width:36px;height:36px;border-radius:8px;font-size:1rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.15s;font-family:inherit}
.ctrl-btn:hover{border-color:#00ff88;color:#00ff88}
.ctrl-btn.active{border-color:#00ff88;color:#00ff88;background:rgba(0,255,136,0.08)}
.menu-trigger{box-shadow:0 0 18px rgba(0,255,136,0.06)}
.control-menu{display:flex;flex-direction:column;gap:6px;padding:8px;background:rgba(5,5,16,0.86);border:1px solid rgba(0,255,136,0.12);border-radius:14px;backdrop-filter:blur(12px);box-shadow:0 18px 40px rgba(0,0,0,0.38),0 0 24px rgba(0,255,136,0.05);opacity:0;transform:translateY(-8px) scale(0.96);transform-origin:top right;pointer-events:none;transition:opacity 0.18s ease,transform 0.18s ease;max-height:0;overflow:hidden}
.control-menu.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto;max-height:320px}
.lang-toggle{display:flex;background:rgba(5,5,16,0.9);border:1px solid rgba(0,255,136,0.16);border-radius:10px;padding:3px;gap:3px;box-shadow:0 0 18px rgba(0,255,136,0.06)}
.lang-btn{min-width:40px;height:30px;border:none;border-radius:8px;background:transparent;color:#707080;font-size:0.68rem;font-weight:700;letter-spacing:1px;cursor:pointer;transition:all 0.15s;font-family:'JetBrains Mono',monospace}
.lang-btn:hover{color:#c0c0d0;background:rgba(255,255,255,0.05)}
.lang-btn.active{background:#00ff88;color:#050510;box-shadow:0 0 18px rgba(0,255,136,0.22)}
.level-panel{display:none}
.lp-row{display:flex;align-items:center;gap:8px;background:rgba(5,5,16,0.75);border:1px solid rgba(255,255,255,0.06);border-radius:8px;padding:6px 12px}
.lp-num{font-size:1rem;font-weight:700}
.lp-label{font-size:0.68rem;color:#606070}
#btnInfo{position:absolute;top:calc(12px + var(--safe-top));left:calc(12px + var(--safe-left));width:36px;height:36px;border-radius:8px;background:rgba(5,5,16,0.85);border:1px solid rgba(0,255,136,0.3);color:#00ff88;font-weight:700;font-size:1rem;cursor:pointer;pointer-events:all;display:none;align-items:center;justify-content:center;transition:all 0.15s}
#btnInfo:hover{background:rgba(0,255,136,0.12)}
.lab-modal-header{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;border-bottom:1px solid rgba(167,139,250,0.2);flex-shrink:0;gap:12px}
.lab-modal-title-wrap{display:flex;align-items:center;gap:10px;min-width:0}
#labInputBar{padding-bottom:calc(10px + var(--safe-bottom))}
@media(max-width:768px){
.header{top:calc(8px + var(--safe-top))}
.header h1{font-size:1.3rem}
.level-panel{display:none}
#btnInfo{display:flex}
.hint{bottom:calc(56px + var(--safe-bottom));font-size:0.65rem;max-width:72vw;white-space:normal}
.legend{bottom:calc(12px + var(--safe-bottom));padding:6px 12px;gap:10px}
.leg-item{font-size:0.65rem}
.controls{top:calc(8px + var(--safe-top));right:calc(8px + var(--safe-right))}
.ctrl-btn{width:34px;height:34px}
.lang-toggle{align-self:flex-end}
.lang-btn{min-width:38px;height:28px}
.control-menu{padding:6px}
#levelOverlay .modal-card,#previewOverlay .modal-card{padding:16px 16px calc(20px + var(--safe-bottom))}
#pdfOverlay .modal-card{padding:16px 16px calc(20px + var(--safe-bottom))}
.preview-meta{grid-template-columns:1fr}
#dragonInfo{display:none}
.modal-overlay{padding:calc(12px + var(--safe-top)) calc(10px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(10px + var(--safe-left))}
.modal-close{width:36px;height:36px}
.pdf-card{height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px);max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px)}
.pdf-toolbar{padding:10px}
.pdf-status{font-size:0.62rem}
.pdf-viewer{padding:10px}
.pdf-card .preview-cta{margin-top:12px;padding-bottom:2px}
.pdf-card .preview-cta a{flex-basis:calc(50% - 4px)}
/* ── Lab modal mobile ── */
#labOverlay{padding:calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left))!important}
#labOverlay .modal-card,#labModalCard{
height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px)!important;
max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px)!important;
border-radius:14px!important;
overflow:hidden!important;
padding:0!important;
display:flex!important;
flex-direction:column!important;
}
.lab-modal-header{padding:12px 14px 12px!important}
#labBodyFlex{
flex:1!important;
flex-direction:column!important;
overflow:hidden!important;
min-height:0!important;
}
#labSidebarWrapper{
width:100%!important;
height:44px!important;
max-height:44px!important;
min-height:44px!important;
border-right:none!important;
border-bottom:1px solid rgba(255,255,255,0.07)!important;
flex-shrink:0!important;
overflow-x:auto!important;
overflow-y:hidden!important;
display:flex!important;
flex-direction:row!important;
align-items:center!important;
padding:4px 8px!important;
gap:4px!important;
}
#labSidebar{
display:flex!important;
flex-direction:row!important;
gap:6px!important;
padding:0!important;
width:max-content!important;
align-items:center!important;
}
.lab-item{
padding:0 10px!important;
border-left:none!important;
border-bottom:3px solid transparent!important;
border-radius:8px!important;
white-space:nowrap!important;
flex-shrink:0!important;
display:flex!important;
align-items:center!important;
height:34px!important;
overflow:hidden!important;
}
/* En mobile: ocultar badge, mostrar solo el título truncado */
.lab-item>span{display:none!important}
.lab-item>div{font-size:0.7rem!important;white-space:nowrap!important;overflow:hidden!important;max-width:120px!important;text-overflow:ellipsis!important;margin-bottom:0!important}
#labDescArea{padding:8px 12px!important;flex-shrink:0!important}
#labTerminal{flex:1!important;font-size:0.7rem!important;padding:10px 12px!important;overflow-y:auto!important}
#labInputBar{flex-wrap:nowrap!important;gap:6px!important;padding:8px 10px calc(10px + var(--safe-bottom))!important;flex-shrink:0!important}
#labInputBar #labPrompt{display:none!important}
#labInputBar #labInput{min-width:0!important;font-size:0.75rem!important;flex:1!important}
#labInputBar #labRun{padding:6px 12px!important;font-size:0.7rem!important;white-space:nowrap!important;flex-shrink:0!important}
#labInputBar #labHint,#labInputBar #labReset{padding:6px 10px!important;flex-shrink:0!important}
#theoryPanel{padding:14px 14px calc(18px + var(--safe-bottom))!important}
}
@media(max-width:480px){
.header h1{font-size:1.15rem}
.controls{gap:4px}
.ctrl-btn{width:32px;height:32px}
#btnInfo{width:32px;height:32px}
.legend{gap:8px;padding:5px 10px}
.leg-item{font-size:0.6rem;gap:4px}
.leg-dot{width:7px;height:7px}
.hint{display:none}
#labOverlay{padding:calc(6px + var(--safe-top)) calc(6px + var(--safe-right)) calc(6px + var(--safe-bottom)) calc(6px + var(--safe-left))!important}
#labOverlay .modal-card,#labModalCard{height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 12px)!important;max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 12px)!important;border-radius:18px!important}
.lab-modal-header{padding:12px 12px 10px!important}
#labSidebarWrapper{max-height:46px!important;min-height:40px!important}
#labTerminal{font-size:0.67rem!important}
.pdf-card{height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 12px)!important;max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 12px)!important;border-radius:18px!important;padding:14px 14px calc(16px + var(--safe-bottom))}
.pdf-card .preview-cta a{flex-basis:100%}
}
/* ── Theory / Clase Magistral ── */
#theoryPanel{display:none;position:absolute;inset:0;background:rgba(4,4,14,0.98);z-index:10;overflow-y:auto;padding:20px 22px calc(24px + var(--safe-bottom));flex-direction:column;gap:14px}
#theoryPanel.visible{display:flex}
.theory-badge{display:inline-block;font-size:0.58rem;font-weight:700;padding:2px 9px;border-radius:20px;letter-spacing:1px;margin-bottom:8px}
.theory-title{font-family:'Space Grotesk',sans-serif;color:#e0e0e8;font-size:1.1rem;margin-bottom:4px}
.theory-subtitle{font-size:0.68rem;color:#505065;letter-spacing:2px;margin-bottom:14px}
.theory-block{background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:10px;padding:12px 14px}
.theory-block h4{font-family:'Space Grotesk',sans-serif;font-size:0.8rem;margin-bottom:6px;display:flex;align-items:center;gap:7px}
.theory-block p,.theory-block li{font-size:0.72rem;color:#9090a8;line-height:1.55}
.theory-block ul{padding-left:16px;margin-top:4px}
.theory-block li{margin:3px 0}
.theory-cmd{font-family:'JetBrains Mono',monospace;font-size:0.66rem;background:rgba(0,255,136,0.07);border-left:2px solid #00ff88;padding:3px 8px;border-radius:0 5px 5px 0;color:#00cc66;margin:3px 0;display:block}
.theory-start-btn{margin-top:6px;padding:12px 20px;background:#00ff88;color:#050510;border:none;border-radius:10px;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:0.9rem;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:transform 0.15s,box-shadow 0.15s;flex-shrink:0}
.theory-start-btn:hover{transform:scale(1.02);box-shadow:0 4px 22px rgba(0,255,136,0.3)}
.theory-tab-btn{font-size:0.62rem;font-family:'JetBrains Mono',monospace;background:rgba(0,255,136,0.08);border:1px solid rgba(0,255,136,0.25);color:#00cc66;padding:3px 10px;border-radius:6px;cursor:pointer;transition:all 0.15s;flex-shrink:0}
.theory-tab-btn:hover{background:rgba(0,255,136,0.15)}
</style>
</head>
<body>
<div id="ui">
<div class="header">
<h1>>_ cyberpath <span style="color:#ff3333;font-size:0.75em;vertical-align:middle">🐉</span></h1>
<p id="headerSubtitle">Roadmap interactivo · 18 plataformas</p>
</div>
<div id="tooltip">
<div class="tt-num" id="ttNum">PLATAFORMA #01</div>
<div class="tt-name" id="ttName">—</div>
<div class="tt-badge" id="ttBadge">—</div>
<div class="tt-url" id="ttUrl">—</div>
<div class="tt-desc" id="ttDesc">—</div>
<div class="tt-features" id="ttFeatures"></div>
<div class="tt-click">
<i class="fa-solid fa-arrow-up-right-from-square" style="font-size:14px"></i>
<span id="tooltipActionText">Abrir plataforma</span>
</div>
</div>
<div id="speechBubble">
<div class="sb-dragon"><div class="sb-dragon-dot"></div>KALI</div>
<div class="sb-name" id="sbName">—</div>
<span class="sb-badge" id="sbBadge">—</span>
<div class="sb-cmd" id="sbCmd">> _</div>
<div class="sb-desc" id="sbDesc">—</div>
</div>
<div id="dragonInfo">
<div class="di-name">🐉 Kali</div>
<div class="di-status" id="diStatus">Despegando...</div>
</div>
<button id="btnInfo" title="¿Por qué estos niveles?"><i class="fa-solid fa-circle-question" style="font-size:18px"></i></button>
<div class="level-panel">
<div class="lp-row"><span class="lp-num" style="color:#00ff88">6</span><span class="lp-label" id="levelPanelBeginner">Principiante</span></div>
<div class="lp-row"><span class="lp-num" style="color:#ff9500">6</span><span class="lp-label" id="levelPanelIntermediate">Intermedio</span></div>
<div class="lp-row"><span class="lp-num" style="color:#ff5555">6</span><span class="lp-label" id="levelPanelAdvanced">Avanzado</span></div>
</div>
<div class="legend">
<div class="leg-item"><div class="leg-dot" style="background:#00ff88"></div><span id="legendBeginner">Principiante</span></div>
<div class="leg-item"><div class="leg-dot" style="background:#ff9500"></div><span id="legendIntermediate">Intermedio</span></div>
<div class="leg-item"><div class="leg-dot" style="background:#ff5555"></div><span id="legendAdvanced">Avanzado</span></div>
</div>
<div class="hint" id="sceneHint">Arrastra para rotar · Click para visitar · El dragón revela cada plataforma</div>
<div class="controls">
<div class="lang-toggle" id="langToggle" aria-label="Language selector">
<button class="lang-btn active" id="langEs" data-lang="es" type="button">ES</button>
<button class="lang-btn" id="langEn" data-lang="en" type="button">EN</button>
</div>
<button class="ctrl-btn menu-trigger" id="btnMenu" title="Abrir menú" type="button" aria-expanded="false" aria-controls="controlMenu" aria-label="Abrir menú"><i class="fa-solid fa-bars" style="font-size:15px"></i></button>
<div class="control-menu" id="controlMenu">
<button class="ctrl-btn" id="btnPdf" title="Ver PDF" type="button"><i class="fa-solid fa-file-pdf" style="font-size:16px"></i></button>
<button class="ctrl-btn" id="btnReset" title="Reset" type="button"><i class="fa-solid fa-house" style="font-size:18px"></i></button>
<button class="ctrl-btn" id="btnAuto" title="Auto-rotar" type="button"><i class="fa-solid fa-play" style="font-size:16px" id="autoIcon"></i></button>
<button class="ctrl-btn" id="btnDragon" title="Toggle dragón" type="button" style="color:#00ff88;border-color:rgba(0,255,136,0.4)"><i class="fa-solid fa-dragon" style="font-size:16px"></i></button>
<button class="ctrl-btn" id="btnLab" title="Laboratorio de retos" type="button" style="color:#a78bfa;border-color:rgba(167,139,250,0.4)"><i class="fa-solid fa-terminal" style="font-size:15px"></i></button>
</div>
</div>
</div>
<div class="modal-overlay" id="levelOverlay">
<div class="modal-card" id="levelModalCard"></div>
</div>
<div class="modal-overlay" id="previewOverlay">
<div class="modal-card">
<div class="preview-header">
<div>
<div class="preview-title" id="pvName">—</div>
<span class="preview-badge" id="pvBadge">—</span>
</div>
<button class="modal-close" id="closePreview"><i class="fa-solid fa-xmark" style="font-size:16px"></i></button>
</div>
<div class="preview-content">
<div class="preview-section">
<h4><i class="fa-regular fa-clipboard" style="font-size:16px"></i> <span id="pvDescLabel">Descripción</span></h4>
<p id="pvDesc">—</p>
</div>
<div class="preview-section">
<h4><i class="fa-solid fa-bullseye" style="font-size:16px"></i> <span id="pvReasonLabel">¿Por qué este nivel?</span></h4>
<p id="pvReason">—</p>
</div>
<div class="preview-section">
<h4><i class="fa-solid fa-wand-magic-sparkles" style="font-size:16px"></i> <span id="pvFeaturesLabel">Características</span></h4>
<ul id="pvFeatures"></ul>
</div>
<div class="preview-section">
<h4><i class="fa-solid fa-chart-pie" style="font-size:16px"></i> <span id="pvMetaLabel">Info Técnica</span></h4>
<div class="preview-meta">
<div class="preview-meta-item"><span class="preview-meta-label" id="pvDomainLabel">Dominio</span><span class="preview-meta-value" id="pvDomain">—</span></div>
<div class="preview-meta-item"><span class="preview-meta-label" id="pvTypeLabel">Tipo</span><span class="preview-meta-value" id="pvType">—</span></div>
<div class="preview-meta-item"><span class="preview-meta-label" id="pvLangLabel">Idioma</span><span class="preview-meta-value" id="pvLang">—</span></div>
<div class="preview-meta-item"><span class="preview-meta-label" id="pvPriceLabel">Precio</span><span class="preview-meta-value" id="pvPrice">—</span></div>
</div>
</div>
<div class="preview-cta">
<a href="#" target="_blank" rel="noopener" id="pvVisit"><i class="fa-solid fa-rocket" style="font-size:16px"></i> <span id="pvVisitText">Visitar Plataforma</span></a>
</div>
</div>
</div>
</div>
<div class="modal-overlay" id="pdfOverlay">
<div class="modal-card pdf-card">
<div class="modal-header">
<h2><i class="fa-solid fa-file-pdf" style="color:#ff5555;font-size:22px"></i> <span id="pdfTitle">CyberPath PDF</span></h2>
<button class="modal-close" id="closePdf"><i class="fa-solid fa-xmark" style="font-size:16px"></i></button>
</div>
<p class="pdf-intro" id="pdfIntro">Consulta la versión visual del roadmap sin salir de la web.</p>
<div class="pdf-frame-wrap">
<div class="pdf-toolbar">
<div class="pdf-status" id="pdfStatus" aria-live="polite">Cargando PDF...</div>
<div class="pdf-toolbar-actions">
<button class="pdf-tool-btn" id="pdfZoomOut" type="button" title="Reducir zoom" aria-label="Reducir zoom"><i class="fa-solid fa-magnifying-glass-minus"></i></button>
<button class="pdf-tool-btn" id="pdfZoomReset" type="button" title="Ajustar al ancho" aria-label="Ajustar al ancho"><i class="fa-solid fa-expand"></i></button>
<button class="pdf-tool-btn" id="pdfZoomIn" type="button" title="Aumentar zoom" aria-label="Aumentar zoom"><i class="fa-solid fa-magnifying-glass-plus"></i></button>
<button class="pdf-tool-btn" id="pdfFullscreen" type="button" title="Pantalla completa" aria-label="Pantalla completa"><i class="fa-solid fa-up-right-and-down-left-from-center"></i></button>
</div>
</div>
<div class="pdf-viewer" id="pdfViewer">
<div class="pdf-loading" id="pdfLoading">
<i class="fa-solid fa-spinner fa-spin"></i>
<p id="pdfLoadingText">Cargando PDF...</p>
<span class="pdf-note" id="pdfViewerHint">Si el navegador no puede incrustarlo, igual podrás abrirlo o descargarlo.</span>
</div>
<div class="pdf-pages" id="pdfPages" hidden></div>
<div class="pdf-fallback" id="pdfFallback" hidden>
<i class="fa-solid fa-file-arrow-down"></i>
<p id="pdfFallbackText">Este navegador no pudo renderizar el PDF dentro de la página.</p>
</div>
</div>
</div>
<div class="preview-cta">
<a href="assets/CyberPath_Dragon_Edition.pdf" target="_blank" rel="noopener" id="pdfOpen"><i class="fa-solid fa-arrow-up-right-from-square" style="font-size:16px"></i> <span id="pdfOpenText">Abrir en nueva pestaña</span></a>
<a href="assets/CyberPath_Dragon_Edition.pdf" download class="secondary" id="pdfDownload"><i class="fa-solid fa-download" style="font-size:16px"></i> <span id="pdfDownloadText">Descargar PDF</span></a>
</div>
</div>
</div>
<!-- ═══ LAB MODAL ═══ -->
<div class="modal-overlay" id="labOverlay">
<div class="modal-card" id="labModalCard" style="max-width:860px;padding:0;overflow:hidden;display:flex;flex-direction:column;height:88vh">
<!-- Header -->
<div class="lab-modal-header">
<div class="lab-modal-title-wrap">
<i class="fa-solid fa-terminal" style="color:#a78bfa;font-size:18px"></i>
<span style="font-family:'Space Grotesk',sans-serif;color:#a78bfa;font-size:1.1rem" id="labModalTitle">Laboratorio de Retos</span>
<span id="labDifficulty" style="font-size:0.6rem;font-weight:700;padding:2px 8px;border-radius:20px;background:rgba(0,255,136,0.15);color:#00ff88;letter-spacing:1px"></span>
</div>
<button class="modal-close" id="closeLabModal"><i class="fa-solid fa-xmark" style="font-size:16px"></i></button>
</div>
<!-- Body -->
<div style="display:flex;flex:1;overflow:hidden;flex-direction:row" id="labBodyFlex">
<!-- Sidebar retos -->
<div id="labSidebarWrapper" style="width:210px;border-right:1px solid rgba(255,255,255,0.07);overflow-y:auto;flex-shrink:0;padding:10px 0">
<div id="labSidebar"></div>
</div>
<!-- Main -->
<div style="flex:1;display:flex;flex-direction:column;overflow:hidden;position:relative">
<!-- Theory panel (clase magistral) -->
<div id="theoryPanel">
<div>
<span class="theory-badge" id="theoryBadge">—</span>
<div class="theory-title" id="theoryTitle">—</div>
<div class="theory-subtitle" id="theorySubtitle">📚 CLASE MAGISTRAL</div>
</div>
<div class="theory-block">
<h4 style="color:#00ff88"><i class="fa-solid fa-book-open" style="font-size:15px"></i> <span id="theoryLearnLabel">¿Qué vas a aprender?</span></h4>
<p id="theoryConcept">—</p>
</div>
<div class="theory-block">
<h4 style="color:#a78bfa"><i class="fa-solid fa-lightbulb" style="font-size:15px"></i> <span id="theoryPointsLabel">Conceptos clave</span></h4>
<ul id="theoryPoints"></ul>
</div>
<div class="theory-block">
<h4 style="color:#ff9500"><i class="fa-solid fa-terminal" style="font-size:15px"></i> <span id="theoryToolsLabel">Comandos / Herramientas</span></h4>
<div id="theoryTools"></div>
</div>
<div class="theory-block">
<h4 style="color:#ff5555"><i class="fa-solid fa-triangle-exclamation" style="font-size:15px"></i> <span id="theoryWhyLabel">¿Por qué importa en ciberseguridad?</span></h4>
<p id="theoryWhy">—</p>
</div>
<button class="theory-start-btn" id="theoryStartBtn"><i class="fa-solid fa-play" style="font-size:15px"></i> <span id="theoryStartText">¡Entendido — Comenzar Reto!</span></button>
</div>
<!-- Descripcion reto -->
<div id="labDescArea" style="padding:14px 18px;border-bottom:1px solid rgba(255,255,255,0.07);flex-shrink:0">
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:6px">
<div style="font-family:'Space Grotesk',sans-serif;color:#e0e0e8;font-size:0.95rem" id="labTitle">—</div>
<button class="theory-tab-btn" id="theoryToggleBtn" title="Ver clase magistral"><i class="fa-solid fa-book-open"></i> <span id="theoryToggleText">Teoría</span></button>
</div>
<div style="font-size:0.7rem;color:#808090;line-height:1.5;margin-bottom:8px" id="labDesc">—</div>
<div style="display:flex;gap:8px;flex-wrap:wrap" id="labObjectives"></div>
</div>
<!-- Terminal -->
<div id="labTerminal" style="flex:1;overflow-y:auto;background:#020208;padding:12px 16px;font-family:'JetBrains Mono',monospace;font-size:0.72rem;line-height:1.6"></div>
<!-- Input -->
<div id="labInputBar" style="display:flex;align-items:center;gap:8px;padding:10px 16px;border-top:1px solid rgba(167,139,250,0.15);background:#04040f;flex-shrink:0">
<span style="color:#a78bfa;font-size:0.72rem;white-space:nowrap" id="labPrompt">kali@cyberpath:~$</span>
<input id="labInput" type="text" autocomplete="off" autocorrect="off" spellcheck="false"
style="flex:1;min-width:0;background:transparent;border:none;outline:none;color:#e0e0e8;font-family:'JetBrains Mono',monospace;font-size:0.72rem;caret-color:#a78bfa"
placeholder="escribe un comando...">
<button id="labRun" style="background:rgba(167,139,250,0.15);border:1px solid rgba(167,139,250,0.3);color:#a78bfa;padding:4px 12px;border-radius:6px;font-size:0.68rem;cursor:pointer;font-family:inherit"><span id="labRunText">Ejecutar</span></button>
<button id="labHint" title="Pedir pista" style="background:rgba(255,149,0,0.1);border:1px solid rgba(255,149,0,0.25);color:#ff9500;padding:4px 10px;border-radius:6px;font-size:0.68rem;cursor:pointer;font-family:inherit"><i class="fa-solid fa-lightbulb"></i></button>
<button id="labReset" title="Reiniciar reto" style="background:rgba(255,85,85,0.1);border:1px solid rgba(255,85,85,0.2);color:#ff5555;padding:4px 10px;border-radius:6px;font-size:0.68rem;cursor:pointer;font-family:inherit"><i class="fa-solid fa-rotate-left"></i></button>
</div>
</div>
</div>
</div>
</div>
<!-- ═══ SVG DRAGON OVERLAY ═══ -->
<svg id="dragonSVG" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
style="position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:8;overflow:visible;opacity:0.6">
<defs>
<g id="DCabeza">
<path style="fill:#00bb55" d="M-28.9,-1.1L-28.55 -1.95Q-28.1 -3.1 -27.25 -2.95L-26.7 -2.95Q-27.7 -1.65 -28.9 -1.1M-18.35,-1.8Q-15.1 -10.3 -9.6 -6.05Q-15.1 -6.2 -18.35 -1.8M-18.35,1.1Q-15.1 5.45 -9.6 5.35Q-15.1 9.55 -18.35 1.1M-26.7,2.2L-27.25 2.25Q-28.1 2.4 -28.55 1.2L-28.9 0.35Q-27.7 0.9 -26.7 2.2"/>
<path style="fill:#00ff88" d="M-21.05,-8.25Q-13.6 -15.95 -1.3 -12.1Q-7.85 -8.5 -5.85 -4.35Q-2.3 -4.85 10.5 0.15Q0 4.35 -5.85 3.65Q-7.85 7.75 -1.25 12.45Q-13.6 15.2 -21.05 7.5Q-29.55 4.05 -30.2 -0.35Q-29.55 -4.8 -21.05 -8.25M-26.7,-2.95L-27.25 -2.95Q-28.1 -3.1 -28.55 -1.95L-28.9 -1.1Q-27.7 -1.65 -26.7 -2.95M-9.6,-6.05Q-15.1 -10.3 -18.35 -1.8Q-15.1 -6.2 -9.6 -6.05M-9.6,5.35Q-15.1 5.45 -18.35 1.1Q-15.1 9.55 -9.6 5.35M-28.9,0.35L-28.55 1.2Q-28.1 2.4 -27.25 2.25L-26.7 2.2Q-27.7 0.9 -28.9 0.35"/>
</g>
<g id="DAletas">
<linearGradient id="DG1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.0935974,0,0,0.188782,-20.55,0)" x1="-819.2" y1="0" x2="819.2" y2="0">
<stop offset="0" style="stop-color:#00ff88;stop-opacity:1"/>
<stop offset="1" style="stop-color:#00cc44;stop-opacity:1"/>
</linearGradient>
<path style="fill:url(#DG1)" d="M29.75,-36.85Q-17.75 -61.45 -42.05 -40.95L-45.35 -38.35L-53.7 -41.15L-51.15 -44.85Q-34.85 -68.4 21 -57.8Q-32.2 -72.1 -50.25 -50Q-53.85 -45.65 -56.05 -41.95L-64.7 -43.35L-60.6 -50.3Q-45.9 -75.55 5.1 -79.35Q-2.2 -79.8 -9.45 -79.15Q-16.2 -78.55 -22.85 -77.15Q-29.85 -75.65 -36.5 -73Q-43.05 -70.4 -48.8 -66.85Q-54.55 -63.35 -56.8 -60.3L-60.5 -55.4Q-62.95 -52.1 -67 -43.55L-70.55 -43.55L-76.35 -42.95Q-74.6 -49.1 -71.85 -54.85Q-68.9 -61.25 -64.8 -67.1Q-60.8 -73 -55.45 -77.55Q-49.9 -82.35 -43.65 -85.85L-30.6 -92.7Q-24.05 -95.95 -17 -98.25Q-63.75 -86.35 -73.65 -57.1Q-75.75 -50.75 -77.45 -42.75Q-82.9 -41.75 -88 -39.65Q-87.65 -46.65 -86.3 -53.05Q-79.8 -89.8 -36.65 -117.2Q-80.65 -94.5 -87.55 -59.55Q-88.65 -54.15 -88.95 -39.4L-89.8 -38.85L-92.7 -37.6Q-93.75 -44.35 -94.1 -51.15Q-94.4 -58.2 -93.25 -65.1Q-92.15 -72.5 -90.05 -79.65Q-88.05 -86.55 -85 -93Q-82.1 -99.3 -78.45 -105.15Q-74.6 -111.35 -70.25 -117.25Q-65.95 -123.1 -61.1 -128.55Q-70.3 -119.35 -77.9 -108.7Q-86 -97.3 -90.8 -84.05Q-95.8 -70.5 -96 -56.15Q-96.1 -46 -94.05 -36.05L-93.25 -31.55Q-93.5 -35.65 -92.35 -36Q-79.85 -42 -66.6 -40.45Q-52.45 -38.85 -39.2 -33.25Q-28.3 -29.9 -21.25 -24.15Q-17.8 -23.3 -8.6 -15.6Q-12.1 -20.75 -16.75 -24.5Q-24.55 -30.7 -34.25 -34.05L-42.55 -37Q-38.9 -41.25 -31.5 -43.25Q-24.05 -45.3 -16.2 -46.3Q-8.35 -47.35 -1 -46Q5.95 -44.75 12.75 -42.85Q19.85 -40.9 29.75 -36.85M-92.45,-27.35L-94.95 -36.25Q-109.7 -105 -27.95 -154.65Q-98.65 -103.8 -91.75 -39.4L-89.95 -40.2Q-92.2 -105.25 -5.6 -130.9Q-78.8 -99.95 -87.45 -40.9Q-83.15 -42.95 -78.45 -43.95Q-70 -101.3 17.65 -103.8Q-56.9 -93.4 -74.5 -44.55L-67.4 -45.45Q-49.1 -94.95 39.25 -75.65Q-36.75 -84.35 -62.25 -44.25L-57.3 -43.6Q-31.65 -86.5 56.15 -46.05Q-20.3 -73.35 -51.35 -41.7L-45.95 -39.75Q-17.85 -71.35 51.85 -24.8Q-8.7 -56.4 -39.75 -37.05Q-28.15 -34.05 -14.25 -24.45Q-8.6 -19.85 -5.8 -16.95Q5.95 -2.4 20 0Q5.95 2.4 -5.8 16.95Q-8.6 19.85 -14.25 24.45Q-28.15 34.05 -39.75 37.05Q-8.7 56.4 51.85 24.8Q-17.85 71.35 -45.95 39.75L-51.35 41.7Q-20.3 73.35 56.15 46.1Q-31.65 86.5 -57.3 43.65L-62.25 44.3Q-36.75 84.35 39.25 75.7Q-49.1 94.95 -67.4 45.5L-74.5 44.6Q-56.9 93.4 17.65 103.85Q-70 101.3 -78.45 43.95Q-83.15 42.95 -87.45 40.9Q-78.8 99.95 -5.6 130.9Q-92.2 105.25 -89.95 40.25L-91.75 39.4Q-98.65 103.8 -27.95 154.65Q-109.7 105 -94.95 36.3L-92.45 27.35Q-93.05 33.9 -92.05 34.75Q-91.1 35.55 -88.95 36.7L-87.95 37Q-83.7 38.25 -79.05 38.8L-77.25 38.95Q-72.55 39.3 -67.5 38.85L-65.45 38.65Q-44.4 36.05 -17.8 19.6Q-9.9 12.8 -15.15 4.4Q-18.15 3.15 -19 0Q-18.15 -3.15 -15.15 -4.4Q-9.9 -12.8 -17.8 -19.6L-17.8 -19.55Q-44.4 -36.05 -65.45 -38.6L-67.5 -38.8Q-72.55 -39.3 -77.25 -38.95L-79.05 -38.75Q-83.7 -38.25 -87.95 -36.95L-88.95 -36.65Q-91.1 -35.55 -92.05 -34.7Q-93.05 -33.9 -92.45 -27.35M-8.6,15.6Q-17.8 23.3 -21.25 24.2Q-28.3 29.9 -39.2 33.3Q-52.45 38.85 -66.6 40.5Q-79.85 42 -92.35 36Q-93.5 35.65 -93.25 31.55L-94.05 36.1Q-96.1 46.05 -96 56.15Q-95.8 70.5 -90.8 84.1Q-86 97.3 -77.9 108.75Q-70.3 119.35 -61.1 128.6Q-65.95 123.1 -70.25 117.25Q-74.6 111.35 -78.45 105.15Q-82.1 99.3 -85 93Q-88.05 86.55 -90.05 79.7Q-92.15 72.5 -93.25 65.1Q-94.4 58.2 -94.1 51.2Q-93.75 44.35 -92.7 37.6L-89.8 38.9L-88.95 39.45Q-88.65 54.15 -87.55 59.55Q-80.65 94.5 -36.65 117.25Q-79.8 89.8 -86.3 53.1Q-87.65 46.65 -88 39.65Q-82.9 41.75 -77.45 42.75Q-75.75 50.75 -73.65 57.15Q-63.75 86.35 -17 98.3Q-24.05 95.95 -30.6 92.75L-43.65 85.9Q-49.9 82.35 -55.45 77.6Q-60.8 73 -64.8 67.15Q-68.9 61.25 -71.85 54.85Q-74.6 49.1 -76.35 42.95L-70.55 43.6L-67 43.6Q-62.95 52.1 -60.5 55.4L-56.8 60.35Q-54.55 63.35 -48.8 66.9Q-43.05 70.4 -36.5 73Q-29.85 75.65 -22.85 77.15Q-16.2 78.55 -9.45 79.15Q-2.2 79.8 5.1 79.35Q-45.9 75.55 -60.6 50.3L-64.7 43.4L-56.05 41.95Q-53.85 45.65 -50.25 50Q-32.2 72.1 21 57.85Q-34.85 68.4 -51.15 44.85L-53.7 41.2L-45.35 38.35L-42.05 40.95Q-17.75 61.45 29.75 36.85Q19.85 40.9 12.75 42.9Q5.95 44.75 -1 46Q-8.35 47.35 -16.2 46.35Q-24.05 45.3 -31.5 43.3Q-38.9 41.25 -42.55 37.05L-34.25 34.05Q-24.55 30.7 -16.75 24.5Q-12.1 20.75 -8.6 15.6"/>
</g>
<g id="DEspina">
<linearGradient id="DG2" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.0229492,0,0,-0.0152893,0,0.05)" x1="-819.2" y1="0" x2="819.2" y2="0">
<stop offset="0" style="stop-color:#00ff88;stop-opacity:1"/>
<stop offset="1" style="stop-color:#00cc55;stop-opacity:1"/>
</linearGradient>
<path style="fill:url(#DG2)" d="M-18.8,0Q-17.85 -5.7 -12.3 -9.6Q-11.2 -5.35 -6.5 -8.25L-6.45 -8.2L-6.2 -8.3Q1.25 -16.25 6.65 -12.4Q0.05 -12.55 0 -5.95Q2.7 -2.4 7.75 -4.1Q18 -1.45 18.8 0L-18.8 0"/>
<linearGradient id="DG3" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.0229492,0,0,0.0152893,0,-0.05)" x1="-819.2" y1="0" x2="819.2" y2="0">
<stop offset="0" style="stop-color:#00ff88;stop-opacity:1"/>
<stop offset="1" style="stop-color:#00cc55;stop-opacity:1"/>
</linearGradient>
<path style="fill:url(#DG3)" d="M18.8,0Q18 1.45 7.75 4.1Q2.7 2.4 0 5.95Q0.05 12.55 6.65 12.4Q1.25 16.25 -6.2 8.35Q-6.35 8.25 -6.45 8.25L-6.5 8.25Q-11.2 5.35 -12.3 9.6Q-17.85 5.7 -18.8 0L18.8 0"/>
</g>
</defs>
<g id="dragonScreen" filter="drop-shadow(0 0 6px #00ff88)"></g>
</svg>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
<script>
/* =====================================================================
PRETEXT-LITE — Inspirado en @chenglou/pretext (MIT)
Medición de texto sin DOM reflow, usando canvas measureText como
ground truth — exactamente el mismo enfoque que la librería original.
Permite dimensionar sprites y bubbles con precisión antes de renderizar.
===================================================================== */
const _ptCanvas = document.createElement('canvas');
const _ptCtx = _ptCanvas.getContext('2d');
const _ptCache = new Map();
function ptPrepare(text, font) {
const key = font + '||' + text;
if (_ptCache.has(key)) return _ptCache.get(key);
_ptCtx.font = font;
const words = text.split(/(\s+)/).filter(w => w.length > 0);
const segs = words.map(w => ({
text: w,
width: _ptCtx.measureText(w).width,
isSpace: /^\s+$/.test(w)
}));
const r = { text, font, segs };
_ptCache.set(key, r);
return r;
}
// Pretext: layout() → altura exacta sin tocar el DOM
function ptLayout(prepared, maxWidth, lineH) {
let lines = 0, curW = 0;
for (const s of prepared.segs) {
if (s.isSpace) { if (curW > 0) curW += s.width; continue; }
if (curW + s.width > maxWidth && curW > 0) { lines++; curW = s.width; }
else curW += s.width;
}
if (curW > 0) lines++;
return { height: lines * lineH, lineCount: lines };
}
// Pretext: layoutWithLines() → líneas reales para renderizar en canvas
function ptLayoutWithLines(prepared, maxWidth, lineH) {
const lines = []; let cur = [], curW = 0;
const flush = () => { if (cur.length) { lines.push({ text: cur.join(''), width: curW }); cur = []; curW = 0; } };
for (const s of prepared.segs) {
if (s.isSpace && curW === 0) continue;
if (!s.isSpace && curW + s.width > maxWidth && curW > 0) flush();
cur.push(s.text); curW += s.width;
}
flush();
return { lines, height: lines.length * lineH, lineCount: lines.length };
}
// Pretext: measureNaturalWidth() → ancho intrínseco para badges y sprites
function ptNaturalWidth(prepared) {
return prepared.segs.reduce((mx, s) => Math.max(mx, s.width), 0);
}
// Pretext: walkLineRanges() con ancho variable — para el fuego del dragón
function ptWalkVariableLines(prepared, getWidth, lineH, onLine) {
let cur = [], curW = 0, lineIdx = 0;
const flush = () => {
if (cur.length) { onLine({ text: cur.join(''), width: curW, lineIdx }); cur = []; curW = 0; lineIdx++; }
};
for (const s of prepared.segs) {
const mw = getWidth(lineIdx);
if (s.isSpace && curW === 0) continue;
if (!s.isSpace && curW + s.width > mw && curW > 0) flush();
cur.push(s.text); curW += s.width;
}
flush();
}
/* =====================================================================
DATOS
===================================================================== */
const PLATFORMS = [
{ name:'TryHackMe', url:'https://tryhackme.com', domain:'tryhackme.com', level:0, desc:'Plataforma gamificada con rutas de aprendizaje guiadas y máquinas vulnerables en la nube.', reason:'Ideal para principiantes: interfaz amigable, tutoriales paso a paso, sin configuración local.', features:['Rutas estructuradas','Máquinas en la nube','Comunidad activa','Gratis + Premium'], type:'LMS + Labs', lang:'Inglés', price:'Freemium' },
{ name:'PicoCTF', url:'https://picoctf.org', domain:'picoctf.org', level:0, desc:'CTF educativo creado por Carnegie Mellon, perfecto para aprender jugando.', reason:'Retos progresivos con pistas, enfoque pedagógico, sin presión competitiva.', features:['CTF educativo','Pistas integradas','Sin registro obligatorio','100% gratuito'], type:'CTF', lang:'Inglés', price:'Gratis' },
{ name:'OverTheWire', url:'https://overthewire.org/wargames', domain:'overthewire.org', level:0, desc:'Wargames clásicos para aprender seguridad mediante la línea de comandos y exploits básicos.', reason:'Enseña fundamentos de Linux y redes desde cero, con progreso gradual.', features:['Enfoque en CLI','Niveles progresivos','Sin interfaz gráfica','Comunidad histórica'], type:'Wargames', lang:'Inglés', price:'Gratis' },
{ name:'OWASP Juice Shop', url:'https://juice-shop.github.io', domain:'owasp.org', level:0, desc:'Aplicación web vulnerable moderna que cubre las 10 vulnerabilidades OWASP Top 10.', reason:'Entorno seguro para practicar hacking web sin riesgos, con documentación excelente.', features:['OWASP Top 10','Docker/K8s ready','Scoreboard','Open Source'], type:'App Vulnerable', lang:'Multi', price:'Gratis' },
{ name:'Hacker101', url:'https://hacker101.com', domain:'hacker101.com', level:0, desc:'Cursos gratuitos de HackerOne para aprender bug bounty y seguridad web desde cero.', reason:'Contenido creado por expertos en bug bounty, enfocado en habilidades prácticas.', features:['Cursos en video','Retos prácticos','Certificados','Enfoque bug bounty'], type:'Cursos + CTF', lang:'Inglés', price:'Gratis' },
{ name:'CryptoHack', url:'https://cryptohack.org', domain:'cryptohack.org', level:0, desc:'Plataforma interactiva para aprender criptografía moderna mediante retos de código.', reason:'Introduce conceptos criptográficos con ejemplos prácticos y Python.', features:['Criptografía aplicada','Python integrado','Progreso gamificado','Comunidad Discord'], type:'Crypto CTF', lang:'Inglés', price:'Gratis' },
{ name:'Hack The Box', url:'https://hackthebox.com', domain:'hackthebox.com', level:1, desc:'Plataforma líder con máquinas vulnerables reales, CTFs y certificaciones profesionales.', reason:'Requiere conocimientos básicos de pentesting; menos guías, más investigación autónoma.', features:['Máquinas reales','Academy integrada','Certificaciones','Ranking global'], type:'Labs + CTF', lang:'Inglés', price:'Freemium' },
{ name:'PortSwigger', url:'https://portswigger.net/web-security', domain:'portswigger.net', level:1, desc:'Academy gratuita de los creadores de Burp Suite, con laboratorios de seguridad web.', reason:'Profundiza en vulnerabilidades web con teoría sólida y práctica guiada.', features:['Burp Suite integrado','Teoría + práctica','Certificación disponible','Actualizado constantemente'], type:'Academy Web', lang:'Inglés', price:'Gratis' },
{ name:'Root Me', url:'https://root-me.org', domain:'root-me.org', level:1, desc:'Plataforma francesa con +1000 retos de seguridad informática en múltiples categorías.', reason:'Variedad de desafíos que requieren aplicar conocimientos de forma creativa.', features:['1000+ retos','Múltiples categorías','Writeups comunitarios','Sin costo'], type:'Challenge Platform', lang:'FR/EN', price:'Gratis' },
{ name:'PentesterLab', url:'https://pentesterlab.com', domain:'pentesterlab.com', level:1, desc:'Ejercicios prácticos enfocados en vulnerabilidades web y metodologías de pentesting.', reason:'Enseña el cómo y por qué de cada exploit, ideal para consolidar conocimientos.', features:['Ejercicios guiados','Badges de progreso','Enfoque metodológico','Pro + Free'], type:'Hands-on Labs', lang:'Inglés', price:'Freemium' },
{ name:'CTFChallenge', url:'https://ctfchallenge.co.uk', domain:'ctfchallenge.co.uk', level:1, desc:'Agregador de CTFs con calendario, writeups y recursos para competidores.', reason:'Ayuda a transicionar de aprendizaje guiado a competencia real.', features:['Calendario CTF','Writeups','Recursos de estudio','Comunidad activa'], type:'CTF Aggregator', lang:'Inglés', price:'Gratis' },
{ name:'YesWeHack DOJO', url:'https://dojo-yeswehack.com', domain:'yeswehack.com', level:1, desc:'Entrenamiento en bug bounty con escenarios reales y metodología profesional.', reason:'Puente entre aprendizaje y bug bounty real, con enfoque en reportes profesionales.', features:['Escenarios reales','Metodología pro','Preparación bug bounty','Plataforma europea'], type:'Bug Bounty Training', lang:'EN/FR', price:'Freemium' },
{ name:'VulnHub', url:'https://vulnhub.com', domain:'vulnhub.com', level:2, desc:'Repositorio de máquinas vulnerables para descargar y practicar en entorno local.', reason:'Requiere configurar laboratorios propios; ideal para simular entornos reales.', features:['Máquinas descargables','Sin límites de tiempo','Comunidad de creadores','100% offline'], type:'VM Repository', lang:'Inglés', price:'Gratis' },
{ name:'crAPI (OWASP)', url:'https://github.com/OWASP/crAPI', domain:'github.com', level:2, desc:'Aplicación de referencia vulnerable para practicar seguridad en APIs modernas.', reason:'Enfocado en APIs REST/GraphQL, requiere conocimientos de arquitectura avanzada.', features:['APIs vulnerables','Docker/K8s','OWASP API Top 10','Open Source'], type:'API Security Lab', lang:'Multi', price:'Gratis' },
{ name:'Metasploitable 3', url:'https://github.com/rapid7/metasploitable3', domain:'rapid7.com', level:2, desc:'Máquina vulnerable diseñada para probar herramientas de pentesting como Metasploit.', reason:'Entorno complejo con múltiples servicios vulnerables; requiere análisis profundo.', features:['Múltiples vectores','Integración Metasploit','Documentación técnica','Enterprise focus'], type:'Vulnerable VM', lang:'Inglés', price:'Gratis' },
{ name:'APIsec University', url:'https://apisecuniversity.com', domain:'apisecuniversity.com', level:2, desc:'Cursos especializados en seguridad de APIs con laboratorios prácticos y certificaciones.', reason:'Contenido avanzado para profesionales que trabajan con arquitecturas modernas.', features:['Cursos especializados','Labs prácticos','Certificación','Enfoque enterprise'], type:'API Security Academy', lang:'Inglés', price:'Freemium' },
{ name:'Google CTF', url:'https://capturetheflag.withgoogle.com', domain:'google.com', level:2, desc:'CTF anual de Google con desafíos de nivel mundial en criptografía, reversing y exploits.', reason:'Retos diseñados por ingenieros de Google; requieren pensamiento creativo avanzado.', features:['Desafíos de élite','Tecnologías Google','Writeups oficiales','Competencia global'], type:'Elite CTF', lang:'Inglés', price:'Gratis' },
{ name:'Hacking Hub', url:'https://hackinghub.io', domain:'hackinghub.io', level:2, desc:'Plataforma emergente con laboratorios de pentesting y rutas de certificación avanzada.', reason:'Contenido para quienes buscan especializarse en seguridad ofensiva avanzada.', features:['Rutas especializadas','Labs realistas','Mentoría disponible','Enfoque certificaciones'], type:'Advanced Labs', lang:'Inglés', price:'Premium' },
];
const LANG_STORAGE_KEY = 'cyberpath_lang';
let currentLang = (localStorage.getItem(LANG_STORAGE_KEY) || 'es') === 'en' ? 'en' : 'es';
const UI_STRINGS = {
es: {
pageTitle: 'CyberPath — Dragon Edition',
headerSubtitle: 'Roadmap interactivo · 18 plataformas',
tooltipAction: 'Abrir plataforma',
levelNames: ['PRINCIPIANTE', 'INTERMEDIO', 'AVANZADO'],
levelLabels: ['Principiante', 'Intermedio', 'Avanzado'],
levelModalTitle: 'Criterios de Nivel',
levelCards: [
{
title: 'Principiante',
audience: 'Personas sin experiencia previa en ciberseguridad.',
finding: 'Tutoriales guiados, conceptos básicos y retos con pistas.',
bullets: ['Sin necesidad de conocimientos técnicos previos', 'Entornos controlados y seguros', 'Fundamentos: Linux, redes y web básica'],
},
{
title: 'Intermedio',
audience: 'Quienes dominan lo básico y buscan escenarios más realistas.',
finding: 'Máquinas vulnerables, CTFs y laboratorios de explotación web.',
bullets: ['Requiere terminal, HTTP y scripting básico', 'Herramientas profesionales como Burp, Nmap y Metasploit'],
},
{
title: 'Avanzado',
audience: 'Profesionales que buscan simular entornos de producción reales.',
finding: 'Infraestructuras complejas, exploits e ingeniería inversa.',
bullets: ['Requiere dominio de redes, sistemas y programación', 'Preparación para OSCP, OSCE y rutas similares'],
},
],
hint: 'Arrastra para rotar · Click para visitar · El dragón revela cada plataforma',
dragonBoot: 'Despegando...',
dragonPatrol: 'Patrullando la red...',
dragonStealth: 'En modo stealth...',
controls: {
info: '¿Por qué estos niveles?',
menu: 'Abrir menú',
pdf: 'Ver PDF',
reset: 'Reiniciar vista',
auto: 'Auto-rotar',
dragon: 'Mostrar u ocultar dragón',
lab: 'Laboratorio de retos',
},
preview: {
description: 'Descripción',
reason: '¿Por qué este nivel?',
features: 'Características',
meta: 'Info Técnica',
domain: 'Dominio',
type: 'Tipo',
language: 'Idioma',
price: 'Precio',
visit: 'Visitar Plataforma',
},
pdf: {
title: 'CyberPath PDF',
intro: 'Consulta la versión visual del roadmap sin salir de la web.',
open: 'Abrir en nueva pestaña',
download: 'Descargar PDF',
loading: 'Cargando PDF...',
viewerHint: 'Si el navegador bloquea el visor embebido, igual podrás abrirlo o descargarlo.',
fallback: 'Este navegador no pudo renderizar el PDF dentro de la página.',
zoomOut: 'Reducir zoom',
zoomReset: 'Ajustar al ancho',
zoomIn: 'Aumentar zoom',
fullscreen: 'Pantalla completa',
rendering: (page, total) => `Renderizando página ${page} de ${total}...`,
ready: total => `${total} páginas listas · desplázate para explorar`,
},
lab: {
title: 'Laboratorio de Retos',
theorySubtitle: '📚 CLASE MAGISTRAL',
theoryLearn: '¿Qué vas a aprender?',
theoryPoints: 'Conceptos clave',
theoryTools: 'Comandos / Herramientas',
theoryWhy: '¿Por qué importa en ciberseguridad?',
theoryStart: '¡Entendido — Comenzar Reto!',
theoryToggle: 'Teoría',
theoryToggleTitle: 'Ver clase magistral',
inputPlaceholder: 'escribe un comando...',
run: 'Ejecutar',
hintTitle: 'Pedir pista',
resetTitle: 'Reiniciar reto',
lockedPrefix: 'Completa primero:',
unlocked: 'LABORATORIO DESBLOQUEADO',
allDone: '¡TODOS LOS LABORATORIOS COMPLETADOS!',
hintPrefix: '💡 Pista:',
unknown: 'Escribe help para ver comandos disponibles',
},
platformLabel: n => `PLATAFORMA #${n}`,
},
en: {
pageTitle: 'CyberPath — Dragon Edition',
headerSubtitle: 'Interactive roadmap · 18 platforms',
tooltipAction: 'Open platform',
levelNames: ['BEGINNER', 'INTERMEDIATE', 'ADVANCED'],
levelLabels: ['Beginner', 'Intermediate', 'Advanced'],
levelModalTitle: 'Level Criteria',
levelCards: [
{
title: 'Beginner',
audience: 'People with no previous cybersecurity experience.',
finding: 'Guided tutorials, core concepts, and hint-driven challenges.',
bullets: ['No previous technical knowledge required', 'Safe and controlled environments', 'Fundamentals: Linux, networking, and basic web security'],
},
{
title: 'Intermediate',
audience: 'People who know the basics and want more realistic scenarios.',
finding: 'Vulnerable machines, CTFs, and web exploitation labs.',
bullets: ['Requires terminal, HTTP, and basic scripting', 'Professional tooling like Burp, Nmap, and Metasploit'],
},
{
title: 'Advanced',
audience: 'Professionals who want to simulate real production environments.',
finding: 'Complex infrastructure, exploits, and reverse engineering.',
bullets: ['Requires strong networking, systems, and programming skills', 'Great preparation for OSCP, OSCE, and similar tracks'],
},
],
hint: 'Drag to rotate · Click to inspect · The dragon reveals each platform',
dragonBoot: 'Booting up...',
dragonPatrol: 'Patrolling the network...',
dragonStealth: 'Stealth mode...',
controls: {
info: 'Why these levels?',
menu: 'Open menu',
pdf: 'Open PDF',
reset: 'Reset view',
auto: 'Auto-rotate',
dragon: 'Toggle dragon',
lab: 'Challenge lab',
},
preview: {
description: 'Description',
reason: 'Why this level?',
features: 'Features',
meta: 'Technical Info',
domain: 'Domain',
type: 'Type',
language: 'Language',
price: 'Price',
visit: 'Visit Platform',
},
pdf: {
title: 'CyberPath PDF',
intro: 'Read the visual roadmap companion without leaving the site.',
open: 'Open in new tab',
download: 'Download PDF',
loading: 'Loading PDF...',
viewerHint: 'If the browser blocks the embedded viewer, you can still open or download the PDF.',
fallback: 'This browser could not render the PDF inside the page.',
zoomOut: 'Zoom out',
zoomReset: 'Fit to width',
zoomIn: 'Zoom in',
fullscreen: 'Full screen',
rendering: (page, total) => `Rendering page ${page} of ${total}...`,
ready: total => `${total} pages ready · scroll to explore`,
},
lab: {
title: 'Challenge Lab',
theorySubtitle: '📚 MASTERCLASS',
theoryLearn: 'What will you learn?',
theoryPoints: 'Key concepts',
theoryTools: 'Commands / Tools',
theoryWhy: 'Why does it matter in cybersecurity?',
theoryStart: 'Got it — Start Challenge!',
theoryToggle: 'Theory',
theoryToggleTitle: 'View masterclass',
inputPlaceholder: 'type a command...',
run: 'Run',
hintTitle: 'Get a hint',
resetTitle: 'Reset challenge',
lockedPrefix: 'Complete first:',
unlocked: 'LAB UNLOCKED',
allDone: 'ALL LABS COMPLETED!',
hintPrefix: '💡 Hint:',
unknown: 'Type help to see available commands',
},
platformLabel: n => `PLATFORM #${n}`,
},
};
const PLATFORM_I18N = {
'TryHackMe': { en: { desc:'Gamified platform with guided learning paths and cloud-based vulnerable machines.', reason:'Great for beginners: friendly interface, step-by-step tutorials, and no local setup required.', features:['Structured paths','Cloud labs','Active community','Free + Premium'], lang:'English' } },
'PicoCTF': { en: { desc:'Educational CTF created by Carnegie Mellon, perfect for learning by playing.', reason:'Progressive challenges with hints, a teaching-first approach, and low competitive pressure.', features:['Educational CTF','Built-in hints','No mandatory registration','100% free'], lang:'English', price:'Free' } },
'OverTheWire': { en: { desc:'Classic wargames to learn security through the command line and basic exploits.', reason:'Teaches Linux and networking fundamentals from scratch with gradual progression.', features:['CLI focused','Progressive levels','No graphical UI','Long-standing community'], lang:'English', price:'Free' } },
'OWASP Juice Shop': { en: { desc:'Modern deliberately vulnerable web application covering the OWASP Top 10.', reason:'A safe environment to practice web hacking with excellent documentation.', features:['OWASP Top 10','Docker/K8s ready','Scoreboard','Open source'], price:'Free' } },
'Hacker101': { en: { desc:'Free HackerOne courses to learn bug bounty and web security from zero.', reason:'Created by bug bounty experts and focused on practical skills.', features:['Video courses','Hands-on challenges','Certificates','Bug bounty focus'], lang:'English', price:'Free' } },
'CryptoHack': { en: { desc:'Interactive platform to learn modern cryptography through coding challenges.', reason:'Introduces cryptographic concepts with practical Python examples.', features:['Applied cryptography','Built-in Python','Gamified progress','Discord community'], lang:'English', price:'Free' } },
'Hack The Box': { en: { desc:'Leading platform with real vulnerable machines, CTFs, and professional certifications.', reason:'Requires some pentesting knowledge; fewer guides, more independent research.', features:['Real machines','Integrated Academy','Certifications','Global ranking'], lang:'English' } },
'PortSwigger': { en: { desc:'Free academy from the creators of Burp Suite packed with web security labs.', reason:'Dives deep into web vulnerabilities with solid theory and guided practice.', features:['Burp Suite integrated','Theory + practice','Certification available','Continuously updated'], lang:'English', price:'Free' } },
'Root Me': { en: { desc:'French platform with 1000+ security challenges across many categories.', reason:'Wide variety of challenges that force you to apply knowledge creatively.', features:['1000+ challenges','Multiple categories','Community write-ups','Free'], price:'Free' } },
'PentesterLab': { en: { desc:'Hands-on exercises focused on web vulnerabilities and pentesting methodology.', reason:'Teaches the how and why behind each exploit, perfect for consolidating knowledge.', features:['Guided exercises','Progress badges','Methodology-focused','Pro + Free'], lang:'English' } },
'CTFChallenge': { en: { desc:'CTF aggregator with calendar, write-ups, and resources for competitors.', reason:'Helps bridge guided learning and real competition.', features:['CTF calendar','Write-ups','Study resources','Active community'], lang:'English', price:'Free' } },
'YesWeHack DOJO': { en: { desc:'Bug bounty training with realistic scenarios and professional methodology.', reason:'A bridge between learning and real bug bounty work, with a strong reporting mindset.', features:['Realistic scenarios','Pro methodology','Bug bounty prep','European platform'] } },
'VulnHub': { en: { desc:'Repository of vulnerable machines to download and practice locally.', reason:'Requires building your own lab and is ideal for simulating real-world environments.', features:['Downloadable machines','No time limits','Creator community','100% offline'], lang:'English', price:'Free' } },
'crAPI (OWASP)': { en: { desc:'Reference vulnerable application for practicing modern API security.', reason:'Focused on REST and GraphQL APIs, and aimed at more advanced architecture work.', features:['Vulnerable APIs','Docker/K8s','OWASP API Top 10','Open source'], price:'Free' } },
'Metasploitable 3': { en: { desc:'Vulnerable machine built to test pentesting tools such as Metasploit.', reason:'Complex environment with multiple vulnerable services that requires deeper analysis.', features:['Multiple attack paths','Metasploit integration','Technical docs','Enterprise focus'], lang:'English', price:'Free' } },
'APIsec University': { en: { desc:'Specialized API security courses with hands-on labs and certifications.', reason:'Advanced content for professionals working with modern architectures.', features:['Specialized courses','Hands-on labs','Certification','Enterprise focus'], lang:'English' } },
'Google CTF': { en: { desc:'Google’s annual CTF with world-class crypto, reversing, and exploit challenges.', reason:'Challenges designed by Google engineers and built for advanced creative thinking.', features:['Elite challenges','Google tech','Official write-ups','Global competition'], lang:'English', price:'Free' } },
'Hacking Hub': { en: { desc:'Emerging platform with pentesting labs and advanced certification paths.', reason:'Built for learners who want to specialize in advanced offensive security.', features:['Specialized paths','Realistic labs','Mentorship available','Certification focus'], lang:'English' } },
};
function getStrings() {
return UI_STRINGS[currentLang];
}
function getLevelName(level) {
return getStrings().levelNames[level];
}
function getLevelLabel(level) {
return getStrings().levelLabels[level];
}
function getPlatformCopy(platform) {
if (currentLang === 'es') return platform;
const translated = PLATFORM_I18N[platform.name]?.[currentLang];
return translated ? { ...platform, ...translated } : platform;
}
function getLabCopy(lab) {
if (currentLang === 'es') return lab;
const translated = LAB_I18N[lab.id]?.[currentLang];
if (!translated) return lab;
return {
...lab,
...translated,
theory: translated.theory ? { ...lab.theory, ...translated.theory } : lab.theory,
commands: translated.commands ? { ...lab.commands, ...translated.commands } : lab.commands,
};
}
const HACKING_GLYPHS = [
'nmap -sV','0x41424344','/bin/sh','nc -lvp 4444',
'chmod +x','grep -rn','sudo su -','iptables -F',
'cat /etc/passwd','hydra -l root','sqlmap --dbs','john --show',
'curl -X POST','wget --no-check','tcpdump -i eth0','ps aux',
'rm -rf /tmp','python3 -m http','bash -i >&','msfconsole',
'nikto -h 127.0.0.1','dirb http://','>/dev/null 2>&1','kill -9',
'gcc -o exploit','objdump -d','./exploit.py','pwndbg> r',
'ROPgadget','checksec --file','readelf -a','strings binary',
'binwalk -e','volatility -f','strace -p','ltrace',
'hashcat -a 0','airmon-ng','ettercap -T','mitmproxy',
'john --wordlist','crunch 8 8','medusa -h','netcat -e',
'xxd binary','hexdump -C','base64 -d','openssl enc',
];
const DRAGON_MSGS = [
'> Analizando red...', '> Escaneando puertos...', '> Root obtenido!',
'> Exploit ejecutado.', '> Hash crackeado!', '> Escalando privilegios...',
'> Shell reversa lista.', '> Payload inyectado.', '> Bypass UAC OK.',
'> Exfiltrando datos...', '> Persistencia instalada.', '> Covering tracks...',
];
const LEVEL_COLORS = ['#00ff88', '#ff9500', '#ff5555'];
const LEVEL_NAMES = ['PRINCIPIANTE', 'INTERMEDIO', 'AVANZADO'];
const SX = 4.6, SZ = 6.5;
const GRID_POS = [
[-2.5*SX,0,-SZ],[-1.5*SX,0,-SZ],[-0.5*SX,0,-SZ],[0.5*SX,0,-SZ],[1.5*SX,0,-SZ],[2.5*SX,0,-SZ],
[2.5*SX,0,0],[1.5*SX,0,0],[0.5*SX,0,0],[-0.5*SX,0,0],[-1.5*SX,0,0],[-2.5*SX,0,0],
[-2.5*SX,0,SZ],[-1.5*SX,0,SZ],[-0.5*SX,0,SZ],[0.5*SX,0,SZ],[1.5*SX,0,SZ],[2.5*SX,0,SZ]
];
let W = window.innerWidth, H = window.innerHeight, aspect = W/H, BASE_F = 34;
const renderer = new THREE.WebGLRenderer({antialias:true, alpha:true});
renderer.setSize(W,H); renderer.setPixelRatio(Math.min(devicePixelRatio,1.5));
renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFSoftShadowMap;
document.body.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x050510);
scene.fog = new THREE.FogExp2(0x050510, 0.011);
const camera = new THREE.OrthographicCamera(-BASE_F*aspect/2,BASE_F*aspect/2,BASE_F/2,-BASE_F/2,-200,200);
scene.add(new THREE.AmbientLight(0x0d0d25, 1.2));
const sun = new THREE.DirectionalLight(0xffffff, 0.7);
sun.position.set(15,25,15); sun.castShadow=true; sun.shadow.mapSize.set(1024,1024); scene.add(sun);
const glow0=new THREE.PointLight(0x00ff88,2.5,28); glow0.position.set(-10,4,-8); scene.add(glow0);
const glow1=new THREE.PointLight(0xff9500,2,28); glow1.position.set(10,4,0); scene.add(glow1);
const glow2=new THREE.PointLight(0xff5555,2,28); glow2.position.set(-10,4,8); scene.add(glow2);
const gridH=new THREE.GridHelper(70,35,0x0d0d25,0x080818); gridH.position.y=-0.55; scene.add(gridH);
/* =====================================================================
PLATAFORMAS (igual que original)
===================================================================== */
const PLATFORM_ABBR = {
'TryHackMe': 'THM',
'PicoCTF': 'piCo',
'OverTheWire': 'OTW',
'OWASP Juice Shop': 'OWS',
'Hacker101': 'H101',
'CryptoHack': 'CRYP',
'Hack The Box': 'HTB',
'PortSwigger': 'PSW',
'Root Me': 'R-ME',
'PentesterLab': 'PLB',
'CTFChallenge': 'CTC',
'YesWeHack DOJO': 'YWH',
'VulnHub': 'VHB',
'crAPI (OWASP)': 'API',
'Metasploitable 3': 'MS3',
'APIsec University':'APIsec',
'Google CTF': 'GCTF',
'Hacking Hub': 'HUB',
};
function makeLogoTexture(p) {
const S = 128, col = LEVEL_COLORS[p.level];
const cv = document.createElement('canvas'); cv.width = cv.height = S;
const cx = cv.getContext('2d');
cx.fillStyle = '#07071a'; cx.fillRect(0, 0, S, S);
const pad = 7, r = 18;
cx.beginPath();
cx.moveTo(pad+r,pad); cx.lineTo(S-pad-r,pad); cx.arcTo(S-pad,pad,S-pad,pad+r,r);
cx.lineTo(S-pad,S-pad-r); cx.arcTo(S-pad,S-pad,S-pad-r,S-pad,r);
cx.lineTo(pad+r,S-pad); cx.arcTo(pad,S-pad,pad,S-pad-r,r);
cx.lineTo(pad,pad+r); cx.arcTo(pad,pad,pad+r,pad,r);
cx.closePath();
cx.fillStyle = col+'18'; cx.fill();
cx.strokeStyle = col; cx.lineWidth = 3.5;
cx.shadowBlur = 14; cx.shadowColor = col; cx.stroke(); cx.shadowBlur = 0;
[[pad+5,pad+5],[S-pad-5,pad+5],[S-pad-5,S-pad-5],[pad+5,S-pad-5]].forEach(([dx,dy])=>{
cx.beginPath(); cx.arc(dx,dy,2.8,0,Math.PI*2); cx.fillStyle=col+'99'; cx.fill();
});
const abbr = PLATFORM_ABBR[p.name] || p.name.slice(0,3).toUpperCase();
const fs = abbr.length <= 3 ? 40 : abbr.length <= 4 ? 30 : 22;
cx.font = `bold ${fs}px 'JetBrains Mono',monospace`;
cx.textAlign = 'center'; cx.textBaseline = 'middle';
cx.shadowBlur = 18; cx.shadowColor = col;
cx.fillStyle = col; cx.fillText(abbr, S/2, S/2 - 4);
cx.shadowBlur = 0;
cx.strokeStyle = col+'55'; cx.lineWidth = 1;
cx.beginPath(); cx.moveTo(pad+16,S/2+fs/2+4); cx.lineTo(S-pad-16,S/2+fs/2+4); cx.stroke();
return new THREE.CanvasTexture(cv);
}
function makeNameSprite(text,color){
// PRETEXT: medimos el texto antes de crear el canvas — sin canvas desperdiciado
const font = `bold 22px 'JetBrains Mono',monospace`;
const prep = ptPrepare(text, font);
const tw = ptNaturalWidth(prep);
const W = Math.ceil(tw) + 20, H = 48;
const cv=document.createElement('canvas'); cv.width=W; cv.height=H;
const cx=cv.getContext('2d');cx.font=font;cx.textAlign='center';cx.textBaseline='middle';
cx.fillStyle=color;cx.globalAlpha=0.9;cx.fillText(text,W/2,H/2);
const tex=new THREE.CanvasTexture(cv);
const mat=new THREE.SpriteMaterial({map:tex,transparent:true,depthWrite:false});
const sp=new THREE.Sprite(mat);
// PRETEXT: scale basado en ancho medido — ratio exacto
sp.scale.set(W/76, H/76, 1);
return sp;
}
function makeNumSprite(n,color){
// PRETEXT: measureNaturalWidth para badge numérico exacto
const font=`bold 24px 'JetBrains Mono',monospace`;
const prep=ptPrepare(String(n), font);
const tw=ptNaturalWidth(prep);
const S=Math.ceil(tw)+20;
const cv=document.createElement('canvas');cv.width=S;cv.height=S;
const cx=cv.getContext('2d');cx.beginPath();cx.arc(S/2,S/2,S/2-2,0,Math.PI*2);
cx.fillStyle=color;cx.fill();cx.font=font;cx.textAlign='center';cx.textBaseline='middle';
cx.fillStyle='#050510';cx.fillText(String(n),S/2,S/2+1);
const tex=new THREE.CanvasTexture(cv);
const mat=new THREE.SpriteMaterial({map:tex,transparent:true,depthWrite:false});
const sp=new THREE.Sprite(mat);sp.scale.set(S/72,S/72,1);return sp;
}
const allPlatformGroups=[],hitObjects=[],platformWorldPos=[];
let time=0;
PLATFORMS.forEach((p,i)=>{
const[px,py,pz]=GRID_POS[i];
platformWorldPos.push(new THREE.Vector3(px,py,pz));
const col=new THREE.Color(LEVEL_COLORS[p.level]);
const colDark=col.clone().multiplyScalar(0.18);
const colGlow=col.clone().multiplyScalar(0.08);
const group=new THREE.Group();group.position.set(px,py,pz);group.userData={platform:p,idx:i,phase:Math.random()*Math.PI*2};
const pedestalG=new THREE.CylinderGeometry(1.55,1.75,0.45,6,1);
const pedestalM=new THREE.MeshLambertMaterial({color:colDark,emissive:colGlow});
const pedestal=new THREE.Mesh(pedestalG,pedestalM);pedestal.position.y=-0.22;pedestal.castShadow=true;group.add(pedestal);
const blockG=new THREE.BoxGeometry(2.75,0.85,2.75);
const blockM=new THREE.MeshLambertMaterial({color:new THREE.Color(0x0c0c20),emissive:colGlow});
const block=new THREE.Mesh(blockG,blockM);block.position.y=0.42;block.castShadow=true;block.receiveShadow=true;group.add(block);
const logoG=new THREE.PlaneGeometry(2.1,2.1);
const logoM=new THREE.MeshBasicMaterial({map:makeLogoTexture(p),transparent:true});
const logoFace=new THREE.Mesh(logoG,logoM);logoFace.rotation.x=-Math.PI/2;logoFace.position.y=0.86;group.add(logoFace);
const ringG=new THREE.RingGeometry(1.15,1.42,6);
const ringM=new THREE.MeshBasicMaterial({color:LEVEL_COLORS[p.level],transparent:true,opacity:0.45,side:THREE.DoubleSide});
const ring=new THREE.Mesh(ringG,ringM);ring.rotation.x=-Math.PI/2;ring.position.y=0.87;group.add(ring);group.userData.ring=ring;
for(let c=0;c<4;c++){const angle=(c/4)*Math.PI*2+Math.PI/4;const lineG=new THREE.BoxGeometry(0.04,0.88,0.04);const lineM=new THREE.MeshBasicMaterial({color:LEVEL_COLORS[p.level],transparent:true,opacity:0.3});const line=new THREE.Mesh(lineG,lineM);line.position.set(Math.cos(angle)*1.36,0.42,Math.sin(angle)*1.36);group.add(line);}
const nameSp=makeNameSprite(p.name,LEVEL_COLORS[p.level]);nameSp.position.set(0,-1.0,0);group.add(nameSp);
const numSp=makeNumSprite(i+1,LEVEL_COLORS[p.level]);numSp.position.set(1.55,1.55,0);group.add(numSp);