Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
1604 lines (1372 loc) · 63.9 KB
/
Copy pathindex.html
File metadata and controls
1604 lines (1372 loc) · 63.9 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">
<title>Log Analyzer</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%233b82f6' d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5C16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM2 2h10v2H2V2zm0 4h10v2H2V6zm0 4h6v2H2v-2z'/></svg>">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--bg-primary: #0a0f1a;
--bg-secondary: #111827;
--bg-card: #1a2234;
--bg-elevated: #243049;
--border-color: #2d3a52;
--border-hover: #3d4a62;
--text-primary: #e2e8f0;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--accent-primary: #3b82f6;
--accent-secondary: #60a5fa;
--accent-glow: rgba(59, 130, 246, 0.15);
--error-color: #f87171;
--error-bg: rgba(248, 113, 113, 0.1);
--warning-color: #fbbf24;
--warning-bg: rgba(251, 191, 36, 0.1);
--success-color: #34d399;
--success-bg: rgba(52, 211, 153, 0.1);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
font-size: 14px;
line-height: 1.6;
min-height: 100vh;
display: flex;
}
/* Scrollbar personalizado */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--border-hover);
}
/* Navegación lateral */
nav {
width: 260px;
background: var(--bg-secondary);
border-right: 1px solid var(--border-color);
padding: 1.5rem 1rem;
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.logo {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0 0.5rem;
margin-bottom: 2rem;
}
.logo svg {
width: 32px;
height: 32px;
color: var(--accent-primary);
}
.logo h1 {
font-size: 1.25rem;
font-weight: 700;
color: white;
}
.nav-button {
width: 100%;
text-align: left;
padding: 0.75rem 1rem;
border-radius: 8px;
border: none;
background: transparent;
color: var(--text-secondary);
font-family: inherit;
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.75rem;
transition: all 0.2s ease;
margin-bottom: 0.25rem;
}
.nav-button:hover {
background: var(--bg-card);
color: var(--text-primary);
}
.nav-button.active {
background: var(--bg-card);
color: white;
border-left: 3px solid var(--accent-primary);
padding-left: calc(1rem - 3px);
}
.nav-button i {
width: 20px;
text-align: center;
font-size: 1rem;
}
.nav-footer {
margin-top: auto;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
text-align: center;
font-size: 0.75rem;
color: var(--text-muted);
}
/* Contenido principal */
main {
flex: 1;
padding: 2rem;
overflow-y: auto;
background: linear-gradient(135deg, var(--bg-primary) 0%, #0d1424 100%);
}
.tab-content {
max-width: 1000px;
margin: 0 auto;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.tab-content.hidden {
display: none;
}
h2 {
font-size: 1.75rem;
font-weight: 700;
color: white;
margin-bottom: 0.5rem;
}
.subtitle {
color: var(--text-secondary);
margin-bottom: 1.5rem;
}
/* Tarjetas */
.card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 1rem;
transition: border-color 0.2s ease;
}
.card:hover {
border-color: var(--border-hover);
}
.card h3 {
font-size: 1.1rem;
font-weight: 600;
color: var(--accent-secondary);
margin-bottom: 0.75rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.card p {
color: var(--text-secondary);
}
.card code {
background: var(--bg-elevated);
padding: 2px 8px;
border-radius: 4px;
font-family: 'JetBrains Mono', monospace;
font-size: 0.85em;
color: var(--accent-secondary);
}
/* Grid de opciones en bienvenida */
.options-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1rem;
margin-top: 1.5rem;
}
.option-card {
background: var(--bg-elevated);
border: 1px solid var(--border-color);
border-radius: 10px;
padding: 1.25rem;
cursor: pointer;
transition: all 0.2s ease;
text-align: left;
}
.option-card:hover {
border-color: var(--accent-primary);
transform: translateY(-2px);
box-shadow: 0 4px 20px var(--accent-glow);
}
.option-card strong {
display: block;
color: white;
margin-bottom: 0.25rem;
}
.option-card span {
font-size: 0.85rem;
color: var(--text-muted);
}
/* Zona de drop */
#drop-zone {
border: 2px dashed var(--border-color);
border-radius: 12px;
padding: 2.5rem;
text-align: center;
transition: all 0.3s ease;
background: var(--bg-secondary);
}
#drop-zone.dragover {
border-color: var(--accent-primary);
background: var(--accent-glow);
}
#drop-zone p {
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
#drop-zone .file-info {
font-size: 0.8rem;
color: var(--text-muted);
margin-top: 0.5rem;
}
.btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.6rem 1.25rem;
border-radius: 8px;
font-family: inherit;
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
border: none;
transition: all 0.2s ease;
}
.btn-primary {
background: var(--accent-primary);
color: white;
}
.btn-primary:hover {
background: #2563eb;
}
.btn-secondary {
background: var(--bg-elevated);
color: var(--text-primary);
border: 1px solid var(--border-color);
}
.btn-secondary:hover {
background: var(--border-color);
}
.btn-success {
background: var(--success-color);
color: #0a0f1a;
}
.btn-success:hover {
background: #2dd4bf;
}
/* Textarea */
textarea {
width: 100%;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 0.75rem;
color: var(--text-primary);
font-family: 'JetBrains Mono', monospace;
font-size: 0.85rem;
resize: vertical;
transition: border-color 0.2s ease;
}
textarea:focus {
outline: none;
border-color: var(--accent-primary);
}
textarea::placeholder {
color: var(--text-muted);
}
/* Opciones de filtro */
.filter-options {
display: flex;
align-items: center;
gap: 1.5rem;
padding: 1rem 0;
flex-wrap: wrap;
}
.filter-options label {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
color: var(--text-secondary);
font-size: 0.9rem;
}
.filter-options input[type="radio"] {
accent-color: var(--accent-primary);
width: 16px;
height: 16px;
}
/* Barra de búsqueda */
.search-bar {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}
.search-bar input {
flex: 1;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 0.6rem 1rem;
color: var(--text-primary);
font-family: inherit;
font-size: 0.9rem;
}
.search-bar input:focus {
outline: none;
border-color: var(--accent-primary);
}
.search-bar input::placeholder {
color: var(--text-muted);
}
/* Output del log */
#log-output {
font-family: 'JetBrains Mono', monospace;
font-size: 0.8rem;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 10px;
padding: 1rem;
max-height: 50vh;
overflow-y: auto;
white-space: pre-wrap;
word-wrap: break-word;
line-height: 1.5;
}
.log-line {
padding: 2px 4px;
border-radius: 3px;
}
.log-line-error {
background: var(--error-bg);
color: var(--error-color);
}
.log-line-warning {
background: var(--warning-bg);
color: var(--warning-color);
}
.log-line-number {
display: inline-block;
width: 50px;
color: var(--text-muted);
user-select: none;
text-align: right;
padding-right: 12px;
margin-right: 8px;
border-right: 1px solid var(--border-color);
}
.highlight-match {
background: rgba(251, 191, 36, 0.3);
border-radius: 2px;
}
/* Estadísticas */
.stats-bar {
display: flex;
gap: 1.5rem;
padding: 0.75rem 1rem;
background: var(--bg-secondary);
border-radius: 8px;
margin-bottom: 1rem;
font-size: 0.85rem;
flex-wrap: wrap;
}
.stat-item {
display: flex;
align-items: center;
gap: 0.5rem;
}
.stat-item.errors { color: var(--error-color); }
.stat-item.warnings { color: var(--warning-color); }
.stat-item.total { color: var(--text-secondary); }
/* Resumen */
#summary-section {
margin-top: 1.5rem;
}
.summary-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.summary-header h3 {
font-size: 1rem;
font-weight: 600;
color: white;
}
#summary-output {
background: var(--bg-secondary);
border-radius: 8px;
padding: 1rem;
}
.finding-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-color);
}
.finding-item:last-child {
border-bottom: none;
}
.finding-code {
font-family: 'JetBrains Mono', monospace;
font-size: 0.85rem;
text-decoration: none;
transition: opacity 0.2s ease;
}
.finding-code:hover {
opacity: 0.8;
text-decoration: underline;
}
.finding-code.error { color: var(--error-color); }
.finding-code.warning { color: var(--warning-color); }
.finding-count {
color: var(--text-muted);
font-size: 0.85rem;
}
/* Listas */
ol, ul {
padding-left: 1.5rem;
color: var(--text-secondary);
}
li {
margin-bottom: 0.5rem;
}
/* Links */
a {
color: var(--accent-secondary);
text-decoration: none;
transition: color 0.2s ease;
}
a:hover {
color: var(--accent-primary);
text-decoration: underline;
}
/* Alerta/mensaje de estado */
.alert {
padding: 1rem;
border-radius: 8px;
display: flex;
align-items: flex-start;
gap: 0.75rem;
margin-bottom: 1rem;
}
.alert-info {
background: var(--accent-glow);
border: 1px solid var(--accent-primary);
color: var(--accent-secondary);
}
.alert-warning {
background: var(--warning-bg);
border: 1px solid var(--warning-color);
color: var(--warning-color);
}
.alert-error {
background: var(--error-bg);
border: 1px solid var(--error-color);
color: var(--error-color);
}
.alert i {
font-size: 1.1rem;
margin-top: 2px;
}
/* Mensaje vacío/placeholder */
.empty-state {
text-align: center;
padding: 3rem 1rem;
color: var(--text-muted);
}
.empty-state i {
font-size: 2.5rem;
margin-bottom: 1rem;
opacity: 0.5;
}
/* Loader */
.loader {
display: inline-block;
width: 20px;
height: 20px;
border: 2px solid var(--border-color);
border-top-color: var(--accent-primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Progreso */
.progress-bar {
height: 4px;
background: var(--bg-elevated);
border-radius: 2px;
overflow: hidden;
margin-top: 0.5rem;
}
.progress-fill {
height: 100%;
background: var(--accent-primary);
transition: width 0.3s ease;
}
/* Recursos grid */
.resources-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1rem;
}
.resource-link {
display: block;
padding: 0.75rem 0;
border-bottom: 1px solid var(--border-color);
}
.resource-link:last-child {
border-bottom: none;
}
.resource-link strong {
color: var(--text-primary);
}
/* Secciones colapsables en la guía */
.guide-section {
scroll-margin-top: 2rem;
}
/* Tooltip para contexto */
#context-info {
font-size: 0.8rem;
color: var(--text-muted);
margin-bottom: 0.5rem;
}
/* Responsive */
@media (max-width: 768px) {
body {
flex-direction: column;
}
nav {
width: 100%;
flex-direction: row;
overflow-x: auto;
padding: 1rem;
gap: 0.5rem;
}
.logo {
display: none;
}
.nav-button {
white-space: nowrap;
padding: 0.5rem 1rem;
}
.nav-button span {
display: none;
}
.nav-footer {
display: none;
}
main {
padding: 1rem;
}
.options-grid {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<nav role="navigation" aria-label="Navegación principal">
<div class="logo">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14Z" fill="currentColor"/>
<path d="M2 2H12V4H2V2Z" fill="currentColor"/>
<path d="M2 6H12V8H2V6Z" fill="currentColor"/>
<path d="M2 10H8V12H2V10Z" fill="currentColor"/>
</svg>
<h1>Log Analyzer</h1>
</div>
<button onclick="showTab('welcome')" class="nav-button active" aria-current="page">
<i class="fas fa-home" aria-hidden="true"></i>
<span>Inicio</span>
</button>
<button onclick="showTab('analyzer')" class="nav-button">
<i class="fas fa-search" aria-hidden="true"></i>
<span>Analizar</span>
</button>
<button onclick="showTab('info')" class="nav-button">
<i class="fas fa-book-open" aria-hidden="true"></i>
<span>Guía</span>
</button>
<button onclick="showTab('resources')" class="nav-button">
<i class="fas fa-tools" aria-hidden="true"></i>
<span>Recursos</span>
</button>
<div class="nav-footer">
<p>por TheInkReaper</p>
<p style="margin-top: 4px; opacity: 0.7;">v2.0</p>
</div>
</nav>
<main role="main">
<!-- Tab: Bienvenida -->
<div id="welcome" class="tab-content">
<h2>Bienvenido a Log Analyzer</h2>
<p class="subtitle">Herramienta de diagnóstico para ayudarte a entender y solucionar errores en tu PC.</p>
<div class="card">
<h3><i class="fas fa-compass" aria-hidden="true"></i> ¿Qué problema tienes?</h3>
<div class="options-grid">
<button onclick="showTab('info', 'bsod-section')" class="option-card">
<strong><i class="fas fa-desktop" aria-hidden="true"></i> Pantallazo Azul (BSOD)</strong>
<span>El PC se reinicia mostrando una pantalla azul con un código de error.</span>
</button>
<button onclick="showTab('info', 'app-section')" class="option-card">
<strong><i class="fas fa-window-close" aria-hidden="true"></i> Un programa se cierra</strong>
<span>Una aplicación o juego falla inesperadamente.</span>
</button>
<button onclick="showTab('info', 'system-section')" class="option-card">
<strong><i class="fas fa-cogs" aria-hidden="true"></i> Problemas de Windows</strong>
<span>Actualizaciones fallidas, lentitud, errores del sistema.</span>
</button>
<button onclick="showTab('analyzer')" class="option-card">
<strong><i class="fas fa-file-code" aria-hidden="true"></i> Ya tengo un log</strong>
<span>Ir directamente al analizador de archivos.</span>
</button>
</div>
</div>
<div class="card" style="margin-top: 1rem;">
<h3><i class="fas fa-lightbulb" aria-hidden="true"></i> ¿Cómo funciona?</h3>
<ol>
<li>Encuentra el archivo de log apropiado (la <strong>Guía</strong> te explica dónde buscar).</li>
<li>Arrastra el archivo al <strong>Analizador</strong> o pega su contenido.</li>
<li>La herramienta resaltará errores y te dará enlaces para buscar soluciones.</li>
</ol>
</div>
</div>
<!-- Tab: Analizador -->
<div id="analyzer" class="tab-content hidden">
<h2>Analizador de Logs</h2>
<p class="subtitle">Arrastra un archivo o pega el contenido del log para analizarlo.</p>
<div class="card">
<div id="drop-zone" role="button" tabindex="0" aria-label="Zona para soltar archivos">
<i class="fas fa-cloud-upload-alt" style="font-size: 2rem; color: var(--text-muted); margin-bottom: 0.5rem;" aria-hidden="true"></i>
<p>Arrastra y suelta un archivo de log aquí</p>
<p style="font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0;">o</p>
<input type="file" id="log-file" accept=".log,.txt,.csv,.xml" aria-label="Seleccionar archivo" style="display: none !important;">
<label for="log-file" class="btn btn-primary" style="cursor: pointer;">
<i class="fas fa-folder-open" aria-hidden="true"></i> Seleccionar archivo
</label>
<p class="file-info">Formatos: .log, .txt, .csv, .xml — Máximo recomendado: 10 MB</p>
</div>
<div id="loading-indicator" style="display: none; text-align: center; padding: 1rem;">
<div class="loader"></div>
<p style="margin-top: 0.5rem; color: var(--text-muted);">Procesando archivo...</p>
<div class="progress-bar"><div class="progress-fill" id="progress-fill" style="width: 0%;"></div></div>
</div>
<div style="margin-top: 1rem;">
<textarea id="paste-zone" rows="4" placeholder="... o pega el contenido del log aquí" aria-label="Pegar contenido del log"></textarea>
</div>
<div class="filter-options">
<span style="color: var(--text-secondary); font-weight: 500;">Visualización:</span>
<label>
<input type="radio" name="filter-option" value="highlight" checked>
Resaltar errores
</label>
<label>
<input type="radio" name="filter-option" value="only">
Solo errores y warnings
</label>
<label>
<input type="checkbox" id="show-line-numbers" checked style="accent-color: var(--accent-primary);">
Números de línea
</label>
</div>
<div class="search-bar">
<input type="text" id="search-input" placeholder="Buscar en el log... (Ctrl+F)" aria-label="Buscar en el log">
<button class="btn btn-secondary" onclick="searchInLog()" aria-label="Buscar">
<i class="fas fa-search" aria-hidden="true"></i>
</button>
<button class="btn btn-secondary" onclick="clearSearch()" aria-label="Limpiar búsqueda">
<i class="fas fa-times" aria-hidden="true"></i>
</button>
</div>
<div id="stats-bar" class="stats-bar hidden">
<div class="stat-item total">
<i class="fas fa-file-alt" aria-hidden="true"></i>
<span id="stat-total">0 líneas</span>
</div>
<div class="stat-item errors">
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
<span id="stat-errors">0 errores</span>
</div>
<div class="stat-item warnings">
<i class="fas fa-exclamation-triangle" aria-hidden="true"></i>
<span id="stat-warnings">0 warnings</span>
</div>
<div class="stat-item" style="color: var(--text-muted);">
<i class="fas fa-weight-hanging" aria-hidden="true"></i>
<span id="stat-size">0 KB</span>
</div>
</div>
<div id="log-output" aria-live="polite">
<div class="empty-state">
<i class="fas fa-file-import" aria-hidden="true"></i>
<p>El contenido del log aparecerá aquí</p>
</div>
</div>
<div id="summary-section" class="hidden">
<div class="summary-header">
<h3><i class="fas fa-clipboard-list" aria-hidden="true"></i> Resumen de Hallazgos</h3>
<div style="display: flex; gap: 0.5rem;">
<button id="copy-summary-btn" class="btn btn-secondary" onclick="copySummary()">
<i class="fas fa-copy" aria-hidden="true"></i> Copiar
</button>
<button class="btn btn-secondary" onclick="exportAnalysis()">
<i class="fas fa-download" aria-hidden="true"></i> Exportar
</button>
</div>
</div>
<div id="context-info"></div>
<div id="summary-output"></div>
</div>
</div>
</div>
<!-- Tab: Guía -->
<div id="info" class="tab-content hidden">
<h2>Guía para Encontrar Logs</h2>
<p class="subtitle">Aprende dónde encontrar los archivos de diagnóstico según tu problema.</p>
<div id="app-section" class="card guide-section">
<h3><i class="fas fa-window-maximize" aria-hidden="true"></i> Visor de Eventos de Windows</h3>
<p>Es la fuente principal para errores de aplicaciones. Para usar sus logs aquí, necesitas exportarlos:</p>
<ol style="margin-top: 0.75rem;">
<li>Abre el Visor de Eventos: presiona <code>Win + R</code>, escribe <code>eventvwr.msc</code> y pulsa Enter.</li>
<li>En el panel izquierdo, ve a <strong>Registros de Windows → Aplicación</strong>.</li>
<li>Clic derecho en "Aplicación" → <strong>Filtrar registro actual</strong>. Marca <strong>Crítico</strong>, <strong>Error</strong> y <strong>Advertencia</strong>.</li>
<li>Clic derecho de nuevo → <strong>Guardar eventos filtrados como...</strong></li>
<li>En "Guardar como tipo", elige <strong>Texto (delimitado por tabulaciones) (*.txt)</strong>.</li>
</ol>
<div class="alert alert-info" style="margin-top: 1rem;">
<i class="fas fa-info-circle" aria-hidden="true"></i>
<div>
<strong>Tipos de códigos de error:</strong> Los códigos que empiezan por <code>0x8...</code> son errores HRESULT (típicos de Windows/COM). Los que empiezan por <code>0xc...</code> son NTSTATUS (kernel/drivers). Nuestra herramienta detecta ambos y genera enlaces de búsqueda apropiados.
</div>
</div>
</div>
<div class="card">
<h3><i class="fas fa-gamepad" aria-hidden="true"></i> Logs de Juegos</h3>
<p>Los juegos suelen guardar sus propios logs. Ubicaciones comunes:</p>
<ul style="margin-top: 0.75rem;">
<li><strong>Steam:</strong> Clic derecho en el juego → Propiedades → Archivos instalados → Explorar. Busca carpetas como <code>Logs</code>, <code>Crash</code> o <code>Saved</code>.</li>
<li><strong>Documentos:</strong> Muchos juegos guardan logs en <code>Mis Documentos\Nombre del Juego\</code>.</li>
<li><strong>AppData:</strong> Revisa <code>%LOCALAPPDATA%\Nombre del Juego\</code> o <code>%APPDATA%\Nombre del Juego\</code>.</li>
</ul>
<p style="margin-top: 0.75rem;">Busca archivos con extensiones como <code>.log</code>, <code>.txt</code>, <code>crash.dmp</code>, o carpetas llamadas <code>CrashDumps</code>.</p>
</div>
<div id="bsod-section" class="card guide-section">
<h3><i class="fas fa-skull-crossbones" aria-hidden="true"></i> Pantallazos Azules (BSOD)</h3>
<p>Un BSOD crea un archivo de volcado (dump) que contiene información sobre el fallo.</p>
<div class="alert alert-warning" style="margin-top: 1rem;">
<i class="fas fa-exclamation-triangle" aria-hidden="true"></i>
<div>
<strong>Importante:</strong> Los archivos <code>.dmp</code> son binarios y NO se pueden analizar con esta herramienta. Necesitas software especializado como <strong>BlueScreenView</strong> (ver Recursos).
</div>
</div>
<p style="margin-top: 1rem;"><strong>Ubicación de los Minidumps:</strong></p>
<ul>
<li><code>C:\Windows\Minidump\</code> — Volcados pequeños (más comunes).</li>
<li><code>C:\Windows\MEMORY.DMP</code> — Volcado completo (si está configurado).</li>
</ul>
<p style="margin-top: 1rem;"><strong>Qué hacer:</strong></p>
<ol>
<li>Descarga <a href="https://www.nirsoft.net/utils/blue_screen_view.html" target="_blank">BlueScreenView</a> (gratuito, portable).</li>
<li>Ábrelo y automáticamente listará todos los BSODs.</li>
<li>Mira la columna "Caused By Driver" para identificar el culpable.</li>
</ol>
</div>
<div id="system-section" class="card guide-section">
<h3><i class="fas fa-server" aria-hidden="true"></i> Logs del Sistema Windows</h3>
<p>Para problemas graves de Windows, estos logs de texto SÍ se pueden analizar aquí:</p>
<div style="margin-top: 1rem;">
<p><strong>1. Errores de Instalación/Actualización:</strong></p>
<ul>
<li>Ruta: <code>C:\Windows\Panther\setuperr.log</code></li>
<li>Uso: Cuando Windows falla al instalarse o durante actualizaciones mayores.</li>
</ul>
</div>
<div style="margin-top: 1rem;">
<p><strong>2. Componentes y Windows Update (CBS):</strong></p>
<ul>
<li>Ruta: <code>C:\Windows\Logs\CBS\CBS.log</code></li>
<li>Uso: Cuando falla Windows Update o <code>sfc /scannow</code>.</li>
</ul>
</div>
<div style="margin-top: 1rem;">
<p><strong>3. Reparación de Imagen (DISM):</strong></p>
<ul>
<li>Ruta: <code>C:\Windows\Logs\DISM\dism.log</code></li>
<li>Uso: Para ver detalles de operaciones DISM.</li>
</ul>
</div>
<div class="alert alert-info" style="margin-top: 1rem;">
<i class="fas fa-info-circle" aria-hidden="true"></i>
<div>
<strong>Consejo:</strong> El archivo CBS.log puede ser muy grande (50+ MB). Si tu navegador se vuelve lento, filtra primero el archivo usando PowerShell:<br>
<code style="display: block; margin-top: 0.5rem;">Select-String -Path "C:\Windows\Logs\CBS\CBS.log" -Pattern "error|fail" | Out-File filtered.txt</code>
</div>
</div>
</div>
</div>
<!-- Tab: Recursos -->
<div id="resources" class="tab-content hidden">
<h2>Recursos y Herramientas</h2>
<p class="subtitle">Herramientas gratuitas y webs útiles para diagnóstico avanzado.</p>
<div class="resources-grid">
<div class="card">
<h3><i class="fas fa-wrench" aria-hidden="true"></i> Herramientas de Diagnóstico</h3>
<p>Aplicaciones gratuitas y portables para análisis profundo.</p>
<a href="https://www.nirsoft.net/utils/blue_screen_view.html" target="_blank" class="resource-link">
<strong>BlueScreenView</strong><br>
<span style="color: var(--text-muted);">Lee archivos Minidump (.dmp) y muestra qué driver causó el BSOD.</span>
</a>
<a href="https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns" target="_blank" class="resource-link">
<strong>Autoruns (Microsoft)</strong><br>
<span style="color: var(--text-muted);">Muestra todo lo que arranca con Windows. Útil para detectar conflictos.</span>
</a>
<a href="https://learn.microsoft.com/en-us/sysinternals/downloads/process-monitor" target="_blank" class="resource-link">
<strong>Process Monitor (Microsoft)</strong><br>
<span style="color: var(--text-muted);">Monitoreo en tiempo real de sistema de archivos, registro y procesos.</span>
</a>
<a href="https://www.hwinfo.com/" target="_blank" class="resource-link">
<strong>HWiNFO</strong><br>
<span style="color: var(--text-muted);">Diagnóstico de hardware: temperaturas, voltajes, sensores.</span>
</a>
</div>
<div class="card">
<h3><i class="fas fa-globe" aria-hidden="true"></i> Webs de Consulta</h3>
<p>Buscadores y bases de datos para encontrar soluciones.</p>
<a href="https://www.hresult.info/" target="_blank" class="resource-link">
<strong>hresult.info</strong><br>
<span style="color: var(--text-muted);">Buscador para códigos HRESULT (0x8...).</span>
</a>
<a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2" target="_blank" class="resource-link">
<strong>Bug Check Reference (Microsoft)</strong><br>
<span style="color: var(--text-muted);">Referencia oficial de códigos de BSOD.</span>
</a>
<a href="https://www.pcgamingwiki.com/" target="_blank" class="resource-link">