-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdice-roller.html
More file actions
1962 lines (1741 loc) · 82.2 KB
/
dice-roller.html
File metadata and controls
1962 lines (1741 loc) · 82.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SCAR - Rolador de Dados</title>
<link rel="stylesheet" href="https://cdn.squeleton.dev/squeleton.v4.min.css">
<link rel="stylesheet" href="assets/css/main.css">
<script src="https://cdn.squeleton.dev/squeleton-main.v4.min.js"></script>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
<style>
/* ============================================
Dice Roller - Estilos Especificos da Pagina
Estilos comuns estao em assets/css/main.css
============================================ */
body {
overflow-x: hidden;
}
/* Container principal de conteúdo */
.main-content {
background: var(--cor-card);
border: 1px solid var(--cor-borda);
border-radius: 18px;
overflow: hidden;
box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
}
/* Tabs - integradas ao container */
.tabs {
border-bottom: 1px solid var(--cor-borda);
overflow-x: auto;
background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
padding: 0 15px;
display: flex;
gap: 5px;
}
.tabs::-webkit-scrollbar {
height: 3px;
}
.tabs::-webkit-scrollbar-thumb {
background: var(--cor-principal);
border-radius: 3px;
}
.tab {
background: transparent;
border: none;
color: var(--cor-texto-soft);
cursor: pointer;
transition: all 0.25s ease;
border-bottom: 3px solid transparent;
white-space: nowrap;
font-family: 'Bebas Neue', sans-serif;
letter-spacing: 1.5px;
font-size: 0.95rem;
position: relative;
margin-bottom: -1px;
}
.tab:hover {
color: var(--cor-texto);
background: rgba(255,255,255,0.03);
}
.tab.active {
color: var(--cor-secundaria);
border-bottom-color: var(--cor-secundaria);
background: linear-gradient(180deg, rgba(220,20,60,0.08) 0%, transparent 100%);
}
.tab-content {
display: none;
padding: 28px;
}
.tab-content.active { display: block; }
/* Labels */
.field-label {
display: block;
font-size: 0.7rem;
color: var(--cor-texto-soft);
letter-spacing: 2px;
margin-bottom: 8px;
text-transform: uppercase;
}
/* Inputs */
input, select {
background: rgba(0,0,0,0.4);
border: 1px solid var(--cor-borda);
color: var(--cor-texto);
border-radius: 10px;
transition: all 0.3s ease;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
input:hover, select:hover {
border-color: rgba(255,255,255,0.2);
background: rgba(0,0,0,0.5);
}
input:focus, select:focus {
outline: none;
border-color: var(--cor-secundaria);
background: rgba(0,0,0,0.5);
box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 0 3px rgba(220, 20, 60, 0.15);
}
input::placeholder { color: rgba(255,255,255,0.3); }
/* Select dropdown */
select option {
background: var(--cor-card);
color: var(--cor-texto);
}
/* Buttons */
.btn {
border: none;
cursor: pointer;
transition: all 0.3s;
font-family: 'Bebas Neue', sans-serif;
letter-spacing: 2px;
position: relative;
overflow: hidden;
}
.btn::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
transition: left 0.5s;
}
.btn:hover::after {
left: 100%;
}
.btn-primary {
background: var(--gradient-blood);
color: #fff;
box-shadow: 0 4px 20px rgba(139,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
filter: brightness(1.15);
box-shadow: 0 8px 30px rgba(220,20,60,0.5);
transform: translateY(-3px);
}
.btn-primary:active {
transform: translateY(-1px);
box-shadow: 0 4px 15px rgba(220,20,60,0.4);
}
.btn-secondary {
background: rgba(255,255,255,0.03);
border: 1px solid var(--cor-borda);
color: var(--cor-texto);
}
.btn-secondary:hover {
background: rgba(255,255,255,0.08);
border-color: var(--cor-texto-soft);
transform: translateY(-2px);
}
.btn-online {
background: linear-gradient(135deg, var(--purple), var(--pink));
color: #fff;
box-shadow: 0 4px 20px rgba(155,89,182,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-online:hover {
filter: brightness(1.15);
transform: translateY(-3px);
box-shadow: 0 8px 30px rgba(155,89,182,0.5);
}
.btn-green {
background: linear-gradient(135deg, #27ae60, #1e8449);
color: #fff;
box-shadow: 0 4px 20px rgba(39,174,96,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-green:hover {
filter: brightness(1.15);
transform: translateY(-3px);
box-shadow: 0 8px 30px rgba(39,174,96,0.5);
}
/* Dice */
.dice-pool {
display: flex;
flex-wrap: wrap;
gap: 12px;
justify-content: center;
}
.die {
width: 54px;
height: 54px;
background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
border: 2px solid var(--cor-borda);
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
font-weight: bold;
font-family: 'Bebas Neue', sans-serif;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
border-radius: 10px;
}
.die.rolling {
animation: shake 0.1s infinite;
border-color: var(--cor-gold);
box-shadow: 0 0 20px rgba(212,175,55,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}
.die.max {
border-color: var(--green);
color: var(--green);
background: linear-gradient(145deg, rgba(39,174,96,0.15), rgba(39,174,96,0.05));
box-shadow: 0 0 20px rgba(39,174,96,0.4), inset 0 1px 0 rgba(39,174,96,0.2);
}
.die.min {
border-color: var(--cor-secundaria);
color: var(--cor-secundaria);
background: linear-gradient(145deg, rgba(220,20,60,0.15), rgba(220,20,60,0.05));
box-shadow: 0 0 20px rgba(220,20,60,0.4), inset 0 1px 0 rgba(220,20,60,0.2);
}
@keyframes shake {
0%, 100% { transform: rotate(-3deg); }
50% { transform: rotate(3deg); }
}
/* Results */
.result-total {
font-size: 60px;
font-weight: bold;
color: var(--cor-gold);
font-family: 'Bebas Neue', sans-serif;
text-shadow: 0 0 40px rgba(212,175,55,0.5), 0 2px 10px rgba(0,0,0,0.5);
letter-spacing: 3px;
}
.injury-badge {
display: inline-block;
padding: 8px 18px;
border-radius: 8px;
font-weight: bold;
font-family: 'Bebas Neue', sans-serif;
letter-spacing: 2px;
box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
text-transform: uppercase;
font-size: 0.85rem;
flex-shrink: 0;
white-space: nowrap;
min-width: 80px;
text-align: center;
}
/* Tabela de Injúrias */
.injury-table-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.injury-table-row:last-child {
border-bottom: none;
}
.injury-none {
background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
color: #fff;
box-shadow: 0 4px 20px rgba(39,174,96,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}
.injury-leve {
background: linear-gradient(135deg, #D4AF37 0%, #b8960c 100%);
color: #000;
box-shadow: 0 4px 20px rgba(212,175,55,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.injury-grave {
background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
color: #fff;
box-shadow: 0 4px 20px rgba(230,126,34,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}
.injury-critica {
background: var(--gradient-blood);
color: #fff;
animation: critGlow 1s ease-in-out infinite alternate;
box-shadow: 0 4px 20px rgba(220,20,60,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}
@keyframes critGlow {
from { box-shadow: 0 0 10px rgba(220,20,60,0.3); }
to { box-shadow: 0 0 25px rgba(220,20,60,0.6); }
}
.fear-success {
color: var(--green);
text-shadow: 0 0 20px rgba(39,174,96,0.5), 0 2px 4px rgba(0,0,0,0.3);
}
.fear-fail {
color: var(--cor-secundaria);
text-shadow: 0 0 20px rgba(220,20,60,0.5), 0 2px 4px rgba(0,0,0,0.3);
}
/* Crítico */
.crit-banner {
background: var(--gradient-blood);
padding: 20px 24px;
border-radius: 12px;
margin-top: 18px;
animation: critPulse 0.5s ease;
box-shadow: 0 8px 30px rgba(220,20,60,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
border: 1px solid rgba(255,255,255,0.1);
}
@keyframes critPulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.02); }
}
/* Quick dice */
.quick-btn {
background: rgba(0,0,0,0.3);
border: 1px solid var(--cor-borda);
color: var(--cor-texto-soft);
cursor: pointer;
transition: all 0.25s ease;
font-family: 'Bebas Neue', sans-serif;
letter-spacing: 1px;
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.quick-btn:hover {
background: var(--gradient-blood);
border-color: var(--cor-secundaria);
color: #fff;
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(220,20,60,0.4);
}
.quick-btn:active {
transform: translateY(-1px);
box-shadow: 0 4px 15px rgba(220,20,60,0.3);
}
/* Seção interna do card */
.section-box {
background: rgba(0,0,0,0.25);
border: 1px solid rgba(255,255,255,0.05);
border-radius: 12px;
padding: 24px;
margin-bottom: 20px;
transition: all 0.3s ease;
}
.section-box:last-child {
margin-bottom: 0;
}
.section-box:hover {
border-color: rgba(255,255,255,0.08);
background: rgba(0,0,0,0.3);
}
/* Separador decorativo */
.divider {
height: 1px;
background: linear-gradient(90deg, transparent, var(--cor-borda), transparent);
margin: 20px 0;
}
/* Título de seção */
.section-title {
color: var(--cor-gold);
font-family: 'Bebas Neue', sans-serif;
font-size: 1.2rem;
letter-spacing: 3px;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid rgba(212,175,55,0.2);
display: flex;
align-items: center;
gap: 10px;
}
.section-title::before {
content: '';
width: 4px;
height: 20px;
background: var(--gradient-blood);
border-radius: 2px;
}
/* Modal */
.modal-popup {
background: var(--cor-card);
max-height: 80vh;
overflow-y: auto;
border: 1px solid var(--cor-borda);
box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}
.history-item {
border-left: 3px solid var(--cor-borda);
transition: all 0.2s ease;
background: rgba(0,0,0,0.3);
border-radius: 0 10px 10px 0;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.history-item:hover {
border-left-color: var(--cor-secundaria);
background: rgba(0,0,0,0.4);
transform: translateX(4px);
}
/* Online */
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
display: inline-block;
flex-shrink: 0;
}
.status-dot.online {
background: var(--green);
box-shadow: 0 0 12px rgba(39,174,96,0.7), 0 0 4px rgba(39,174,96,0.9);
}
.status-dot.offline {
background: var(--cor-secundaria);
box-shadow: 0 0 12px rgba(220,20,60,0.7), 0 0 4px rgba(220,20,60,0.9);
}
.status-dot.waiting {
background: var(--cor-gold);
animation: pulse 1.2s ease-in-out infinite;
box-shadow: 0 0 12px rgba(212,175,55,0.7), 0 0 4px rgba(212,175,55,0.9);
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.room-code {
font-family: 'Bebas Neue', sans-serif;
font-size: 28px;
letter-spacing: 6px;
color: var(--cor-gold);
background: rgba(212,175,55,0.08);
text-shadow: 0 0 25px rgba(212,175,55,0.5);
padding: 14px 28px;
border-radius: 10px;
border: 2px dashed rgba(212,175,55,0.5);
display: inline-block;
box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}
.player-box {
background: rgba(0,0,0,0.3);
border: 2px solid var(--cor-borda);
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03);
}
.player-box.connected {
border-color: var(--green);
background: rgba(39,174,96,0.08);
box-shadow: 0 0 25px rgba(39,174,96,0.2), inset 0 1px 0 rgba(39,174,96,0.1);
}
.player-box.ready {
border-color: var(--cor-gold);
background: rgba(212,175,55,0.08);
box-shadow: 0 0 25px rgba(212,175,55,0.25), inset 0 1px 0 rgba(212,175,55,0.1);
}
.player-box.winner {
border-color: var(--green);
background: rgba(39,174,96,0.12);
box-shadow: 0 0 35px rgba(39,174,96,0.35), inset 0 1px 0 rgba(39,174,96,0.15);
}
.player-box.loser {
border-color: var(--cor-secundaria);
opacity: 0.65;
background: rgba(220,20,60,0.08);
box-shadow: 0 0 20px rgba(220,20,60,0.2);
}
.chat-box {
background: rgba(0,0,0,0.4);
height: 160px;
overflow-y: auto;
border: 1px solid var(--cor-borda);
border-radius: 10px;
box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}
.chat-msg {
padding: 10px 14px;
margin: 8px;
border-radius: 8px;
font-size: 0.85rem;
}
.chat-msg.system {
background: rgba(212,175,55,0.12);
color: var(--cor-gold);
border-left: 3px solid var(--cor-gold);
}
.chat-msg.player {
background: rgba(255,255,255,0.03);
border-left: 3px solid var(--cor-texto-soft);
color: var(--cor-texto);
}
/* Botão Voltar */
.btn-back {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
background: rgba(255,255,255,0.03);
border: 1px solid var(--cor-borda);
border-radius: 10px;
color: var(--cor-texto-soft);
text-decoration: none;
font-family: 'Bebas Neue', sans-serif;
font-size: 0.9rem;
letter-spacing: 1px;
transition: all 0.3s ease;
}
.btn-back:hover {
background: rgba(220,20,60,0.1);
border-color: var(--cor-secundaria);
color: var(--cor-texto);
transform: translateX(-3px);
}
.btn-back svg {
width: 16px;
height: 16px;
transition: transform 0.3s ease;
}
.btn-back:hover svg {
transform: translateX(-3px);
}
/* Footer */
.site-footer {
text-align: center;
padding: 40px 20px 30px;
margin-top: 40px;
width: 100vw;
position: relative;
left: 50%;
transform: translateX(-50%);
background: linear-gradient(180deg, var(--cor-fundo) 0%, rgba(139,0,0,0.15) 100%);
border-top: 1px solid rgba(139,0,0,0.3);
}
.site-footer::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 120px;
height: 2px;
background: var(--gradient-blood);
box-shadow: 0 0 10px rgba(220,20,60,0.5);
}
.footer-brand {
margin-bottom: 20px;
}
.footer-brand a {
font-family: 'Bebas Neue', sans-serif;
font-size: 1.8rem;
color: var(--cor-secundaria);
text-decoration: none;
letter-spacing: 4px;
transition: text-shadow 0.3s ease;
}
.footer-brand a:hover {
text-shadow: 0 0 30px rgba(220,20,60,0.6);
}
.footer-brand span {
display: block;
font-family: 'Roboto', sans-serif;
font-size: 0.7rem;
color: var(--cor-texto-soft);
letter-spacing: 2px;
text-transform: uppercase;
margin-top: 5px;
}
.footer-links {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
margin-bottom: 20px;
flex-wrap: wrap;
}
.footer-links a {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 8px 16px;
color: var(--cor-texto-soft);
text-decoration: none;
font-size: 0.8rem;
border: 1px solid var(--cor-borda);
border-radius: 6px;
transition: all 0.3s ease;
}
.footer-links a:hover {
color: var(--cor-texto);
border-color: var(--cor-secundaria);
background: rgba(139,0,0,0.2);
transform: translateY(-2px);
}
.footer-links svg {
width: 16px;
height: 16px;
opacity: 0.8;
}
.footer-links a:hover svg {
opacity: 1;
}
.footer-divider-line {
width: 200px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(139,0,0,0.3), transparent);
margin: 0 auto 15px;
}
.footer-copy {
color: var(--cor-texto-soft);
font-size: 0.7rem;
opacity: 0.5;
letter-spacing: 0.5px;
}
/* ========== MOBILE RESPONSIVO - ONLINE ========== */
@media (max-width: 640px) {
#tab-online .section-box {
padding: 15px;
}
#tab-online .section-title {
font-size: 1.1rem;
}
/* Botões em coluna no mobile */
#online-lobby .d-flex.f-gap-15 {
flex-direction: column;
}
/* Código da sala menor */
.room-code {
font-size: 16px;
letter-spacing: 2px;
padding: 10px 14px;
word-break: break-all;
}
/* Grid de jogadores responsivo */
#online-sala .row.gap-20 {
gap: 10px;
}
.player-box {
padding: 12px !important;
}
.player-box .fs-9 {
font-size: 0.85rem;
}
/* Controles de combate em coluna */
#online-controles .d-flex {
flex-direction: column;
gap: 12px;
align-items: stretch !important;
}
#online-controles .d-flex > div {
width: 100%;
}
#online-controles input,
#online-controles select {
width: 100% !important;
}
#online-controles button {
width: 100%;
padding: 14px 20px;
}
/* Chat menor */
.chat-box {
height: 100px;
}
.chat-msg {
padding: 8px 10px;
margin: 5px;
font-size: 0.8rem;
}
/* Inputs mais compactos */
#tab-online input,
#tab-online select {
padding: 12px;
font-size: 14px;
}
/* Botão sair */
#online-sala > button:last-child {
padding: 12px;
}
}
</style>
</head>
<body class="p-30-t p-30-lr xs-p-15-t xs-p-15-lr" style="overflow-x: hidden;">
<div class="container">
<!-- Botão Voltar -->
<div class="m-20-b">
<a href="index.html" class="btn-back">
<svg fill="currentColor" viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
Voltar ao Início
</a>
</div>
<!-- Header -->
<div class="text-center m-40-b xs-m-25-b">
<h1 class="title fs-15 xs-fs-12 m-5-b" style="letter-spacing: 10px;">SCAR</h1>
<p class="opacity-4 fs-7" style="letter-spacing: 5px; text-transform: uppercase;">Sacrificial Contract & Risk</p>
<div class="m-15-t d-flex f-justify-center f-items-center f-gap-15">
<span style="width: 40px; height: 1px; background: linear-gradient(90deg, transparent, var(--cor-secundaria));"></span>
<span class="fs-6" style="color: var(--cor-secundaria); font-style: italic;">Rolador de Dados</span>
<span style="width: 40px; height: 1px; background: linear-gradient(90deg, var(--cor-secundaria), transparent);"></span>
</div>
</div>
<!-- Botão Histórico -->
<div class="text-center m-25-b">
<button class="btn btn-secondary border-rd-10 p-12-tb p-30-lr fs-7" data-modal-show="modal-historico">
📜 HISTÓRICO <span id="historico-count" class="m-5-l opacity-6">(0)</span>
</button>
</div>
<!-- Container Principal -->
<div class="main-content">
<!-- Tabs -->
<div class="tabs d-flex f-gap-5">
<button class="tab active p-15-tb p-25-lr fs-7" data-tab="livre">LIVRE</button>
<button class="tab p-15-tb p-25-lr fs-7" data-tab="combate">COMBATE</button>
<button class="tab p-15-tb p-25-lr fs-7" data-tab="medo">MEDO</button>
<button class="tab p-15-tb p-25-lr fs-7" data-tab="duelo">DUELO</button>
<button class="tab p-15-tb p-25-lr fs-7" data-tab="online" style="color:var(--pink)">⚔ ONLINE</button>
</div>
<!-- TAB: Teste de Ação -->
<!-- TAB: Combate -->
<div class="tab-content" id="tab-combate">
<div class="section-title">Combate - Injúrias</div>
<div class="section-box">
<div class="row gap-25">
<div class="c-xs-12 c-sm-6">
<label class="field-label">Atacante (dados)</label>
<input type="number" id="atacante-dados" value="4" min="1" class="border-rd-10 p-14-all w-100 text-center fs-9">
</div>
<div class="c-xs-12 c-sm-6">
<label class="field-label">Defensor (dados)</label>
<input type="number" id="defensor-dados" value="3" min="1" class="border-rd-10 p-14-all w-100 text-center fs-9">
</div>
</div>
<button class="btn btn-primary border-rd-10 p-15-tb w-100 fs-8 m-25-t" onclick="rolarCombate()">ROLAR COMBATE</button>
</div>
<div class="section-box">
<label class="field-label m-15-b">Tabela de Injúrias</label>
<div class="fs-7">
<div class="injury-table-row">
<span class="opacity-6">Diferença 1-9</span>
<span class="injury-badge injury-leve">Leve</span>
</div>
<div class="injury-table-row">
<span class="opacity-6">Diferença 10-19</span>
<span class="injury-badge injury-grave">Grave</span>
</div>
<div class="injury-table-row">
<span class="opacity-6">Diferença 20+</span>
<span class="injury-badge injury-critica">Crítica</span>
</div>
</div>
</div>
<div id="resultado-combate" class="section-box text-center p-35-all">
<span class="opacity-4 fs-8">⚔ Role o combate</span>
</div>
</div>
<!-- TAB: Teste de Medo -->
<div class="tab-content" id="tab-medo">
<div class="section-title">Teste de Medo</div>
<div class="section-box">
<div class="d-flex f-wrap f-gap-25 f-items-end">
<div>
<label class="field-label">Categoria de Idade</label>
<select id="nivel-medo" class="border-rd-10 p-14-all w-200px fs-7">
<option value="0">Recém-Nascido (DT 15)</option>
<option value="1">Jovem (DT 20)</option>
<option value="2">Maduro (DT 25)</option>
<option value="3">Veterano (DT 30)</option>
<option value="4">Ancião (DT 35)</option>
<option value="5">Primevo (DT 40)</option>
</select>
</div>
<div>
<label class="field-label">Atributo</label>
<input type="number" id="medo-atributo" value="4" min="0" class="border-rd-10 p-14-all w-90px text-center fs-9">
</div>
<div>
<label class="field-label">DT</label>
<input type="number" id="medo-dt" value="25" min="1" class="border-rd-10 p-14-all w-90px text-center fs-9">
</div>
</div>
<button class="btn btn-primary border-rd-10 p-15-tb w-100 fs-8 m-25-t" onclick="rolarMedo()">TESTAR MEDO</button>
</div>
<div id="resultado-medo" class="section-box text-center p-35-all">
<span class="opacity-4 fs-8">👁 Faça o teste de medo</span>
</div>
</div>
<!-- TAB: Duelo -->
<div class="tab-content" id="tab-duelo">
<div class="section-title">Duelo (Melhor de 3)</div>
<div class="section-box">
<p class="fs-7 opacity-5 m-20-b" style="border-left: 3px solid var(--cor-principal); padding-left: 12px;">Cada duelista escolhe 3 atributos (forte, médio, fraco)</p>
<div class="row gap-25 m-25-b">
<div class="c-xs-6">
<p class="fs-7 text-center m-15-b" style="color:var(--blue); letter-spacing: 2px; font-family: 'Bebas Neue', sans-serif;">DUELISTA A</p>
<input type="number" id="duelo-a1" placeholder="Forte" class="border-rd-10 p-12-all w-100 text-center m-10-b">
<input type="number" id="duelo-a2" placeholder="Médio" class="border-rd-10 p-12-all w-100 text-center m-10-b">
<input type="number" id="duelo-a3" placeholder="Fraco" class="border-rd-10 p-12-all w-100 text-center">
</div>
<div class="c-xs-6">
<p class="fs-7 text-center m-15-b" style="color:var(--cor-secundaria); letter-spacing: 2px; font-family: 'Bebas Neue', sans-serif;">DUELISTA B</p>
<input type="number" id="duelo-b1" placeholder="Forte" class="border-rd-10 p-12-all w-100 text-center m-10-b">
<input type="number" id="duelo-b2" placeholder="Médio" class="border-rd-10 p-12-all w-100 text-center m-10-b">
<input type="number" id="duelo-b3" placeholder="Fraco" class="border-rd-10 p-12-all w-100 text-center">
</div>
</div>
<button class="btn btn-primary border-rd-10 p-15-tb w-100 fs-8" onclick="rolarDuelo()">INICIAR DUELO</button>
</div>
<div id="resultado-duelo" class="section-box text-center p-35-all">
<span class="opacity-4 fs-8">🗡 Configure os duelistas</span>
</div>
</div>
<!-- TAB: Livre -->
<div class="tab-content active" id="tab-livre">
<div class="section-title">Rolagem Livre</div>
<div class="section-box">
<div class="d-flex f-wrap f-gap-20 f-items-end">
<div>
<label class="field-label">Quantidade</label>
<input type="number" id="livre-qtd" value="1" min="1" class="border-rd-10 p-14-all w-80px text-center fs-9">
</div>
<div>
<label class="field-label">Lados</label>
<input type="number" id="livre-lados" value="10" min="2" class="border-rd-10 p-14-all w-80px text-center fs-9">
</div>
<div>
<label class="field-label">Modificador</label>
<input type="number" id="livre-mod" value="0" class="border-rd-10 p-14-all w-80px text-center fs-9">
</div>
<button class="btn btn-primary border-rd-10 p-15-tb p-40-lr fs-8" onclick="rolarLivre()">ROLAR</button>
</div>
</div>
<div class="section-box">
<label class="field-label m-15-b">Atalhos</label>
<div class="d-flex f-wrap f-gap-12">
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,4,0)">D4</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,6,0)">D6</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,8,0)">D8</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,10,0)">D10</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,12,0)">D12</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,20,0)">D20</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,100,0)">D100</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(2,6,0)">2D6</button>
<button class="quick-btn border-rd-10 p-12-tb p-18-lr fs-7" onclick="rolarCustom(1,7,0)">D7</button>
</div>
</div>
<div id="resultado-livre" class="section-box text-center p-35-all">
<span class="opacity-4 fs-8">🎲 Role os dados</span>
</div>
</div>
<!-- TAB: Online -->
<div class="tab-content" id="tab-online">
<!-- Status -->
<div class="section-box p-15-all m-0-b">
<div class="d-flex f-items-center f-gap-12">
<span class="status-dot offline" id="online-status-dot"></span>
<span class="fs-7" id="online-status-text">Desconectado</span>
</div>
</div>
<div class="divider"></div>
<!-- Tela Inicial (não conectado) -->
<div id="online-lobby">
<div class="section-title">Combate Online (P2P)</div>
<div class="section-box">
<div class="m-20-b">
<label class="field-label">Seu Nome</label>
<input type="text" id="online-nome" placeholder="Digite seu nome" maxlength="20" class="border-rd-10 p-14-all w-100 fs-8">
</div>
<div class="d-flex f-gap-15">
<button class="btn btn-online border-rd-10 p-15-tb f-grow-1 fs-8" onclick="criarSala()">CRIAR SALA</button>
<button class="btn btn-secondary border-rd-10 p-15-tb f-grow-1 fs-8" onclick="toggleEntrar()">ENTRAR EM SALA</button>
</div>
<div id="entrar-form" class="d-none m-25-t">
<label class="field-label">Código da Sala</label>
<div class="d-flex f-gap-12">
<input type="text" id="codigo-entrar" placeholder="Cole o código aqui" class="border-rd-10 p-14-all f-grow-1 fs-8">
<button class="btn btn-green border-rd-10 p-14-tb p-30-lr fs-8" onclick="entrarSala()">ENTRAR</button>
</div>
</div>
</div>
<div class="section-box">
<label class="field-label m-15-b">Como Funciona</label>
<ol class="fs-7 opacity-5" style="padding-left: 20px; line-height: 2.2;">
<li>Um jogador clica em "Criar Sala"</li>
<li>Compartilha o código com o outro jogador</li>
<li>O outro jogador cola o código e clica "Entrar"</li>
<li>Ambos rolam e veem o resultado em tempo real!</li>
</ol>
</div>
</div>
<!-- Tela da Sala (conectado) -->
<div id="online-sala" class="d-none">
<!-- Código da Sala -->
<div class="section-box text-center">
<label class="field-label">Código da Sala</label>
<p class="room-code m-15-t" id="sala-codigo">------</p>
<button class="btn btn-secondary border-rd-8 p-10-tb p-25-lr fs-7 m-15-t" onclick="copiarCodigo()">📋 Copiar Código</button>
</div>
<!-- Jogadores (renderizado dinamicamente) -->
<div class="section-box">
<div class="section-title">Jogadores na Sala (<span id="jogadores-count">0</span>)</div>
<div class="row gap-15" id="jogadores-container">
<!-- Renderizado via JavaScript -->
<div class="c-xs-12 text-center p-20-all">
<span class="opacity-4 fs-8">Aguardando jogadores...</span>
</div>
</div>
</div>
<!-- Controles de Combate -->
<div class="section-box" id="online-controles">
<div class="section-title">Rolar Dados</div>
<div class="d-flex f-wrap f-gap-25 f-items-end f-justify-center">
<div>
<label class="field-label">Quantidade de Dados</label>
<input type="number" id="online-dados" value="3" min="1" max="10" class="border-rd-10 p-14-all w-90px text-center fs-9">
</div>
<button class="btn btn-primary border-rd-10 p-15-tb p-50-lr fs-8" id="btn-rolar-online" onclick="rolarOnline()">ROLAR!</button>
</div>
</div>
<!-- Resultado Online -->
<div class="section-box" id="online-resultado">
<div class="text-center p-20-all">
<span class="opacity-4 fs-8">⚔ Aguardando rolagens...</span>
</div>
</div>
<!-- Chat / Log -->
<div class="section-box">
<div class="section-title">Log de Eventos</div>
<div class="chat-box border-rd-10 p-15-all" id="chat-box"></div>
</div>
<!-- Sair -->
<button class="btn btn-secondary border-rd-10 p-14-tb w-100 fs-7" onclick="sairSala()">SAIR DA SALA</button>
</div>
</div>
</div>
<!-- Footer -->
<footer class="site-footer">
<div class="footer-brand">
<a href="index.html">SCAR</a>
<span>Sacrificial Contract & Risk</span>
</div>
<div class="footer-links">
<a href="index.html">
<svg fill="currentColor" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>