File size: 37,901 Bytes
e514e28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>N茅bula Notes - Convertidor de Formatos</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <div id="hidden-copy" style="position: absolute; left: -9999px; opacity: 0;"></div>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        nebula: {
                            primary: '#6d28d9',
                            secondary: '#8b5cf6',
                            dark: '#4c1d95',
                            light: '#a78bfa',
                        }
                    },
                    fontFamily: {
                        sans: ['Inter', 'sans-serif'],
                    },
                    boxShadow: {
                        '3d': '0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2)',
                        '3d-hover': '0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2)',
                        'inner-3d': 'inset 0 4px 6px -1px rgba(0, 0, 0, 0.3), inset 0 2px 4px -2px rgba(0, 0, 0, 0.2)'
                    },
                    transformOrigin: {
                        '3d': '50% 50%'
                    },
                    perspective: {
                        '3d': '1000px'
                    }
                }
            }
        }
    </script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 50%, #8b5cf6 100%);
            min-height: 100vh;
            background-attachment: fixed;
        }
        
        .markdown-preview {
            transition: all 0.3s ease;
        }
        
        .markdown-preview h1 {
            font-size: 1.8rem;
            font-weight: bold;
            margin: 1.5rem 0 1rem 0;
            color: #ffffff;
            border-bottom: 2px solid #4b5563;
            padding-bottom: 0.5rem;
        }
        
        .markdown-preview h2 {
            font-size: 1.5rem;
            font-weight: bold;
            margin: 1.3rem 0 0.8rem 0;
            color: #d1d5db;
        }
        
        .markdown-preview h3 {
            font-size: 1.25rem;
            font-weight: bold;
            margin: 1.1rem 0 0.6rem 0;
            color: #d1d5db;
        }
        
        .markdown-preview p {
            margin: 0.8rem 0;
            line-height: 1.6;
            color: #e5e7eb;
        }
        
        .markdown-preview ul, .markdown-preview ol {
            margin: 0.8rem 0;
            padding-left: 2rem;
        }
        
        .markdown-preview ul {
            list-style-type: disc;
        }
        
        .markdown-preview ol {
            list-style-type: decimal;
        }
        
        .markdown-preview li {
            margin: 0.3rem 0;
        }
        
        .markdown-preview blockquote {
            border-left: 4px solid #a78bfa;
            padding-left: 1rem;
            margin: 1rem 0;
            color: #f3e8ff;
            font-style: italic;
        }
        
        .markdown-preview code {
            background-color: rgba(255, 255, 255, 0.1);
            padding: 0.2rem 0.4rem;
            border-radius: 0.25rem;
            font-family: monospace;
            color: #c4b5fd;
        }
        
        .markdown-preview pre {
            background-color: #1e293b;
            color: #f8fafc;
            padding: 1rem;
            border-radius: 0.5rem;
            overflow-x: auto;
            margin: 1rem 0;
        }
        
        .markdown-preview pre code {
            background-color: transparent;
            padding: 0;
            color: inherit;
        }
        
        .markdown-preview a {
            color: #e9d5ff;
            text-decoration: underline;
        }
        
        .markdown-preview a:hover {
            color: #ffffff;
        }
        
        .markdown-preview hr {
            border: none;
            border-top: 1px solid #e5e7eb;
            margin: 1.5rem 0;
        }
        
        .markdown-preview strong {
            font-weight: bold;
        }
        
        .markdown-preview em {
            font-style: italic;
        }
        
        .card-3d {
            transition: all 0.3s ease;
            box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
        }
        
        .card-3d:hover {
            box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
        }
        
        .btn-3d {
            transition: all 0.3s ease;
            transform-style: preserve-3d;
        }
        
        .btn-3d:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
        }
        
        .btn-3d:active {
            transform: translateY(1px);
            box-shadow: inset 0 4px 6px -1px rgba(0, 0, 0, 0.3), inset 0 2px 4px -2px rgba(0, 0, 0, 0.2);
        }
        
        .floating {
            animation: floating 6s ease-in-out infinite;
        }
        
        @keyframes floating {
            0% { transform: translateY(0px) rotateX(0deg); }
            50% { transform: translateY(-10px) rotateX(5deg); }
            100% { transform: translateY(0px) rotateX(0deg); }
        }
        
        .bg-nebula {
            background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
        }
        
        .text-nebula {
            background: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 0 10px rgba(199, 210, 254, 0.5), 0 0 20px rgba(199, 210, 254, 0.3);
        }
        
        .glow {
            box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
        }
        
        .glow:hover {
            box-shadow: 0 0 25px rgba(139, 92, 246, 0.7);
        }
    </style>
