File size: 78,152 Bytes
dfd45fc
 
 
 
 
5b64408
dfd45fc
 
 
 
 
 
5b64408
 
 
 
 
 
 
 
 
 
dfd45fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5b64408
 
 
 
 
dfd45fc
 
 
 
 
 
 
 
 
 
 
 
 
5b64408
 
dfd45fc
5b64408
 
 
 
dfd45fc
5b64408
 
 
dfd45fc
5b64408
 
 
 
dfd45fc
 
 
 
 
 
 
5b64408
 
dfd45fc
 
 
5b64408
dfd45fc
5b64408
dfd45fc
 
5b64408
 
 
 
 
 
 
 
 
 
 
dfd45fc
5b64408
 
dfd45fc
5b64408
 
dfd45fc
 
 
 
 
5b64408
dfd45fc
5b64408
 
dfd45fc
 
5b64408
 
 
 
 
 
dfd45fc
 
5b64408
dfd45fc
5b64408
 
dfd45fc
 
5b64408
 
dfd45fc
 
 
 
 
 
5b64408
 
dfd45fc
 
5b64408
dfd45fc
 
 
 
 
 
 
 
 
5b64408
 
dfd45fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5b64408
 
dfd45fc
 
 
5b64408
 
 
 
dfd45fc
 
 
 
 
5b64408
dfd45fc
5b64408
 
 
dfd45fc
 
5b64408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dfd45fc
 
5b64408
dfd45fc
 
 
5b64408
dfd45fc
 
 
 
 
 
 
 
 
 
5b64408
 
dfd45fc
 
5b64408
 
dfd45fc
 
 
 
 
5b64408
 
dfd45fc
 
 
5b64408
dfd45fc
5b64408
 
dfd45fc
5b64408
dfd45fc
5b64408
 
dfd45fc
5b64408
dfd45fc
5b64408
 
dfd45fc
5b64408
dfd45fc
5b64408
 
dfd45fc
5b64408
dfd45fc
5b64408
 
dfd45fc
5b64408
dfd45fc
5b64408
 
dfd45fc
 
 
5b64408
 
dfd45fc
 
 
 
5b64408
 
 
dfd45fc
5b64408
 
dfd45fc
5b64408
 
dfd45fc
5b64408
dfd45fc
 
 
 
 
 
5b64408
 
dfd45fc
5b64408
 
 
 
 
 
 
 
 
 
 
dfd45fc
 
 
 
 
 
5b64408
 
 
 
dfd45fc
 
 
5b64408
 
dfd45fc
 
 
 
 
5b64408
 
dfd45fc
 
 
 
 
 
 
 
 
 
 
5b64408
 
 
 
 
 
 
 
 
 
dfd45fc
 
5b64408
 
dfd45fc
 
 
 
5b64408
 
dfd45fc
5b64408
 
dfd45fc
 
 
 
 
5b64408
 
 
 
dfd45fc
 
 
 
5b64408
 
dfd45fc
 
 
 
5b64408
 
dfd45fc
 
5b64408
 
dfd45fc
 
 
 
 
5b64408
 
dfd45fc
 
 
 
 
 
5b64408
 
 
 
dfd45fc
 
5b64408
 
 
dfd45fc
 
 
 
5b64408
 
dfd45fc
5b64408
 
dfd45fc
 
5b64408
dfd45fc
5b64408
 
dfd45fc
 
 
 
 
 
 
 
 
 
5b64408
 
dfd45fc
 
 
 
 
 
 
 
 
5b64408
 
dfd45fc
 
 
 
5b64408
 
 
 
dfd45fc
 
 
 
5b64408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dfd45fc
 
 
 
5b64408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dfd45fc
 
 
 
 
 
 
5b64408
 
 
 
dfd45fc
 
