-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1102 lines (1031 loc) · 57.5 KB
/
index.html
File metadata and controls
1102 lines (1031 loc) · 57.5 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="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>Sunrise Detox Jeopardy</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
/* --- GLOBAL STYLES --- */
html, body {
font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
background-color: #000; /* Start black */
/* DVH fixes the "cut off" issue on mobile browsers by accounting for the URL bar */
height: 100dvh;
width: 100vw;
overflow: hidden;
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
user-select: none;
margin: 0;
padding: 0;
}
/* Safe area handling for iPhones with notches */
body {
padding-top: max(env(safe-area-inset-top), 4px);
padding-bottom: max(env(safe-area-inset-bottom), 4px);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
display: flex;
flex-direction: column;
}
/* --- SPLASH SCREEN --- */
#splash-screen {
position: fixed;
inset: 0;
z-index: 300;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #000;
transition: opacity 1s ease;
}
/* --- INTRO OVERLAY --- */
#intro-overlay {
position: fixed;
inset: 0;
z-index: 200;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(to bottom, #020411, #1a0b16);
transition: opacity 1.5s ease-in-out;
}
.run-sunrise-sky { animation: sky-change 4s ease-out forwards; }
.run-sunrise-sun { animation: sunrise 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.run-sunrise-text { animation: fade-in-text 2s ease-out forwards; animation-delay: 3s; }
.sun-graphic {
width: 150px;
height: 150px;
background: linear-gradient(to bottom, #fbbf24, #f59e0b);
border-radius: 50%;
box-shadow: 0 0 60px rgba(251, 191, 36, 0.6);
position: relative;
z-index: 10;
transform: translateY(200%);
opacity: 0;
}
.ocean {
position: absolute;
bottom: 0;
width: 100%;
height: 35%;
background: linear-gradient(to top, #06226e, #1e3a8a);
z-index: 20;
box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.intro-content {
position: relative;
z-index: 30;
text-align: center;
margin-top: -80px;
opacity: 0;
width: 90%;
}
@keyframes sunrise {
0% { transform: translateY(200%); opacity: 0; }
100% { transform: translateY(0); opacity: 1; }
}
@keyframes sky-change {
0% { background: linear-gradient(to bottom, #020411, #000000); }
100% { background: linear-gradient(to bottom, #1e1b4b, #4c1d95); }
}
@keyframes fade-in-text {
0% { opacity: 0; transform: translateY(20px); }
100% { opacity: 1; transform: translateY(0); }
}
/* --- MENU SCREEN --- */
#menu-screen {
position: fixed;
inset: 0;
z-index: 50;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(to bottom, #020411, #1a0b16);
opacity: 0;
transition: opacity 1s ease;
overflow-y: auto; /* Allow scrolling if menu is tall */
}
/* --- GAME CONTAINER (Flexbox layout for perfect fit) --- */
#game-container {
display: none;
flex-direction: column;
height: 100%;
width: 100%;
opacity: 0;
transition: opacity 1s ease-in;
padding: 4px;
}
.header-bar {
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0; /* Never shrink the header */
margin-bottom: 4px;
height: 40px;
}
/* --- MENU BUTTONS --- */
.menu-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
width: 90%;
max-width: 600px;
}
.menu-btn {
width: 100%;
padding: 15px;
background-color: #06226e;
color: white;
font-weight: bold;
font-size: clamp(0.8rem, 2vw, 1rem);
border-radius: 8px;
border: 2px solid #3b82f6;
box-shadow: 0 4px 6px rgba(0,0,0,0.4);
text-align: center;
transition: transform 0.1s;
}
.menu-btn:active { transform: scale(0.96); background-color: #1e3a8a; }
/* --- BOARD STYLES --- */
.jeopardy-board {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
/* KEY FIX: Use fractions so rows squash to fit screen exactly */
grid-template-rows: repeat(6, 1fr);
gap: 3px;
flex-grow: 1; /* Take up all remaining space */
min-height: 0; /* Allow shrinking */
width: 100%;
}
.category-cell {
background-color: #06226e;
color: white;
font-weight: bold;
text-align: center;
padding: 2px;
/* Responsive font scaling */
font-size: clamp(0.7rem, 2.5vw, 1.1rem);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
line-height: 1.1;
word-break: break-word;
hyphens: auto;
overflow: hidden;
}
.question-cell {
background-color: #06226e;
color: #ffcc00;
font-size: clamp(1.2rem, 6dvh, 2.5rem); /* Scales with height */
font-weight: 900;
text-align: center;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid transparent;
}
.question-cell.answered {
background-color: #1e1b4b;
color: #1e1b4b;
cursor: not-allowed;
pointer-events: none;
}
/* --- COMPACT SCOREBOARD --- */
.scoreboard-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px;
margin-bottom: 4px;
flex-shrink: 0; /* Never shrink scores */
height: 44px; /* Fixed compact height */
}
.team-scoreboard {
background-color: #ffffff;
padding: 0 8px;
border-radius: 6px;
border: 3px solid transparent;
display: flex;
align-items: center;
justify-content: space-between;
}
.team-scoreboard.active {
border-color: var(--team-color, #3b82f6);
box-shadow: 0 0 8px var(--team-color, #3b82f6);
transform: scale(1.01);
}
.team-score {
font-size: clamp(1.2rem, 4vw, 1.5rem);
font-weight: 900;
color: #06226e;
background: none;
border: none;
text-align: right;
width: 70px;
outline: none;
margin: 0;
pointer-events: auto;
}
/* --- MODAL --- */
.modal {
display: none;
position: fixed;
z-index: 100;
left: 0; top: 0;
width: 100%; height: 100%;
background-color: rgba(0, 0, 0, 0.95);
align-items: center;
justify-content: center;
padding: 10px;
}
.modal-content {
background-color: #fefefe;
padding: 12px;
border-radius: 12px;
width: 100%;
max-width: 600px;
/* Ensure modal fits on screen even with keyboard */
max-height: 95dvh;
display: flex;
flex-direction: column;
justify-content: space-between;
text-align: center;
overflow-y: auto;
}
.modal-question {
font-size: clamp(1.1rem, 4vw, 1.8rem);
font-weight: 600;
color: #1f2937;
padding: 10px 0;
line-height: 1.3;
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
min-height: 80px;
}
.modal-answer {
display: none;
font-size: clamp(1rem, 4vw, 1.4rem);
font-weight: 700;
color: #059669;
margin: 8px 0;
padding: 10px;
background: #d1fae5;
border-radius: 8px;
border: 1px solid #10b981;
}
/* --- UTILS --- */
input[type="color"] { width: 20px; height: 20px; border: none; border-radius: 50%; padding: 0; overflow: hidden; }
#scoring-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-btn { border-radius: 8px; padding: 12px; font-weight: bold; font-size: 1rem; color: white; }
</style>
</head>
<body>
<div id="splash-screen">
<h1 class="text-gray-400 text-sm tracking-[0.3em] uppercase mb-6">Sunrise Detox</h1>
<button id="activate-app-btn" class="text-2xl font-bold text-white border-2 border-white px-8 py-4 rounded-full active:bg-white active:text-black transition-colors">
ENTER EXPERIENCE
</button>
</div>
<div id="intro-overlay">
<div id="intro-sun" class="sun-graphic"></div>
<div class="ocean"></div>
<div id="intro-text" class="intro-content">
<h1 class="text-3xl md:text-6xl font-extrabold text-white tracking-wide drop-shadow-lg mb-2">
<span class="text-yellow-400">SUNRISE</span> DETOX
</h1>
<p class="text-xs md:text-xl text-blue-200 tracking-[0.2em] uppercase font-semibold mb-8">Recovery Jeopardy</p>
<button id="intro-btn" class="relative inline-flex items-center justify-center px-8 py-4 text-lg font-bold text-blue-900 bg-yellow-400 rounded-full hover:bg-yellow-300 active:scale-95 shadow-[0_0_20px_rgba(253,224,71,0.5)] transition-all">
TAP TO START
</button>
</div>
</div>
<div id="menu-screen">
<div class="sun-graphic" style="width:80px; height:80px; margin-bottom:10px; transform:translateY(0); opacity:1;"></div>
<h1 class="text-2xl font-extrabold text-white text-center leading-tight mb-4">SELECT GAME</h1>
<div class="menu-grid">
<button onclick="startGame('game1', 'Relationships')" class="menu-btn">Game 1:<br>Relationships</button>
<button onclick="startGame('game2', 'The Body & Detox')" class="menu-btn">Game 2:<br>The Body & Detox</button>
<button onclick="startGame('game3', 'Famous Faces')" class="menu-btn">Game 3:<br>Famous Faces</button>
<button onclick="startGame('game4', 'The Program')" class="menu-btn">Game 4:<br>The Program (AA/NA)</button>
<button onclick="startGame('game5', 'Life Skills')" class="menu-btn">Game 5:<br>Life Skills & Goals</button>
<button onclick="startGame('game6', 'Emotions & Family')" class="menu-btn">Game 6:<br>Emotions & Family</button>
</div>
</div>
<div id="game-container">
<div class="header-bar">
<button id="back-to-menu" class="bg-blue-900 text-white text-[10px] font-bold py-2 px-3 rounded border border-blue-500">
← MENU
</button>
<div class="text-center flex-grow">
<h1 id="game-title-display" class="text-xs md:text-sm font-black text-white uppercase tracking-wide leading-tight truncate px-2">Relationships Edition</h1>
</div>
<button id="reset-game" class="bg-red-900/50 active:bg-red-600 text-white text-[10px] font-bold py-2 px-3 rounded border border-red-500">
RESET
</button>
</div>
<div class="scoreboard-container">
<div id="team-1-board" class="team-scoreboard active" style="--team-color: #3b82f6;">
<div class="flex items-center gap-2 flex-1 min-w-0">
<input type="color" id="team-1-color" value="#3b82f6">
<input type="text" id="team-1-name" class="font-bold text-gray-800 text-xs w-full bg-transparent outline-none truncate" value="Team 1">
</div>
<input type="number" id="team-1-score" class="team-score" value="0">
</div>
<div id="team-2-board" class="team-scoreboard" style="--team-color: #ef4444;">
<div class="flex items-center gap-2 flex-1 min-w-0">
<input type="color" id="team-2-color" value="#ef4444">
<input type="text" id="team-2-name" class="font-bold text-gray-800 text-xs w-full bg-transparent outline-none truncate" value="Team 2">
</div>
<input type="number" id="team-2-score" class="team-score" value="0">
</div>
</div>
<div id="jeopardy-board" class="jeopardy-board"></div>
</div>
<div id="question-modal" class="modal">
<div class="modal-content">
<div class="flex justify-between items-center border-b pb-2 mb-2">
<span id="modal-category" class="text-xs font-bold text-blue-600 uppercase tracking-wider truncate mr-2">Category</span>
<span id="modal-points" class="text-2xl font-black text-yellow-600">$000</span>
</div>
<div id="modal-question-text" class="modal-question"></div>
<div id="modal-answer-text" class="modal-answer"></div>
<div class="mt-auto pt-2">
<div class="flex items-center justify-center gap-4 mb-4">
<div id="timer-display" class="text-4xl font-black text-blue-900">30</div>
<button id="timer-toggle-btn" class="w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center active:bg-gray-300">
<svg id="timer-icon" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-gray-800" fill="currentColor" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>
</button>
</div>
<div id="button-container">
<div id="scoring-buttons">
<button id="correct-btn" class="game-btn bg-green-500 active:bg-green-600">CORRECT</button>
<button id="incorrect-btn" class="game-btn bg-red-500 active:bg-red-600">WRONG</button>
</div>
<button id="next-btn" class="hidden w-full game-btn bg-blue-600 active:bg-blue-700">CONTINUE</button>
</div>
</div>
</div>
</div>
<div id="daily-double-modal" class="modal">
<div class="modal-content border-4 border-yellow-400 bg-blue-950 text-white">
<h2 class="text-3xl font-black text-yellow-400 mb-6 tracking-widest">DAILY DOUBLE</h2>
<div class="mb-6 w-full">
<label class="block text-white text-lg mb-2">Enter Wager:</label>
<input type="number" id="dd-wager-input" class="text-4xl font-bold text-center w-full p-4 rounded-lg text-black" min="5">
</div>
<button id="submit-wager-btn" class="game-btn w-full bg-yellow-400 text-blue-900 hover:bg-yellow-300">BET!</button>
</div>
</div>
<div id="winner-modal" class="modal">
<div class="modal-content bg-gradient-to-br from-yellow-300 to-yellow-500 border-8 border-blue-900 justify-center">
<div id="confetti-container" class="absolute inset-0 pointer-events-none overflow-hidden rounded-lg"></div>
<h2 class="text-xl font-bold text-blue-900 opacity-75">WINNER</h2>
<h1 id="winner-name" class="text-5xl md:text-7xl font-black text-blue-900 my-6">TEAM NAME</h1>
<button id="close-winner-modal-btn" class="game-btn bg-blue-900 text-white px-8 rounded-full shadow-2xl">NEW GAME</button>
</div>
</div>
<div id="change-team-modal" class="modal">
<div class="modal-content !bg-indigo-600 !text-white justify-center items-center">
<h1 class="text-2xl font-bold opacity-80">SWITCH TURNS</h1>
<p class="text-5xl font-black my-8" id="next-team-name">Team 2</p>
<button id="confirm-change-team-btn" class="game-btn w-full bg-white text-indigo-700">READY</button>
</div>
</div>
<script>
// --- 6 GAMES DATA ---
const ALL_GAMES = {
"game1": { // RELATIONSHIPS (Original)
"Red Flags": {
100: { q: "When a partner isolates you from friends, family, or support networks.", a: "What is isolation?" },
200: { q: "A subtle form of manipulation where someone questions your reality.", a: "What is gaslighting?" },
300: { q: "Excessive affection and praise early on to gain rapid control.", a: "What is love bombing?" },
400: { q: "The cyclical pattern of tension building, incident, and calm.", a: "What is the Cycle of Abuse?" },
500: { q: "Using guilt or silence as a tool for punishment.", a: "What is emotional coercion?" }
},
"Codependency": {
100: { q: "Prioritizing another's needs so intensely that you neglect your own.", a: "What is self-abandonment?" },
200: { q: "Protecting a partner from the natural consequences of their actions.", a: "What is enabling?" },
300: { q: "Deriving self-worth solely from the ability to 'fix' or 'save' others.", a: "What is the Savior Complex?" },
400: { q: "An intense, anxiety-driven need to manage others' behaviors.", a: "What is controlling behavior?" },
500: { q: "Inability to identify one's own distinct emotions separate from a partner.", a: "What is enmeshment?" }
},
"Boundaries": {
100: { q: "A boundary that is unclear, inconsistent, or easily violated.", a: "What is a porous boundary?" },
200: { q: "The internal limit regarding what personal details you share.", a: "What is an emotional boundary?" },
300: { q: "A rigid boundary style that acts as a wall to keep everyone out.", a: "What is avoidance?" },
400: { q: "Communicating a boundary using 'I' statements.", a: "What is assertive communication?" },
500: { q: "The recovery concept of detaching with love.", a: "What is detachment?" }
},
"Triggers": {
100: { q: "Acronym for Hungry, Angry, Lonely, Tired.", a: "What is H.A.L.T.?" },
200: { q: "Small event causing disproportionate reaction due to past trauma.", a: "What is an emotional flashback?" },
300: { q: "Associating specific places or things with past toxic dynamics.", a: "What is euphoric recall?" },
400: { q: "Transferring feelings about one person onto another.", a: "What is transference?" },
500: { q: "Brain creating false danger due to chronic past stress.", a: "What is hypervigilance?" }
},
"Recovery": {
100: { q: "The ability to regulate emotions without relying on a partner.", a: "What is self-soothing?" },
200: { q: "Taking responsibility for one's own part in a conflict.", a: "What is accountability?" },
300: { q: "Observing thoughts without judgment.", a: "What is mindfulness?" },
400: { q: "Developing interests outside of the primary relationship.", a: "What is autonomy?" },
500: { q: "Understanding another's perspective while maintaining your own.", a: "What is differentiation?" }
}
},
"game2": { // DETOX & BODY (Revised Detox Friendly)
"The Body": {
100: { q: "It is crucial to drink plenty of this to help your organs flush out toxins.", a: "What is water (or hydration)?" },
200: { q: "This organ is the body's primary filter and works overtime during detox to process alcohol and drugs.", a: "What is the liver?" },
300: { q: "Many people experience this sleep disorder in early recovery, finding it hard to fall or stay asleep.", a: "What is insomnia?" },
400: { q: "This acronym describes withdrawal symptoms that can last for months, like mood swings and brain fog.", a: "What is P.A.W.S. (Post-Acute Withdrawal Syndrome)?" },
500: { q: "This 'feel-good' chemical in the brain is often depleted in early recovery, causing low mood.", a: "What is Dopamine?" }
},
"Common Feelings": {
100: { q: "A feeling of intense desire to use a substance.", a: "What is a craving?" },
200: { q: "This feeling of holding onto past anger or wrongs is often called the 'number one offender' in relapse.", a: "What is resentment?" },
300: { q: "A temporary phase of euphoria and over-confidence often experienced in early sobriety.", a: "What is the Pink Cloud?" },
400: { q: "The feeling that you are a fraud or don't belong in recovery, often called 'Imposter ______'.", a: "What is Syndrome?" },
500: { q: "The opposite of connection; addiction is often described as a disease of this.", a: "What is isolation?" }
},
"Fact or Fiction": {
100: { q: "True or False: You have to hit 'rock bottom' before you can get better.", a: "What is False?" },
200: { q: "True or False: Addiction is defined as a chronic brain disease, not a lack of willpower.", a: "What is True?" },
300: { q: "True or False: Relapse means you have failed and have to start completely over.", a: "What is False? (It is part of the learning process)" },
400: { q: "True or False: You can become physically dependent on prescription medications even if you take them as prescribed.", a: "What is True?" },
500: { q: "True or False: Marijuana is not addictive.", a: "What is False?" }
},
"Recovery Lingo": {
100: { q: "We are taught to change 'People, Places, and ______'.", a: "What are Things?" },
200: { q: "Someone who is sober but still behaves in self-destructive or angry ways is often called a 'Dry ______'.", a: "What is a Drunk?" },
300: { q: "This term refers to helping an addict avoid the negative consequences of their behavior.", a: "What is Enabling?" },
400: { q: "The 'Big Book' is the basic text for this organization.", a: "What is Alcoholics Anonymous (AA)?" },
500: { q: "This three-word phrase suggests you should take action even if you don't feel like it yet: 'Fake it ______'.", a: "What is '...Till You Make It'?" }
},
"Relapse Prevention": {
100: { q: "If you are hungry, angry, lonely, or tired, you are more likely to experience this.", a: "What is a trigger (or craving)?" },
200: { q: "Calling this person is a common strategy when you feel like using.", a: "Who is a Sponsor?" },
300: { q: "Visualizing the negative outcome of using before you do it is called 'Playing the ______'.", a: "What is Tape Forward?" },
400: { q: "Keeping alcohol or paraphernalia in your house is considered this type of risk.", a: "What is an environmental trigger?" },
500: { q: "This is the process of identifying your personal warning signs before a physical relapse occurs.", a: "What is Relapse Prevention Planning?" }
}
},
"game3": { // FAMOUS FACES & FACTS
"Famous Recovery": {
100: { q: "This 'Iron Man' actor credits his recovery to therapy and staying sober since 2003.", a: "Who is Robert Downey Jr.?" },
200: { q: "This rapper, known for 'Not Afraid', celebrated 16 years of sobriety in 2024.", a: "Who is Eminem?" },
300: { q: "This 'Rocketman' singer founded a massive AIDS foundation and has been sober for 30+ years.", a: "Who is Elton John?" },
400: { q: "Star of 'Friends', he spent millions on his own recovery and wrote a memoir before his passing.", a: "Who is Matthew Perry?" },
500: { q: "This 'Halloween' actress has been sober from opioid painkillers for over two decades.", a: "Who is Jamie Lee Curtis?" }
},
"Music & Addiction": {
100: { q: "This British singer, known for 'Rehab', tragically passed away at age 27.", a: "Who is Amy Winehouse?" },
200: { q: "This grunge icon and Nirvana frontman struggled with heroin addiction before his death in 1994.", a: "Who is Kurt Cobain?" },
300: { q: "He was the 'Man in Black' who found redemption and recovery later in life.", a: "Who is Johnny Cash?" },
400: { q: "This pop star had a public breakdown in 2007 but regained control of her life and career.", a: "Who is Britney Spears?" },
500: { q: "Lead singer of Aerosmith, he was once part of the 'Toxic Twins' before getting clean.", a: "Who is Steven Tyler?" }
},
"Toxic Relationships": {
100: { q: "This musical duo had a famously abusive marriage portrayed in 'What's Love Got to Do with It'.", a: "Who are Ike and Tina Turner?" },
200: { q: "This 'Pirates' actor and 'Aquaman' actress had a publicized defamation trial about mutual toxicity.", a: "Who are Johnny Depp and Amber Heard?" },
300: { q: "This R&B singer's assault on Rihanna in 2009 brought attention to domestic violence.", a: "Who is Chris Brown?" },
400: { q: "Known for 'Sid & Nancy', this punk rocker's relationship ended in tragedy.", a: "Who is Sid Vicious?" },
500: { q: "This Motown legend's father shot him during a domestic dispute.", a: "Who is Marvin Gaye?" }
},
"Clinical Facts": {
100: { q: "In a chronic user, THC (marijuana) can remain detectable in a urine test for this long.", a: "What is up to 30 days (or more)?" },
200: { q: "This organ metabolizes alcohol at a rate of approximately one standard drink per hour.", a: "What is the Liver?" },
300: { q: "This life-saving medication can immediately reverse an opioid overdose.", a: "What is Narcan (or Naloxone)?" },
400: { q: "This severe form of alcohol withdrawal includes shaking, confusion, and hallucinations.", a: "What are Delirium Tremens (DTs)?" },
500: { q: "Often mixed with other drugs, this synthetic opioid is 50-100 times stronger than morphine.", a: "What is Fentanyl?" }
},
"Pop Culture": {
100: { q: "This HBO show featuring Zendaya depicts a raw look at teenage drug addiction.", a: "What is Euphoria?" },
200: { q: "This 1996 movie follows a group of heroin addicts in Edinburgh.", a: "What is Trainspotting?" },
300: { q: "Sandra Bullock plays a columnist forced into rehab in this 2000 movie.", a: "What is 28 Days?" },
400: { q: "This A&E reality show followed real-life interventionists helping families.", a: "What is Intervention?" },
500: { q: "Bradley Cooper and Lady Gaga starred in this movie dealing with alcoholism and fame.", a: "What is A Star Is Born?" }
}
},
"game4": { // THE PROGRAM (12 Steps, AA/NA)
"The Steps": {
100: { q: "Step 1: We admitted we were ______ over alcohol/drugs.", a: "What is Powerless?" },
200: { q: "Step 4 requires us to make a searching and fearless ______ inventory of ourselves.", a: "What is Moral?" },
300: { q: "Step 9 involves making these to people we have harmed, except when doing so would injure them.", a: "What are Amends?" },
400: { q: "Step 11 suggests using prayer and ______ to improve our conscious contact with God.", a: "What is Meditation?" },
500: { q: "Step 12: Having had a spiritual awakening, we try to carry this message to others and practice these ______.", a: "What are Principles?" }
},
"AA History": {
100: { q: "He is the co-founder of AA, known simply as 'Bill'.", a: "Who is Bill W.?" },
200: { q: "This doctor co-founded AA with Bill W. in Akron, Ohio.", a: "Who is Dr. Bob?" },
300: { q: "The year AA was founded.", a: "What is 1935?" },
400: { q: "The 'Big Book' was first published in this year.", a: "What is 1939?" },
500: { q: "This was the first name of the addiction recovery group before it became AA.", a: "What is The Oxford Group?" }
},
"Slogans": {
100: { q: "This slogan reminds us to stay in the present moment.", a: "What is 'One Day at a Time'?" },
200: { q: "This slogan tells us to relax and not try to force outcomes.", a: "What is 'Easy Does It'?" },
300: { q: "Used when we are overthinking or complicating things.", a: "What is 'Keep It Simple'?" },
400: { q: "A reminder to surrender control: 'Let Go and ______'.", a: "What is '...Let God'?" },
500: { q: "This slogan emphasizes attending meetings and listening: 'Meeting makers ______'.", a: "What is '...Make It'?" }
},
"Definitions": {
100: { q: "The AA definition of insanity: Doing the same thing over and over and expecting ______.", a: "What are 'Different Results'?" },
200: { q: "A person you call for guidance through the 12 steps.", a: "What is a Sponsor?" },
300: { q: "The state of being free from all mind-altering substances.", a: "What is Abstinence?" },
400: { q: "A daily reprieve contingent on the maintenance of our spiritual condition.", a: "What is Sobriety?" },
500: { q: "A desire to stop drinking is the only requirement for this.", a: "What is Membership?" }
},
"Service": {
100: { q: "Making this at a meeting is a common first service commitment.", a: "What is Coffee?" },
200: { q: "This person greets newcomers at the door.", a: "What is a Greeter?" },
300: { q: "This trusted servant leads the meeting format.", a: "What is the Chairperson?" },
400: { q: "This person manages the group's money.", a: "What is the Treasurer?" },
500: { q: "Service keeps you sober by getting you out of ______.", a: "What is Self?" }
}
},
"game5": { // LIFE SKILLS & GOALS
"Goal Setting": {
100: { q: "A popular saying: 'If you fail to plan, you are planning to ______'.", a: "What is Fail?" },
200: { q: "Goals should be SMART: Specific, Measurable, Achievable, Relevant, and ______.", a: "What is Time-bound?" },
300: { q: "Breaking a big goal into smaller, manageable steps prevents this feeling.", a: "What is Overwhelm?" },
400: { q: "A vision board is a tool used for this.", a: "What is Visualization?" },
500: { q: "Rewarding yourself for small wins is called positive ______.", a: "What is Reinforcement?" }
},
"Sober Living": {
100: { q: "Most sober living homes require this to prove you are staying clean.", a: "What is a Drug Test (or UA)?" },
200: { q: "A set time you must be back at the house each night.", a: "What is Curfew?" },
300: { q: "Attending these is usually mandatory in sober living.", a: "What are House Meetings (or 12-step meetings)?" },
400: { q: "Doing these contributes to the cleanliness of the shared space.", a: "What are Chores?" },
500: { q: "This is often the first financial responsibility you take on in sober living.", a: "What is Rent?" }
},
"Routine": {
100: { q: "Making this every morning is a simple task to start the day with a win.", a: "What is your Bed?" },
200: { q: "Eating at regular times helps regulate blood sugar and ______.", a: "What is Mood?" },
300: { q: "A solid routine reduces this, which is a major relapse trigger.", a: "What is Boredom (or Idle Time)?" },
400: { q: "Setting a consistent time for this ensures you get enough rest.", a: "What is Sleep (or Bedtime)?" },
500: { q: "Planning your day the night before reduces anxiety about the ______.", a: "What is Future?" }
},
"Money": {
100: { q: "A plan for how you will spend and save your money.", a: "What is a Budget?" },
200: { q: "This type of spending is done on impulse rather than need.", a: "What is Impulsive Spending?" },
300: { q: "Paying off these is a common part of making financial amends.", a: "What are Debts?" },
400: { q: "It is important to save money for an ______ fund.", a: "What is Emergency?" },
500: { q: "Financial honesty is crucial; hiding spending is often a sign of ______ behavior.", a: "What is Addictive?" }
},
"Employment": {
100: { q: "A document listing your work history and skills.", a: "What is a Resume?" },
200: { q: "You should arrive this early for a job interview.", a: "What is 10-15 minutes?" },
300: { q: "When asked about a gap in employment due to rehab, it is best to be honest but ______.", a: "What is Professional (or Brief)?" },
400: { q: "This soft skill involves working well with others.", a: "What is Teamwork?" },
500: { q: "Reliability means showing up to work on time and ______.", a: "What is Sober?" }
}
},
"game6": { // EMOTIONS & FAMILY
"Fear": {
100: { q: "An acronym for F.E.A.R.: False Evidence Appearing ______.", a: "What is Real?" },
200: { q: "Fear of this often keeps people from trying new things in recovery.", a: "What is Failure?" },
300: { q: "The antidote to fear is often said to be this.", a: "What is Faith?" },
400: { q: "Fear of success can lead to this behavior.", a: "What is Self-Sabotage?" },
500: { q: "Courage is not the absence of fear, but acting ______ it.", a: "What is Despite (or In Spite of)?" }
},
"Rejection": {
100: { q: "Rejection is often God's way of saying 'Not ______'.", a: "What is Yet (or 'Not This')?" },
200: { q: "Taking rejection personally is a sign of low ______.", a: "What is Self-Esteem?" },
300: { q: "When someone says 'no' to you, they are setting a ______.", a: "What is Boundary?" },
400: { q: "Learning to handle 'no' without using is a sign of ______ maturity.", a: "What is Emotional?" },
500: { q: "We must accept that we cannot ______ how others feel about us.", a: "What is Control?" }
},
"Family": {
100: { q: "Addiction is often called a ______ disease because it affects everyone in the home.", a: "What is Family?" },
200: { q: "Trust is lost in buckets and regained in ______.", a: "What are Drops?" },
300: { q: "Family members often attend this 12-step group for their own recovery.", a: "What is Al-Anon?" },
400: { q: "Setting healthy ______ is crucial for rebuilding relationships.", a: "What are Boundaries?" },
500: { q: "Sometimes the healthiest choice for a family member is to ______ with love.", a: "What is Detach?" }
},
"Parenting": {
100: { q: "The best amends to children is living a ______ life.", a: "What is Sober?" },
200: { q: "Children of addicts often take on adult responsibilities, known as ______.", a: "What is Parentification?" },
300: { q: "Consistency creates a sense of ______ for children.", a: "What is Safety?" },
400: { q: "It is okay to say 'I don't ______' to your child's question.", a: "What is Know?" },
500: { q: "Modeling healthy ______ coping is better than hiding all emotions.", a: "What is Emotional?" }
},
"Amends": {
100: { q: "A simple 'I'm sorry' is an apology; changed behavior is an ______.", a: "What is Amends?" },
200: { q: "Living Amends means showing up and doing the right thing ______.", a: "What is Daily (or Consistently)?" },
300: { q: "Financial amends involves paying back ______.", a: "What is Money?" },
400: { q: "Before making amends, you should consult your ______.", a: "What is Sponsor?" },
500: { q: "The purpose of amends is to clean your side of the ______.", a: "What is Street?" }
}
}
};
let activeGameData = null;
let team1Score = 0, team2Score = 0;
let activeTeam = 1;
let currentPoints = 0;
let currentDD = null;
let timerInterval = null;
let timeLeft = 30;
let attemptState = 'initial';
let consecutiveCorrect1 = 0, consecutiveCorrect2 = 0;
let answeredCount = 0;
let timerOscillator = null;
let tickTock = 0; // For high/low tick sounds
// --- UI ---
const ui = {
splash: document.getElementById('splash-screen'),
splashBtn: document.getElementById('activate-app-btn'),
intro: document.getElementById('intro-overlay'),
menu: document.getElementById('menu-screen'),
game: document.getElementById('game-container'),
board: document.getElementById('jeopardy-board'),
modal: document.getElementById('question-modal'),
ddModal: document.getElementById('daily-double-modal'),
winnerModal: document.getElementById('winner-modal'),
changeModal: document.getElementById('change-team-modal'),
t1Board: document.getElementById('team-1-board'),
t2Board: document.getElementById('team-2-board'),
t1Score: document.getElementById('team-1-score'),
t2Score: document.getElementById('team-2-score'),
timer: document.getElementById('timer-display'),
timerIcon: document.getElementById('timer-icon'),
titleDisplay: document.getElementById('game-title-display')
};
// --- AUDIO ENGINE ---
let ac;
function initAudio() {
if(!ac) {
ac = new (window.AudioContext||window.webkitAudioContext)();
}
if(ac.state === 'suspended') ac.resume();
}
// 1. Intro Swell
function playSunriseSwell() {
if(!ac) initAudio();
const notes = [261.63, 329.63, 392.00, 523.25, 587.33];
notes.forEach((f,i) => {
const o=ac.createOscillator(), g=ac.createGain();
o.type='sine'; o.frequency.value=f;
o.connect(g); g.connect(ac.destination);
g.gain.setValueAtTime(0, ac.currentTime+i*0.2);
g.gain.linearRampToValueAtTime(0.05, ac.currentTime+i*0.2+0.05);
g.gain.exponentialRampToValueAtTime(0.001, ac.currentTime+i*0.2+4.0);
o.start(ac.currentTime+i*0.2); o.stop(ac.currentTime+i*0.2+4.1);
});
}
// 2. Timer
function playTimerSound() {
if (!ac) return;
if (timerOscillator) timerOscillator.stop();
timerOscillator = ac.createOscillator();
const gainNode = ac.createGain();
timerOscillator.type = 'sine';
if (tickTock % 2 === 0) {
timerOscillator.frequency.setValueAtTime(1200, ac.currentTime);
} else {
timerOscillator.frequency.setValueAtTime(800, ac.currentTime);
}
tickTock++;
gainNode.gain.setValueAtTime(0.1, ac.currentTime);
gainNode.gain.exponentialRampToValueAtTime(0.001, ac.currentTime + 0.05);
timerOscillator.connect(gainNode);
gainNode.connect(ac.destination);
timerOscillator.start();
timerOscillator.stop(ac.currentTime + 0.05);
}
function stopTimerSound() {
if (timerOscillator) { timerOscillator.stop(); timerOscillator = null; }
tickTock = 0;
}
// 3. Daily Double
function playDailyDoubleSound() {
if (!ac) return;
const osc = ac.createOscillator(), gain = ac.createGain();
osc.type = 'sine'; osc.connect(gain); gain.connect(ac.destination);
const now = ac.currentTime;
gain.gain.setValueAtTime(0.3, now);
osc.frequency.setValueAtTime(300, now);
osc.frequency.exponentialRampToValueAtTime(900, now + 0.3);
osc.start(); osc.stop(now + 0.4);
}
// 4. Time's Up
function playTimesUpSound() {
if (!ac) return;
const now = ac.currentTime;
const osc = ac.createOscillator(), gain = ac.createGain();
osc.type = 'sawtooth'; osc.connect(gain); gain.connect(ac.destination);
osc.frequency.setValueAtTime(120, now);
gain.gain.setValueAtTime(0.3, now);
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.4);
osc.start(); osc.stop(now + 0.4);
}
// 5. Steal
function playStealSound() {
if (!ac) return;
const now = ac.currentTime;
const osc = ac.createOscillator(), gain = ac.createGain();
osc.type = 'triangle'; osc.connect(gain); gain.connect(ac.destination);
gain.gain.setValueAtTime(0.2, now);
osc.frequency.setValueAtTime(900, now);
osc.frequency.setValueAtTime(1200, now + 0.1);
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.2);
osc.start(); osc.stop(now + 0.2);
}
// 6. Correct
function playCorrectSound() {
if (!ac) return;
const now = ac.currentTime;
const osc = ac.createOscillator(), gain = ac.createGain();
osc.type = 'triangle'; osc.connect(gain); gain.connect(ac.destination);
gain.gain.setValueAtTime(0.2, now);
osc.frequency.setValueAtTime(523.25, now);
osc.frequency.setValueAtTime(659.25, now + 0.1);
osc.frequency.setValueAtTime(783.99, now + 0.2);
osc.frequency.setValueAtTime(1046.50, now + 0.3);
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.7);
osc.start(now); osc.stop(now + 0.7);
}
// 7. Win (Ta-Da)
function playWinSound() {
if (!ac) return;
const now = ac.currentTime;
const playBrassNote = (freq, startTime, duration, vol = 0.3) => {
const osc = ac.createOscillator(), gain = ac.createGain(), filter = ac.createBiquadFilter();
osc.type = 'sawtooth'; osc.frequency.value = freq;
filter.type = 'lowpass';
filter.frequency.setValueAtTime(500, startTime);
filter.frequency.linearRampToValueAtTime(3000, startTime + 0.05);
filter.frequency.exponentialRampToValueAtTime(1000, startTime + duration);
gain.gain.setValueAtTime(0, startTime);
gain.gain.linearRampToValueAtTime(vol, startTime + 0.02);
gain.gain.exponentialRampToValueAtTime(0.01, startTime + duration);
osc.connect(filter); filter.connect(gain); gain.connect(ac.destination);
osc.start(startTime); osc.stop(startTime + duration);
};
playBrassNote(392.00, now, 0.15, 0.25);
const impactTime = now + 0.12, duration = 1.2;
playBrassNote(261.63, impactTime, duration, 0.3);
playBrassNote(329.63, impactTime, duration, 0.25);
playBrassNote(392.00, impactTime, duration, 0.25);
playBrassNote(523.25, impactTime, duration, 0.2);
}
// Simple Select
function playSelectSound() {
if(!ac) return;
const o=ac.createOscillator(), g=ac.createGain();
o.type='triangle'; o.frequency.value=800;
o.connect(g); g.connect(ac.destination);
g.gain.setValueAtTime(0, ac.currentTime);
g.gain.linearRampToValueAtTime(0.1, ac.currentTime+0.05);
g.gain.exponentialRampToValueAtTime(0.001, ac.currentTime+0.1);
o.start(ac.currentTime); o.stop(ac.currentTime+0.15);
}
// --- GAME LOGIC ---
ui.splashBtn.onclick = () => {
initAudio();
ui.splash.style.opacity = 0;
setTimeout(() => {
ui.splash.style.display = 'none';
startIntroSequence();
}, 1000);
};
function startIntroSequence() {
ui.intro.style.display = 'flex';
document.querySelector('#intro-overlay').classList.add('run-sunrise-sky');
document.querySelector('.sun-graphic').classList.add('run-sunrise-sun');
document.querySelector('.intro-content').classList.add('run-sunrise-text');
playSunriseSwell();
}
document.getElementById('intro-btn').onclick = () => {
playSelectSound();
ui.intro.style.opacity = 0;
ui.menu.style.display = 'flex';
setTimeout(() => {
ui.intro.style.display = 'none';
ui.menu.style.opacity = 1;
}, 1000);
};
window.startGame = function(gameKey, title) {
playSelectSound();
activeGameData = ALL_GAMES[gameKey];
ui.titleDisplay.textContent = title;
ui.menu.style.opacity = '0';
setTimeout(() => {
ui.menu.style.display = 'none';
ui.game.style.display = 'flex';
setTimeout(() => ui.game.style.opacity = '1', 100);
}, 500);
resetGame();
};
document.getElementById('back-to-menu').onclick = () => {
if(confirm("Exit to Menu?")) location.reload();
};
function resetGame() {
team1Score = 0; team2Score = 0; answeredCount = 0;
updateScores();
createBoard();
}
function createBoard() {
ui.board.innerHTML = '';
let allCells = [];
for(let cat in activeGameData) {
let h = document.createElement('div');
h.className = 'category-cell';
h.textContent = cat;
ui.board.appendChild(h);
}
const points = [100, 200, 300, 400, 500];
points.forEach(p => {
for(let cat in activeGameData) {
let cell = document.createElement('div');
cell.className = 'question-cell';
cell.textContent = `$${p}`;
cell.onclick = () => handleCellClick(cell, cat, p);
ui.board.appendChild(cell);
allCells.push(cell);
}
});
if(allCells.length > 0) {
const rand = Math.floor(Math.random() * allCells.length);
allCells[rand].dataset.dd = 'true';
}
}
function handleCellClick(cell, cat, pts) {
if(cell.classList.contains('answered')) return;
cell.classList.add('answered');
cell.textContent = '';
currentPoints = pts;
answeredCount++;
const data = activeGameData[cat][pts];
if(cell.dataset.dd === 'true') {
currentDD = { cat, q: data.q, a: data.a };
openDDModal();
} else {
openQuestionModal(cat, pts, data.q, data.a);
}
}
function openQuestionModal(cat, pts, q, a) {
document.getElementById('modal-category').textContent = cat;
document.getElementById('modal-points').textContent = `$${pts}`;
document.getElementById('modal-question-text').textContent = q;
document.getElementById('modal-answer-text').textContent = a;
document.getElementById('modal-answer-text').style.display = 'none';
document.getElementById('scoring-buttons').style.display = 'grid';
document.getElementById('next-btn').style.display = 'none';
ui.modal.style.display = 'flex';
attemptState = 'initial';
resetTimer(30);
startTimer();
}
function openDDModal() {
playDailyDoubleSound();
ui.ddModal.style.display = 'flex';
const s = activeTeam === 1 ? team1Score : team2Score;
const max = Math.max(1000, s);
const inp = document.getElementById('dd-wager-input');
inp.max = max; inp.value = ''; inp.placeholder = `Max: $${max}`;
setTimeout(() => inp.focus(), 100);
}
document.getElementById('submit-wager-btn').onclick = () => {
const w = parseInt(document.getElementById('dd-wager-input').value);
const max = parseInt(document.getElementById('dd-wager-input').max);
if(!w || w < 5 || w > max) return;
currentPoints = w;
ui.ddModal.style.display = 'none';
openQuestionModal(`DAILY DOUBLE`, `Wager: $${w}`, currentDD.q, currentDD.a);
attemptState = 'dd';
};
// --- SCORING ---
document.getElementById('correct-btn').onclick = () => {
playCorrectSound();
let pts = attemptState === 'steal' ? Math.round(currentPoints/2) : currentPoints;
addScore(activeTeam, pts);
if(activeTeam===1) { consecutiveCorrect1++; consecutiveCorrect2=0; }
else { consecutiveCorrect2++; consecutiveCorrect1=0; }
revealAnswer(true);
};
document.getElementById('incorrect-btn').onclick = () => {
if(attemptState === 'dd') {
playTimesUpSound();
addScore(activeTeam, -currentPoints);
revealAnswer(false);
} else if(attemptState === 'initial') {
playTimesUpSound();
addScore(activeTeam, -Math.round(currentPoints/2));
setTimeout(() => playStealSound(), 500);
attemptState = 'steal';
const next = activeTeam===1 ? 2 : 1;
setActiveTeam(next);
resetTimer(5);
startTimer();
} else {
playTimesUpSound();
revealAnswer(false);
}
};
document.getElementById('next-btn').onclick = () => {
ui.modal.style.display = 'none';
const next = parseInt(document.getElementById('next-btn').dataset.nextTeam) || activeTeam;
if(next !== activeTeam && answeredCount < 25) {
document.getElementById('next-team-name').textContent = document.getElementById(`team-${next}-name`).value;