</head>
<body class="py-8 px-4 sm:px-6 lg:px-8">
    <div class="max-w-6xl mx-auto">
        <!-- Header -->
        <header class="text-center mb-12">
            <div class="inline-block transform transition-all duration-500 hover:scale-105">
                <h1 class="text-4xl sm:text-5xl font-bold mb-2 text-nebula floating glow">N茅bula Notes</h1>
                <div class="h-1 w-24 mx-auto bg-gradient-to-r from-purple-500 to-purple-300 rounded-full mb-4"></div>
            </div>
            <p class="text-lg text-purple-200 max-w-2xl mx-auto">Convierte entre m煤ltiples formatos: Markdown, SSML, JSON, CSV y texto plano</p>
            
            <!-- Navigation Tabs -->
            <div class="flex justify-center space-x-4 mt-8">
                <button id="tab-markdown" class="px-6 py-3 bg-purple-600 text-white rounded-lg font-medium transition-all hover:bg-purple-700 tab-btn active-tab">
                    Markdown
                </button>
                <button id="tab-ssml" class="px-6 py-3 bg-gray-700 text-white rounded-lg font-medium transition-all hover:bg-gray-600 tab-btn">
                    SSML
                </button>
                <button id="tab-json" class="px-6 py-3 bg-gray-700 text-white rounded-lg font-medium transition-all hover:bg-gray-600 tab-btn">
                    JSON
                </button>
                <button id="tab-csv" class="px-6 py-3 bg-gray-700 text-white rounded-lg font-medium transition-all hover:bg-gray-600 tab-btn">
                    CSV
                </button>
            </div>
        </header>
        
        <!-- Main Content -->
        <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
            <!-- Markdown Input -->
            <div id="markdown-section" class="card-3d bg-black rounded-xl p-6 shadow-3d glow tab-content">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-code mr-2 text-purple-600"></i> Markdown
                    </h2>
                    <button id="clear-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-trash-alt mr-1"></i> Limpiar
                    </button>
                </div>
                <textarea id="markdown-input" class="w-full h-96 p-4 border border-gray-700 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none bg-gray-900 text-white" placeholder="Escribe tu Markdown aqu铆...">## **Esto es una Prueba**  
**_Copia y Pega en un segundo_**</textarea>
            </div>
            
            <!-- HTML Output -->
            <div id="markdown-output" class="card-3d bg-black rounded-xl p-6 shadow-3d tab-content">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-eye mr-2 text-purple-600"></i> Vista Previa
                    </h2>
                    <button id="copy-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-copy mr-1"></i> Copiar
                    </button>
                </div>
                <div id="html-output" class="markdown-preview w-full h-96 p-4 border border-gray-700 rounded-lg overflow-y-auto bg-gray-900 text-white"></div>
            </div>
            
            <!-- SSML Section -->
            <div id="ssml-section" class="card-3d bg-black rounded-xl p-6 shadow-3d glow tab-content hidden">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-volume-up mr-2 text-purple-600"></i> SSML
                    </h2>
                    <button id="ssml-clear-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-trash-alt mr-1"></i> Limpiar
                    </button>
                </div>
                <textarea id="ssml-input" class="w-full h-96 p-4 border border-gray-700 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none bg-gray-900 text-white" placeholder="Escribe tu SSML aqu铆..."><speak>
  Esto es un ejemplo de texto con SSML.
  <emphasis level="strong">Texto importante</emphasis>.
  <break time="500ms"/>