5b64408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dfd45fc
 
 
5b64408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>D&D Campaign Manager</title>
    <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=Press+Start+2P&display=swap" rel="stylesheet">
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .broken-console {
            font-family: 'Courier New', monospace;
            letter-spacing: 0.1em;
            text-shadow: 
                0 0 2px #0f0,
                0 0 5px #0f0,
                0 0 10px #0f0;
            animation: glitch 0.5s infinite alternate;
        }
        
        @keyframes glitch {
            0% { text-shadow: 0 0 2px #0f0, 0 0 5px #0f0, 0 0 10px #0f0; }
            25% { text-shadow: 0 0 2px #f0f, 0 0 5px #f0f, 0 0 10px #f0f; }
            50% { text-shadow: 0 0 2px #0ff, 0 0 5px #0ff, 0 0 10px #0ff; }
            75% { text-shadow: 0 0 2px #ff0, 0 0 5px #ff0, 0 0 10px #ff0; }
            100% { text-shadow: 0 0 2px #f00, 0 0 5px #f00, 0 0 10px #f00; }
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes gentlePulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); }
        }
        
        .tab-content {
            animation: fadeIn 0.5s ease-out;
        }
        * {
            transition: background-color 0.3s ease, color 0.3s ease;
        }
        
        .character-sheet:hover, .npc-card:hover, .location-card:hover {
            animation: gentlePulse 3s ease-in-out infinite;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }
        
        .dice-roller:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }
        .agent-card {
            background: linear-gradient(135deg, #6b21a8 0%, #7e22ce 100%);
            padding: 20px;
            border-radius: 15px;
            margin: 10px 0;
            color: white;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .output-box {
            background: #111827;
            border: 1px solid #4b5563;
            border-radius: 10px;
            padding: 15px;
            margin: 10px 0;
            color: #e5e7eb;
            max-height: 300px;
            overflow-y: auto;
        }
        .tab-content {
            display: none;
        }
        .tab-content.active {
            display: block;
        }
        .tab-button {
            transition: all 0.3s ease;
        }
        .tab-button.active {
            background-color: #4f46e5;
            color: white;
        }
        .character-sheet {
            background-color: #1f2937;
            border-radius: 0.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
            color: #e5e7eb;
        }
        .ability-score {
            background-color: #374151;
            border-radius: 0.25rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
            color: #f3f4f6;
        }
        .dice-roller {
            background-color: #d4a373;
            color: white;
            transition: all 0.2s;
        }
        .dice-roller {
            background-color: #7c3aed;
            color: white;
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            font-family: 'Quicksand', sans-serif;
        }
        
        .dice-roller:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
            filter: brightness(1.05);
        }
        .npc-card {
            border-left: 4px solid #4f46e5;
        }
        .location-card {
            background-color: #f9fafb;
            border-radius: 0.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }
        .deity-card {
            background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
            border-radius: 0.5rem;
        }
        .loot-card {
            background-color: #451a03;
            border-radius: 0.5rem;
            color: #fef3c7;
        }
    </style>
</head>
<body class="bg-gray-900" style="font-family: 'Press Start 2P', cursive;">
    <div class="container mx-auto px-4 py-8">
        <!-- Header -->
        <header class="mb-8 text-center">
            <h1 class="text-4xl font-bold text-purple-400 mb-2" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-dragon mr-2"></i> Advanced D&D Campaign Manager
            </h1>
        </header>

        <!-- Tabs Navigation -->
        <div class="flex overflow-x-auto mb-8 bg-gray-800 rounded-lg shadow-lg p-1">
            <button class="tab-button px-6 py-3 text-base font-bold text-purple-300 active hover:bg-gray-700 transition-all duration-200" data-tab="character-creator" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-user mr-2"></i> CHARACTER
            </button>
            <button class="tab-button px-6 py-3 text-base font-bold text-gray-400 hover:text-purple-300 hover:bg-gray-700 transition-all duration-200" data-tab="dungeon-master" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-theater-masks mr-2"></i> DUNGEON MASTER
            </button>
            <button class="tab-button px-6 py-3 text-base font-bold text-gray-400 hover:text-purple-300 hover:bg-gray-700 transition-all duration-200" data-tab="npc-agent" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-users mr-2"></i> NPC AGENT
            </button>
            <button class="tab-button px-6 py-3 text-base font-bold text-gray-400 hover:text-purple-300 hover:bg-gray-700 transition-all duration-200" data-tab="world-builder" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-map mr-2"></i> WORLD BUILDER
            </button>
            <button class="tab-button px-6 py-3 text-base font-bold text-gray-400 hover:text-purple-300 hover:bg-gray-700 transition-all duration-200" data-tab="deity-creator" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-star-and-crescent mr-2"></i> DEITY CREATOR
            </button>
            <button class="tab-button px-6 py-3 text-base font-bold text-gray-400 hover:text-purple-300 hover:bg-gray-700 transition-all duration-200" data-tab="loot-master" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-gem mr-2"></i> LOOT MASTER
            </button>
            <button class="tab-button px-6 py-3 text-base font-bold text-gray-400 hover:text-purple-300 hover:bg-gray-700 transition-all duration-200" data-tab="campaign-tools" style="font-family: 'Press Start 2P', cursive;">
                <i class="fas fa-tools mr-2"></i> CAMPAIGN TOOLS
            </button>
        </div>

        <!-- Tab Contents -->
        <div class="bg-gray-800 rounded-lg shadow-lg p-6 mb-8">
            <!-- Character Creator Tab -->
            <div id="character-creator" class="tab-content active">
                <h2 class="text-2xl font-bold text-indigo-800 mb-2">
                    <i class="fas fa-user mr-2"></i> Character Creator
                </h2>
                
                <div class="grid grid-cols-1 lg:grid-cols-5 gap-4">
                    <!-- Left Column - Character Details -->
                    <div class="lg:col-span-3">
                        <div class="character-sheet p-6 mb-4">
                            <h3 class="text-xl font-semibold text-gray-800 mb-2">
                                <i class="fas fa-file-alt mr-2"></i> Character Details
                            </h3>
                            
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-3 mb-3">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Character Name</label>
                                    <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="Enter name...">
                                </div>
                                <div>
                                    <button class="w-full mt-6 px-4 py-2 bg-purple-100 text-purple-800 rounded-md hover:bg-purple-200 transition">
                                        <i class="fas fa-magic mr-2"></i> Generate Name
                                    </button>
                                </div>
                            </div>
                            
                            <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Race</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Human</option>
                                        <option>Elf</option>
                                        <option>Dwarf</option>
                                        <option>Halfling</option>
                                        <option>Dragonborn</option>
                                        <option>Gnome</option>
                                        <option>Half-Elf</option>
                                        <option>Half-Orc</option>
                                        <option>Tiefling</option>
                                    </select>
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Class</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Fighter</option>
                                        <option>Wizard</option>
                                        <option>Rogue</option>
                                        <option>Cleric</option>
                                        <option>Barbarian</option>
                                        <option>Bard</option>
                                        <option>Druid</option>
                                        <option>Monk</option>
                                        <option>Paladin</option>
                                        <option>Ranger</option>
                                        <option>Sorcerer</option>
                                        <option>Warlock</option>
                                    </select>
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Gender</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Male</option>
                                        <option>Female</option>
                                        <option>Non-binary</option>
                                        <option>Transgender Male</option>
                                        <option>Transgender Female</option>
                                        <option>Genderfluid</option>
                                        <option>Agender</option>
                                        <option>Other</option>
                                    </select>
                                </div>
                            </div>
                            
                            <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Level</label>
                                    <input type="range" min="1" max="20" value="1" class="w-full">
                                    <div class="text-center text-sm font-medium">Level 1</div>
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Alignment</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Lawful Good</option>
                                        <option>Neutral Good</option>
                                        <option>Chaotic Good</option>
                                        <option>Lawful Neutral</option>
                                        <option>True Neutral</option>
                                        <option>Chaotic Neutral</option>
                                        <option>Lawful Evil</option>
                                        <option>Neutral Evil</option>
                                        <option>Chaotic Evil</option>
                                    </select>
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Background</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Acolyte</option>
                                        <option>Criminal</option>
                                        <option>Folk Hero</option>
                                        <option>Noble</option>
                                        <option>Sage</option>
                                        <option>Soldier</option>
                                        <option>Charlatan</option>
                                        <option>Entertainer</option>
                                        <option>Guild Artisan</option>
                                        <option>Hermit</option>
                                        <option>Outlander</option>
                                        <option>Sailor</option>
                                    </select>
                                </div>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-gray-700 mb-1">Backstory</label>
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="3" placeholder="Character background..."></textarea>
                            </div>
                            
                            <button class="w-full px-4 py-2 bg-purple-100 text-purple-800 rounded-md hover:bg-purple-200 transition mb-2">
                                <i class="fas fa-book mr-2"></i> Generate Backstory
                            </button>
                        </div>
                        
                        <!-- Ability Scores -->
                        <div class="character-sheet p-6">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4">
                                <i class="fas fa-dice-d20 mr-2"></i> Ability Scores
                            </h3>
                            
                            <div class="grid grid-cols-2 md:grid-cols-3 gap-4 mb-6">
                                <div class="ability-score p-4 text-center">
                                    <div class="text-lg font-bold">STR</div>
                                    <div class="text-3xl font-bold my-2">10</div>
                                    <div class="text-sm">(+0)</div>
                                </div>
                                <div class="ability-score p-4 text-center">
                                    <div class="text-lg font-bold">DEX</div>
                                    <div class="text-3xl font-bold my-2">10</div>
                                    <div class="text-sm">(+0)</div>
                                </div>
                                <div class="ability-score p-4 text-center">
                                    <div class="text-lg font-bold">CON</div>
                                    <div class="text-3xl font-bold my-2">10</div>
                                    <div class="text-sm">(+0)</div>
                                </div>
                                <div class="ability-score p-4 text-center">
                                    <div class="text-lg font-bold">INT</div>
                                    <div class="text-3xl font-bold my-2">10</div>
                                    <div class="text-sm">(+0)</div>
                                </div>
                                <div class="ability-score p-4 text-center">
                                    <div class="text-lg font-bold">WIS</div>
                                    <div class="text-3xl font-bold my-2">10</div>
                                    <div class="text-sm">(+0)</div>
                                </div>
                                <div class="ability-score p-4 text-center">
                                    <div class="text-lg font-bold">CHA</div>
                                    <div class="text-3xl font-bold my-2">10</div>
                                    <div class="text-sm">(+0)</div>
                                </div>
                            </div>
                            
                            <button class="dice-roller w-full px-4 py-3 rounded-md font-bold">
                                <i class="fas fa-dice mr-2"></i> Roll Ability Scores
                            </button>
                        </div>
                    </div>
                    
                    <!-- Right Column - Character Summary and Portrait -->
                    <div class="lg:col-span-2 space-y-6">
                        <!-- Portrait at the top -->
                        <div class="character-sheet p-6">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4">
                                <i class="fas fa-portrait mr-2"></i> Character Portrait
                            </h3>
                            <div class="bg-gray-200 rounded-lg w-full h-96 flex items-center justify-center text-gray-400">
                                <i class="fas fa-user fa-6x"></i>
                            </div>
                            <button id="generate-portrait-btn" class="dice-roller w-full px-4 py-2 rounded-md font-medium mt-2 text-center" style="font-family: 'Press Start 2P', cursive;">
                                <i class="fas fa-magic mr-2"></i> GENERATE PORTRAIT
                            </button>
                        </div>
                        
                        <!-- Character Summary -->
                        <div class="character-sheet p-6">
                            <h3 class="text-xl font-semibold text-gray-800 mb-4">
                                <i class="fas fa-scroll mr-2"></i> Character Summary
                            </h3>
                            <div class="output-box p-4" style="min-height: 150px;">
                                <p class="text-gray-600 italic">Create character to see summary</p>
                            </div>
                            
                            <div class="mt-4">
                                <h4 class="font-medium text-gray-700 mb-2">
                                    <i class="fas fa-file-export mr-2"></i> Export Character
                                </h4>
                                <button class="w-full px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition">
                                    <i class="fas fa-download mr-2"></i> Export Character Sheet
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Dungeon Master Tab -->
            <div id="dungeon-master" class="tab-content">
                <h2 class="text-2xl font-bold text-indigo-800 mb-6">
                    <i class="fas fa-theater-masks mr-2"></i> Dungeon Master
                </h2>
                
                <div class="agent-card mb-6">
                    <h3 class="text-xl font-semibold text-white mb-2">
                        <i class="fas fa-scroll mr-2"></i> Campaign Generation
                    </h3>
                    
                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                        <div>
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Campaign Theme</label>
                                <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                    <option>High Fantasy</option>
                                    <option>Dark Fantasy</option>
                                    <option>Urban Fantasy</option>
                                    <option>Steampunk</option>
                                    <option>Horror</option>
                                    <option>Comedy</option>
                                    <option>Political Intrigue</option>
                                    <option>Exploration</option>
                                </select>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Starting Level</label>
                                <input type="range" min="1" max="20" value="5" class="w-full">
                                <div class="text-center text-sm font-medium text-white">Level 5</div>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Number of Players</label>
                                <input type="range" min="1" max="8" value="4" class="w-full">
                                <div class="text-center text-sm font-medium text-white">4 Players</div>
                            </div>
                            
                            <button class="dice-roller w-full px-4 py-3 rounded-md font-bold">
                                <i class="fas fa-dice-d20 mr-2"></i> Generate Campaign Concept
                            </button>
                        </div>
                        
                        <div>
                            <div class="bg-gray-200 rounded-lg w-full h-64 flex items-center justify-center text-gray-400 mb-2">
                                <i class="fas fa-image fa-5x"></i>
                            </div>
                            <button class="w-full px-4 py-2 bg-indigo-200 text-indigo-800 rounded-md hover:bg-indigo-300 transition">
                                <i class="fas fa-paint-brush mr-2"></i> Generate Campaign Art
                            </button>
                        </div>
                    </div>
                </div>
                
                <div class="output-box mb-6" style="min-height: 200px;">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Campaign Concept</label>
                    <div class="p-4 bg-gray-100 rounded">
                        <p class="text-gray-600 italic">Generate a campaign to see the results</p>
                    </div>
                </div>
                
                <div class="agent-card">
                    <h3 class="text-xl font-semibold text-white mb-2">
                        <i class="fas fa-calendar-day mr-2"></i> Session Planning
                    </h3>
                    
                    <div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-4">
                        <div>
                            <label class="block text-sm font-medium text-white mb-1">Session Number</label>
                            <input type="number" min="1" value="1" class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                        </div>
                        <div class="md:col-span-3 flex items-end">
                            <button class="w-full px-4 py-2 bg-white text-indigo-800 rounded-md hover:bg-gray-100 transition">
                                <i class="fas fa-scroll mr-2"></i> Generate Session Content
                            </button>
                        </div>
                    </div>
                    
                    <div class="output-box bg-white bg-opacity-20">
                        <label class="block text-sm font-medium text-white mb-1">Session Content</label>
                        <div class="p-4 rounded">
                            <p class="text-white italic">Generate session content to see the results</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- NPC Agent Tab -->
            <div id="npc-agent" class="tab-content">
                <h2 class="text-2xl font-bold text-indigo-800 mb-6">
                    <i class="fas fa-users mr-2"></i> NPC Agent
                </h2>
                
                <div class="agent-card mb-6">
                    <h3 class="text-xl font-semibold text-white mb-2">
                        <i class="fas fa-user-plus mr-2"></i> NPC Creator
                    </h3>
                    
                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                        <div>
                            <h4 class="font-medium text-white mb-2">Create New NPC</h4>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Campaign/Scene Context</label>
                                <textarea class="w-full px-3 py-2 border border-indigo-300 rounded-md" rows="2" placeholder="Describe the setting or situation..."></textarea>
                            </div>
                            
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
                                <div>
                                    <label class="block text-sm font-medium text-white mb-1">NPC Role</label>
                                    <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                        <option>Ally</option>
                                        <option>Neutral</option>
                                        <option>Antagonist</option>
                                        <option>Quest Giver</option>
                                        <option>Merchant</option>
                                        <option>Authority Figure</option>
                                        <option>Mysterious Stranger</option>
                                    </select>
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-white mb-1">Importance Level</label>
                                    <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                        <option>Minor</option>
                                        <option>Moderate</option>
                                        <option>Major</option>
                                        <option>Recurring</option>
                                    </select>
                                </div>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Gender (Optional)</label>
                                <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                    <option value="">Random</option>
                                    <option>Male</option>
                                    <option>Female</option>
                                    <option>Non-binary</option>
                                    <option>Transgender Male</option>
                                    <option>Transgender Female</option>
                                    <option>Genderfluid</option>
                                    <option>Agender</option>
                                    <option>Other</option>
                                </select>
                            </div>
                            
                            <button class="dice-roller w-full px-4 py-3 rounded-md font-bold mb-2">
                                <i class="fas fa-user-plus mr-2"></i> Generate NPC
                            </button>
                            
                            <button class="w-full px-4 py-2 bg-indigo-200 text-indigo-800 rounded-md hover:bg-indigo-300 transition">
                                <i class="fas fa-portrait mr-2"></i> Generate NPC Portrait
                            </button>
                        </div>
                        
                        <div>
                            <div class="bg-gray-200 rounded-lg w-full h-64 flex items-center justify-center text-gray-400 mb-2">
                                <i class="fas fa-user fa-5x"></i>
                            </div>
                            
                            <div class="output-box bg-white bg-opacity-20">
                                <label class="block text-sm font-medium text-white mb-1">Generated NPC</label>
                                <div class="p-4 rounded">
                                    <p class="text-white italic">Generate an NPC to see the results</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="agent-card">
                    <h3 class="text-xl font-semibold text-white mb-2">
                        <i class="fas fa-comments mr-2"></i> NPC Roleplay
                    </h3>
                    
                    <div class="grid grid-cols-1 lg:grid-cols-3 gap-4 mb-4">
                        <div class="lg:col-span-2">
                            <label class="block text-sm font-medium text-white mb-1">Player Action/Dialogue</label>
                            <textarea class="w-full px-3 py-2 border border-indigo-300 rounded-md" rows="2" placeholder="What does the player say or do?"></textarea>
                        </div>
                        <div>
                            <label class="block text-sm font-medium text-white mb-1">Scene Context</label>
                            <textarea class="w-full px-3 py-2 border border-indigo-300 rounded-md" rows="2" placeholder="Describe the current situation..."></textarea>
                        </div>
                    </div>
                    
                    <button class="w-full px-4 py-2 bg-white text-indigo-800 rounded-md hover:bg-gray-100 transition mb-4">
                        <i class="fas fa-comment-dots mr-2"></i> NPC Response
                    </button>
                    
                    <div class="output-box bg-white bg-opacity-20">
                        <label class="block text-sm font-medium text-white mb-1">NPC Response</label>
                        <div class="p-4 rounded">
                            <p class="text-white italic">Generate an NPC response to see the results</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- World Builder Tab -->
            <div id="world-builder" class="tab-content">
                <h2 class="text-2xl font-bold text-indigo-800 mb-6">
                    <i class="fas fa-map mr-2"></i> World Builder
                </h2>
                
                <div class="agent-card">
                    <h3 class="text-xl font-semibold text-white mb-2">
                        <i class="fas fa-archway mr-2"></i> Location & World Generator
                    </h3>
                    
                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                        <div>
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Location Type</label>
                                <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                    <option>Tavern</option>
                                    <option>Dungeon</option>
                                    <option>City</option>
                                    <option>Forest</option>
                                    <option>Castle</option>
                                    <option>Temple</option>
                                    <option>Shop</option>
                                    <option>Wilderness</option>
                                    <option>Mansion</option>
                                    <option>Cave System</option>
                                </select>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Theme</label>
                                <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                    <option>Standard Fantasy</option>
                                    <option>Dark/Gothic</option>
                                    <option>Mystical</option>
                                    <option>Abandoned/Ruined</option>
                                    <option>Luxurious</option>
                                    <option>Dangerous</option>
                                    <option>Peaceful</option>
                                    <option>Mysterious</option>
                                </select>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-white mb-1">Purpose in Campaign</label>
                                <textarea class="w-full px-3 py-2 border border-indigo-300 rounded-md" rows="2" placeholder="How will this location be used?"></textarea>
                            </div>
                            
                            <button class="dice-roller w-full px-4 py-3 rounded-md font-bold mb-2">
                                <i class="fas fa-map-marked-alt mr-2"></i> Generate Location
                            </button>
                            
                            <button class="w-full px-4 py-2 bg-indigo-200 text-indigo-800 rounded-md hover:bg-indigo-300 transition">
                                <i class="fas fa-mountain mr-2"></i> Generate Location Art
                            </button>
                        </div>
                        
                        <div>
                            <div class="bg-gray-200 rounded-lg w-full h-64 flex items-center justify-center text-gray-400 mb-2">
                                <i class="fas fa-landmark fa-5x"></i>
                            </div>
                            
                            <div class="output-box bg-white bg-opacity-20">
                                <label class="block text-sm font-medium text-white mb-1">Location Details</label>
                                <div class="p-4 rounded">
                                    <p class="text-white italic">Generate a location to see the results</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Deity Creator Tab -->
            <div id="deity-creator" class="tab-content">
                <h2 class="text-2xl font-bold text-indigo-800 mb-6">
                    <i class="fas fa-star-and-crescent mr-2"></i> Deity Creator
                </h2>
                
                <div class="agent-card mb-6">
                    <h3 class="text-xl font-semibold text-white mb-2">
                        <i class="fas fa-star mr-2"></i> Divine Pantheon Generator
                    </h3>
                    
                    <div class="flex overflow-x-auto mb-4">
                        <button class="deity-tab-button px-4 py-2 font-medium text-white bg-indigo-700 rounded-t-lg mr-2" data-deity-tab="single-deity">
                            <i class="fas fa-star mr-2"></i> Single Deity
                        </button>
                        <button class="deity-tab-button px-4 py-2 font-medium text-white bg-indigo-600 rounded-t-lg hover:bg-indigo-700" data-deity-tab="full-pantheon">
                            <i class="fas fa-temple mr-2"></i> Full Pantheon
                        </button>
                    </div>
                    
                    <!-- Single Deity Content -->
                    <div id="single-deity" class="deity-tab-content active">
                        <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                            <div>
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-white mb-1">Primary Domain</label>
                                    <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                        <option>War</option>
                                        <option>Death</option>
                                        <option>Life</option>
                                        <option>Knowledge</option>
                                        <option>Nature</option>
                                        <option>Tempest</option>
                                        <option>Trickery</option>
                                        <option>Light</option>
                                        <option>Forge</option>
                                        <option>Grave</option>
                                        <option>Order</option>
                                        <option>Peace</option>
                                        <option>Twilight</option>
                                    </select>
                                </div>
                                
                                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
                                    <div>
                                        <label class="block text-sm font-medium text-white mb-1">Alignment</label>
                                        <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                            <option>Lawful Good</option>
                                            <option>Neutral Good</option>
                                            <option>Chaotic Good</option>
                                            <option>Lawful Neutral</option>
                                            <option>True Neutral</option>
                                            <option>Chaotic Neutral</option>
                                            <option>Lawful Evil</option>
                                            <option>Neutral Evil</option>
                                            <option>Chaotic Evil</option>
                                        </select>
                                    </div>
                                    <div>
                                        <label class="block text-sm font-medium text-white mb-1">Gender</label>
                                        <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                            <option>Male</option>
                                            <option>Female</option>
                                            <option>Non-binary</option>
                                            <option>Genderfluid</option>
                                            <option>Agender</option>
                                            <option>Beyond Gender</option>
                                            <option>Dual-Gendered</option>
                                            <option>Other</option>
                                        </select>
                                    </div>
                                </div>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-white mb-1">Pantheon Theme</label>
                                    <input type="text" class="w-full px-3 py-2 border border-indigo-300 rounded-md" placeholder="Greek, Norse, Egyptian, Original, etc.">
                                </div>
                                
                                <button class="dice-roller w-full px-4 py-3 rounded-md font-bold mb-2">
                                    <i class="fas fa-magic mr-2"></i> Generate Deity
                                </button>
                                
                                <button class="w-full px-4 py-2 bg-indigo-200 text-indigo-800 rounded-md hover:bg-indigo-300 transition">
                                    <i class="fas fa-portrait mr-2"></i> Generate Deity Art
                                </button>
                            </div>
                            
                            <div>
                                <div class="bg-gray-200 rounded-lg w-full h-64 flex items-center justify-center text-gray-400 mb-2">
                                    <i class="fas fa-star fa-5x"></i>
                                </div>
                                
                                <div class="output-box bg-white bg-opacity-20">
                                    <label class="block text-sm font-medium text-white mb-1">Deity Details</label>
                                    <div class="p-4 rounded">
                                        <p class="text-white italic">Generate a deity to see the results</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Full Pantheon Content -->
                    <div id="full-pantheon" class="deity-tab-content">
                        <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                            <div>
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-white mb-1">Pantheon Style</label>
                                    <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                        <option>Greek-inspired</option>
                                        <option>Norse-inspired</option>
                                        <option>Egyptian-inspired</option>
                                        <option>Celtic-inspired</option>
                                        <option>Hindu-inspired</option>
                                        <option>Mesopotamian-inspired</option>
                                        <option>Original Fantasy</option>
                                        <option>Dark Pantheon</option>
                                        <option>Nature Pantheon</option>
                                        <option>Elemental Pantheon</option>
                                    </select>
                                </div>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-white mb-1">Pantheon Size</label>
                                    <select class="w-full px-3 py-2 border border-indigo-300 rounded-md">
                                        <option>Small (5-8 deities)</option>
                                        <option>Medium (9-12 deities)</option>
                                        <option>Large (13-16 deities)</option>
                                        <option>Epic (17+ deities)</option>
                                    </select>
                                </div>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-white mb-1">Cultural Influence</label>
                                    <textarea class="w-full px-3 py-2 border border-indigo-300 rounded-md" rows="2" placeholder="What mortal culture do they influence?"></textarea>
                                </div>
                                
                                <button class="dice-roller w-full px-4 py-3 rounded-md font-bold">
                                    <i class="fas fa-temple mr-2"></i> Generate Pantheon
                                </button>
                            </div>
                            
                            <div>
                                <div class="bg-gray-200 rounded-lg w-full h-64 flex items-center justify-center text-gray-400 mb-2">
                                    <i class="fas fa-temple fa-5x"></i>
                                </div>
                                
                                <button class="w-full px-4 py-2 bg-indigo-200 text-indigo-800 rounded-md hover:bg-indigo-300 transition mb-4">
                                    <i class="fas fa-image mr-2"></i> Generate Pantheon Art
                                </button>
                                
                                <div class="output-box bg-white bg-opacity-20">
                                    <label class="block text-sm font-medium text-white mb-1">Pantheon Details</label>
                                    <div class="p-4 rounded">
                                        <p class="text-white italic">Generate a pantheon to see the results</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Loot Master Tab -->
            <div id="loot-master" class="tab-content">
                <h2 class="text-2xl font-bold text-indigo-800 mb-6">
                    <i class="fas fa-gem mr-2"></i> Loot Master
                </h2>
                
                <div class="agent-card">
                    <h3 class="text-xl font-semibold text-white mb-2">
                        <i class="fas fa-treasure-chest mr-2"></i> Treasure & Magic Item Generator
                    </h3>
                    
                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
                        <div class="loot-card p-4">
                            <h4 class="font-bold text-amber-800 mb-3">
                                <i class="fas fa-coins mr-2"></i> Loot Table Generator
                            </h4>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-amber-800 mb-1">Party Level</label>
                                <input type="range" min="1" max="20" value="5" class="w-full">
                                <div class="text-center text-sm font-medium text-amber-800">Level 5</div>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-amber-800 mb-1">Encounter Type</label>
                                <select class="w-full px-3 py-2 border border-amber-300 rounded-md">
                                    <option>Boss Fight</option>
                                    <option>Mini-boss</option>
                                    <option>Standard Combat</option>
                                    <option>Exploration Reward</option>
                                    <option>Quest Completion</option>
                                    <option>Treasure Hoard</option>
                                </select>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-amber-800 mb-1">Treasure Quality</label>
                                <select class="w-full px-3 py-2 border border-amber-300 rounded-md">
                                    <option>Poor</option>
                                    <option>Standard</option>
                                    <option>Rich</option>
                                    <option>Legendary</option>
                                </select>
                            </div>
                            
                            <button class="w-full px-4 py-2 bg-amber-600 text-white rounded-md hover:bg-amber-700 transition">
                                <i class="fas fa-dice mr-2"></i> Generate Loot Table
                            </button>
                        </div>
                        
                        <div class="loot-card p-4">
                            <h4 class="font-bold text-amber-800 mb-3">
                                <i class="fas fa-magic mr-2"></i> Custom Magic Item
                            </h4>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-amber-800 mb-1">Item Concept</label>
                                <input type="text" class="w-full px-3 py-2 border border-amber-300 rounded-md" placeholder="What kind of item? (sword, ring, staff, etc.)">
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-amber-800 mb-1">Power Level</label>
                                <select class="w-full px-3 py-2 border border-amber-300 rounded-md">
                                    <option>Common</option>
                                    <option>Uncommon</option>
                                    <option>Rare</option>
                                    <option>Very Rare</option>
                                    <option>Legendary</option>
                                    <option>Artifact</option>
                                </select>
                            </div>
                            
                            <div class="mb-4">
                                <label class="block text-sm font-medium text-amber-800 mb-1">Campaign Theme</label>
                                <textarea class="w-full px-3 py-2 border border-amber-300 rounded-md" rows="2" placeholder="How should it fit your campaign?"></textarea>
                            </div>
                            
                            <button class="w-full px-4 py-2 bg-amber-600 text-white rounded-md hover:bg-amber-700 transition">
                                <i class="fas fa-wand-magic-sparkles mr-2"></i> Create Magic Item
                            </button>
                        </div>
                    </div>
                    
                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
                        <div class="output-box">
                            <label class="block text-sm font-medium text-gray-700 mb-1">Loot Table</label>
                            <div class="p-4 bg-gray-100 rounded">
                                <p class="text-gray-600 italic">Generate loot to see the results</p>
                            </div>
                        </div>
                        
                        <div class="output-box">
                            <label class="block text-sm font-medium text-gray-700 mb-1">Magic Item Details</label>
                            <div class="p-4 bg-gray-100 rounded">
                                <p class="text-gray-600 italic">Create an item to see the results</p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="text-center">
                        <div class="bg-gray-200 rounded-lg w-full h-48 flex items-center justify-center text-gray-400 mb-2 mx-auto max-w-md">
                            <i class="fas fa-gem fa-5x"></i>
                        </div>
                        <button class="w-full max-w-md px-4 py-2 bg-amber-600 text-white rounded-md hover:bg-amber-700 transition mx-auto">
                            <i class="fas fa-image mr-2"></i> Generate Item Art
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- Campaign Tools Tab -->
            <div id="campaign-tools" class="tab-content">
                <h2 class="text-2xl font-bold text-indigo-800 mb-6">
                    <i class="fas fa-tools mr-2"></i> Campaign Tools
                </h2>
                
                <div class="flex overflow-x-auto mb-4">
                    <button class="tools-tab-button px-4 py-2 font-medium text-white bg-indigo-700 rounded-t-lg mr-2" data-tools-tab="initiative-tracker">
                        <i class="fas fa-swords mr-2"></i> Initiative Tracker
                    </button>
                    <button class="tools-tab-button px-4 py-2 font-medium text-white bg-indigo-600 rounded-t-lg hover:bg-indigo-700 mr-2" data-tools-tab="session-notes">
                        <i class="fas fa-book mr-2"></i> Session Notes
                    </button>
                    <button class="tools-tab-button px-4 py-2 font-medium text-white bg-indigo-600 rounded-t-lg hover:bg-indigo-700" data-tools-tab="random-generators">
                        <i class="fas fa-dice mr-2"></i> Random Generators
                    </button>
                </div>
                
                <!-- Initiative Tracker Content -->
                <div id="initiative-tracker" class="tools-tab-content active">
                    <div class="bg-white rounded-lg shadow p-6 mb-6">
                        <h3 class="text-xl font-semibold text-gray-800 mb-4">
                            <i class="fas fa-swords mr-2"></i> Combat Management
                        </h3>
                        
                        <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Character Name</label>
                                <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="Add to initiative...">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Initiative Roll</label>
                                <input type="number" class="w-full px-3 py-2 border border-gray-300 rounded-md" value="10">
                            </div>
                            <div class="flex items-end">
                                <button class="w-full px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition">
                                    <i class="fas fa-plus mr-2"></i> Add to Initiative
                                </button>
                            </div>
                        </div>
                        
                        <div class="overflow-x-auto mb-4">
                            <table class="min-w-full bg-white border border-gray-200">
                                <thead>
                                    <tr class="bg-gray-100">
                                        <th class="py-2 px-4 border-b border-gray-200 text-left text-sm font-semibold text-gray-700">Name</th>
                                        <th class="py-2 px-4 border-b border-gray-200 text-left text-sm font-semibold text-gray-700">Initiative</th>
                                        <th class="py-2 px-4 border-b border-gray-200 text-left text-sm font-semibold text-gray-700">HP</th>
                                        <th class="py-2 px-4 border-b border-gray-200 text-left text-sm font-semibold text-gray-700">AC</th>
                                        <th class="py-2 px-4 border-b border-gray-200 text-left text-sm font-semibold text-gray-700">Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td colspan="5" class="py-4 px-4 border-b border-gray-200 text-center text-gray-500">No combatants added yet</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        
                        <div class="flex justify-between">
                            <button class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition">
                                <i class="fas fa-step-forward mr-2"></i> Next Turn
                            </button>
                            <button class="px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition">
                                <i class="fas fa-redo mr-2"></i> Reset Combat
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- Session Notes Content -->
                <div id="session-notes" class="tools-tab-content">
                    <div class="bg-white rounded-lg shadow p-6 mb-6">
                        <h3 class="text-xl font-semibold text-gray-800 mb-4">
                            <i class="fas fa-book mr-2"></i> Session Management
                        </h3>
                        
                        <div class="mb-4">
                            <label class="block text-sm font-medium text-gray-700 mb-1">Session Date</label>
                            <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md" value="Session 1">
                        </div>
                        
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Key Events</label>
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="4" placeholder="What happened this session?"></textarea>
                                
                                <label class="block text-sm font-medium text-gray-700 mb-1 mt-4">NPC Interactions</label>
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="3" placeholder="Who did they meet?"></textarea>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Notable Player Actions</label>
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="4" placeholder="What did the players do?"></textarea>
                                
                                <label class="block text-sm font-medium text-gray-700 mb-1 mt-4">Next Session Prep</label>
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="3" placeholder="What to prepare for next time?"></textarea>
                            </div>
                        </div>
                        
                        <button class="w-full px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition">
                            <i class="fas fa-save mr-2"></i> Save Session Notes
                        </button>
                    </div>
                </div>
                
                <!-- Random Generators Content -->
                <div id="random-generators" class="tools-tab-content">
                    <div class="bg-white rounded-lg shadow p-6">
                        <h3 class="text-xl font-semibold text-gray-800 mb-4">
                            <i class="fas fa-dice-d20 mr-2"></i> Quick Generators
                        </h3>
                        
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                            <div>
                                <h4 class="font-bold text-gray-700 mb-3">
                                    <i class="fas fa-signature mr-2"></i> Name Generators
                                </h4>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Name Type</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Human Male</option>
                                        <option>Human Female</option>
                                        <option>Elven</option>
                                        <option>Dwarven</option>
                                        <option>Orcish</option>
                                        <option>Fantasy Place</option>
                                        <option>Tavern</option>
                                        <option>Shop</option>
                                    </select>
                                </div>
                                
                                <button class="w-full px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition mb-2">
                                    <i class="fas fa-dice mr-2"></i> Generate Name
                                </button>
                                
                                <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md" placeholder="Generated name will appear here" readonly>
                            </div>
                            
                            <div>
                                <h4 class="font-bold text-gray-700 mb-3">
                                    <i class="fas fa-swords mr-2"></i> Quick Encounters
                                </h4>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Party Level</label>
                                    <input type="range" min="1" max="20" value="5" class="w-full">
                                    <div class="text-center text-sm font-medium text-gray-700">Level 5</div>
                                </div>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Difficulty</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Easy</option>
                                        <option>Medium</option>
                                        <option>Hard</option>
                                        <option>Deadly</option>
                                    </select>
                                </div>
                                
                                <button class="w-full px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition mb-2">
                                    <i class="fas fa-dice-d20 mr-2"></i> Generate Encounter
                                </button>
                                
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="3" placeholder="Generated encounter will appear here" readonly></textarea>
                            </div>
                        </div>
                        
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <div>
                                <h4 class="font-bold text-gray-700 mb-3">
                                    <i class="fas fa-fishing-rod mr-2"></i> Plot Hooks
                                </h4>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Theme</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Mystery</option>
                                        <option>Adventure</option>
                                        <option>Political</option>
                                        <option>Personal</option>
                                        <option>Rescue</option>
                                        <option>Exploration</option>
                                    </select>
                                </div>
                                
                                <button class="w-full px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition mb-2">
                                    <i class="fas fa-dice mr-2"></i> Generate Plot Hook
                                </button>
                                
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="2" placeholder="Generated plot hook will appear here" readonly></textarea>
                            </div>
                            
                            <div>
                                <h4 class="font-bold text-gray-700 mb-3">
                                    <i class="fas fa-cloud-sun-rain mr-2"></i> Weather & Atmosphere
                                </h4>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-gray-700 mb-1">Climate</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>Temperate</option>
                                        <option>Tropical</option>
                                        <option>Arctic</option>
                                        <option>Desert</option>
                                        <option>Mountainous</option>
                                    </select>
                                </div>
                                
                                <button class="w-full px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition mb-2">
                                    <i class="fas fa-dice mr-2"></i> Generate Weather
                                </button>
                                
                                <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md" rows="2" placeholder="Generated weather will appear here" readonly></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Tab switching functionality
        document.querySelectorAll('.tab-button').forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons and contents
                document.querySelectorAll('.tab-button').forEach(btn => btn.classList.remove('active'));
                document.querySelectorAll('.tab-content').forEach(content => content.classList.remove('active'));
                
                // Add active class to clicked button
                button.classList.add('active');
                
                // Show corresponding content
                const tabId = button.getAttribute('data-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // Deity tab switching
        document.querySelectorAll('.deity-tab-button').forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons and contents
                document.querySelectorAll('.deity-tab-button').forEach(btn => {
                    btn.classList.remove('bg-indigo-700');
                    btn.classList.add('bg-indigo-600');
                });
                document.querySelectorAll('.deity-tab-content').forEach(content => content.classList.remove('active'));
                
                // Add active class to clicked button
                button.classList.remove('bg-indigo-600');
                button.classList.add('bg-indigo-700');
                
                // Show corresponding content
                const tabId = button.getAttribute('data-deity-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // Tools tab switching
        document.querySelectorAll('.tools-tab-button').forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons and contents
                document.querySelectorAll('.tools-tab-button').forEach(btn => {
                    btn.classList.remove('bg-indigo-700');
                    btn.classList.add('bg-indigo-600');
                });
                document.querySelectorAll('.tools-tab-content').forEach(content => content.classList.remove('active'));
                
                // Add active class to clicked button
                button.classList.remove('bg-indigo-600');
                button.classList.add('bg-indigo-700');
                
                // Show corresponding content
                const tabId = button.getAttribute('data-tools-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // Update level display when slider changes
        document.querySelectorAll('input[type="range"]').forEach(slider => {
            const display = slider.nextElementSibling;
            if (display && display.tagName === 'DIV') {
                slider.addEventListener('input', () => {
                    display.textContent = `Level ${slider.value}`;
                });
            }
        });
        
        // Simple dice roller for ability scores
        document.querySelector('.dice-roller').addEventListener('click', function() {
            const abilities = ['STR', 'DEX', 'CON', 'INT', 'WIS', 'CHA'];
            const abilityElements = document.querySelectorAll('.ability-score');
            
            abilityElements.forEach((element, index) => {
                // Roll 4d6 and drop lowest
                const rolls = [
                    Math.floor(Math.random() * 6) + 1,
                    Math.floor(Math.random() * 6) + 1,
                    Math.floor(Math.random() * 6) + 1,
                    Math.floor(Math.random() * 6) + 1
                ];
                
                rolls.sort((a, b) => b - a); // Sort descending
                const total = rolls[0] + rolls[1] + rolls[2]; // Take top 3
                
                // Update the display
                element.querySelector('.text-3xl').textContent = total;
                
                // Calculate modifier (score - 10 / 2, rounded down)
                const modifier = Math.floor((total - 10) / 2);
                element.querySelector('.text-sm').textContent = `(${modifier >= 0 ? '+' : ''}${modifier})`;
            });
            
            // Show a nice animation
            this.classList.add('animate-pulse');
            setTimeout(() => {
                this.classList.remove('animate-pulse');
            }, 500);
        });
        
        // Generate portrait
        document.getElementById('generate-portrait-btn').addEventListener('click', function() {
            console.log("Generating character portrait...");
            // Add your portrait generation logic here
            this.classList.add('animate-pulse');
            setTimeout(() => {
                this.classList.remove('animate-pulse');
                console.log("Portrait generated successfully!");
            }, 1000);
        });

        // Generate random name
        document.querySelector('.gen_name_btn').addEventListener('click', function() {
            const nameTypes = {
                "Human Male": ["Garrett", "Marcus", "Thomas", "William", "James"],
                "Human Female": ["Elena", "Sarah", "Miranda", "Catherine", "Rose"],
                "Elven": ["Aelar", "Berrian", "Drannor", "Enna", "Galinndan"],
                "Dwarven": ["Adrik", "Baern", "Darrak", "Delg", "Eberk"],
                "Orcish": ["Grul", "Thark", "Dench", "Feng", "Gell"],
                "Fantasy Place": ["Ravenshollow", "Goldbrook", "Thornfield", "Mistral Keep"],
                "Tavern": ["The Prancing Pony", "Dragon's Rest", "The Silver Tankard"],
                "Shop": ["Magical Mysteries", "Fine Blades & More", "Potions & Remedies"]
            };
            
            const selectedType = document.querySelector('.name_type').value;
            const names = nameTypes[selectedType] || ["Unknown"];
            const randomName = names[Math.floor(Math.random() * names.length)];
            
            document.querySelector('.random_name').value = randomName;
        });
        
        // Generate random encounter
        document.querySelector('.gen_encounter_btn').addEventListener('click', function() {
            const level = document.querySelector('.encounter_level').value;
            const difficulty = document.querySelector('.encounter_difficulty').value;
            
            const encounters = [
                `Bandit ambush (adapted for level ${level})`,
                `Wild animal encounter (CR ${Math.max(1, Math.floor(level/4))})`,
                "Mysterious traveler with a quest",
                `Ancient ruins with ${difficulty.toLowerCase()} traps`,
                "Rival adventuring party",
                "Magical phenomenon requiring investigation"
            ];
            
            const randomEncounter = encounters[Math.floor(Math.random() * encounters.length)];
            document.querySelector('.random_encounter').value = randomEncounter;
        });
        
        // Generate plot hook
        document.querySelector('.gen_hook_btn').addEventListener('click', function() {
            const theme = document.querySelector('.hook_theme').value;
            
            const hooks = {
                "Mystery": "A beloved local figure has vanished without a trace, leaving behind only cryptic clues.",
                "Adventure": "Ancient maps surface pointing to a legendary treasure thought lost forever.",
                "Political": "A diplomatic envoy requests secret protection during dangerous negotiations.",
                "Personal": "A character's past catches up with them in an unexpected way.",
                "Rescue": "Innocent people are trapped in a dangerous situation and need immediate help.",
                "Exploration": "Uncharted territories beckon with promises of discovery and danger."
            };
            
            const randomHook = hooks[theme] || "A mysterious stranger approaches with an urgent request.";
            document.querySelector('.plot_hook').value = randomHook;
        });
        
        // Generate weather
        document.querySelector('.gen_weather_btn').addEventListener('click', function() {
            const climate = document.querySelector('.climate').value;
            
            const weatherOptions = {
                "Temperate": ["Sunny and mild", "Light rain showers", "Overcast skies", "Gentle breeze"],
                "Tropical": ["Hot and humid", "Sudden thunderstorm", "Sweltering heat", "Monsoon rains"],
                "Arctic": ["Bitter cold winds", "Heavy snowfall", "Blizzard conditions", "Icy fog"],
                "Desert": ["Scorching sun", "Sandstorm approaching", "Cool desert night", "Rare rainfall"],
                "Mountainous": ["Mountain mist", "Alpine winds", "Rocky terrain", "Sudden weather change"]
            };
            
            const weathers = weatherOptions[climate] || ["Pleasant weather"];
            const randomWeather = weathers[Math.floor(Math.random() * weathers.length)];
            document.querySelector('.weather').value = randomWeather;
        });
    </script>
</body>
</html>