File size: 62,695 Bytes
7b86e8f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Gestão de Campanhas Sociais</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">
    <style>
        .gradient-bg {
            background: linear-gradient(135deg, #6B46C1 0%, #4299E1 100%);
        }
        .campaign-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .payment-method {
            transition: all 0.3s ease;
        }
        .payment-method:hover {
            background-color: #F7FAFC;
            transform: scale(1.02);
        }
        .news-card:hover .news-title {
            color: #4299E1;
        }
        #paymentSuccessModal {
            transition: opacity 0.3s ease;
        }
    </style>
</head>
<body class="bg-gray-50 font-sans">
    <!-- Header/Navigation -->
    <header class="gradient-bg text-white shadow-lg">
        <div class="container mx-auto px-4 py-6">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="flex items-center mb-4 md:mb-0">
                    <i class="fas fa-rocket text-3xl mr-3"></i>
                    <h1 class="text-2xl font-bold">SocialCamp Pro</h1>
                </div>
                <nav class="flex flex-col md:flex-row space-y-2 md:space-y-0 md:space-x-6">
                    <a href="#home" class="hover:text-gray-200 font-medium">Início</a>
                    <a href="#campaigns" class="hover:text-gray-200 font-medium">Campanhas</a>
                    <a href="#payment" class="hover:text-gray-200 font-medium">Adicionar Saldo</a>
                    <a href="#balance" class="hover:text-gray-200 font-medium">Meu Saldo</a>
                    <a href="#news" class="hover:text-gray-200 font-medium">Notícias</a>
                    <a href="#generate" class="hover:text-gray-200 font-medium">Gerar Conteúdo</a>
                    <a href="#ai-tools" class="hover:text-gray-200 font-medium">Ferramentas AI</a>
                </nav>
            </div>
        </div>
    </header>

    <!-- Main Content -->
    <main class="container mx-auto px-4 py-8">
        <!-- Hero Section -->
        <section id="home" class="mb-16">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-8 md:mb-0">
                    <h2 class="text-4xl font-bold text-gray-800 mb-4">Potencialize suas campanhas sociais</h2>
                    <p class="text-lg text-gray-600 mb-6">Gerencie campanhas orgânicas e pagas em várias redes sociais com nossa plataforma completa.</p>
                    <div class="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-4">
                        <a href="#campaigns" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-6 rounded-lg shadow-md transition duration-300 text-center">
                            Criar Campanha
                        </a>
                        <a href="#payment" class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-3 px-6 rounded-lg shadow-md transition duration-300 text-center">
                            Adicionar Saldo
                        </a>
                    </div>
                </div>
                <div class="md:w-1/2">
                    <img src="https://images.unsplash.com/photo-1552581234-26160f608093?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Social Media" class="rounded-lg shadow-xl w-full">
                </div>
            </div>

            <!-- Exchange Rates -->
            <div class="mt-12 bg-white p-6 rounded-lg shadow-md">
                <h3 class="text-xl font-bold text-gray-800 mb-4">Cotações Atuais</h3>
                <div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
                    <div class="bg-gray-100 p-4 rounded-lg">
                        <div class="flex items-center">
                            <i class="fas fa-dollar-sign text-green-500 mr-2"></i>
                            <span class="font-medium">Dólar Americano</span>
                        </div>
                        <div class="text-2xl font-bold mt-2"><span id="usd-rate">5.25</span></div>
                    </div>
                    <div class="bg-gray-100 p-4 rounded-lg">
                        <div class="flex items-center">
                            <i class="fas fa-euro-sign text-blue-500 mr-2"></i>
                            <span class="font-medium">Euro</span>
                        </div>
                        <div class="text-2xl font-bold mt-2"><span id="eur-rate">5.65</span></div>
                    </div>
                    <div class="bg-gray-100 p-4 rounded-lg">
                        <div class="flex items-center">
                            <i class="fas fa-chart-line text-purple-500 mr-2"></i>
                            <span class="font-medium">Atualizado</span>
                        </div>
                        <div class="text-lg mt-2" id="update-time">10 minutos atrás</div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Campaign Section -->
        <section id="campaigns" class="mb-16">
            <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Gerenciamento de Campanhas</h2>
            
            <div class="bg-white rounded-lg shadow-md overflow-hidden mb-8">
                <div class="p-6">
                    <h3 class="text-xl font-bold text-gray-800 mb-4">Criar Nova Campanha</h3>
                    
                    <form id="campaignForm">
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                            <div>
                                <label class="block text-gray-700 font-medium mb-2" for="campaign-name">Nome da Campanha</label>
                                <input type="text" id="campaign-name" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" required>
                            </div>
                            <div>
                                <label class="block text-gray-700 font-medium mb-2" for="campaign-type">Tipo de Campanha</label>
                                <select id="campaign-type" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" required>
                                    <option value="">Selecione...</option>
                                    <option value="organic">Orgânica</option>
                                    <option value="paid">Paga</option>
                                </select>
                            </div>
                        </div>
                        
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                            <div>
                                <label class="block text-gray-700 font-medium mb-2" for="campaign-title">Título</label>
                                <input type="text" id="campaign-title" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" required>
                            </div>
                            <div>
                                <label class="block text-gray-700 font-medium mb-2" for="campaign-subtitle">Subtítulo</label>
                                <input type="text" id="campaign-subtitle" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                            </div>
                        </div>
                        
                        <div class="mb-6">
                            <label class="block text-gray-700 font-medium mb-2" for="campaign-description">Descrição</label>
                            <textarea id="campaign-description" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"></textarea>
                        </div>
                        
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                            <div>
                                <label class="block text-gray-700 font-medium mb-2" for="campaign-budget">Valor do Orçamento (R$)</label>
                                <input type="number" id="campaign-budget" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" required>
                            </div>
                            <div>
                                <label class="block text-gray-700 font-medium mb-2">Público Estimado</label>
                                <div class="bg-gray-100 p-4 rounded-lg">
                                    <div class="flex items-center justify-between">
                                        <span>Alcance estimado:</span>
                                        <span id="estimated-reach" class="font-bold">0 pessoas</span>
                                    </div>
                                    <input type="range" id="reach-slider" min="1000" max="1000000" step="1000" class="w-full mt-2">
                                </div>
                            </div>
                        </div>
                        
                        <div class="mb-6">
                            <label class="block text-gray-700 font-medium mb-2">Mídia</label>
                            <div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center">
                                <div id="media-preview" class="mb-4 hidden">
                                    <img id="preview-image" src="#" alt="Preview" class="max-h-48 mx-auto hidden">
                                    <video id="preview-video" controls class="max-h-48 mx-auto hidden"></video>
                                </div>
                                <input type="file" id="media-upload" accept="image/*,video/*" class="hidden">
                                <button type="button" onclick="document.getElementById('media-upload').click()" class="bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium py-2 px-4 rounded-lg transition duration-300">
                                    <i class="fas fa-cloud-upload-alt mr-2"></i> Anexar Foto ou Vídeo
                                </button>
                                <p class="text-sm text-gray-500 mt-2">Formatos suportados: JPG, PNG, MP4 (até 20MB)</p>
                            </div>
                        </div>
                        
                        <div class="flex justify-end">
                            <button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-lg shadow-md transition duration-300">
                                <i class="fas fa-save mr-2"></i> Salvar Campanha
                            </button>
                        </div>
                    </form>
                </div>
            </div>
            
            <h3 class="text-2xl font-bold text-gray-800 mb-6">Minhas Campanhas</h3>
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                <!-- Sample Campaign Cards -->
                <div class="bg-white rounded-lg shadow-md overflow-hidden campaign-card transition duration-300">
                    <div class="relative">
                        <img src="https://images.unsplash.com/photo-1611162616305-c69b3fa7fbe0?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Campaign" class="w-full h-48 object-cover">
                        <span class="absolute top-2 right-2 bg-green-500 text-white text-xs font-bold px-2 py-1 rounded">ORGÂNICA</span>
                    </div>
                    <div class="p-6">
                        <h4 class="text-xl font-bold text-gray-800 mb-2">Promoção de Verão</h4>
                        <p class="text-gray-600 mb-4">Aumente suas vendas com nossa promoção especial de verão</p>
                        <div class="flex justify-between items-center mb-4">
                            <span class="text-sm text-gray-500"><i class="fas fa-users mr-1"></i> 15,000 alcance</span>
                            <span class="text-sm font-bold text-blue-600">R$ 1,200</span>
                        </div>
                        <div class="flex space-x-2">
                            <button class="bg-blue-100 hover:bg-blue-200 text-blue-600 px-3 py-1 rounded text-sm">
                                <i class="fas fa-chart-line mr-1"></i> Estatísticas
                            </button>
                            <button class="bg-gray-100 hover:bg-gray-200 text-gray-600 px-3 py-1 rounded text-sm">
                                <i class="fas fa-edit mr-1"></i> Editar
                            </button>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-lg shadow-md overflow-hidden campaign-card transition duration-300">
                    <div class="relative">
                        <img src="https://images.unsplash.com/photo-1556740738-b6a63e27c4df?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Campaign" class="w-full h-48 object-cover">
                        <span class="absolute top-2 right-2 bg-purple-500 text-white text-xs font-bold px-2 py-1 rounded">PAGA</span>
                    </div>
                    <div class="p-6">
                        <h4 class="text-xl font-bold text-gray-800 mb-2">Novo Produto</h4>
                        <p class="text-gray-600 mb-4">Conheça nosso lançamento exclusivo</p>
                        <div class="flex justify-between items-center mb-4">
                            <span class="text-sm text-gray-500"><i class="fas fa-users mr-1"></i> 45,000 alcance</span>
                            <span class="text-sm font-bold text-blue-600">R$ 3,500</span>
                        </div>
                        <div class="flex space-x-2">
                            <button class="bg-blue-100 hover:bg-blue-200 text-blue-600 px-3 py-1 rounded text-sm">
                                <i class="fas fa-chart-line mr-1"></i> Estatísticas
                            </button>
                            <button class="bg-gray-100 hover:bg-gray-200 text-gray-600 px-3 py-1 rounded text-sm">
                                <i class="fas fa-edit mr-1"></i> Editar
                            </button>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-lg shadow-md overflow-hidden campaign-card transition duration-300">
                    <div class="relative">
                        <img src="https://images.unsplash.com/photo-1521791055366-0d553872125f?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Campaign" class="w-full h-48 object-cover">
                        <span class="absolute top-2 right-2 bg-green-500 text-white text-xs font-bold px-2 py-1 rounded">ORGÂNICA</span>
                    </div>
                    <div class="p-6">
                        <h4 class="text-xl font-bold text-gray-800 mb-2">Evento Corporativo</h4>
                        <p class="text-gray-600 mb-4">Participe do nosso grande evento anual</p>
                        <div class="flex justify-between items-center mb-4">
                            <span class="text-sm text-gray-500"><i class="fas fa-users mr-1"></i> 8,000 alcance</span>
                            <span class="text-sm font-bold text-blue-600">R$ 800</span>
                        </div>
                        <div class="flex space-x-2">
                            <button class="bg-blue-100 hover:bg-blue-200 text-blue-600 px-3 py-1 rounded text-sm">
                                <i class="fas fa-chart-line mr-1"></i> Estatísticas
                            </button>
                            <button class="bg-gray-100 hover:bg-gray-200 text-gray-600 px-3 py-1 rounded text-sm">
                                <i class="fas fa-edit mr-1"></i> Editar
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Payment Section -->
        <section id="payment" class="mb-16">
            <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Adicionar Saldo</h2>
            
            <div class="bg-white rounded-lg shadow-md overflow-hidden">
                <div class="p-6">
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-1/2 pr-0 md:pr-6 mb-6 md:mb-0">
                            <h3 class="text-xl font-bold text-gray-800 mb-4">Saldo Disponível: <span class="text-blue-600" id="current-balance">-</span></h3>
                            
                            <div class="mb-6">
                                <label class="block text-gray-700 font-medium mb-2" for="amount">Valor a Adicionar</label>
                                <div class="relative">
                                    <input type="number" id="amount" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="0.00">
                                    <span class="absolute left-3 top-2.5 text-gray-500">R$</span>
                                </div>
                            </div>
                            
                            <div class="mb-6">
                                <label class="block text-gray-700 font-medium mb-2">Moeda</label>
                                <div class="grid grid-cols-3 gap-3">
                                    <button class="bg-blue-600 text-white py-2 px-4 rounded-lg font-medium">BRL</button>
                                    <button class="bg-gray-200 hover:bg-gray-300 text-gray-700 py-2 px-4 rounded-lg font-medium transition">USD</button>
                                    <button class="bg-gray-200 hover:bg-gray-300 text-gray-700 py-2 px-4 rounded-lg font-medium transition">EUR</button>
                                </div>
                            </div>
                            
                            <div>
                                <h4 class="font-bold text-gray-700 mb-2">Resumo</h4>
                                <div class="bg-gray-100 p-4 rounded-lg">
                                    <div class="flex justify-between mb-2">
                                        <span>Valor:</span>
                                        <span id="summary-amount" class="font-bold">R$ 0.00</span>
                                    </div>
                                    <div class="flex justify-between">
                                        <span>Taxa (2.5%):</span>
                                        <span id="summary-fee" class="font-bold">R$ 0.00</span>
                                    </div>
                                    <div class="border-t border-gray-300 my-2"></div>
                                    <div class="flex justify-between font-bold text-lg">
                                        <span>Total:</span>
                                        <span id="summary-total" class="text-blue-600">R$ 0.00</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <div class="md:w-1/2 pl-0 md:pl-6">
                            <h3 class="text-xl font-bold text-gray-800 mb-4">Método de Pagamento</h3>
                            
                            <div class="space-y-4">
                                <!-- Pix Payment -->
                                <div class="payment-method bg-white border border-gray-300 rounded-lg p-4 cursor-pointer hover:border-blue-500" onclick="showPixDetails()">
                                    <div class="flex items-center">
                                        <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mr-4">
                                            <i class="fas fa-qrcode text-purple-600 text-xl"></i>
                                        </div>
                                        <div>
                                            <h4 class="font-bold text-gray-800">PIX</h4>
                                            <p class="text-sm text-gray-600">Pagamento instantâneo sem taxas</p>
                                        </div>
                                    </div>
                                    
                                    <div id="pix-details" class="mt-4 hidden">
                                        <div class="bg-gray-100 p-4 rounded-lg mb-4">
                                            <p class="text-sm text-gray-700 mb-2">Envie o pagamento para:</p>
                                            <div class="flex items-center justify-between bg-white p-3 rounded border border-gray-300">
                                                <span class="font-mono text-sm">21404872000195</span>
                                                <button onclick="copyPix()" class="text-blue-600 hover:text-blue-800">
                                                    <i class="fas fa-copy"></i>
                                                </button>
                                            </div>
                                            <p class="text-xs text-gray-500 mt-2">Após o pagamento, clique em confirmar abaixo.</p>
                                        </div>
                                        <button onclick="confirmPayment('pix')" class="w-full bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-lg">
                                            Confirmar Pagamento
                                        </button>
                                    </div>
                                </div>
                                
                                <!-- Credit Card Payment -->
                                <div class="payment-method bg-white border border-gray-300 rounded-lg p-4 cursor-pointer hover:border-blue-500" onclick="showCardDetails()">
                                    <div class="flex items-center">
                                        <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mr-4">
                                            <i class="far fa-credit-card text-blue-600 text-xl"></i>
                                        </div>
                                        <div>
                                            <h4 class="font-bold text-gray-800">Cartão de Crédito</h4>
                                            <p class="text-sm text-gray-600">Parcela em até 12x com juros</p>
                                        </div>
                                    </div>
                                    
                                    <div id="card-details" class="mt-4 hidden">
                                        <div class="mb-4">
                                            <label class="block text-gray-700 text-sm font-medium mb-1">Número do Cartão</label>
                                            <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="1234 5678 9012 3456">
                                        </div>
                                        <div class="grid grid-cols-2 gap-4 mb-4">
                                            <div>
                                                <label class="block text-gray-700 text-sm font-medium mb-1">Validade</label>
                                                <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="MM/AA">
                                            </div>
                                            <div>
                                                <label class="block text-gray-700 text-sm font-medium mb-1">CVC</label>
                                                <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="123">
                                            </div>
                                        </div>
                                        <button onclick="confirmPayment('credit')" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg">
                                            Adicionar Saldo
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Balance Section -->
        <section id="balance" class="mb-16">
            <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Meu Saldo</h2>
            
            <div class="bg-white rounded-lg shadow-md overflow-hidden mb-8">
                <div class="p-6">
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div class="bg-gray-100 p-6 rounded-lg">
                            <div class="flex items-center mb-4">
                                <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mr-4">
                                    <i class="fas fa-wallet text-blue-600 text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-bold text-gray-800">Saldo Disponível</h4>
                                    <p class="text-2xl font-bold text-blue-600" id="available-balance">-</p>
                                </div>
                            </div>
                        </div>
                        
                        <div class="bg-gray-100 p-6 rounded-lg">
                            <div class="flex items-center mb-4">
                                <div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mr-4">
                                    <i class="fas fa-chart-line text-green-600 text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-bold text-gray-800">Total Investido</h4>
                                    <p class="text-2xl font-bold text-green-600" id="total-invested">-</p>
                                </div>
                            </div>
                        </div>
                        
                        <div class="bg-gray-100 p-6 rounded-lg">
                            <div class="flex items-center mb-4">
                                <div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mr-4">
                                    <i class="fas fa-bullseye text-purple-600 text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-bold text-gray-800">Campanhas Ativas</h4>
                                    <p class="text-2xl font-bold text-purple-600" id="active-campaigns">0</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <h3 class="text-2xl font-bold text-gray-800 mb-6">Histórico de Transações</h3>
            <div class="bg-white rounded-lg shadow-md overflow-hidden">
                <div class="overflow-x-auto">
                    <table class="min-w-full divide-y divide-gray-200">
                        <thead class="bg-gray-50">
                            <tr>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Data</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Descrição</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Valor</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
                            </tr>
                        </thead>
                        <tbody class="bg-white divide-y divide-gray-200" id="transactions-body">
                            <!-- Transactions will be loaded here -->
                        </tbody>
                    </table>
                </div>
            </div>
        </section>

        <!-- News Section -->
        <section id="news" class="mb-16">
            <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Notícias do Mundo</h2>
            
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                <!-- News will be loaded here via JavaScript -->
            </div>
            
            <div class="text-center mt-8">
                <button onclick="loadMoreNews()" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-6 rounded-lg shadow-md transition duration-300 inline-flex items-center">
                    <i class="fas fa-sync-alt mr-2"></i> Carregar Mais Notícias
                </button>
            </div>
        </section>

        <!-- Content Generation Section -->
        <section id="generate" class="mb-16">
            <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Gerador de Conteúdo IA</h2>
            
            <div class="bg-white rounded-lg shadow-md overflow-hidden">
                <div class="p-6">
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div class="border-r border-gray-200 pr-6">
                            <h3 class="text-xl font-bold text-gray-800 mb-4">Título</h3>
                            <textarea id="title-input" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 mb-4" placeholder="Digite o tema principal..."></textarea>
                            <button onclick="generateTitle()" class="w-full bg-purple-600 hover:bg-purple-700 text-white font-bold py-2 px-4 rounded-lg">
                                <i class="fas fa-magic mr-2"></i> Gerar Título
                            </button>
                            <div id="title-result" class="mt-4 p-4 bg-gray-100 rounded-lg hidden">
                                <p class="font-medium">Exemplo de título gerado:</p>
                                <p id="generated-title" class="text-lg font-bold mt-2"></p>
                            </div>
                        </div>
                        
                        <div class="border-r border-gray-200 pr-6">
                            <h3 class="text-xl font-bold text-gray-800 mb-4">Subtítulo</h3>
                            <textarea id="subtitle-input" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 mb-4"></textarea>
                            <button onclick="generateSubtitle()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg">
                                <i class="fas fa-magic mr-2"></i> Gerar Subtítulo
                            </button>
                            <div id="subtitle-result" class="mt-4 p-4 bg-gray-100 rounded-lg hidden">
                                <p class="font-medium">Exemplo de subtítulo gerado:</p>
                                <p id="generated-subtitle" class="text-lg mt-2"></p>
                            </div>
                        </div>
                        
                        <div>
                            <h3 class="text-xl font-bold text-gray-800 mb-4">Descrição</h3>
                            <textarea id="description-input" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 mb-4"></textarea>
                            <button onclick="generateDescription()" class="w-full bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-lg">
                                <i class="fas fa-magic mr-2"></i> Gerar Descrição
                            </button>
                            <div id="description-result" class="mt-4 p-4 bg-gray-100 rounded-lg hidden">
                                <p class="font-medium">Exemplo de descrição gerada:</p>
                                <p id="generated-description" class="mt-2"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- AI Tools Section -->
    <section id="ai-tools" class="mb-16">
        <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Ferramentas AI</h2>
        
        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <!-- Currency Tools -->
            <div class="bg-white rounded-lg shadow-md overflow-hidden p-6">
                <h3 class="text-xl font-bold text-gray-800 mb-4">Moedas</h3>
                <div class="space-y-4">
                    <button onclick="activateCurrency('USD')" class="block bg-gray-200 hover:bg-gray-300 text-gray-700 p-4 rounded-lg font-medium transition w-full text-center">
                        <i class="fas fa-dollar-sign mr-2"></i> Ativar USD
                    </button>
                    <button onclick="activateCurrency('EUR')" class="block bg-gray-200 hover:bg-gray-300 text-gray-700 p-4 rounded-lg font-medium transition w-full text-center">
                        <i class="fas fa-euro-sign mr-2"></i> Ativar EUR
                    </button>
                    <div class="bg-gray-100 p-4 rounded-lg">
                        <p class="font-medium mb-2">Cotações Atuais:</p>
                        <div class="flex justify-between">
                            <span>USD: <span id="current-usd-rate" class="font-bold">-</span></span>
                            <span>EUR: <span id="current-eur-rate" class="font-bold">-</span></span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Text Tools -->
            <div class="bg-white rounded-lg shadow-md overflow-hidden p-6">
                <h3 class="text-xl font-bold text-gray-800 mb-4">Ferramentas de Texto AI</h3>
                <div class="space-y-4">
                    <a href="#" class="block bg-purple-100 hover:bg-purple-200 text-purple-800 p-4 rounded-lg transition">
                        <i class="fas fa-align-left mr-2"></i> Gerador de Textos Persuasivos
                    </a>
                    <a href="#" class="block bg-blue-100 hover:bg-blue-200 text-blue-800 p-4 rounded-lg transition">
                        <i class="fas fa-hashtag mr-2"></i> Criador de Hashtags Inteligentes
                    </a>
                    <a href="#" class="block bg-green-100 hover:bg-green-200 text-green-800 p-4 rounded-lg transition">
                        <i class="fas fa-key mr-2"></i> Otimizador de Palavras-Chave
                    </a>
                </div>
            </div>

            <!-- Photo AI Tools -->
            <div class="bg-white rounded-lg shadow-md overflow-hidden p-6">
                <h3 class="text-xl font-bold text-gray-800 mb-4">Ferramentas de Foto AI</h3>
                <div class="space-y-4">
                    <a href="#" class="block bg-red-100 hover:bg-red-200 text-red-800 p-4 rounded-lg transition">
                        <i class="fas fa-magic mr-2"></i> Melhorador de Qualidade de Imagens
                    </a>
                    <a href="#" class="block bg-yellow-100 hover:bg-yellow-200 text-yellow-800 p-4 rounded-lg transition">
                        <i class="fas fa-paint-brush mr-2"></i> Editor de Fotos Automático
                    </a>
                    <a href="#" class="block bg-indigo-100 hover:bg-indigo-200 text-indigo-800 p-4 rounded-lg transition">
                        <i class="fas fa-object-group mr-2"></i> Criador de Compositions
                    </a>
                </div>
            </div>

            <!-- Photo to Video AI -->
            <div class="bg-white rounded-lg shadow-md overflow-hidden p-6">
                <h3 class="text-xl font-bold text-gray-800 mb-4">Transformar Foto em Vídeo AI</h3>
                <div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center">
                    <input type="file" id="photo-to-video-upload" accept="image/*" class="hidden">
                    <button onclick="document.getElementById('photo-to-video-upload').click()" class="bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium py-2 px-4 rounded-lg transition mb-4">
                        <i class="fas fa-cloud-upload-alt mr-2"></i> Selecionar Foto
                    </button>
                    <button id="convert-to-video-btn" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition hidden">
                        <i class="fas fa-film mr-2"></i> Converter para Vídeo
                    </button>
                    <div id="video-result" class="mt-4 hidden">
                        <video controls class="w-full rounded-lg"></video>
                        <button class="mt-2 bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-lg transition w-full">
                            <i class="fas fa-download mr-2"></i> Baixar Vídeo
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Payment Success Modal -->
    <div id="paymentSuccessModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg shadow-xl p-6 w-full max-w-md mx-4">
            <div class="text-center">
                <div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
                    <i class="fas fa-check text-green-600 text-2xl"></i>
                </div>
                <h3 class="text-xl font-bold text-gray-800 mb-2">Pagamento Confirmado!</h3>
                <p class="text-gray-600 mb-6">Seu saldo foi atualizado com sucesso.</p>
                <button onclick="closeModal()" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-6 rounded-lg shadow-md transition duration-300">
                    Fechar
                </button>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="gradient-bg text-white py-8">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row justify-between">
                <div class="mb-6 md:mb-0">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-rocket text-2xl mr-3"></i>
                        <h2 class="text-xl font-bold">SocialCamp Pro</h2>
                    </div>
                    <p class="text-gray-200">Potencialize suas campanhas sociais com nossa plataforma completa.</p>
                </div>
                
                <div class="grid grid-cols-2 md:grid-cols-3 gap-8">
                    <div>
                        <h3 class="font-bold text-lg mb-4">Links</h3>
                        <ul class="space-y-2">
                            <li><a href="#home" class="text-gray-200 hover:text-white">Início</a></li>
                            <li><a href="#campaigns" class="text-gray-200 hover:text-white">Campanhas</a></li>
                            <li><a href="#payment" class="text-gray-200 hover:text-white">Adicionar Saldo</a></li>
                        </ul>
                    </div>
                    
                    <div>
                        <h3 class="font-bold text-lg mb-4">Recursos</h3>
                        <ul class="space-y-2">
                            <li><a href="#balance" class="text-gray-200 hover:text-white">Meu Saldo</a></li>
                            <li><a href="#news" class="text-gray-200 hover:text-white">Notícias</a></li>
                            <li><a href="#generate" class="text-gray-200 hover:text-white">Gerar Conteúdo</a></li>
                        </ul>
                    </div>
                    
                    <div>
                        <h3 class="font-bold text-lg mb-4">Contato</h3>
                        <ul class="space-y-2">
                            <li class="flex items-center"><i class="fas fa-envelope mr-2"></i> contato@socialcamppro.com</li>
                            <li class="flex items-center"><i class="fas fa-phone mr-2"></i> (11) 98765-4321</li>
                            <li class="flex items-center">
                                <a href="#" class="text-gray-200 hover:text-white mr-3"><i class="fab fa-facebook-f"></i></a>
                                <a href="#" class="text-gray-200 hover:text-white mr-3"><i class="fab fa-instagram"></i></a>
                                <a href="#" class="text-gray-200 hover:text-white"><i class="fab fa-linkedin-in"></i></a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            
            <div class="border-t border-gray-700 mt-8 pt-6 text-sm text-gray-300 text-center">
                <p>&copy; 2023 SocialCamp Pro. Todos os direitos reservados.</p>
            </div>
        </div>
    </footer>

    <script>
        // Currency exchange rates (dynamic)
        document.addEventListener('DOMContentLoaded', function() {
            updateRateTime();
            setupFormCalculations();
            setupMediaUpload();
            loadInitialNews();
            fetchExchangeRates();
            loadBalanceInfo();
        });

        async function fetchExchangeRates() {
            try {
                // Fetch commercial market rates from Brazil's Central Bank API
                const response = await fetch('https://economia.awesomeapi.com.br/json/last/USD-BRL,EUR-BRL');
                const data = await response.json();
                
                const usdRate = parseFloat(data.USDBRL.bid).toFixed(2);
                const eurRate = parseFloat(data.EURBRL.bid).toFixed(2);
                
                document.getElementById('usd-rate').textContent = `R$ ${usdRate}`;
                document.getElementById('current-usd-rate').textContent = `R$ ${usdRate}`;
                document.getElementById('eur-rate').textContent = `R$ ${eurRate}`;
                document.getElementById('current-eur-rate').textContent = `R$ ${eurRate}`;
            } catch (error) {
                console.error('Error fetching rates:', error);
                // Fallback to manual values if API fails
                const manualUsd = 5.20;
                const manualEur = 5.60;
                
                document.getElementById('usd-rate').textContent = `R$ ${manualUsd}`;
                document.getElementById('current-usd-rate').textContent = `R$ ${manualUsd}`;
                document.getElementById('eur-rate').textContent = `R$ ${manualEur}`;
                document.getElementById('current-eur-rate').textContent = `R$ ${manualEur}`;
            }
        }

        function activateCurrency(currency) {
            const amountInput = document.getElementById('amount');
            const amount = parseFloat(amountInput.value);
            
            if (amount && amount > 0) {
                const usdRate = parseFloat(document.getElementById('current-usd-rate').textContent.replace('R$ ', ''));
                const eurRate = parseFloat(document.getElementById('current-eur-rate').textContent.replace('R$ ', ''));
                
                let convertedAmount;
                if (currency === 'USD') {
                    convertedAmount = amount / usdRate;
                    alert(`Valor convertido: ${convertedAmount.toFixed(2)} USD (Taxa: R${usdRate} por 1 USD)`);
                } else {
                    convertedAmount = amount / eurRate;
                    alert(`Valor convertido: €${convertedAmount.toFixed(2)} EUR (Taxa: R${eurRate} por 1 EUR)`);
                }
            } else {
                alert(`Moeda definida como ${currency}. Insira o valor para ver a conversão.`);
            }
        }

        async function loadBalanceInfo() {
            try {
                // In a real app, this would fetch from your backend
                const response = await fetch('/api/balance');
                const data = await response.json();
                
                document.getElementById('available-balance').textContent = `R$ ${data.available.toFixed(2)}`;
                document.getElementById('total-invested').textContent = `R$ ${data.invested.toFixed(2)}`;
                document.getElementById('active-campaigns').textContent = data.activeCampaigns;
                
                // Load transactions
                const transactionsBody = document.getElementById('transactions-body');
                transactionsBody.innerHTML = data.transactions.map(tx => `
                    <tr>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${tx.date}</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${tx.description}</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm ${tx.amount >= 0 ? 'text-green-600' : 'text-red-600'} font-bold">
                            ${tx.amount >= 0 ? '+ R$ ' : '- R$ '}${Math.abs(tx.amount).toFixed(2)}
                        </td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">${tx.status}</span>
                        </td>
                    </tr>
                `).join('');
            } catch (error) {
                console.error('Error loading balance:', error);
            }
        }

        function updateRateTime() {
            const now = new Date();
            document.getElementById('update-time').textContent = formatTime(now);
            
            // Update rates every 5 minutes (simulated)
            setTimeout(updateRateTime, 300000);
        }

        function formatTime(date) {
            const hours = date.getHours().toString().padStart(2, '0');
            const minutes = date.getMinutes().toString().padStart(2, '0');
            return `Atualizado às ${hours}:${minutes}`;
        }

        function setupFormCalculations() {
            const amountInput = document.getElementById('amount');
            const budgetInput = document.getElementById('campaign-budget');
            const reachSlider = document.getElementById('reach-slider');
            const estimatedReach = document.getElementById('estimated-reach');
            
            // Campaign budget calculations
            budgetInput.addEventListener('input', function() {
                const budget = parseFloat(this.value) || 0;
                const reach = Math.min(Math.floor(budget * 15), 1000000);
                reachSlider.value = reach;
                estimatedReach.textContent = formatNumber(reach) + ' pessoas';
            });
            
            // Reach slider updates
            reachSlider.addEventListener('input', function() {
                const reach = parseInt(this.value);
                estimatedReach.textContent = formatNumber(reach) + ' pessoas';
            });
            
            // Payment amount calculations
            amountInput.addEventListener('input', function() {
                const amount = parseFloat(this.value) || 0;
                const fee = amount * 0.025;
                const total = amount + fee;
                
                document.getElementById('summary-amount').textContent = 'R$ ' + amount.toFixed(2);
                document.getElementById('summary-fee').textContent = 'R$ ' + fee.toFixed(2);
                document.getElementById('summary-total').textContent = 'R$ ' + total.toFixed(2);
            });
        }

        function formatNumber(num) {
            return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
        }

        function setupMediaUpload() {
            const mediaUpload = document.getElementById('media-upload');
            
            mediaUpload.addEventListener('change', function(e) {
                const file = e.target.files[0];
                if (!file) return;
                
                const previewDiv = document.getElementById('media-preview');
                const previewImage = document.getElementById('preview-image');
                const previewVideo = document.getElementById('preview-video');
                
                previewDiv.classList.remove('hidden');
                
                if (file.type.startsWith('image/')) {
                    previewVideo.classList.add('hidden');
                    
                    const reader = new FileReader();
                    reader.onload = function(e) {
                        previewImage.src = e.target.result;
                        previewImage.classList.remove('hidden');
                    }
                    reader.readAsDataURL(file);
                } else if (file.type.startsWith('video/')) {
                    previewImage.classList.add('hidden');
                    
                    const videoURL = URL.createObjectURL(file);
                    previewVideo.src = videoURL;
                    previewVideo.classList.remove('hidden');
                }
            });
        }

        function showPixDetails() {
            document.getElementById('pix-details').classList.toggle('hidden');
            document.getElementById('card-details').classList.add('hidden');
        }

        function showCardDetails() {
            document.getElementById('card-details').classList.toggle('hidden');
            document.getElementById('pix-details').classList.add('hidden');
        }

        // Currency activation functions
        function activateCurrency(currency) {
            const amount = document.getElementById('amount');
            if (amount.value && parseFloat(amount.value) > 0) {
                alert(`Ativado pagamento em ${currency}. O valor será convertido na confirmação.`);
            } else {
                alert(`Moeda definida como ${currency}. Insira o valor para ver a conversão.`);
            }
        }

        function copyPix() {
            const pixKey = '21404872000195';
            navigator.clipboard.writeText(pixKey).then(function() {
                alert('Chave PIX copiada: ' + pixKey);
            });
        }

        function confirmPayment(method) {
            const amount = parseFloat(document.getElementById('amount').value);
            if (!amount || amount <= 0) {
                alert('Por favor, insira um valor válido.');
                return;
            }
            
            // Update balance (demo)
            const currentBalance = parseFloat(document.getElementById('available-balance').textContent.replace('R$ ', '').replace('.', '').replace(',', '.'));
            const newBalance = currentBalance + amount;
            
            document.getElementById('available-balance').textContent = 'R$ ' + newBalance.toFixed(2).replace('.', ',');
            
            // Show success modal
            document.getElementById('paymentSuccessModal').classList.remove('hidden');
        }

        function closeModal() {
            document.getElementById('paymentSuccessModal').classList.add('hidden');
            // Reset form
            document.getElementById('amount').value = '';
            document.getElementById('summary-amount').textContent = 'R$ 0.00';
            document.getElementById('summary-fee').textContent = 'R$ 0.00';
            document.getElementById('summary-total').textContent = 'R$ 0.00';
            document.getElementById('pix-details').classList.add('hidden');
            document.getElementById('card-details').classList.add('hidden');
        }

        // News Generation
        const newsData = [
            {
                title: "Grande avanço nos negócios digitais em 2023",
                excerpt: "Empresas digitais reportam crescimento recorde no primeiro semestre.",
                date: "15/06/2023",
                image: "https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
            },
            {
                title: "Novas tendências em marketing digital",
                excerpt: "Especialistas discutem as estratégias mais eficazes para 2023.",
                date: "12/06/2023",
                image: "https://images.unsplash.com/photo-1460925895917-afdab827c52f?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
            },
            {
                title: "Crescimento das redes sociais no Brasil",
                excerpt: "Pesquisa mostra aumento de 15% no tempo gasto em plataformas sociais.",
                date: "10/06/2023",
                image: "https://images.unsplash.com/photo-1563986768609-322da13575f3?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
            },
            {
                title: "Impacto da IA no conteúdo digital",
                excerpt: "Como a inteligência artificial está revolucionando a criação de conteúdo.",
                date: "08/06/2023",
                image: "https://images.unsplash.com/photo-1620712943543-bcc4688e7485?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
            },
            {
                title: "Estratégias para aumentar o engajamento",
                excerpt: "Confira dicas práticas para melhorar a interação com seu público.",
                date: "05/06/2023",
                image: "https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
            },
            {
                title: "O futuro das campanhas pagas",
                excerpt: "Novas regulamentações e como se adaptar às mudanças.",
                date: "01/06/2023",
                image: "https://images.unsplash.com/photo-1552581234-26160f608093?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
            }
        ];

        let loadedNewsCount = 0;

        function loadInitialNews() {
            const newsContainer = document.querySelector('#news .grid');
            loadNewsSegment(newsContainer, 0, 3);
            loadedNewsCount = 3;
        }

        function loadMoreNews() {
            const newsContainer = document.querySelector('#news .grid');
            if (loadedNewsCount >= newsData.length) {
                loadedNewsCount = 0;
            }
            loadNewsSegment(newsContainer, loadedNewsCount, 3);
            loadedNewsCount += 3;
        }

        function loadNewsSegment(container, startIndex, count) {
            const endIndex = Math.min(startIndex + count, newsData.length);
            
            for (let i = startIndex; i < endIndex; i++) {
                const news = newsData[i];
                const newsCard = document.createElement('div');
                newsCard.className = 'bg-white rounded-lg shadow-md overflow-hidden news-card transition duration-300 cursor-pointer';
                newsCard.innerHTML = `
                    <img src="${news.image}" alt="${news.title}" class="w-full h-48 object-cover">
                    <div class="p-6">
                        <span class="text-sm text-gray-500">${news.date}</span>
                        <h3 class="news-title text-xl font-bold text-gray-800 my-2 transition duration-300">${news.title}</h3>
                        <p class="text-gray-600">${news.excerpt}</p>
                        <div class="mt-4 flex justify-between items-center">
                            <span class="text-blue-600 hover:text-blue-800 font-medium">Ler mais</span>
                            <i class="fas fa-share-alt text-gray-400 hover:text-gray-600"></i>
                        </div>
                    </div>
                `;
                container.appendChild(newsCard);
            }
        }

        // AI Content Generation
        const titleExamples = [
            "Descubra Como Aumentar Seu Alcance Organico em 30 Dias",
            "O Guia Definitivo Para Campanhas Pagas de Sucesso",
            "Segredos Revelados: Estratégias Que Ninguém Te Contou"
        ];

        const subtitleExamples = [
            "Aprenda com especialistas as técnicas mais eficazes para crescer sua audiência",
            "Maximize seu ROI com essas dicas comprovadas de marketing digital",
            "Transforme sua estratégia de conteúdo com essas ideias inovadoras"
        ];

        const descriptionExamples = [
            "Neste guia completo, você vai descobrir passo a passo como criar campanhas que geram resultados reais. Desde a definição do público-alvo até a análise de métricas, cobrimos tudo o que você precisa saber para ter sucesso no marketing digital. Com exemplos práticos e insights de especialistas, você estará pronto para implementar essas estratégias imediatamente.",
            "O mercado digital está em constante evolução, e manter-se atualizado pode ser um desafio. Neste material exclusivo, reunimos as últimas tendências e estratégias comprovadas para ajudar você a destacar-se da concorrência. Aprenda a criar conteúdo relevante, engajar sua audiência e converter seguidores em clientes.",
            "Ninguém nasce sabendo tudo sobre marketing digital, mas com as orientações certas, você pode acelerar sua curva de aprendizado. Este conteúdo foi cuidadosamente elaborado para fornecer informações acionáveis que você pode implementar hoje mesmo. Independentemente do seu nível de experiência, há algo valioso aqui para você."
        ];

        function generateTitle() {
            const input = document.getElementById('title-input').value.trim();
            if (!input) {
                alert('Por favor, digite um tema para gerar o título.');
                return;
            }
            
            const randomTitle = titleExamples[Math.floor(Math.random() * titleExamples.length)];
            document.getElementById('generated-title').textContent = randomTitle;
            document.getElementById('title-result').classList.remove('hidden');
        }

        function generateSubtitle() {
            const input = document.getElementById('subtitle-input').value.trim();
            if (!input) {
                alert('Por favor, digite um tema para gerar o subtítulo.');
                return;
            }
            
            const randomSubtitle = subtitleExamples[Math.floor(Math.random() * subtitleExamples.length)];
            document.getElementById('generated-subtitle').textContent = randomSubtitle;
            document.getElementById('subtitle-result').classList.remove('hidden');
        }

        function generateDescription() {
            const input = document.getElementById('description-input').value.trim();
            if (!input) {
                alert('Por favor, digite um tema para gerar a descrição.');
                return;
            }
            
            const randomDescription = descriptionExamples[Math.floor(Math.random() * descriptionExamples.length)];
            document.getElementById('generated-description').textContent = randomDescription;
            document.getElementById('description-result').classList.remove('hidden');
        }

        // Photo to Video AI
        document.getElementById('photo-to-video-upload').addEventListener('change', function(e) {
            const file = e.target.files[0];
            if (!file) return;

            const preview = document.createElement('img');
            preview.src = URL.createObjectURL(file);
            preview.className = 'w-full mb-4 rounded-lg max-h-64 object-cover';

            const uploadArea = document.querySelector('#photo-to-video-upload').parentNode;
            uploadArea.insertBefore(preview, uploadArea.lastElementChild);

            document.getElementById('convert-to-video-btn').classList.remove('hidden');
        });

        document.getElementById('convert-to-video-btn').addEventListener('click', function() {
            // In a real app, this would send to an API
            alert('Processando sua foto em vídeo... Isso pode levar alguns segundos');

            // Demo - show fake result after 2 seconds
            setTimeout(() => {
                document.querySelector('#video-result video').src = 'https://example.com/sample-video.mp4';
                document.getElementById('video-result').classList.remove('hidden');
            }, 2000);
        });
    </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=danilomecene/https-dashboard-convex-dev-t-danilomeccene-gmail-com" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>