</speak></textarea>
            </div>
            
            <!-- SSML Output -->
            <div id="ssml-output" class="card-3d bg-black rounded-xl p-6 shadow-3d tab-content hidden">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-text-width mr-2 text-purple-600"></i> Texto Plano
                    </h2>
                    <button id="ssml-copy-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-copy mr-1"></i> Copiar
                    </button>
                </div>
                <textarea id="ssml-text-output" class="w-full h-96 p-4 border border-gray-700 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none bg-gray-900 text-white" placeholder="Texto convertido aparecer谩 aqu铆..." readonly></textarea>
                <div class="mt-4">
                    <button id="convert-to-ssml" class="btn-3d px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow w-full">
                        <i class="fas fa-exchange-alt mr-2"></i> Convertir Texto a SSML
                    </button>
                </div>
            </div>
            
            <!-- JSON Section -->
            <div id="json-section" class="card-3d bg-black rounded-xl p-6 shadow-3d glow tab-content hidden">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-brackets-curly mr-2 text-purple-600"></i> JSON
                    </h2>
                    <button id="json-clear-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-trash-alt mr-1"></i> Limpiar
                    </button>
                </div>
                <textarea id="json-input" class="w-full h-96 p-4 border border-gray-700 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none bg-gray-900 text-white" placeholder="Escribe tu JSON aqu铆...">{
  "nombre": "Ejemplo",
  "edad": 25,
  "ciudad": "Madrid"
}</textarea>
            </div>
            
            <!-- JSON Output -->
            <div id="json-output" class="card-3d bg-black rounded-xl p-6 shadow-3d tab-content hidden">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-text-width mr-2 text-purple-600"></i> Texto Plano
                    </h2>
                    <button id="json-copy-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-copy mr-1"></i> Copiar
                    </button>
                </div>
                <textarea id="json-text-output" class="w-full h-96 p-4 border border-gray-700 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none bg-gray-900 text-white" placeholder="Texto convertido aparecer谩 aqu铆..." readonly></textarea>
                <div class="mt-4">
                    <button id="convert-to-json" class="btn-3d px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow w-full">
                        <i class="fas fa-exchange-alt mr-2"></i> Convertir Texto a JSON
                    </button>
                </div>
            </div>
            
            <!-- CSV Section -->
            <div id="csv-section" class="card-3d bg-black rounded-xl p-6 shadow-3d glow tab-content hidden">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-table mr-2 text-purple-600"></i> CSV
                    </h2>
                    <button id="csv-clear-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-trash-alt mr-1"></i> Limpiar
                    </button>
                </div>
                <textarea id="csv-input" class="w-full h-96 p-4 border border-gray-700 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none bg-gray-900 text-white" placeholder="Escribe tu CSV aqu铆...">nombre,edad,ciudad
Juan,25,Madrid
Mar铆a,30,Barcelona
Carlos,22,Valencia</textarea>
            </div>
            
            <!-- CSV Output -->
            <div id="csv-output" class="card-3d bg-black rounded-xl p-6 shadow-3d tab-content hidden">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-white">
                        <i class="fas fa-text-width mr-2 text-purple-600"></i> Texto Plano
                    </h2>
                    <button id="csv-copy-btn" class="btn-3d px-3 py-1 text-sm bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow">
                        <i class="fas fa-copy mr-1"></i> Copiar
                    </button>
                </div>
                <textarea id="csv-text-output" class="w-full h-96 p-4 border border-gray-700 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent resize-none bg-gray-900 text-white" placeholder="Texto convertido aparecer谩 aqu铆..." readonly></textarea>
                <div class="mt-4">
                    <button id="convert-to-csv" class="btn-3d px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-md transition-all glow w-full">
                        <i class="fas fa-exchange-alt mr-2"></i> Convertir Texto a CSV
                    </button>
                </div>
            </div>
        </div>
        
        <!-- Quick Reference -->
        <div class="card-3d bg-black rounded-xl p-6 mb-12">
            <h2 class="text-xl font-semibold text-white mb-4">
                <i class="fas fa-lightbulb mr-2 text-purple-600"></i> Referencias R谩pidas
            </h2>
            
            <!-- Markdown Reference -->
            <div id="markdown-ref" class="reference-section">
                <h3 class="font-medium text-white mb-3 text-lg">Markdown</h3>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Encabezados</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white"># H1
## H2
### H3</pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">脡nfasis</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">*cursiva*
**negrita**
~~tachado~~</pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Listas</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">- Item 1
- Item 2
  - Subitem</pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">C贸digo</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">`c贸digo en l铆nea`
