Spaces:
Running

File size: 39,715 Bytes
81b724d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24ba05b
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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Fight Club Diamond</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
    <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
    <style>
        .gold-gradient {
            background: linear-gradient(135deg, #D4AF37 0%, #F9D423 100%);
        }
        .gold-text {
            background: linear-gradient(135deg, #D4AF37 0%, #F9D423 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        .dark-bg {
            background-color: #0a0a0a;
        }
        .darker-bg {
            background-color: #050505;
        }
        .border-gold {
            border-color: #D4AF37;
        }
    </style>
</head>
<body class="dark-bg text-gray-100 min-h-screen">
    <div id="app" class="container mx-auto px-4 py-8">
        <!-- Header -->
        <header class="flex justify-between items-center mb-12 border-b border-gold pb-6">
            <div class="flex items-center">
                <i data-feather="diamond" class="w-10 h-10 gold-text"></i>
                <h1 class="text-3xl font-bold ml-3 gold-text">Fight Club Diamond</h1>
            </div>
            <div class="flex items-center bg-black bg-opacity-50 px-4 py-2 rounded-lg border border-gold">
                <i data-feather="dollar-sign" class="w-5 h-5 mr-2 gold-text"></i>
                <span class="font-bold gold-text">Lucro Total: </span>
                <span id="totalProfit" class="ml-2 font-mono">R$ 0,00</span>
            </div>
        </header>

        <!-- Navigation Tabs -->
        <div class="mb-8">
            <div class="flex overflow-x-auto pb-2">
                <button @click="activeTab = 'registros'" :class="{'gold-gradient text-black': activeTab === 'registros', 'bg-gray-900 text-gray-300': activeTab !== 'registros'}" class="px-6 py-3 rounded-t-lg font-medium mr-2 transition-all">
                    <i data-feather="user-plus" class="inline mr-2"></i> Registros
                </button>
                <button @click="activeTab = 'blacklist'" :class="{'gold-gradient text-black': activeTab === 'blacklist', 'bg-gray-900 text-gray-300': activeTab !== 'blacklist'}" class="px-6 py-3 rounded-t-lg font-medium mr-2 transition-all">
                    <i data-feather="slash" class="inline mr-2"></i> BlackList
                </button>
                <button @click="activeTab = 'apostas'" :class="{'gold-gradient text-black': activeTab === 'apostas', 'bg-gray-900 text-gray-300': activeTab !== 'apostas'}" class="px-6 py-3 rounded-t-lg font-medium mr-2 transition-all">
                    <i data-feather="dollar-sign" class="inline mr-2"></i> Apostas
                </button>
                <button @click="activeTab = 'eliminatorias'" :class="{'gold-gradient text-black': activeTab === 'eliminatorias', 'bg-gray-900 text-gray-300': activeTab !== 'eliminatorias'}" class="px-6 py-3 rounded-t-lg font-medium mr-2 transition-all">
                    <i data-feather="award" class="inline mr-2"></i> Eliminatórias
                </button>
                <button @click="activeTab = 'resultados'" :class="{'gold-gradient text-black': activeTab === 'resultados', 'bg-gray-900 text-gray-300': activeTab !== 'resultados'}" class="px-6 py-3 rounded-t-lg font-medium transition-all">
                    <i data-feather="bar-chart-2" class="inline mr-2"></i> Resultados
                </button>
            </div>
        </div>

        <!-- Main Content -->
        <main class="bg-gray-900 rounded-lg p-6 border border-gold min-h-[500px]">
            <!-- Registros Tab -->
            <div v-if="activeTab === 'registros'" class="grid md:grid-cols-2 gap-8">
                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h2 class="text-xl font-bold mb-4 gold-text">
                        <i data-feather="user" class="inline mr-2"></i> Registrar Cliente
                    </h2>
                    <div class="space-y-4">
                        <div>
                            <label class="block text-gray-300 mb-1">Nome do Cliente</label>
                            <input v-model="newClient.name" type="text" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                        </div>
                        <div>
                            <label class="block text-gray-300 mb-1">ID do Cliente</label>
                            <input v-model="newClient.id" type="text" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                        </div>
                        <div>
                            <label class="block text-gray-300 mb-1">Valor da Entrada (R$)</label>
                            <input v-model="entryFee" type="number" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                        </div>
                        <button @click="registerClient" class="gold-gradient text-black font-bold py-2 px-6 rounded-lg flex items-center">
                            <i data-feather="save" class="mr-2"></i> Registrar Cliente
                        </button>
                    </div>
                </div>

                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h2 class="text-xl font-bold mb-4 gold-text">
                        <i data-feather="users" class="inline mr-2"></i> Registrar Lutador
                    </h2>
                    <div class="space-y-4">
                        <div>
                            <label class="block text-gray-300 mb-1">Nome do Lutador</label>
                            <input v-model="newFighter.name" type="text" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                        </div>
                        <div>
                            <label class="block text-gray-300 mb-1">ID do Lutador</label>
                            <input v-model="newFighter.id" type="text" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                        </div>
                        <div>
                            <label class="block text-gray-300 mb-1">Valor Base de Aposta (R$)</label>
                            <input v-model="newFighter.baseBet" type="number" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                        </div>
                        <button @click="registerFighter" class="gold-gradient text-black font-bold py-2 px-6 rounded-lg flex items-center">
                            <i data-feather="save" class="mr-2"></i> Registrar Lutador
                        </button>
                    </div>
                </div>

                <div class="md:col-span-2 bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h2 class="text-xl font-bold mb-4 gold-text">
                        <i data-feather="list" class="inline mr-2"></i> Registros Atuais
                    </h2>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h3 class="text-lg font-semibold mb-3 gold-text">Clientes</h3>
                            <div class="max-h-60 overflow-y-auto">
                                <table class="w-full">
                                    <thead>
                                        <tr class="border-b border-gray-600">
                                            <th class="text-left py-2">Nome</th>
                                            <th class="text-left py-2">ID</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr v-for="client in clients" :key="client.id" class="border-b border-gray-700 hover:bg-gray-700">
                                            <td class="py-2">{{ client.name }}</td>
                                            <td class="py-2">{{ client.id }}</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div>
                            <h3 class="text-lg font-semibold mb-3 gold-text">Lutadores</h3>
                            <div class="max-h-60 overflow-y-auto">
                                <table class="w-full">
                                    <thead>
                                        <tr class="border-b border-gray-600">
                                            <th class="text-left py-2">Nome</th>
                                            <th class="text-left py-2">ID</th>
                                            <th class="text-left py-2">Valor Base</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr v-for="fighter in fighters" :key="fighter.id" class="border-b border-gray-700 hover:bg-gray-700">
                                            <td class="py-2">{{ fighter.name }}</td>
                                            <td class="py-2">{{ fighter.id }}</td>
                                            <td class="py-2">R$ {{ fighter.baseBet }}</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- BlackList Tab -->
            <div v-if="activeTab === 'blacklist'" class="space-y-6">
                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h2 class="text-xl font-bold mb-4 gold-text">
                        <i data-feather="slash" class="inline mr-2"></i> Gerenciar BlackList
                    </h2>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <div class="mb-4">
                                <label class="block text-gray-300 mb-1">Adicionar à BlackList</label>
                                <div class="flex">
                                    <select v-model="blacklistType" class="bg-gray-700 border border-gray-600 rounded-l px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                                        <option value="client">Cliente</option>
                                        <option value="fighter">Lutador</option>
                                    </select>
                                    <input v-model="newBlacklistItem" type="text" class="w-full bg-gray-700 border border-gray-600 rounded-r px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold" placeholder="ID ou Nome">
                                </div>
                            </div>
                            <button @click="addToBlacklist" class="gold-gradient text-black font-bold py-2 px-6 rounded-lg flex items-center">
                                <i data-feather="plus" class="mr-2"></i> Adicionar
                            </button>
                        </div>
                        <div>
                            <div class="mb-4">
                                <label class="block text-gray-300 mb-1">Pesquisar BlackList</label>
                                <input v-model="blacklistSearch" type="text" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold" placeholder="Pesquisar por nome ou ID">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h3 class="text-lg font-semibold mb-3 gold-text">Resultados da Pesquisa</h3>
                    <div class="max-h-60 overflow-y-auto">
                        <table class="w-full">
                            <thead>
                                <tr class="border-b border-gray-600">
                                    <th class="text-left py-2">Tipo</th>
                                    <th class="text-left py-2">Nome/ID</th>
                                    <th class="text-left py-2">Status</th>
                                    <th class="text-left py-2">Ações</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr v-for="item in filteredBlacklist" :key="item.id" class="border-b border-gray-700 hover:bg-gray-700">
                                    <td class="py-2">{{ item.type === 'client' ? 'Cliente' : 'Lutador' }}</td>
                                    <td class="py-2">{{ item.name || item.id }}</td>
                                    <td class="py-2">
                                        <span :class="{'text-red-500': isBlacklisted(item), 'text-green-500': !isBlacklisted(item)}">
                                            {{ isBlacklisted(item) ? 'Banido' : 'Liberado' }}
                                        </span>
                                    </td>
                                    <td class="py-2">
                                        <button v-if="isBlacklisted(item)" @click="removeFromBlacklist(item)" class="text-red-500 hover:text-red-400">
                                            <i data-feather="trash-2" class="w-4 h-4"></i>
                                        </button>
                                        <button v-else @click="addToBlacklist(item)" class="text-green-500 hover:text-green-400">
                                            <i data-feather="plus" class="w-4 h-4"></i>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <!-- Apostas Tab -->
            <div v-if="activeTab === 'apostas'" class="space-y-6">
                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h2 class="text-xl font-bold mb-4 gold-text">
                        <i data-feather="dollar-sign" class="inline mr-2"></i> Registrar Aposta
                    </h2>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <label class="block text-gray-300 mb-1">Selecionar Cliente</label>
                            <select v-model="selectedClient" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                                <option v-for="client in clients" :value="client.id">{{ client.name }} ({{ client.id }})</option>
                            </select>
                        </div>
                        <div>
                            <label class="block text-gray-300 mb-1">Selecionar Lutador</label>
                            <select v-model="selectedFighter" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                                <option v-for="fighter in fighters" :value="fighter.id">{{ fighter.name }} ({{ fighter.id }})</option>
                            </select>
                        </div>
                    </div>

                    <div class="mt-6">
                        <label class="block text-gray-300 mb-1">Valor da Aposta (R$)</label>
                        <div class="flex flex-wrap gap-2 mb-4">
                            <button @click="betAmount = 10000" class="bg-gray-700 hover:bg-gray-600 border border-gray-600 px-4 py-2 rounded">
                                R$ 10.000
                            </button>
                            <button @click="betAmount = 20000" class="bg-gray-700 hover:bg-gray-600 border border-gray-600 px-4 py-2 rounded">
                                R$ 20.000
                            </button>
                            <button @click="betAmount = 50000" class="bg-gray-700 hover:bg-gray-600 border border-gray-600 px-4 py-2 rounded">
                                R$ 50.000
                            </button>
                        </div>
                        <input v-model="betAmount" type="number" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold" placeholder="Ou digite outro valor">
                    </div>

                    <button @click="placeBet" class="mt-6 gold-gradient text-black font-bold py-2 px-6 rounded-lg flex items-center">
                        <i data-feather="check" class="mr-2"></i> Confirmar Aposta
                    </button>
                </div>

                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h3 class="text-lg font-semibold mb-3 gold-text">Apostas Registradas</h3>
                    <div class="max-h-60 overflow-y-auto">
                        <table class="w-full">
                            <thead>
                                <tr class="border-b border-gray-600">
                                    <th class="text-left py-2">Cliente</th>
                                    <th class="text-left py-2">Lutador</th>
                                    <th class="text-left py-2">Valor (R$)</th>
                                    <th class="text-left py-2">Status</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr v-for="bet in bets" :key="bet.id" class="border-b border-gray-700 hover:bg-gray-700">
                                    <td class="py-2">{{ getClientName(bet.clientId) }}</td>
                                    <td class="py-2">{{ getFighterName(bet.fighterId) }}</td>
                                    <td class="py-2">{{ bet.amount }}</td>
                                    <td class="py-2">
                                        <span :class="{'text-yellow-500': bet.status === 'pending', 'text-green-500': bet.status === 'won', 'text-red-500': bet.status === 'lost'}">
                                            {{ bet.status === 'pending' ? 'Pendente' : bet.status === 'won' ? 'Ganhou' : 'Perdeu' }}
                                        </span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <!-- Eliminatórias Tab -->
            <div v-if="activeTab === 'eliminatorias'" class="space-y-6">
                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h2 class="text-xl font-bold mb-4 gold-text">
                        <i data-feather="award" class="inline mr-2"></i> Configurar Torneio
                    </h2>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <label class="block text-gray-300 mb-1">Número de Combates</label>
                            <input v-model="numberOfFights" type="number" min="1" max="20" class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold">
                        </div>
                        <div>
                            <label class="block text-gray-300 mb-1">Lutadores Participantes</label>
                            <select v-model="selectedFighters" multiple class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:border-gold focus:ring-1 focus:ring-gold h-[100px]">
                                <option v-for="fighter in fighters" :value="fighter.id">{{ fighter.name }} ({{ fighter.id }})</option>
                            </select>
                        </div>
                    </div>
                    <button @click="setupTournament" class="mt-6 gold-gradient text-black font-bold py-2 px-6 rounded-lg flex items-center">
                        <i data-feather="play" class="mr-2"></i> Iniciar Torneio
                    </button>
                </div>

                <div v-if="tournamentRounds.length > 0" class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h3 class="text-lg font-semibold mb-3 gold-text">Eliminatórias</h3>
                    <div class="overflow-x-auto">
                        <div class="flex space-x-8 min-w-max">
                            <div v-for="(round, roundIndex) in tournamentRounds" :key="roundIndex" class="flex flex-col space-y-4">
                                <h4 class="text-center font-medium gold-text">Rodada {{ roundIndex + 1 }}</h4>
                                <div v-for="(fight, fightIndex) in round" :key="fightIndex" class="bg-gray-700 p-3 rounded border border-gray-600">
                                    <div class="text-center mb-2 text-sm gold-text">Combate {{ fightIndex + 1 }}</div>
                                    <div class="flex flex-col space-y-2">
                                        <div class="flex items-center justify-between">
                                            <span>{{ getFighterName(fight.fighter1) }}</span>
                                            <button @click="recordFightResult(roundIndex, fightIndex, fight.fighter1)" class="bg-green-600 hover:bg-green-700 text-white px-2 py-1 rounded text-xs">
                                                Vitória
                                            </button>
                                        </div>
                                        <div class="flex items-center justify-between">
                                            <span>{{ getFighterName(fight.fighter2) }}</span>
                                            <button @click="recordFightResult(roundIndex, fightIndex, fight.fighter2)" class="bg-green-600 hover:bg-green-700 text-white px-2 py-1 rounded text-xs">
                                                Vitória
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Resultados Tab -->
            <div v-if="activeTab === 'resultados'" class="space-y-6">
                <div class="bg-gray-800 p-6 rounded-lg border border-gray-700">
                    <h2 class="text-xl font-bold mb-4 gold-text">
                        <i data-feather="bar-chart-2" class="inline mr-2"></i> Resultados Finais
                    </h2>
                    
                    <div v-if="tournamentWinner" class="mb-6">
                        <h3 class="text-lg font-semibold mb-3 gold-text">Campeão do Torneio</h3>
                        <div class="bg-gray-700 p-4 rounded border border-gold flex items-center">
                            <i data-feather="award" class="w-8 h-8 gold-text mr-4"></i>
                            <div>
                                <h4 class="text-xl font-bold">{{ getFighterName(tournamentWinner) }}</h4>
                                <p class="text-gray-300">ID: {{ tournamentWinner }}</p>
                            </div>
                        </div>
                    </div>

                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h3 class="text-lg font-semibold mb-3 gold-text">Resultados das Apostas</h3>
                            <div class="max-h-60 overflow-y-auto">
                                <table class="w-full">
                                    <thead>
                                        <tr class="border-b border-gray-600">
                                            <th class="text-left py-2">Cliente</th>
                                            <th class="text-left py-2">Resultado</th>
                                            <th class="text-left py-2">Valor (R$)</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr v-for="bet in resolvedBets" :key="bet.id" class="border-b border-gray-700 hover:bg-gray-700">
                                            <td class="py-2">{{ getClientName(bet.clientId) }}</td>
                                            <td class="py-2">
                                                <span :class="{'text-green-500': bet.status === 'won', 'text-red-500': bet.status === 'lost'}">
                                                    {{ bet.status === 'won' ? 'Ganhou' : 'Perdeu' }}
                                                </span>
                                            </td>
                                            <td class="py-2">{{ bet.amount }}</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div>
                            <h3 class="text-lg font-semibold mb-3 gold-text">Resumo Financeiro</h3>
                            <div class="bg-gray-700 p-4 rounded border border-gray-600">
                                <div class="flex justify-between py-2 border-b border-gray-600">
                                    <span>Total de Apostas:</span>
                                    <span>R$ {{ totalBets }}</span>
                                </div>
                                <div class="flex justify-between py-2 border-b border-gray-600">
                                    <span>Total de Entradas:</span>
                                    <span>R$ {{ totalEntryFees }}</span>
                                </div>
                                <div class="flex justify-between py-2 border-b border-gray-600">
                                    <span>Total Arrecadado:</span>
                                    <span>R$ {{ totalRevenue }}</span>
                                </div>
                                <div class="flex justify-between py-2 border-b border-gray-600">
                                    <span>Prêmios Pagos:</span>
                                    <span>R$ {{ totalPayouts }}</span>
                                </div>
                                <div class="flex justify-between py-2 font-bold gold-text">
                                    <span>Lucro da Casa (10%):</span>
                                    <span>R$ {{ houseProfit }}</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>

        <!-- Footer -->
        <footer class="mt-12 text-center text-gray-500 text-sm">
            <p>Fight Club Diamond &copy; 2023 - Todos os direitos reservados</p>
        </footer>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@3.2.47/dist/vue.global.min.js"></script>
    <script>
        const { createApp, ref, computed, onMounted } = Vue;

        createApp({
            setup() {
                // Data
                const activeTab = ref('registros');
                const totalProfit = ref(0);
                
                // Registros
                const newClient = ref({ name: '', id: '' });
                const newFighter = ref({ name: '', id: '', baseBet: 10000 });
                const entryFee = ref(5000);
                const clients = ref([]);
                const fighters = ref([]);
                
                // BlackList
                const blacklistType = ref('client');
                const newBlacklistItem = ref('');
                const blacklistSearch = ref('');
                const blacklist = ref([]);
                
                // Apostas
                const selectedClient = ref('');
                const selectedFighter = ref('');
                const betAmount = ref(10000);
                const bets = ref([]);
                
                // Eliminatórias
                const numberOfFights = ref(4);
                const selectedFighters = ref([]);
                const tournamentRounds = ref([]);
                const tournamentWinner = ref(null);
                
                // Resultados
                const resolvedBets = ref([]);

                // Computed
                const filteredBlacklist = computed(() => {
                    if (!blacklistSearch.value) return [...clients.value, ...fighters.value];
                    
                    const searchTerm = blacklistSearch.value.toLowerCase();
                    return [...clients.value, ...fighters.value].filter(item => 
                        item.name.toLowerCase().includes(searchTerm) || 
                        item.id.toLowerCase().includes(searchTerm)
                    );
                });
                
                const totalBets = computed(() => {
                    return bets.value.reduce((sum, bet) => sum + bet.amount, 0);
                });
                
                const totalEntryFees = computed(() => {
                    return clients.value.length * entryFee.value;
                });
                
                const totalRevenue = computed(() => {
                    return totalBets.value + totalEntryFees.value;
                });
                
                const totalPayouts = computed(() => {
                    return resolvedBets.value
                        .filter(bet => bet.status === 'won')
                        .reduce((sum, bet) => sum + bet.amount * 2, 0);
                });
                
                const houseProfit = computed(() => {
                    return (totalRevenue.value - totalPayouts.value) * 0.1;
                });

                // Methods
                const registerClient = () => {
                    if (!newClient.value.name || !newClient.value.id) return;
                    clients.value.push({ ...newClient.value });
                    newClient.value = { name: '', id: '' };
                    totalProfit.value += entryFee.value;
                };
                
                const registerFighter = () => {
                    if (!newFighter.value.name || !newFighter.value.id) return;
                    fighters.value.push({ ...newFighter.value });
                    newFighter.value = { name: '', id: '', baseBet: 10000 };
                };
                
                const isBlacklisted = (item) => {
                    return blacklist.value.some(b => b.id === item.id && b.type === (item.baseBet ? 'fighter' : 'client'));
                };
                
                const addToBlacklist = () => {
                    if (!newBlacklistItem.value) return;
                    
                    const item = {
                        id: newBlacklistItem.value,
                        type: blacklistType.value
                    };
                    
                    if (!blacklist.value.some(b => b.id === item.id && b.type === item.type)) {
                        blacklist.value.push(item);
                    }
                    
                    newBlacklistItem.value = '';
                };
                
                const removeFromBlacklist = (item) => {
                    blacklist.value = blacklist.value.filter(b => 
                        !(b.id === item.id && b.type === (item.baseBet ? 'fighter' : 'client'))
                    );
                };
                
                const placeBet = () => {
                    if (!selectedClient.value || !selectedFighter.value || !betAmount.value) return;
                    
                    bets.value.push({
                        id: Date.now(),
                        clientId: selectedClient.value,
                        fighterId: selectedFighter.value,
                        amount: betAmount.value,
                        status: 'pending'
                    });
                    
                    selectedClient.value = '';
                    selectedFighter.value = '';
                    betAmount.value = 10000;
                };
                
                const setupTournament = () => {
                    if (selectedFighters.value.length < 2) return;
                    
                    // Shuffle fighters
                    const shuffled = [...selectedFighters.value].sort(() => 0.5 - Math.random());
                    
                    // Create first round
                    const firstRound = [];
                    for (let i = 0; i < numberOfFights.value; i++) {
                        const fighter1 = shuffled[i * 2];
                        const fighter2 = shuffled[i * 2 + 1];
                        if (fighter1 && fighter2) {
                            firstRound.push({
                                fighter1,
                                fighter2,
                                winner: null
                            });
                        }
                    }
                    
                    tournamentRounds.value = [firstRound];
                    tournamentWinner.value = null;
                };
                
                const recordFightResult = (roundIndex, fightIndex, winnerId) => {
                    // Mark the winner in current fight
                    tournamentRounds.value[roundIndex][fightIndex].winner = winnerId;
                    
                    // If it's the last fight in the round, create next round
                    if (fightIndex === tournamentRounds.value[roundIndex].length - 1) {
                        const winners = tournamentRounds.value[roundIndex].map(fight => fight.winner);
                        
                        if (winners.length > 1) {
                            const nextRound = [];
                            for (let i = 0; i < winners.length / 2; i++) {
                                const fighter1 = winners[i * 2];
                                const fighter2 = winners[i * 2 + 1];
                                if (fighter1 && fighter2) {
                                    nextRound.push({
                                        fighter1,
                                        fighter2,
                                        winner: null
                                    });
                                }
                            }
                            tournamentRounds.value.push(nextRound);
                        } else {
                            // Tournament finished
                            tournamentWinner.value = winners[0];
                            resolveBets();
                        }
                    }
                };
                
                const resolveBets = () => {
                    resolvedBets.value = bets.value.map(bet => ({
                        ...bet,
                        status: bet.fighterId === tournamentWinner.value ? 'won' : 'lost'
                    }));
                    
                    // Update total profit
                    totalProfit.value += houseProfit.value;
                };
                
                const getClientName = (id) => {
                    const client = clients.value.find(c => c.id === id);
                    return client ? client.name : 'Desconhecido';
                };
                
                const getFighterName = (id) => {
                    const fighter = fighters.value.find(f => f.id === id);
                    return fighter ? fighter.name : 'Desconhecido';
                };

                // Initialize with some sample data
                onMounted(() => {
                    clients.value = [
                        { name: 'João Silva', id: 'CL001' },
                        { name: 'Maria Santos', id: 'CL002' },
                        { name: 'Carlos Oliveira', id: 'CL003' }
                    ];
                    
                    fighters.value = [
                        { name: 'Tyson Fury', id: 'FT001', baseBet: 15000 },
                        { name: 'Mike Tyson', id: 'FT002', baseBet: 20000 },
                        { name: 'Muhammad Ali', id: 'FT003', baseBet: 25000 },
                        { name: 'Floyd Mayweather', id: 'FT004', baseBet: 30000 }
                    ];
                    
                    blacklist.value = [
                        { id: 'CL003', type: 'client' }
                    ];
                    
                    selectedFighters.value = fighters.value.map(f => f.id);
                });

                return {
                    activeTab,
                    totalProfit,
                    
                    // Registros
                    newClient,
                    newFighter,
                    entryFee,
                    clients,
                    fighters,
                    registerClient,
                    registerFighter,
                    
                    // BlackList
                    blacklistType,
                    newBlacklistItem,
                    blacklistSearch,
                    blacklist,
                    filteredBlacklist,
                    isBlacklisted,
                    addToBlacklist,
                    removeFromBlacklist,
                    
                    // Apostas
                    selectedClient,
                    selectedFighter,
                    betAmount,
                    bets,
                    placeBet,
                    getClientName,
                    getFighterName,
                    
                    // Eliminatórias
                    numberOfFights,
                    selectedFighters,
                    tournamentRounds,
                    tournamentWinner,
                    setupTournament,
                    recordFightResult,
                    
                    // Resultados
                    resolvedBets,
                    totalBets,
                    totalEntryFees,
                    totalRevenue,
                    totalPayouts,
                    houseProfit
                };
            }
        }).mount('#app');

        // Initialize feather icons and AOS
        document.addEventListener('DOMContentLoaded', () => {
            feather.replace();
            AOS.init();
        });
    </script>
    <script>feather.replace();</script>
    <script>AOS.init();</script>
</body>
</html>