-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabstract.html
More file actions
1074 lines (981 loc) · 60.9 KB
/
Copy pathabstract.html
File metadata and controls
1074 lines (981 loc) · 60.9 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">
<title>Ulcerative Colitis: A Comprehensive Infographic</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
font-family: 'Inter', sans-serif;
background-color: #FFFFFF;
color: #1E293B;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1.75;
font-weight: 400;
}
.main-content-area {
max-width: 800px;
margin: 0 auto;
padding: 4rem 2.5rem;
}
.content-section {
margin-bottom: 4rem;
padding-bottom: 4rem;
border-bottom: 1px solid #E2E8F0;
}
.content-section:last-child {
border-bottom: none;
margin-bottom: 0;
}
.chart-container {
position: relative;
width: 100%;
max-width: 500px;
margin: 2.5rem auto;
height: 300px;
max-height: 380px;
}
.chart-container-taller {
height: 340px;
max-height: 420px;
}
h1 {
color: #0F172A;
font-weight: 700;
font-size: 4.5rem;
line-height: 1.05;
letter-spacing: -0.04em;
margin-bottom: 1.5rem;
text-align: center;
}
.page-subtitle {
color: #334155;
font-size: 2.25rem;
line-height: 1.3;
margin-bottom: 4.5rem;
text-align: center;
max-width: 720px;
margin-left: auto;
margin-right: auto;
font-weight: 500;
}
h2 {
color: #2563EB;
font-weight: 600;
font-size: 1.875rem;
line-height: 1.25;
margin-bottom: 2.25rem;
letter-spacing: -0.015em;
}
h3 {
color: #1E293B;
font-weight: 600;
font-size: 1.375rem;
line-height: 1.35;
margin-bottom: 1.75rem;
}
h4 {
color: #1D4ED8;
font-weight: 600;
font-size: 1.1rem;
margin-bottom: 0.85rem;
}
h4.text-slate-700 {
color: #334155;
}
h4.text-green-700 { color: #047857; }
h4.text-red-700 { color: #B91C1C; }
.highlight-stat {
color: #3B82F6;
font-weight: 700;
font-size: 3.25rem;
line-height: 1;
display: block;
margin: 1rem 0;
}
.text-block {
color: #1E293B;
font-size: 1.05rem;
margin-bottom: 1.5rem;
font-weight: 400;
}
.text-block strong {
color: #0F172A;
font-weight: 600;
}
.visualization-context-text {
color: #475569;
font-size: 0.9rem;
line-height: 1.55;
margin-top: 1rem;
text-align: center;
}
.diagram-item {
background-color: #F8FAFC;
border: 1px solid #E2E8F0;
color: #1E293B;
padding: 0.875rem 1.125rem;
border-radius: 0.5rem;
text-align: center;
font-weight: 500;
font-size: 0.9rem;
margin-bottom: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0,0,0,0.03);
}
.diagram-item.uc-development-warning {
border-color: #D97706;
background-color: #FFFBEB;
color: #B45309;
}
.diagram-item.diagnosis-confirmed {
border-color: #3B82F6;
background-color: #EFF6FF;
color: #1D4ED8;
}
.diagram-arrow {
font-size: 1.375rem;
color: #CBD5E1;
margin: 0.5rem 0;
text-align: center;
}
.gemini-feature-section {
background-color: #F8FAFC;
border: 1px solid #E2E8F0;
border-radius: 0.75rem;
padding: 2.5rem;
margin-top: 3rem;
box-shadow: 0 6px 12px -2px rgb(0 0 0 / 0.05), 0 3px 7px -3px rgb(0 0 0 / 0.05);
}
.gemini-input {
border: 1px solid #CBD5E1;
border-radius: 0.375rem;
padding: 0.75rem 1rem;
width: 100%;
margin-bottom: 1.25rem;
font-size: 1rem;
color: #1E293B;
background-color: #FFFFFF;
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.gemini-input:focus {
outline: none;
border-color: #3B82F6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.gemini-button {
background-color: #3B82F6;
color: #FFFFFF;
padding: 0.875rem 1.5rem;
border-radius: 0.375rem;
font-weight: 600;
font-size: 1rem;
transition: background-color 0.2s ease-in-out;
width: 100%;
border: none;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}
.gemini-button:hover {
background-color: #2563EB;
}
.gemini-button:disabled, .gemini-button.opacity-75 {
background-color: #93C5FD;
cursor: not-allowed;
opacity: 0.75;
}
.gemini-output {
margin-top: 1.5rem;
padding: 1.25rem;
background-color: #FFFFFF;
border-radius: 0.375rem;
border: 1px solid #E2E8F0;
min-height: 45px;
white-space: pre-wrap;
font-size: 0.95rem;
line-height: 1.65;
color: #334155;
}
.loading-spinner {
border: 3px solid #E2E8F0;
border-top: 3px solid #3B82F6;
border-radius: 50%;
width: 28px;
height: 28px;
animation: spin 0.8s linear infinite;
margin: 1.75rem auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.disclaimer-text {
font-size: 0.85rem;
color: #EF4444;
margin-top: 1.25rem;
text-align: center;
font-weight: 400;
}
.list-disc {
padding-left: 1.75rem;
font-size: 1rem;
}
.list-disc > li {
margin-bottom: 0.625rem;
color: #1E293B;
}
.list-disc > li::marker {
color: #3B82F6;
}
/* Specific styling for food lists markers */
.food-list-allowed li::marker { color: #10B981; }
.food-list-triggers li::marker { color: #EF4444; }
.footer-text {
font-size: 0.9rem;
color: #64748B;
text-align: center;
padding-top: 3.5rem;
}
.citation {
font-size: 0.8rem;
color: #94A3B8;
}
.med-category-item {
padding: 0.75rem 1rem;
font-size: 0.875rem;
border-radius: 0.375rem;
text-align: left;
color: #1E293B;
display: flex;
align-items: center;
font-weight: 500;
}
.med-cat-small-mol { background-color: #DBEAFE; border: 1px solid #93C5FD; color: #1E40AF;}
.med-cat-biologic { background-color: #E0E7FF; border: 1px solid #C7D2FE; color: #3730A3;}
.med-cat-immunomod { background-color: #FFFBEB; border: 1px solid #FDE68A; color: #92400E;}
.med-cat-corticosteroid { background-color: #F5F3FF; border: 1px solid #DDD6FE; color: #5B21B6;}
.med-cat-aminosalicylate { background-color: #F8FAFC; border: 1px solid #E2E8F0; color: #334155;}
/* New styles for symptom cards */
.symptom-card {
border-radius: 0.75rem;
padding: 1.5rem;
margin-bottom: 1rem;
display: flex;
align-items: center;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.symptom-card.gut {
background-color: #EFF6FF;
border-left: 4px solid #3B82F6;
}
.symptom-card.systemic {
background-color: #ECFDF5;
border-left: 4px solid #10B981;
}
.symptom-card.eim {
background-color: #FEF2F2;
border-left: 4px solid #EF4444;
}
.symptom-icon {
font-size: 1.5rem;
margin-right: 1rem;
flex-shrink: 0;
}
.symptom-card.gut .symptom-icon { color: #3B82F6; }
.symptom-card.systemic .symptom-icon { color: #10B981; }
.symptom-card.eim .symptom-icon { color: #EF4444; }
/* Responsive adjustments */
@media (max-width: 768px) {
h1 {
font-size: 3rem;
line-height: 1.1;
}
.page-subtitle {
font-size: 1.5rem;
margin-bottom: 3rem;
}
h2 {
font-size: 1.5rem;
}
.main-content-area {
padding: 2.5rem 1.5rem;
}
.content-section {
margin-bottom: 3rem;
padding-bottom: 3rem;
}
.highlight-stat {
font-size: 2.5rem;
}
}
@media (max-width: 480px) {
h1 {
font-size: 2.25rem;
}
.page-subtitle {
font-size: 1.25rem;
}
.gemini-feature-section {
padding: 1.5rem;
}
}
</style>
</head>
<body>
<div class="main-content-area">
<header class="mb-12">
<h1>Navigating Ulcerative Colitis</h1>
<p class="page-subtitle">A Comprehensive Infographic on Understanding and Managing This Condition</p>
</header>
<section id="overview" class="content-section">
<h2>Ulcerative Colitis: A Clear Overview</h2>
<p class="text-block">Ulcerative colitis (UC) is a <strong>long-term (chronic) condition</strong> where the <strong>large intestine (colon and rectum) becomes inflamed</strong>. This inflammation causes tiny sores, called ulcers, to form on the lining of the colon, leading to various symptoms. Managing UC often requires ongoing medical care.</p>
<div class="text-center my-10">
<p class="text-block text-base">Estimated Number of People Affected in the United States:</p>
<span class="highlight-stat">~1 Million</span>
<p class="visualization-context-text mt-2">This shows that many individuals live with UC. <span class="citation">[1]</span></p>
</div>
</section>
<section id="understanding" class="content-section">
<h2>Understanding Your UC: Types and Risk Factors</h2>
<p class="text-block">UC is categorized based on <strong>which parts of the colon are inflamed</strong> and <strong>how widespread the inflammation is</strong>. Knowing the specific type of UC helps doctors create the most effective treatment plan and foresee potential issues.</p>
<div>
<h3>Types of Ulcerative Colitis Explained</h3>
<p class="visualization-context-text mb-4">The type of UC is determined by where the inflammation is located:</p>
<ul class="list-disc space-y-2 mb-8">
<li><strong>Ulcerative Proctitis:</strong> Inflammation is limited to the <strong>rectum</strong> (the last part of the large intestine, ending at the anus). This is often the mildest form. <span class="citation">[1, 6]</span></li>
<li><strong>Left-Sided Colitis (Distal UC):</strong> Inflammation starts at the rectum and extends up the <strong>left side of the colon</strong> (which includes the sigmoid and descending colon). <span class="citation">[1, 6]</span></li>
<li><strong>Extensive Colitis (Pancolitis):</strong> Inflammation affects the <strong>entire colon</strong>. This type can be more severe and may have more widespread symptoms. <span class="citation">[1, 6]</span></li>
</ul>
<div class="mt-5 p-5 border border-slate-200 rounded-lg bg-slate-50 shadow-sm">
<h4 class="text-center text-base font-medium text-blue-700 mb-4">Affected Colon Regions (Simplified View)</h4>
<div class="space-y-2.5 text-sm">
<div class="diagram-item"><strong>Proctitis:</strong> Rectum Only</div>
<div class="diagram-item"><strong>Left-Sided Colitis:</strong> Rectum, Sigmoid & Descending Colon</div>
<div class="diagram-item"><strong>Extensive Colitis / Pancolitis:</strong> Entire Colon Affected</div>
</div>
</div>
</div>
<div class="mt-12">
<h3>Who Is More Likely to Develop UC?</h3>
<div class="chart-container">
<canvas id="riskFactorAgeChart"></canvas>
</div>
<p class="visualization-context-text">UC can develop at any age, but it's most commonly diagnosed in people before the age of 30. <span class="citation">[1, 2, 4]</span></p>
<ul class="list-disc space-y-2 text-base mt-5">
<li><strong>Ethnicity:</strong> It's diagnosed more often in individuals of Caucasian background, especially those of Ashkenazi Jewish descent. <span class="citation">[1, 10]</span></li>
<li><strong>Family History:</strong> If a <strong>close relative</strong> (like a parent, sibling, or child) has UC, your risk of developing it is higher. <span class="citation">[1, 4, 11]</span></li>
</ul>
</div>
<div class="mt-12">
<h3>How UC Often Starts: Ulcerative Proctitis</h3>
<div class="chart-container">
<canvas id="proctitisPrevalenceChart"></canvas>
</div>
<p class="visualization-context-text">For about one-third of people with UC, the condition first appears as ulcerative proctitis. <span class="citation">[6]</span></p>
</div>
</section>
<section id="causes" class="content-section">
<h2>Why Does UC Happen? Exploring Potential Causes</h2>
<p class="text-block">The precise cause of Ulcerative Colitis is still not completely known. However, research suggests it's a <strong>complex condition</strong> resulting from a combination of factors. Importantly, UC is <strong>not caused by specific foods you've eaten or by stress</strong>, although these factors can sometimes make symptoms worse if you already have the condition.</p>
<div>
<h3 class="mb-4">Key Factors Believed to Contribute:</h3>
<ul class="list-disc space-y-2.5 text-base">
<li><strong>Overactive Immune System:</strong> The body's defense system (immune system) mistakenly identifies harmless bacteria or cells in the colon as threats and attacks them, causing inflammation. <span class="citation">[1, 13]</span></li>
<li><strong>Genetic Factors:</strong> Having certain <strong>genes</strong> can make a person more prone to developing UC. It can run in families. <span class="citation">[3, 10, 11]</span></li>
<li><strong>Gut Microbiome (Gut Bacteria):</strong> An imbalance in the types and amounts of bacteria and other microorganisms living in the gut (the "gut microbiome") may play a role. <span class="citation">[2, 12]</span></li>
<li><strong>Environmental Influences:</strong> Various factors in the environment, which are still being researched, might trigger UC in people who are genetically predisposed. <span class="citation">[1, 3, 14, 22]</span></li>
</ul>
</div>
<div class="mt-8 p-5 border border-slate-200 rounded-lg bg-slate-50 shadow-sm">
<h4 class="text-center text-base font-medium text-blue-700 mb-4">How These Factors Might Interact to Cause UC</h4>
<div class="flex flex-col items-center space-y-2">
<div class="diagram-item w-full max-w-md">Genetic Susceptibility (Inherited Tendency)</div>
<div class="diagram-arrow">↓</div>
<div class="diagram-item w-full max-w-md">Immune System Not Working Correctly</div>
<div class="diagram-arrow">↓</div>
<div class="flex space-x-3 w-full max-w-md">
<div class="diagram-item flex-1">Changes in Gut Bacteria</div>
<div class="diagram-item flex-1">Environmental Triggers</div>
</div>
<div class="diagram-arrow">↓</div>
<div class="diagram-item uc-development-warning w-full max-w-md">Development of Ulcerative Colitis</div>
</div>
</div>
</section>
<section id="symptoms" class="content-section">
<h2>Recognizing UC: Common Signs and Symptoms</h2>
<p class="text-block">The symptoms of Ulcerative Colitis can differ greatly from person to person. They depend on <strong>how severe the inflammation is</strong> and <strong>which part of the colon is affected</strong>. Symptoms can also come and go; periods when symptoms are active are called <strong>flare-ups</strong>, and periods with few or no symptoms are called <strong>remission</strong>.</p>
<div class="grid grid-cols-1 gap-6 mt-8">
<h3>Gut-Related Symptoms</h3>
<div class="symptom-card gut">
<div class="symptom-icon"><i class="fas fa-toilet"></i></div>
<div>
<strong>Diarrhea</strong>, which may contain blood, pus, or mucus
</div>
</div>
<div class="symptom-card gut">
<div class="symptom-icon"><i class="fas fa-tint"></i></div>
<div>
<strong>Rectal bleeding</strong> (seeing blood on toilet paper or in the stool)
</div>
</div>
<div class="symptom-card gut">
<div class="symptom-icon"><i class="fas fa-bell"></i></div>
<div>
<strong>Urgency</strong> (a sudden, strong need to have a bowel movement)
</div>
</div>
<div class="symptom-card gut">
<div class="symptom-icon"><i class="fas fa-exclamation"></i></div>
<div>
<strong>Tenesmus</strong> (feeling like you need to pass stool, even if your bowel is empty)
</div>
</div>
<div class="symptom-card gut">
<div class="symptom-icon"><i class="fas fa-procedures"></i></div> <div>
<strong>Abdominal (belly) pain</strong> and cramping, <strong>Pain in the rectum</strong>
</div>
</div>
</div>
<div class="grid grid-cols-1 gap-6 mt-8">
<h3>General Symptoms Affecting Well-being</h3>
<div class="symptom-card systemic">
<div class="symptom-icon"><i class="fas fa-bed"></i></div> <div>
<strong>Fatigue</strong> (feeling very tired and lacking energy)
</div>
</div>
<div class="symptom-card systemic">
<div class="symptom-icon"><i class="fas fa-weight-scale"></i></div> <div>
<strong>Unintended weight loss</strong> and reduced appetite
</div>
</div>
<div class="symptom-card systemic">
<div class="symptom-icon"><i class="fas fa-thermometer-half"></i></div> <div>
<strong>Fever</strong> (especially during severe flare-ups)
</div>
</div>
<div class="symptom-card systemic">
<div class="symptom-icon"><i class="fas fa-heart-pulse"></i></div> <div>
<strong>Anemia</strong> (low red blood cell count, often due to blood loss, causing tiredness and paleness)
</div>
</div>
</div>
<div class="mt-10">
<h3 class="text-center">Beyond the Colon: Symptoms Outside the Gut (EIMs)</h3>
<p class="visualization-context-text mb-4">While UC primarily affects the colon, inflammation can sometimes occur in other parts of the body. These are known as Extraintestinal Manifestations (EIMs). <span class="citation">[3, 29, 30, 31]</span></p>
<div class="grid grid-cols-1 gap-6 mt-6">
<div class="symptom-card eim">
<div class="symptom-icon"><i class="fas fa-joint"></i></div> <div>
<strong>Arthritis</strong> (painful, swollen joints) - most common EIM
</div>
</div>
<div class="symptom-card eim">
<div class="symptom-icon"><i class="fas fa-eye"></i></div>
<div>
<strong>Eye inflammation</strong> (uveitis, iritis)
</div>
</div>
<div class="symptom-card eim">
<div class="symptom-icon"><i class="fas fa-disease"></i></div> <div>
<strong>Skin conditions</strong> (erythema nodosum, pyoderma gangrenosum)
</div>
</div>
<div class="symptom-card eim">
<div class="symptom-icon"><i class="fas fa-bacterium"></i></div> <div>
<strong>Liver conditions</strong> (primary sclerosing cholangitis)
</div>
</div>
</div>
<div class="chart-container chart-container-taller mt-8">
<canvas id="eimPrevalenceChart"></canvas>
</div>
<p class="visualization-context-text mt-3"><strong>Arthritis</strong> (painful, swollen joints) is the most frequently reported EIM among people with UC. <span class="citation">[30, 31, 32]</span></p>
</div>
</section>
<section id="diagnosis" class="content-section">
<h2>Getting Diagnosed: How Doctors Identify UC</h2>
<p class="text-block">Diagnosing Ulcerative Colitis usually involves several steps. Doctors aim to <strong>confirm that there is inflammation in the colon</strong>, determine how much of the colon is affected, and rule out other conditions that can cause similar symptoms (like Crohn's disease, infections, or irritable bowel syndrome).</p>
<h3 class="mb-4">Key Steps in Diagnosing UC:</h3>
<div class="space-y-3">
<div class="diagram-item"><strong>1. Medical History & Physical Exam:</strong> Your doctor will ask about your symptoms, their duration, your family's medical history, and your overall health. A physical exam will also be performed.</div>
<div class="diagram-arrow text-center">↓</div>
<div class="diagram-item"><strong>2. Blood Tests & Stool Tests:</strong> Blood tests can check for signs of inflammation (like high C-reactive protein or ESR), anemia (low red blood cells), and nutritional deficiencies. Stool tests help rule out infections and can detect hidden blood.</div>
<div class="diagram-arrow text-center">↓</div>
<div class="diagram-item"><strong>3. Endoscopy (Colonoscopy or Sigmoidoscopy):</strong> This is a key procedure. A doctor uses a thin, flexible tube with a light and camera (endoscope) to look directly at the lining of your colon and rectum.</div>
<div class="diagram-arrow text-center">↓</div>
<div class="diagram-item diagnosis-confirmed"><strong>4. Biopsy & Confirmation:</strong> During the endoscopy, small tissue samples (biopsies) are taken from the colon lining. These are examined under a microscope by a pathologist to confirm the diagnosis of UC and assess the type of inflammation.</div>
</div>
<p class="visualization-context-text mt-4">An <strong>endoscopy with biopsies</strong> is considered the most definitive way to diagnose Ulcerative Colitis. <span class="citation">[1, 43, 48]</span></p>
</section>
<section id="treatment" class="content-section">
<h2>Treating UC: Options for Managing the Condition</h2>
<p class="text-block">The main goals of treating Ulcerative Colitis are to <strong>reduce the inflammation</strong> in your colon, bring about and maintain <strong>remission</strong> (periods when you have few or no symptoms), improve your quality of life, and prevent complications. Your treatment plan will be tailored to you, considering the severity and extent of your UC, as well as your personal preferences.</p>
<div>
<h3 class="mb-4">Primary Medication Categories for UC</h3>
<div class="space-y-2.5">
<div class="diagram-item med-category-item med-cat-aminosalicylate"><strong>Aminosalicylates (5-ASAs):</strong> Often a first step for mild to moderate UC. They work directly on the lining of the gut to reduce inflammation. (Examples: mesalamine, sulfasalazine)</div>
<div class="diagram-item med-category-item med-cat-corticosteroid"><strong>Corticosteroids:</strong> These are strong, fast-acting anti-inflammatory drugs used to control moderate to severe flare-ups. Due to side effects, they are typically used for short periods. (Examples: prednisone, budesonide)</div>
<div class="diagram-item med-category-item med-cat-immunomod"><strong>Immunomodulators:</strong> These drugs modify or weaken the body's immune system to reduce inflammation. They take longer to start working and are often used for long-term management or if 5-ASAs aren't enough. (Examples: azathioprine, 6-mercaptopurine)</div>
<div class="diagram-item med-category-item med-cat-biologic"><strong>Biologic Therapies:</strong> These are advanced, targeted medications made from living organisms (or components of them) that block specific proteins or cells involved in the inflammation process. Used for moderate to severe UC that hasn't responded to other treatments. (Examples: infliximab, adalimumab, vedolizumab, ustekinumab)</div>
<div class="diagram-item med-category-item med-cat-small-mol"><strong>Small Molecule Drugs (e.g., JAK Inhibitors, S1P Modulators):</strong> These are newer oral medications that target specific pathways inside cells to block inflammation. Also used for moderate to severe UC. (Examples: tofacitinib, upadacitinib, ozanimod)</div>
</div>
<p class="visualization-context-text mt-3">The best medication for you depends on how severe your UC is and where it's located in your colon. <span class="citation">[43, 50, 70]</span></p>
</div>
<div class="mt-10">
<h3 class="text-center">Corticosteroids: Effectiveness and Considerations</h3>
<div class="chart-container chart-container-taller">
<canvas id="steroidEfficacyChart"></canvas>
</div>
<p class="visualization-context-text mt-3">Corticosteroids are highly effective for calming flare-ups quickly, but they are generally not suitable for long-term use due to the risk of significant side effects. <span class="citation">[61, 62, 64]</span></p>
</div>
<div class="gemini-feature-section">
<h3 class="text-center mb-3">✨ Doctor Discussion Helper: Question Ideas</h3>
<p class="visualization-context-text text-center mb-5">Not sure what questions to ask your doctor? Type in a topic or concern (e.g., "new medication," "managing fatigue") to get some tailored question suggestions.</p>
<input type="text" id="doctorQuestionTopic" class="gemini-input" placeholder="e.g., 'medication side effects', 'diet during flare-up'">
<button id="generateDoctorQuestionsBtn" class="gemini-button">Generate Questions</button>
<div id="doctorQuestionsLoader" class="hidden loading-spinner"></div>
<div id="doctorQuestionsOutput" class="gemini-output mt-5 hidden"></div>
<p class="disclaimer-text">This tool offers general question ideas, not medical advice. Always discuss your personal health situation with your healthcare provider.</p>
</div>
<div class="mt-12">
<h3 class="text-center">When Surgery Might Be an Option</h3>
<p class="visualization-context-text mb-2">While medications are the main treatment for most people, surgery to remove the colon (colectomy) becomes necessary for about <strong>one-quarter to one-third of UC patients</strong> at some stage. <span class="citation">[43, 51, 88]</span></p>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-8 mt-5 text-base">
<div>
<h4 class="text-blue-700">Reasons Surgery May Be Recommended: <span class="citation">[43, 85]</span></h4>
<ul class="list-disc space-y-1.5">
<li>Severe, life-threatening complications like toxic megacolon (rapid swelling of the colon) or a hole (perforation) in the colon.</li>
<li>Medical treatments no longer control symptoms effectively (medically refractory disease).</li>
<li>Discovery of colon cancer or high-grade dysplasia (cells that are likely to become cancerous).</li>
</ul>
</div>
<div>
<h4 class="text-blue-700">Common Types of Surgery for UC:</h4>
<ul class="list-disc space-y-1.5">
<li><strong>IPAA (Ileal Pouch-Anal Anastomosis or J-Pouch):</strong> The colon and rectum are removed. A pouch is surgically created from the end of the small intestine (ileum) and connected to the anus, allowing for bowel movements in a relatively normal way. This is often the preferred surgery if possible. <span class="citation">[88, 90]</span></li>
<li><strong>Proctocolectomy with End Ileostomy:</strong> The colon and rectum are removed. The end of the small intestine is brought through an opening (stoma) made in the abdomen. Waste then collects in an external bag (ostomy bag) worn over the stoma. <span class="citation">[50, 86]</span></li>
</ul>
</div>
</div>
</div>
</section>
<section id="living" class="content-section">
<h2>Living Well with UC: Diet, Lifestyle, and Self-Care Tips</h2>
<p class="text-block">While there isn't a specific "UC diet" that can cure the condition, your food choices and lifestyle habits can make a big difference in <strong>managing your symptoms</strong>, improving your overall health, and possibly reducing how often you have flare-ups.</p>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-10">
<div>
<h3>Dietary Guidance for UC <span class="citation">[99, 101]</span></h3>
<h4 class="text-blue-700 mt-4">When in Remission (Feeling Well):</h4>
<ul class="list-disc text-base space-y-1">
<li>Aim for a <strong>balanced, nutrient-dense diet</strong> that you find easy to tolerate. Many people benefit from focusing on whole, unprocessed foods. Keeping a food diary can help identify personal trigger foods.</li>
</ul>
<h4 class="text-amber-700 mt-3">During Flare-Ups (Symptoms Active):</h4>
<ul class="list-disc text-base space-y-1">
<li>A <strong>low-fiber, low-residue diet</strong> may help ease symptoms. This means choosing soft, bland foods like white rice, cooked chicken or fish, bananas, and well-cooked vegetables without skins or seeds. It's important to avoid foods you know make your symptoms worse.</li>
</ul>
</div>
<div>
<h3>Lifestyle and Self-Care Strategies</h3>
<ul class="list-disc space-y-2 text-base">
<li><strong>Manage Stress:</strong> While stress doesn't cause UC, it can trigger or worsen symptoms for some. Finding healthy ways to cope with stress, like mindfulness, meditation, yoga, or talking to a therapist, can be very beneficial. <span class="citation">[1, 114, 116]</span></li>
<li><strong>Gentle, Regular Exercise:</strong> Physical activity, as tolerated, can boost your mood, reduce stress, and improve overall health. Listen to your body and choose activities you enjoy. <span class="citation">[115, 120]</span></li>
<li><strong>Prioritize Sleep:</strong> Getting enough quality sleep is vital for your immune system and overall well-being.</li>
<li><strong>Medication Adherence:</strong> It's crucial to take your medications exactly as prescribed by your doctor, even when you're feeling well (in remission), to help prevent future flare-ups.</li>
</ul>
</div>
</div>
<div class="mt-12">
<h3 class="text-center">General Food Guidelines: Often Tolerated vs. Common Triggers</h3>
<p class="visualization-context-text mb-6">
Managing diet is a key part of living with Ulcerative Colitis. While individual tolerances vary greatly, some foods are generally better tolerated, especially during remission or mild symptoms, while others are common triggers, particularly during flare-ups.
<strong class="block mt-2 text-slate-700">Always listen to your body and work with your doctor or a registered dietitian to identify your personal trigger foods and create a sustainable eating plan.</strong>
</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div class="p-6 bg-green-50 border border-green-200 rounded-lg shadow-sm">
<h4 class="text-lg font-semibold text-green-700 mb-3">Foods Often Better Tolerated</h4>
<p class="text-sm text-green-600 mb-4">These are often easier to digest, especially when symptoms are mild or in remission. Focus on how foods are prepared (e.g., cooked, peeled).</p>
<ul class="list-disc food-list-allowed pl-5 space-y-1.5 text-slate-700 text-base">
<li><strong>Lean Proteins:</strong> Cooked chicken (skinless), turkey, fish (baked, broiled, or steamed), eggs.</li>
<li><strong>Refined Grains:</strong> White rice, pasta, noodles, white bread (sourdough may be better tolerated by some), oatmeal, cream of wheat.</li>
<li><strong>Cooked Vegetables (Low Fiber):</strong> Carrots, green beans, squash (peeled), potatoes (peeled), asparagus tips – all well-cooked.</li>
<li><strong>Fruits (Low Fiber):</strong> Bananas (ripe), cantaloupe, honeydew melon, applesauce, canned peaches/pears (in own juice, peeled), cooked or pureed fruits.</li>
<li><strong>Dairy/Alternatives (if tolerated):</strong> Lactose-free milk, plain yogurt (with live cultures, if tolerated), hard cheeses in moderation. Some may need dairy-free alternatives like almond or rice milk.</li>
<li><strong>Fats (in moderation):</strong> Olive oil, avocado (if tolerated in small amounts).</li>
<li><strong>Hydration:</strong> Water, electrolyte drinks (if needed), clear broths.</li>
</ul>
</div>
<div class="p-6 bg-red-50 border border-red-200 rounded-lg shadow-sm">
<h4 class="text-lg font-semibold text-red-700 mb-3">Foods That May Trigger Symptoms</h4>
<p class="text-sm text-red-600 mb-4">These are common irritants for many with UC, especially during flare-ups. Keeping a food diary can help identify personal triggers.</p>
<ul class="list-disc food-list-triggers pl-5 space-y-1.5 text-slate-700 text-base">
<li><strong>High-Fiber Foods:</strong> Raw vegetables (especially cruciferous like broccoli, cauliflower, cabbage, Brussels sprouts), whole grains (whole wheat bread, brown rice, quinoa), legumes (beans, lentils, peas), nuts, seeds.</li>
<li><strong>Spicy Foods:</strong> Hot peppers, chili, spicy sauces.</li>
<li><strong>Fatty/Greasy Foods:</strong> Fried foods, fast food, fatty cuts of meat, rich sauces, cream.</li>
<li><strong>Dairy (for many):</strong> Milk, ice cream, soft cheeses (if lactose intolerant or sensitive).</li>
<li><strong>Caffeine & Alcohol:</strong> Coffee, tea, soda, alcoholic beverages can irritate the gut.</li>
<li><strong>Sugary Foods & Drinks:</strong> Candy, pastries, sugary sodas, fruit juices with high sugar content (can cause osmotic diarrhea). Sorbitol and other sugar alcohols can also be problematic.</li>
<li><strong>Tough Meats:</strong> Red meat, processed meats (sausages, hot dogs) can be harder to digest for some.</li>
<li><strong>Insoluble Fiber:</strong> Skins and seeds of fruits and vegetables.</li>
</ul>
</div>
</div>
<p class="visualization-context-text mt-6">
<span class="font-semibold text-slate-700">Important Note:</span> This is a general guide. Individual responses to food can vary significantly. A food diary and consultation with healthcare professionals are essential for personalized dietary management. <span class="citation">[General IBD dietary guidelines, e.g., Crohn's & Colitis Foundation]</span>
</p>
</div>
<div class="gemini-feature-section mt-12">
<h3 class="text-center mb-3">✨ Personalized Diet Ideas Generator</h3>
<p class="visualization-context-text text-center mb-5">Need some food inspiration? Tell us about your current dietary needs or what you're looking for (e.g., "easy-to-digest breakfast," "low-lactose snacks for a sensitive gut") to get some general meal ideas.</p>
<textarea id="dietPreferences" class="gemini-input h-28" placeholder="e.g., 'easy-to-digest breakfast', 'low-lactose snacks'"></textarea>
<button id="generateDietIdeasBtn" class="gemini-button">Get Diet Ideas</button>
<div id="dietIdeasLoader" class="hidden loading-spinner"></div>
<div id="dietIdeasOutput" class="gemini-output mt-5 hidden"></div>
<p class="disclaimer-text">This tool offers general diet ideas, not medical advice. Always discuss your dietary plan with your healthcare provider or a registered dietitian.</p>
</div>
<div class="mt-12">
<h3 class="text-center">Common Nutritional Concerns & Deficiencies</h3>
<p class="visualization-context-text mb-4">Inflammation in the colon and symptoms like diarrhea can make it harder for your body to absorb all the nutrients it needs from food. Regular check-ups with your doctor may include blood tests to monitor for deficiencies, and supplementation might be recommended. <span class="citation">[17, 84, 106]</span></p>
<div class="chart-container chart-container-taller">
<canvas id="commonDeficienciesChart"></canvas>
</div>
<p class="visualization-context-text mt-3"><strong>Iron deficiency anemia</strong> is especially common in UC due to blood loss from intestinal ulcers and chronic inflammation. <span class="citation">[17, 84]</span></p>
</div>
</section>
<footer class="footer-text">
<p>Made By Eeman</p> </footer>
</div>
<script>
Chart.defaults.font.family = 'Inter';
Chart.defaults.color = '#64748B';
Chart.defaults.font.weight = 400;
// Calmer Blue-Accented Chart Palette
const CALM_CHART_COLORS = {
primaryAccentDark: '#1E40AF',
primaryAccentMedium: '#3B82F6',
primaryAccentLight: '#60A5FA',
accentLighter: '#93C5FD',
accentPale: '#BFDBFE',
neutralBase: '#FFFFFF',
neutralLight: '#F8FAFC',
neutralMedium: '#94A3B8',
textDark: '#334155'
};
function wrapLabel(str, maxWidth) {
if (!str) return '';
if (Array.isArray(str)) return str;
const strToString = String(str);
if (strToString.length <= maxWidth) return strToString;
const words = strToString.split(' ');
let currentLine = '';
const lines = [];
for (const word of words) {
if ((currentLine + word).length <= maxWidth || currentLine.length === 0) {
currentLine += word + ' ';
} else {
lines.push(currentLine.trim());
currentLine = word + ' ';
}
}
lines.push(currentLine.trim());
return lines.filter(line => line.length > 0);
}
const tooltipTitleCallback = function(tooltipItems) {
const item = tooltipItems[0];
let label = item.chart.data.labels[item.dataIndex];
if (Array.isArray(label)) return label.join(' ');
return String(label);
};
const commonChartOptions = {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'bottom',
labels: {
font: { size: 11, family: 'Inter', weight: 500 },
color: CALM_CHART_COLORS.textDark,
boxWidth: 14,
padding: 18
}
},
tooltip: {
callbacks: { title: tooltipTitleCallback },
titleFont: { family: 'Inter', weight: '600', size: 13 },
bodyFont: { family: 'Inter', size: 12, weight: '400' },
backgroundColor: 'rgba(15, 23, 42, 0.92)',
titleColor: '#FFFFFF',
bodyColor: '#E2E8F0',
padding: 12,
cornerRadius: 5,
borderColor: 'rgba(255,255,255,0.15)',
borderWidth: 1
}
},
scales: {
y: {
beginAtZero: true,
ticks: { font: { size: 10, family: 'Inter', weight: 500 }, color: CALM_CHART_COLORS.neutralMedium, padding: 6 },
grid: { color: '#E2E8F0' }
},
x: {
ticks: {
font: { size: 10, family: 'Inter', weight: 500 },
color: CALM_CHART_COLORS.neutralMedium,
padding: 6,
callback: function(value, index, values) {
const label = this.getLabelForValue(value);
return wrapLabel(label, 10);
}
},
grid: { display: false }
}
}
};
// Chart initializations
if (document.getElementById('riskFactorAgeChart')) {
new Chart(document.getElementById('riskFactorAgeChart'), {
type: 'bar',
data: {
labels: ['15-30 years', '30-50 years', wrapLabel('>60 years (less common peak)', 12)],
datasets: [{
label: 'Typical Age of Diagnosis',
data: [60, 25, 15],
backgroundColor: [CALM_CHART_COLORS.primaryAccentMedium, CALM_CHART_COLORS.primaryAccentLight, CALM_CHART_COLORS.accentLighter],
borderWidth: 0,
borderRadius: 4,
barPercentage: 0.75,
categoryPercentage: 0.7
}]
},
options: {
...commonChartOptions,
indexAxis: 'y',
plugins: {...commonChartOptions.plugins, legend: {display: false}},
scales: {
x: { ...commonChartOptions.scales.x, ticks: { ...commonChartOptions.scales.x.ticks, callback: function(value) { return value + "%" } } },
y: { ...commonChartOptions.scales.y, ticks: { ...commonChartOptions.scales.y.ticks, callback: function(value) { return wrapLabel(this.getLabelForValue(value), 15) } } }
}
}
});
}
if (document.getElementById('proctitisPrevalenceChart')) {
new Chart(document.getElementById('proctitisPrevalenceChart'), {
type: 'doughnut',
data: {
labels: ['Ulcerative Proctitis (Initial Presentation)', 'Other UC Types (Initial Presentation)'],
datasets: [{
label: 'Initial Presentation',
data: [33, 67],
backgroundColor: [CALM_CHART_COLORS.primaryAccentMedium, CALM_CHART_COLORS.neutralLight],
borderColor: CALM_CHART_COLORS.neutralBase,
borderWidth: 4,
hoverOffset: 6
}]
},
options: { ...commonChartOptions, cutout: '65%' }
});
}
if (document.getElementById('eimPrevalenceChart')) {
new Chart(document.getElementById('eimPrevalenceChart'), {
type: 'bar',
data: {
labels: [wrapLabel('Arthritis (Joints)',10), wrapLabel('Skin Issues (e.g., Erythema Nodosum)',15), wrapLabel('Eye Issues (e.g., Uveitis)',12), wrapLabel('PSC (Liver/Bile Duct)',10)],
datasets: [{
label: 'Approx. Prevalence of EIMs (%)',
data: [40, 20, 12, 7], // Example percentages
backgroundColor: CALM_CHART_COLORS.primaryAccentMedium,
borderRadius: 4,
borderWidth: 0,
barPercentage: 0.65,
categoryPercentage: 0.65
}]
},
options: {
...commonChartOptions,
scales: {
...commonChartOptions.scales,
x: { ...commonChartOptions.scales.x, ticks: { autoSkip: false, maxRotation: 0, minRotation: 0, callback: function(value) { return wrapLabel(this.getLabelForValue(value), 12) }}},
y: { ...commonChartOptions.scales.y, ticks: { ...commonChartOptions.scales.y.ticks, callback: function(value) { return value + "%" } } }
},
plugins: {...commonChartOptions.plugins, legend: {display: true, position: 'top', labels: {...commonChartOptions.plugins.legend.labels, font: {size: 10, weight: 500}}}}
}
});
}
if (document.getElementById('steroidEfficacyChart')) {
new Chart(document.getElementById('steroidEfficacyChart'), {
type: 'pie',
data: {
labels: [
wrapLabel('Achieve Complete Remission',15),
wrapLabel('Achieve Partial Remission',15),
wrapLabel('Steroid-Refractory (No Response)',18),
wrapLabel('Steroid-Dependent (Symptoms Return on Taper)',20)
],
datasets: [{
data: [54, 16, 18, 12], // Example percentages
backgroundColor: [CALM_CHART_COLORS.primaryAccentDark, CALM_CHART_COLORS.primaryAccentMedium, CALM_CHART_COLORS.accentLighter, CALM_CHART_COLORS.accentPale],
borderColor: CALM_CHART_COLORS.neutralBase,
borderWidth: 4,
hoverOffset: 6
}]
},
options: {
...commonChartOptions,
plugins: {
...commonChartOptions.plugins,
legend: {
...commonChartOptions.plugins.legend,
labels: {
...commonChartOptions.plugins.legend.labels,
boxWidth: 12,
font: {size: 10, weight: 500},
padding: 12,
generateLabels: function(chart) {
const data = chart.data;
if (data.labels.length && data.datasets.length) {
return data.labels.map(function(label, i) {
const meta = chart.getDatasetMeta(0);
const style = meta.controller.getStyle(i);
return {
text: wrapLabel(label, 22).join(' '),
fillStyle: style.backgroundColor,
strokeStyle: style.borderColor,
lineWidth: style.borderWidth,
hidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,
index: i
};
});
}
return [];
}
}
}
}
}
});
}
if (document.getElementById('commonDeficienciesChart')) {
new Chart(document.getElementById('commonDeficienciesChart'), {
type: 'bar',
data: {
labels: [wrapLabel('Iron Deficiency Anemia',15), wrapLabel('Vitamin D Deficiency',12), wrapLabel('Vitamin B12 Deficiency',12), wrapLabel('Calcium Deficiency',12)],
datasets: [{
label: 'Estimated Prevalence of Deficiency (%)',
data: [76, 60, 25, 30], // Example percentages
backgroundColor: CALM_CHART_COLORS.primaryAccentMedium,
borderRadius: 4,
borderWidth: 0,
barPercentage: 0.65,
categoryPercentage: 0.65
}]
},
options: {
...commonChartOptions,
scales: {
...commonChartOptions.scales,
x: { ...commonChartOptions.scales.x, ticks: { autoSkip: false, maxRotation: 0, minRotation: 0, callback: function(value) { return wrapLabel(this.getLabelForValue(value), 15) }}},
y: { ...commonChartOptions.scales.y, ticks: { ...commonChartOptions.scales.y.ticks, callback: function(value) { return value + "%" } } }
},
plugins: {...commonChartOptions.plugins, legend: {display: true, position: 'top', labels: {...commonChartOptions.plugins.legend.labels, font: {size: 10, weight: 500 }}}}
}
});
}
const doctorQuestionTopicInput = document.getElementById('doctorQuestionTopic');
const generateDoctorQuestionsBtn = document.getElementById('generateDoctorQuestionsBtn');
const doctorQuestionsLoader = document.getElementById('doctorQuestionsLoader');
const doctorQuestionsOutput = document.getElementById('doctorQuestionsOutput');
const dietPreferencesInput = document.getElementById('dietPreferences');
const generateDietIdeasBtn = document.getElementById('generateDietIdeasBtn');
const dietIdeasLoader = document.getElementById('dietIdeasLoader');
const dietIdeasOutput = document.getElementById('dietIdeasOutput');
const apiKey = "AIzaSyCTyBJ5dQZoWWgB14Wjd0l7heigxDRT-qs"; // API Key updated here
async function callGeminiAPI(prompt, outputElement, loaderElement, buttonElement) {
loaderElement.classList.remove('hidden');
outputElement.classList.add('hidden');
outputElement.textContent = '';
buttonElement.disabled = true;
buttonElement.classList.add('opacity-75', 'cursor-not-allowed');
let chatHistory = [{ role: "user", parts: [{ text: prompt }] }];
const payload = { contents: chatHistory };
// Using gemini-2.0-flash as per instructions
const apiUrl = `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${apiKey}`;
try {
const response = await fetch(apiUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});