```javascript
bloque de c贸digo
```</pre>
                    </div>
                </div>
            </div>
            
            <!-- SSML Reference -->
            <div id="ssml-ref" class="reference-section hidden">
                <h3 class="font-medium text-white mb-3 text-lg">SSML</h3>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6">
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Elementos B谩sicos</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white"><speak>texto</speak>
<emphasis level="strong">
<break time="500ms"></pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Prosodia</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white"><prosody rate="fast">
<prosody pitch="high">
<prosody volume="loud"></pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Fon茅tica</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white"><phoneme alphabet="ipa">
<say-as interpret-as="spell-out">
<sub alias="alias"></pre>
                    </div>
                </div>
            </div>
            
            <!-- JSON Reference -->
            <div id="json-ref" class="reference-section hidden">
                <h3 class="font-medium text-white mb-3 text-lg">JSON</h3>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6">
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Estructura B谩sica</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">{
  "clave": "valor",
  "numero": 123,
  "booleano": true
}</pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Arrays</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">{
  "array": [
    "item1",
    "item2"
  ]
}</pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Objetos Anidados</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">{
  "persona": {
    "nombre": "Juan",
    "edad": 25
  }
}</pre>
                    </div>
                </div>
            </div>
            
            <!-- CSV Reference -->
            <div id="csv-ref" class="reference-section hidden">
                <h3 class="font-medium text-white mb-3 text-lg">CSV</h3>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6">
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Estructura B谩sica</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">nombre,edad,ciudad
Juan,25,Madrid
Mar铆a,30,Barcelona</pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Valores con Comas</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">nombre,descripcion
Juan,"Valor con, comas"</pre>
                    </div>
                    <div class="bg-gray-900 p-4 rounded-lg">
                        <h4 class="font-medium text-white mb-2">Valores con Comillas</h4>
                        <pre class="text-sm bg-gray-800 p-2 rounded text-white">nombre,mensaje
Juan,"Dijo ""hola"""</pre>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Footer -->
        <footer class="text-center text-gray-500 text-sm">
            <p>漏 2023 N茅bula Notes - Transforma tus ideas en texto enriquecido</p>
            <div class="flex justify-center space-x-4 mt-2">
                <a href="#" class="text-purple-600 hover:text-purple-800"><i class="fab fa-github"></i></a>
                <a href="#" class="text-purple-600 hover:text-purple-800"><i class="fab fa-twitter"></i></a>
                <a href="#" class="text-purple-600 hover:text-purple-800"><i class="fab fa-discord"></i></a>
            </div>
        </footer>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/github-dark.min.css">
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Elements
            const markdownInput = document.getElementById('markdown-input');
            const htmlOutput = document.getElementById('html-output');
            const copyBtn = document.getElementById('copy-btn');
            const clearBtn = document.getElementById('clear-btn');
            
            // SSML Elements
            const ssmlInput = document.getElementById('ssml-input');
            const ssmlTextOutput = document.getElementById('ssml-text-output');
            const ssmlCopyBtn = document.getElementById('ssml-copy-btn');
            const ssmlClearBtn = document.getElementById('ssml-clear-btn');
            const convertToSsmlBtn = document.getElementById('convert-to-ssml');
            
            // JSON Elements
            const jsonInput = document.getElementById('json-input');
            const jsonTextOutput = document.getElementById('json-text-output');
            const jsonCopyBtn = document.getElementById('json-copy-btn');
            const jsonClearBtn = document.getElementById('json-clear-btn');
            const convertToJsonBtn = document.getElementById('convert-to-json');
            
            // CSV Elements
            const csvInput = document.getElementById('csv-input');
            const csvTextOutput = document.getElementById('csv-text-output');
            const csvCopyBtn = document.getElementById('csv-copy-btn');
            const csvClearBtn = document.getElementById('csv-clear-btn');
            const convertToCsvBtn = document.getElementById('convert-to-csv');
            
            // Tab Elements
            const tabBtns = document.querySelectorAll('.tab-btn');
            const tabContents = document.querySelectorAll('.tab-content');
            const referenceSections = document.querySelectorAll('.reference-section');
            
            // Configuraci贸n de marked
            marked.setOptions({
                breaks: true,
                gfm: true,
                pedantic: false,
                sanitize: false,
                smartLists: true,
                smartypants: false,
                highlight: function(code, lang) {
                    const language = hljs.getLanguage(lang) ? lang : 'plaintext';
                    return hljs.highlight(code, { language }).value;
                }
            });
            
            // Tab Navigation
            tabBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const tabId = this.id.replace('tab-', '');
                    
                    // Update active tab
                    tabBtns.forEach(b => b.classList.remove('active-tab', 'bg-purple-600'));
                    tabBtns.forEach(b => b.classList.add('bg-gray-700'));
                    this.classList.add('active-tab', 'bg-purple-600');
                    this.classList.remove('bg-gray-700');
                    
                    // Show/hide content
                    tabContents.forEach(content => content.classList.add('hidden'));
                    document.getElementById(`${tabId}-section`).classList.remove('hidden');
                    document.getElementById(`${tabId}-output`).classList.remove('hidden');
                    
                    // Show/hide references
                    referenceSections.forEach(ref => ref.classList.add('hidden'));
                    document.getElementById(`${tabId}-ref`).classList.remove('hidden');
                    
                    // Auto-convert when switching tabs
                    if (tabId === 'ssml') {
                        convertSsmlToText();
                    } else if (tabId === 'json') {
                        convertJsonToText();
                    } else if (tabId === 'csv') {
                        convertCsvToText();
                    } else if (tabId === 'markdown') {
                        renderMarkdown();
                    }
                });
            });
            
            // Funci贸n para renderizar Markdown
            function renderMarkdown() {
                const markdownText = markdownInput.value;
                htmlOutput.innerHTML = marked.parse(markdownText);
                
                // Agregar resaltado de sintaxis a los bloques de c贸digo
                document.querySelectorAll('pre code').forEach((block) => {
                    hljs.highlightElement(block);
                });
            }
            
            // Funci贸n para convertir SSML a texto plano
            function convertSsmlToText() {
                const ssmlText = ssmlInput.value;
                // Simple SSML to text conversion (remove XML tags)
                const plainText = ssmlText
                    .replace(/<speak>|<\/speak>/gi, '')
                    .replace(/<[^>]*>/g, '')
                    .replace(/\s+/g, ' ')
                    .trim();
                ssmlTextOutput.value = plainText;
            }
            
            // Funci贸n para convertir texto plano a SSML
            function convertTextToSsml() {
                const plainText = ssmlTextOutput.value;
                // Simple text to SSML conversion
                const ssmlText = `<speak>\n  ${plainText.replace(/\n/g, '\n  ')}\n</speak>`;
                ssmlInput.value = ssmlText;
            }
            
            // Funci贸n para convertir JSON a texto plano
            function convertJsonToText() {
                const jsonText = jsonInput.value;
                try {
                    const jsonObj = JSON.parse(jsonText);
                    // Convert JSON object to readable text
                    let plainText = '';
                    for (const [key, value] of Object.entries(jsonObj)) {
                        plainText += `${key}: ${value}\n`;
                    }
                    jsonTextOutput.value = plainText.trim();
                } catch (error) {
                    jsonTextOutput.value = 'Error: JSON inv谩lido. Por favor, verifica el formato.';
                }
            }
            
            // Funci贸n para convertir texto plano a JSON
            function convertTextToJson() {
                const plainText = jsonTextOutput.value;
                try {
                    // Simple text to JSON conversion (key: value format)
                    const lines = plainText.split('\n');
                    const jsonObj = {};
                    lines.forEach(line => {
                        const [key, ...valueParts] = line.split(':');
                        if (key && valueParts.length > 0) {
                            const value = valueParts.join(':').trim();
                            jsonObj[key.trim()] = isNaN(value) ? value : Number(value);
                        }
                    });
                    jsonInput.value = JSON.stringify(jsonObj, null, 2);
                } catch (error) {
                    alert('Error al convertir texto a JSON. Aseg煤rate de usar el formato "clave: valor".');
                }
            }
            
            // Funci贸n para convertir CSV a texto plano
            function convertCsvToText() {
                const csvText = csvInput.value;
                const lines = csvText.split('\n');
                let plainText = '';
                
                if (lines.length > 0) {
                    const headers = lines[0].split(',');
                    for (let i = 1; i < lines.length; i++) {
                        if (lines[i].trim()) {
                            const values = lines[i].split(',');
                            headers.forEach((header, index) => {
                                if (values[index]) {
                                    plainText += `${header.trim()}: ${values[index].trim()}\n`;
                                }
                            });
                            plainText += '\n';
                        }
                    }
                }
                csvTextOutput.value = plainText.trim();
            }
            
            // Funci贸n para convertir texto plano a CSV
            function convertTextToCsv() {
                const plainText = csvTextOutput.value;
                // Simple text to CSV conversion (assumes key: value format)
                const sections = plainText.split('\n\n');
                let csvLines = [];
                let headers = new Set();
                
                sections.forEach(section => {
                    const lines = section.split('\n');
                    const row = {};
                    lines.forEach(line => {
                        const [key, ...valueParts] = line.split(':');
                        if (key && valueParts.length > 0) {
                            const value = valueParts.join(':').trim();
                            row[key.trim()] = value;
                            headers.add(key.trim());
                        }
                    });
                    if (Object.keys(row).length > 0) {
                        csvLines.push(row);
                    }
                });
                
                if (csvLines.length > 0) {
                    const headerArray = Array.from(headers);
                    let csvText = headerArray.join(',') + '\n';
                    csvLines.forEach(row => {
                        const line = headerArray.map(header => row[header] || '').join(',');
                        csvText += line + '\n';
                    });
                    csvInput.value = csvText;
                }
            }
            
            // Event Listeners
            markdownInput.addEventListener('input', renderMarkdown);
            ssmlInput.addEventListener('input', convertSsmlToText);
            jsonInput.addEventListener('input', convertJsonToText);
            csvInput.addEventListener('input', convertCsvToText);
            
            convertToSsmlBtn.addEventListener('click', convertTextToSsml);
            convertToJsonBtn.addEventListener('click', convertTextToJson);
            convertToCsvBtn.addEventListener('click', convertTextToCsv);
            
            // Copy functions
            function setupCopyButton(button, textArea, originalText) {
                button.addEventListener('click', function() {
                    textArea.select();
                    try {
                        navigator.clipboard.writeText(textArea.value).then(() => {
                            button.innerHTML = '<i class="fas fa-check mr-1"></i> 隆Copiado!';
                            button.classList.remove('bg-purple-600', 'hover:bg-purple-700');
                            button.classList.add('bg-green-500', 'hover:bg-green-600');
                            
                            setTimeout(() => {
                                button.innerHTML = originalText;
                                button.classList.remove('bg-green-500', 'hover:bg-green-600');
                                button.classList.add('bg-purple-600', 'hover:bg-purple-700');
                            }, 2000);
                        });
                    } catch (err) {
                        alert('Error al copiar el contenido');
                    }
                });
            }
            
            // Clear functions
            function setupClearButton(button, textArea, originalText) {
                button.addEventListener('click', function() {
                    if (confirm('驴Est谩s seguro de que quieres limpiar?')) {
                        textArea.value = '';
                        button.innerHTML = '<i class="fas fa-check mr-1"></i> 隆Limpiado!';
                        button.classList.remove('bg-purple-600', 'hover:bg-purple-700');
                        button.classList.add('bg-green-500', 'hover:bg-green-600');
                        
                        setTimeout(() => {
                            button.innerHTML = originalText;
                            button.classList.remove('bg-green-500', 'hover:bg-green-600');
                            button.classList.add('bg-purple-600', 'hover:bg-purple-700');
                        }, 2000);
                    }
                });
            }
            
            // Setup copy and clear buttons
            setupCopyButton(copyBtn, htmlOutput, '<i class="fas fa-copy mr-1"></i> Copiar');
            setupClearButton(clearBtn, markdownInput, '<i class="fas fa-trash-alt mr-1"></i> Limpiar');
            
            setupCopyButton(ssmlCopyBtn, ssmlTextOutput, '<i class="fas fa-copy mr-1"></i> Copiar');
            setupClearButton(ssmlClearBtn, ssmlInput, '<i class="fas fa-trash-alt mr-1"></i> Limpiar');
            
            setupCopyButton(jsonCopyBtn, jsonTextOutput, '<i class="fas fa-copy mr-1"></i> Copiar');
            setupClearButton(jsonClearBtn, jsonInput, '<i class="fas fa-trash-alt mr-1"></i> Limpiar');
            
            setupCopyButton(csvCopyBtn, csvTextOutput, '<i class="fas fa-copy mr-1"></i> Copiar');
            setupClearButton(csvClearBtn, csvInput, '<i class="fas fa-trash-alt mr-1"></i> Limpiar');
            
            // Renderizar al cargar la p谩gina
            markdownInput.value = `## **Esto es una Prueba**  
**_Copia y Pega en un segundo_**`;
            setTimeout(renderMarkdown, 100);
            convertSsmlToText();
            convertJsonToText();
            convertCsvToText();
        });
        
        // Polyfill para el resaltado de sintaxis si hljs no est谩 disponible
        if (typeof hljs === 'undefined') {
            var hljs = {
                getLanguage: () => false,
                highlight: (code) => ({ value: code }),
                highlightElement: () => {}
            };
        }
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 馃К <a href="https://enzostvs-deepsite.hf.space?remix=SFalcon97/n-bula-notes-md-rich-text" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>