emon24434 commited on
Commit
c668a0d
·
verified ·
1 Parent(s): 4835856

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +1118 -19
index.html CHANGED
@@ -1,19 +1,1118 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>DocBangla AI - Bangladeshi Healthcare Assistant</title>
7
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
8
+ <style>
9
+ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');
10
+
11
+ :root {
12
+ --primary: #00695c;
13
+ --primary-light: #009688;
14
+ --secondary: #ff6f00;
15
+ --accent: #00bfa5;
16
+ --bg: #f0f4f8;
17
+ --surface: #ffffff;
18
+ --text: #1a237e;
19
+ --text-secondary: #546e7a;
20
+ --error: #d32f2f;
21
+ --success: #388e3c;
22
+ --warning: #f57c00;
23
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
24
+ --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
25
+ }
26
+
27
+ * {
28
+ margin: 0;
29
+ padding: 0;
30
+ box-sizing: border-box;
31
+ }
32
+
33
+ body {
34
+ font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
35
+ background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
36
+ color: var(--text);
37
+ min-height: 100vh;
38
+ overflow-x: hidden;
39
+ }
40
+
41
+ /* Header Styles */
42
+ header {
43
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
44
+ color: white;
45
+ padding: 1rem;
46
+ box-shadow: var(--shadow-lg);
47
+ position: fixed;
48
+ width: 100%;
49
+ top: 0;
50
+ z-index: 1000;
51
+ backdrop-filter: blur(10px);
52
+ }
53
+
54
+ .header-content {
55
+ max-width: 1400px;
56
+ margin: 0 auto;
57
+ display: flex;
58
+ justify-content: space-between;
59
+ align-items: center;
60
+ flex-wrap: wrap;
61
+ gap: 1rem;
62
+ }
63
+
64
+ .logo {
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 0.75rem;
68
+ font-size: 1.5rem;
69
+ font-weight: 700;
70
+ }
71
+
72
+ .logo i {
73
+ font-size: 2rem;
74
+ color: var(--secondary);
75
+ }
76
+
77
+ .anycoder-badge {
78
+ background: rgba(255, 255, 255, 0.2);
79
+ padding: 0.5rem 1rem;
80
+ border-radius: 2rem;
81
+ font-size: 0.875rem;
82
+ text-decoration: none;
83
+ color: white;
84
+ transition: all 0.3s ease;
85
+ border: 1px solid rgba(255, 255, 255, 0.3);
86
+ }
87
+
88
+ .anycoder-badge:hover {
89
+ background: rgba(255, 255, 255, 0.3);
90
+ transform: translateY(-2px);
91
+ }
92
+
93
+ .header-actions {
94
+ display: flex;
95
+ gap: 1rem;
96
+ align-items: center;
97
+ }
98
+
99
+ .lang-toggle {
100
+ background: rgba(255, 255, 255, 0.2);
101
+ border: none;
102
+ color: white;
103
+ padding: 0.5rem 1rem;
104
+ border-radius: 2rem;
105
+ cursor: pointer;
106
+ font-weight: 600;
107
+ transition: all 0.3s;
108
+ }
109
+
110
+ .lang-toggle:hover {
111
+ background: rgba(255, 255, 255, 0.3);
112
+ }
113
+
114
+ /* Layout */
115
+ .app-container {
116
+ max-width: 1400px;
117
+ margin: 0 auto;
118
+ padding: 6rem 1rem 2rem;
119
+ display: grid;
120
+ grid-template-columns: 280px 1fr 350px;
121
+ gap: 2rem;
122
+ }
123
+
124
+ @media (max-width: 1200px) {
125
+ .app-container {
126
+ grid-template-columns: 1fr;
127
+ }
128
+ }
129
+
130
+ /* Sidebar */
131
+ .sidebar {
132
+ background: var(--surface);
133
+ border-radius: 1.5rem;
134
+ padding: 1.5rem;
135
+ box-shadow: var(--shadow);
136
+ height: fit-content;
137
+ position: sticky;
138
+ top: 6rem;
139
+ }
140
+
141
+ .nav-item {
142
+ display: flex;
143
+ align-items: center;
144
+ gap: 1rem;
145
+ padding: 1rem;
146
+ margin-bottom: 0.5rem;
147
+ border-radius: 1rem;
148
+ cursor: pointer;
149
+ transition: all 0.3s;
150
+ color: var(--text-secondary);
151
+ font-weight: 500;
152
+ }
153
+
154
+ .nav-item:hover, .nav-item.active {
155
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
156
+ color: white;
157
+ transform: translateX(5px);
158
+ }
159
+
160
+ .nav-item i {
161
+ font-size: 1.25rem;
162
+ width: 24px;
163
+ text-align: center;
164
+ }
165
+
166
+ /* Main Content */
167
+ .main-content {
168
+ display: flex;
169
+ flex-direction: column;
170
+ gap: 2rem;
171
+ }
172
+
173
+ .welcome-card {
174
+ background: linear-gradient(135deg, var(--surface) 0%, #e8f5e9 100%);
175
+ border-radius: 2rem;
176
+ padding: 2rem;
177
+ box-shadow: var(--shadow);
178
+ position: relative;
179
+ overflow: hidden;
180
+ }
181
+
182
+ .welcome-card::before {
183
+ content: '';
184
+ position: absolute;
185
+ top: -50%;
186
+ right: -10%;
187
+ width: 300px;
188
+ height: 300px;
189
+ background: radial-gradient(circle, rgba(0, 150, 136, 0.1) 0%, transparent 70%);
190
+ border-radius: 50%;
191
+ }
192
+
193
+ .welcome-header {
194
+ display: flex;
195
+ justify-content: space-between;
196
+ align-items: start;
197
+ margin-bottom: 1.5rem;
198
+ position: relative;
199
+ z-index: 1;
200
+ }
201
+
202
+ .welcome-text h1 {
203
+ font-size: 2rem;
204
+ margin-bottom: 0.5rem;
205
+ color: var(--primary);
206
+ }
207
+
208
+ .welcome-text p {
209
+ color: var(--text-secondary);
210
+ font-size: 1.1rem;
211
+ }
212
+
213
+ .emergency-btn {
214
+ background: linear-gradient(135deg, var(--error) 0%, #c62828 100%);
215
+ color: white;
216
+ border: none;
217
+ padding: 1rem 2rem;
218
+ border-radius: 1rem;
219
+ font-weight: 700;
220
+ cursor: pointer;
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 0.5rem;
224
+ box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
225
+ transition: transform 0.3s;
226
+ animation: pulse 2s infinite;
227
+ }
228
+
229
+ @keyframes pulse {
230
+ 0%, 100% { transform: scale(1); }
231
+ 50% { transform: scale(1.05); }
232
+ }
233
+
234
+ .emergency-btn:hover {
235
+ transform: translateY(-2px);
236
+ }
237
+
238
+ /* Chat Interface */
239
+ .chat-container {
240
+ background: var(--surface);
241
+ border-radius: 2rem;
242
+ box-shadow: var(--shadow);
243
+ overflow: hidden;
244
+ display: flex;
245
+ flex-direction: column;
246
+ height: 600px;
247
+ }
248
+
249
+ .chat-header {
250
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
251
+ color: white;
252
+ padding: 1.5rem;
253
+ display: flex;
254
+ align-items: center;
255
+ gap: 1rem;
256
+ }
257
+
258
+ .ai-avatar {
259
+ width: 50px;
260
+ height: 50px;
261
+ background: white;
262
+ border-radius: 50%;
263
+ display: flex;
264
+ align-items: center;
265
+ justify-content: center;
266
+ font-size: 1.5rem;
267
+ color: var(--primary);
268
+ animation: float 3s ease-in-out infinite;
269
+ }
270
+
271
+ @keyframes float {
272
+ 0%, 100% { transform: translateY(0); }
273
+ 50% { transform: translateY(-5px); }
274
+ }
275
+
276
+ .chat-status {
277
+ display: flex;
278
+ align-items: center;
279
+ gap: 0.5rem;
280
+ font-size: 0.875rem;
281
+ opacity: 0.9;
282
+ }
283
+
284
+ .status-dot {
285
+ width: 8px;
286
+ height: 8px;
287
+ background: #4caf50;
288
+ border-radius: 50%;
289
+ animation: blink 2s infinite;
290
+ }
291
+
292
+ @keyframes blink {
293
+ 0%, 100% { opacity: 1; }
294
+ 50% { opacity: 0.5; }
295
+ }
296
+
297
+ .chat-messages {
298
+ flex: 1;
299
+ overflow-y: auto;
300
+ padding: 2rem;
301
+ display: flex;
302
+ flex-direction: column;
303
+ gap: 1.5rem;
304
+ background: #fafafa;
305
+ }
306
+
307
+ .message {
308
+ max-width: 80%;
309
+ padding: 1rem 1.5rem;
310
+ border-radius: 1.5rem;
311
+ line-height: 1.6;
312
+ animation: slideIn 0.3s ease-out;
313
+ }
314
+
315
+ @keyframes slideIn {
316
+ from {
317
+ opacity: 0;
318
+ transform: translateY(10px);
319
+ }
320
+ to {
321
+ opacity: 1;
322
+ transform: translateY(0);
323
+ }
324
+ }
325
+
326
+ .message.ai {
327
+ background: white;
328
+ align-self: flex-start;
329
+ border-bottom-left-radius: 0.25rem;
330
+ box-shadow: var(--shadow);
331
+ border-left: 4px solid var(--primary);
332
+ }
333
+
334
+ .message.user {
335
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
336
+ color: white;
337
+ align-self: flex-end;
338
+ border-bottom-right-radius: 0.25rem;
339
+ }
340
+
341
+ .message-time {
342
+ font-size: 0.75rem;
343
+ opacity: 0.7;
344
+ margin-top: 0.5rem;
345
+ }
346
+
347
+ .chat-input-container {
348
+ padding: 1.5rem;
349
+ background: white;
350
+ border-top: 1px solid #e0e0e0;
351
+ display: flex;
352
+ gap: 1rem;
353
+ }
354
+
355
+ .chat-input {
356
+ flex: 1;
357
+ padding: 1rem 1.5rem;
358
+ border: 2px solid #e0e0e0;
359
+ border-radius: 2rem;
360
+ font-size: 1rem;
361
+ transition: all 0.3s;
362
+ font-family: inherit;
363
+ }
364
+
365
+ .chat-input:focus {
366
+ outline: none;
367
+ border-color: var(--primary);
368
+ box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
369
+ }
370
+
371
+ .send-btn {
372
+ width: 50px;
373
+ height: 50px;
374
+ border-radius: 50%;
375
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
376
+ color: white;
377
+ border: none;
378
+ cursor: pointer;
379
+ display: flex;
380
+ align-items: center;
381
+ justify-content: center;
382
+ transition: transform 0.3s;
383
+ box-shadow: var(--shadow);
384
+ }
385
+
386
+ .send-btn:hover {
387
+ transform: scale(1.1) rotate(5deg);
388
+ }
389
+
390
+ .quick-symptoms {
391
+ display: flex;
392
+ gap: 0.5rem;
393
+ padding: 0 1.5rem 1rem;
394
+ overflow-x: auto;
395
+ flex-wrap: wrap;
396
+ }
397
+
398
+ .symptom-chip {
399
+ background: #e0f2f1;
400
+ color: var(--primary);
401
+ padding: 0.5rem 1rem;
402
+ border-radius: 2rem;
403
+ font-size: 0.875rem;
404
+ cursor: pointer;
405
+ border: none;
406
+ white-space: nowrap;
407
+ transition: all 0.3s;
408
+ }
409
+
410
+ .symptom-chip:hover {
411
+ background: var(--primary);
412
+ color: white;
413
+ transform: translateY(-2px);
414
+ }
415
+
416
+ /* Right Panel */
417
+ .right-panel {
418
+ display: flex;
419
+ flex-direction: column;
420
+ gap: 1.5rem;
421
+ }
422
+
423
+ .panel-card {
424
+ background: var(--surface);
425
+ border-radius: 1.5rem;
426
+ padding: 1.5rem;
427
+ box-shadow: var(--shadow);
428
+ }
429
+
430
+ .panel-title {
431
+ font-size: 1.25rem;
432
+ font-weight: 700;
433
+ margin-bottom: 1rem;
434
+ color: var(--primary);
435
+ display: flex;
436
+ align-items: center;
437
+ gap: 0.5rem;
438
+ }
439
+
440
+ .prescription-item {
441
+ background: #f5f5f5;
442
+ border-radius: 1rem;
443
+ padding: 1rem;
444
+ margin-bottom: 1rem;
445
+ border-left: 4px solid var(--accent);
446
+ transition: transform 0.3s;
447
+ }
448
+
449
+ .prescription-item:hover {
450
+ transform: translateX(5px);
451
+ box-shadow: var(--shadow);
452
+ }
453
+
454
+ .med-name {
455
+ font-weight: 700;
456
+ color: var(--text);
457
+ margin-bottom: 0.25rem;
458
+ }
459
+
460
+ .med-details {
461
+ font-size: 0.875rem;
462
+ color: var(--text-secondary);
463
+ }
464
+
465
+ .vital-signs {
466
+ display: grid;
467
+ grid-template-columns: 1fr 1fr;
468
+ gap: 1rem;
469
+ }
470
+
471
+ .vital-card {
472
+ background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
473
+ padding: 1rem;
474
+ border-radius: 1rem;
475
+ text-align: center;
476
+ }
477
+
478
+ .vital-card.danger {
479
+ background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
480
+ }
481
+
482
+ .vital-value {
483
+ font-size: 1.5rem;
484
+ font-weight: 700;
485
+ color: var(--primary);
486
+ }
487
+
488
+ .vital-card.danger .vital-value {
489
+ color: var(--error);
490
+ }
491
+
492
+ .vital-label {
493
+ font-size: 0.875rem;
494
+ color: var(--text-secondary);
495
+ margin-top: 0.25rem;
496
+ }
497
+
498
+ /* Prescription Modal */
499
+ .modal {
500
+ display: none;
501
+ position: fixed;
502
+ top: 0;
503
+ left: 0;
504
+ width: 100%;
505
+ height: 100%;
506
+ background: rgba(0, 0, 0, 0.5);
507
+ z-index: 2000;
508
+ align-items: center;
509
+ justify-content: center;
510
+ backdrop-filter: blur(5px);
511
+ }
512
+
513
+ .modal.active {
514
+ display: flex;
515
+ }
516
+
517
+ .modal-content {
518
+ background: white;
519
+ border-radius: 2rem;
520
+ width: 90%;
521
+ max-width: 600px;
522
+ max-height: 90vh;
523
+ overflow-y: auto;
524
+ padding: 2rem;
525
+ position: relative;
526
+ animation: modalSlide 0.3s ease-out;
527
+ }
528
+
529
+ @keyframes modalSlide {
530
+ from {
531
+ opacity: 0;
532
+ transform: scale(0.9) translateY(20px);
533
+ }
534
+ to {
535
+ opacity: 1;
536
+ transform: scale(1) translateY(0);
537
+ }
538
+ }
539
+
540
+ .close-modal {
541
+ position: absolute;
542
+ top: 1rem;
543
+ right: 1rem;
544
+ background: none;
545
+ border: none;
546
+ font-size: 1.5rem;
547
+ cursor: pointer;
548
+ color: var(--text-secondary);
549
+ width: 40px;
550
+ height: 40px;
551
+ border-radius: 50%;
552
+ display: flex;
553
+ align-items: center;
554
+ justify-content: center;
555
+ transition: all 0.3s;
556
+ }
557
+
558
+ .close-modal:hover {
559
+ background: #f5f5f5;
560
+ color: var(--error);
561
+ }
562
+
563
+ .prescription-header {
564
+ text-align: center;
565
+ border-bottom: 2px solid var(--primary);
566
+ padding-bottom: 1rem;
567
+ margin-bottom: 1.5rem;
568
+ }
569
+
570
+ .rx-symbol {
571
+ font-size: 3rem;
572
+ color: var(--primary);
573
+ font-weight: 700;
574
+ }
575
+
576
+ .prescription-body {
577
+ line-height: 1.8;
578
+ }
579
+
580
+ .prescription-section {
581
+ margin-bottom: 1.5rem;
582
+ }
583
+
584
+ .section-title {
585
+ font-weight: 700;
586
+ color: var(--primary);
587
+ margin-bottom: 0.5rem;
588
+ text-transform: uppercase;
589
+ font-size: 0.875rem;
590
+ letter-spacing: 1px;
591
+ }
592
+
593
+ /* Responsive */
594
+ @media (max-width: 768px) {
595
+ .header-content {
596
+ flex-direction: column;
597
+ text-align: center;
598
+ }
599
+
600
+ .app-container {
601
+ padding-top: 8rem;
602
+ }
603
+
604
+ .chat-container {
605
+ height: 500px;
606
+ }
607
+
608
+ .welcome-header {
609
+ flex-direction: column;
610
+ gap: 1rem;
611
+ }
612
+
613
+ .vital-signs {
614
+ grid-template-columns: 1fr;
615
+ }
616
+ }
617
+
618
+ /* Loading Animation */
619
+ .typing-indicator {
620
+ display: flex;
621
+ gap: 0.5rem;
622
+ padding: 1rem;
623
+ }
624
+
625
+ .typing-dot {
626
+ width: 8px;
627
+ height: 8px;
628
+ background: var(--primary);
629
+ border-radius: 50%;
630
+ animation: typing 1.4s infinite;
631
+ }
632
+
633
+ .typing-dot:nth-child(2) { animation-delay: 0.2s; }
634
+ .typing-dot:nth-child(3) { animation-delay: 0.4s; }
635
+
636
+ @keyframes typing {
637
+ 0%, 60%, 100% { transform: translateY(0); }
638
+ 30% { transform: translateY(-10px); }
639
+ }
640
+
641
+ /* Print Styles */
642
+ @media print {
643
+ .no-print {
644
+ display: none !important;
645
+ }
646
+ .modal-content {
647
+ box-shadow: none;
648
+ }
649
+ }
650
+
651
+ /* Bengali Text Support */
652
+ .bn {
653
+ font-family: 'Noto Sans Bengali', sans-serif;
654
+ }
655
+
656
+ .hidden {
657
+ display: none !important;
658
+ }
659
+
660
+ /* Scrollbar */
661
+ ::-webkit-scrollbar {
662
+ width: 8px;
663
+ }
664
+
665
+ ::-webkit-scrollbar-track {
666
+ background: #f1f1f1;
667
+ border-radius: 4px;
668
+ }
669
+
670
+ ::-webkit-scrollbar-thumb {
671
+ background: var(--primary-light);
672
+ border-radius: 4px;
673
+ }
674
+
675
+ ::-webkit-scrollbar-thumb:hover {
676
+ background: var(--primary);
677
+ }
678
+ </style>
679
+ </head>
680
+ <body>
681
+
682
+ <header>
683
+ <div class="header-content">
684
+ <div class="logo">
685
+ <i class="fas fa-user-md"></i>
686
+ <span>DocBangla AI</span>
687
+ </div>
688
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-badge">
689
+ <i class="fas fa-code"></i> Built with anycoder
690
+ </a>
691
+ <div class="header-actions">
692
+ <button class="lang-toggle" onclick="toggleLanguage()">
693
+ <span id="lang-text">বাংলা</span>
694
+ </button>
695
+ </div>
696
+ </div>
697
+ </header>
698
+
699
+ <div class="app-container">
700
+ <!-- Sidebar -->
701
+ <aside class="sidebar no-print">
702
+ <div class="nav-item active" onclick="showSection('dashboard')">
703
+ <i class="fas fa-home"></i>
704
+ <span class="nav-text">Dashboard</span>
705
+ </div>
706
+ <div class="nav-item" onclick="showSection('history')">
707
+ <i class="fas fa-history"></i>
708
+ <span class="nav-text">Medical History</span>
709
+ </div>
710
+ <div class="nav-item" onclick="showSection('medicines')">
711
+ <i class="fas fa-pills"></i>
712
+ <span class="nav-text">BD Medicines</span>
713
+ </div>
714
+ <div class="nav-item" onclick="showSection('monitor')">
715
+ <i class="fas fa-heartbeat"></i>
716
+ <span class="nav-text">Health Monitor</span>
717
+ </div>
718
+ <div class="nav-item" onclick="showSection('doctors')">
719
+ <i class="fas fa-hospital"></i>
720
+ <span class="nav-text">Nearby Hospitals</span>
721
+ </div>
722
+ </aside>
723
+
724
+ <!-- Main Content -->
725
+ <main class="main-content">
726
+ <!-- Welcome Card -->
727
+ <div class="welcome-card">
728
+ <div class="welcome-header">
729
+ <div class="welcome-text">
730
+ <h1 id="welcome-title">Welcome to DocBangla AI</h1>
731
+ <p id="welcome-subtitle">Your personal MBBS doctor for Bangladeshi healthcare</p>
732
+ </div>
733
+ <button class="emergency-btn" onclick="showEmergency()">
734
+ <i class="fas fa-phone-alt"></i>
735
+ <span>Emergency</span>
736
+ </button>
737
+ </div>
738
+ <div style="display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1rem;">
739
+ <div style="display: flex; align-items: center; gap: 0.5rem;">
740
+ <i class="fas fa-check-circle" style="color: var(--success);"></i>
741
+ <span>AI-Powered Diagnosis</span>
742
+ </div>
743
+ <div style="display: flex; align-items: center; gap: 0.5rem;">
744
+ <i class="fas fa-check-circle" style="color: var(--success);"></i>
745
+ <span>BD Medicine Database</span>
746
+ </div>
747
+ <div style="display: flex; align-items: center; gap: 0.5rem;">
748
+ <i class="fas fa-check-circle" style="color: var(--success);"></i>
749
+ <span>24/7 Monitoring</span>
750
+ </div>
751
+ </div>
752
+ </div>
753
+
754
+ <!-- Chat Interface -->
755
+ <div class="chat-container">
756
+ <div class="chat-header">
757
+ <div class="ai-avatar">
758
+ <i class="fas fa-robot"></i>
759
+ </div>
760
+ <div>
761
+ <h3>Dr. AI (MBBS)</h3>
762
+ <div class="chat-status">
763
+ <span class="status-dot"></span>
764
+ <span>Online - Ready to help</span>
765
+ </div>
766
+ </div>
767
+ </div>
768
+
769
+ <div class="chat-messages" id="chat-messages">
770
+ <div class="message ai">
771
+ <div id="initial-greeting">
772
+ Hello! I am your AI doctor specialized in Bangladeshi healthcare. Please describe your symptoms in detail. I can prescribe Bangladeshi medicines like Napa, Seclo, Fexo, etc.
773
+ </div>
774
+ <div class="message-time">Just now</div>
775
+ </div>
776
+ </div>
777
+
778
+ <div class="quick-symptoms">
779
+ <button class="symptom-chip" onclick="sendQuickSymptom('Fever and headache')">🤒 Fever</button>
780
+ <button class="symptom-chip" onclick="sendQuickSymptom('Stomach pain and diarrhea')">🤢 Stomach Issues</button>
781
+ <button class="symptom-chip" onclick="sendQuickSymptom('Cough and cold')">🤧 Cold & Cough</button>
782
+ <button class="symptom-chip" onclick="sendQuickSymptom('Skin rash and itching')">🔴 Skin Problem</button>
783
+ <button class="symptom-chip" onclick="sendQuickSymptom('Chest pain and breathing problem')">💔 Chest Pain</button>
784
+ </div>
785
+
786
+ <div class="chat-input-container">
787
+ <input type="text" class="chat-input" id="user-input" placeholder="Describe your symptoms..." onkeypress="handleKeyPress(event)">
788
+ <button class="send-btn" onclick="sendMessage()">
789
+ <i class="fas fa-paper-plane"></i>
790
+ </button>
791
+ </div>
792
+ </div>
793
+ </main>
794
+
795
+ <!-- Right Panel -->
796
+ <aside class="right-panel">
797
+ <!-- Current Prescription -->
798
+ <div class="panel-card">
799
+ <div class="panel-title">
800
+ <i class="fas fa-prescription"></i>
801
+ <span>Current Prescription</span>
802
+ </div>
803
+ <div id="current-prescription">
804
+ <p style="color: var(--text-secondary); text-align: center; padding: 2rem 0;">
805
+ No active prescription. Start a consultation.
806
+ </p>
807
+ </div>
808
+ </div>
809
+
810
+ <!-- Vital Signs -->
811
+ <div class="panel-card">
812
+ <div class="panel-title">
813
+ <i class="fas fa-chart-line"></i>
814
+ <span>Health Monitor</span>
815
+ </div>
816
+ <div class="vital-signs">
817
+ <div class="vital-card">
818
+ <div class="vital-value" id="bpm">72</div>
819
+ <div class="vital-label">BPM</div>
820
+ </div>
821
+ <div class="vital-card">
822
+ <div class="vital-value" id="temp">98.6°F</div>
823
+ <div class="vital-label">Temp</div>
824
+ </div>
825
+ <div class="vital-card">
826
+ <div class="vital-value" id="spo2">98%</div>
827
+ <div class="vital-label">SpO2</div>
828
+ </div>
829
+ <div class="vital-card">
830
+ <div class="vital-value" id="bp">120/80</div>
831
+ <div class="vital-label">BP</div>
832
+ </div>
833
+ </div>
834
+ <button class="symptom-chip" style="width: 100%; margin-top: 1rem; background: var(--primary); color: white;" onclick="updateVitals()">
835
+ <i class="fas fa-sync-alt"></i> Update Vitals
836
+ </button>
837
+ </div>
838
+
839
+ <!-- Common BD Medicines -->
840
+ <div class="panel-card">
841
+ <div class="panel-title">
842
+ <i class="fas fa-capsules"></i>
843
+ <span>Popular BD Medicines</span>
844
+ </div>
845
+ <div class="prescription-item">
846
+ <div class="med-name">Napa (Paracetamol)</div>
847
+ <div class="med-details">Beximco - Fever & Pain</div>
848
+ </div>
849
+ <div class="prescription-item">
850
+ <div class="med-name">Seclo (Omeprazole)</div>
851
+ <div class="med-details">Square - Gastric</div>
852
+ </div>
853
+ <div class="prescription-item">
854
+ <div class="med-name">Fexo (Fexofenadine)</div>
855
+ <div class="med-details">Square - Allergy</div>
856
+ </div>
857
+ <div class="prescription-item">
858
+ <div class="med-name">Monas (Montelukast)</div>
859
+ <div class="med-details">Square - Asthma</div>
860
+ </div>
861
+ </div>
862
+ </aside>
863
+ </div>
864
+
865
+ <!-- Prescription Modal -->
866
+ <div class="modal" id="prescription-modal">
867
+ <div class="modal-content">
868
+ <button class="close-modal" onclick="closeModal()">
869
+ <i class="fas fa-times"></i>
870
+ </button>
871
+
872
+ <div class="prescription-header">
873
+ <div class="rx-symbol">℞</div>
874
+ <h2>Medical Prescription</h2>
875
+ <p style="color: var(--text-secondary);">DocBangla AI Healthcare</p>
876
+ <p style="font-size: 0.875rem; margin-top: 0.5rem;">Date: <span id="pres-date"></span></p>
877
+ </div>
878
+
879
+ <div class="prescription-body">
880
+ <div class="prescription-section">
881
+ <div class="section-title">Patient Information</div>
882
+ <p><strong>Name:</strong> <span id="pres-name">Patient</span></p>
883
+ <p><strong>Age:</strong> 25 Years</p>
884
+ <p><strong>Gender:</strong> Male</p>
885
+ </div>
886
+
887
+ <div class="prescription-section">
888
+ <div class="section-title">Diagnosis</div>
889
+ <p id="pres-diagnosis">Acute Viral Fever</p>
890
+ </div>
891
+
892
+ <div class="prescription-section">
893
+ <div class="section-title">Medicines (Bangladeshi Brands)</div>
894
+ <div id="pres-medicines"></div>
895
+ </div>
896
+
897
+ <div class="prescription-section">
898
+ <div class="section-title">Instructions</div>
899
+ <ul style="margin-left: 1.5rem; line-height: 2;">
900
+ <li>Take medicines after meal</li>
901
+ <li>Drink plenty of water</li>
902
+ <li>Rest for 2-3 days</li>
903
+ <li>If condition worsens, visit nearest hospital immediately</li>
904
+ </ul>
905
+ </div>
906
+
907
+ <div class="prescription-section" style="margin-top: 2rem; border-top: 1px solid #e0e0e0; padding-top: 1rem;">
908
+ <p style="font-style: italic; color: var(--text-secondary);">
909
+ <i class="fas fa-robot"></i> Prescribed by DocBangla AI<br>
910
+ <small>This is an AI-generated suggestion. Please consult with a real doctor for serious conditions.</small>
911
+ </p>
912
+ </div>
913
+ </div>
914
+
915
+ <button class="emergency-btn" style="width: 100%; margin-top: 1rem; justify-content: center;" onclick="window.print()">
916
+ <i class="fas fa-print"></i> Print Prescription
917
+ </button>
918
+ </div>
919
+ </div>
920
+
921
+ <!-- Emergency Modal -->
922
+ <div class="modal" id="emergency-modal">
923
+ <div class="modal-content" style="max-width: 500px;">
924
+ <button class="close-modal" onclick="closeEmergency()">
925
+ <i class="fas fa-times"></i>
926
+ </button>
927
+
928
+ <div style="text-align: center; color: var(--error); margin-bottom: 1.5rem;">
929
+ <i class="fas fa-ambulance" style="font-size: 3rem;"></i>
930
+ <h2 style="margin-top: 1rem;">Emergency Contacts</h2>
931
+ </div>
932
+
933
+ <div style="display: flex; flex-direction: column; gap: 1rem;">
934
+ <a href="tel:999" style="text-decoration: none;">
935
+ <div style="background: #ffebee; padding: 1rem; border-radius: 1rem; display: flex; align-items: center; gap: 1rem; border-left: 4px solid var(--error);">
936
+ <i class="fas fa-phone-alt" style="font-size: 1.5rem; color: var(--error);"></i>
937
+ <div>
938
+ <div style="font-weight: 700; color: var(--error);">National Emergency</div>
939
+ <div style="color: var(--text-secondary);">999</div>
940
+ </div>
941
+ </div>
942
+ </a>
943
+
944
+ <a href="tel:10655" style="text-decoration: none;">
945
+ <div style="background: #fff3e0; padding: 1rem; border-radius: 1rem; display: flex; align-items: center; gap: 1rem; border-left: 4px solid var(--warning);">
946
+ <i class="fas fa-virus" style="font-size: 1.5rem; color: var(--warning);"></i>
947
+ <div>
948
+ <div style="font-weight: 700; color: var(--warning);">IEDCR Hotline</div>
949
+ <div style="color: var(--text-secondary);">10655</div>
950
+ </div>
951
+ </div>
952
+ </a>
953
+
954
+ <div style="background: #e3f2fd; padding: 1rem; border-radius: 1rem;">
955
+ <div style="font-weight: 700; color: var(--primary); margin-bottom: 0.5rem;">
956
+ <i class="fas fa-hospital"></i> Nearby Hospitals
957
+ </div>
958
+ <ul style="list-style: none; line-height: 2; color: var(--text-secondary);">
959
+ <li>• Dhaka Medical College - 02-55165088</li>
960
+ <li>• Square Hospital - 10616</li>
961
+ <li>• United Hospital - 02-8836000</li>
962
+ <li>• Apollo Hospital - 10678</li>
963
+ </ul>
964
+ </div>
965
+ </div>
966
+ </div>
967
+ </div>
968
+
969
+ <script>
970
+ // Language Support
971
+ let currentLang = 'en';
972
+ const translations = {
973
+ en: {
974
+ welcome: "Welcome to DocBangla AI",
975
+ subtitle: "Your personal MBBS doctor for Bangladeshi healthcare",
976
+ placeholder: "Describe your symptoms...",
977
+ dashboard: "Dashboard",
978
+ history: "Medical History",
979
+ medicines: "BD Medicines",
980
+ monitor: "Health Monitor",
981
+ doctors: "Nearby Hospitals",
982
+ noPrescription: "No active prescription. Start a consultation.",
983
+ greeting: "Hello! I am your AI doctor specialized in Bangladeshi healthcare. Please describe your symptoms in detail. I can prescribe Bangladeshi medicines like Napa, Seclo, Fexo, etc."
984
+ },
985
+ bn: {
986
+ welcome: "ডকবাংলা এআই-তে স্বাগতম",
987
+ subtitle: "বাংলাদেশী স্বাস্থ্যসেবার জন্য আপনার ব্যক্তিগত এমবিবিএস ডাক্তার",
988
+ placeholder: "আপনার লক্ষণগুলি বর্ণনা করুন...",
989
+ dashboard: "ড্যাশবোর্ড",
990
+ history: "চিকিৎসা ইতিহাস",
991
+ medicines: "বাংলাদেশী ওষুধ",
992
+ monitor: "স্বাস্থ্য পর্যবেক্ষণ",
993
+ doctors: "কাছের হাসপাতাল",
994
+ noPrescription: "কোন সক্রিয় প্রেসক্রিপশন নেই। পরামর্শ শুরু করুন।",
995
+ greeting: "হ্যালো! আমি বাংলাদেশী স্বাস্থ্যসেবায় বিশেষজ্ঞ আপনার এআই ডাক্তার। দয়া করে বিস্তারিতভাবে আপনার লক্ষণগুলি বর্ণনা করুন। আমি নাপা, সেকলো, ফেক্সো ইত্যাদি বাংলাদেশী ওষুধ প্রেসক্রাইব করতে পারি।"
996
+ }
997
+ };
998
+
999
+ function toggleLanguage() {
1000
+ currentLang = currentLang === 'en' ? 'bn' : 'en';
1001
+ document.getElementById('lang-text').textContent = currentLang === 'en' ? 'বাংলা' : 'English';
1002
+ updateLanguage();
1003
+ }
1004
+
1005
+ function updateLanguage() {
1006
+ const t = translations[currentLang];
1007
+ document.getElementById('welcome-title').textContent = t.welcome;
1008
+ document.getElementById('welcome-subtitle').textContent = t.subtitle;
1009
+ document.getElementById('user-input').placeholder = t.placeholder;
1010
+
1011
+ // Update navigation
1012
+ const navItems = document.querySelectorAll('.nav-item span');
1013
+ navItems[0].textContent = t.dashboard;
1014
+ navItems[1].textContent = t.history;
1015
+ navItems[2].textContent = t.medicines;
1016
+ navItems[3].textContent = t.monitor;
1017
+ navItems[4].textContent = t.doctors;
1018
+
1019
+ // Update greeting if it's the first message
1020
+ const firstMsg = document.querySelector('.message.ai div:first-child');
1021
+ if (firstMsg && firstMsg.id === 'initial-greeting') {
1022
+ firstMsg.textContent = t.greeting;
1023
+ }
1024
+ }
1025
+
1026
+ // Chat Functionality
1027
+ const chatMessages = document.getElementById('chat-messages');
1028
+ const userInput = document.getElementById('user-input');
1029
+
1030
+ // Medicine Database for Bangladesh
1031
+ const medicineDB = {
1032
+ fever: [
1033
+ { name: "Napa (Paracetamol)", brand: "Beximco", dose: "1+1+1", duration: "3 days", type: "tablet" },
1034
+ { name: "Napa Extra", brand: "Beximco", dose: "1+0+1", duration: "3 days", type: "tablet" }
1035
+ ],
1036
+ pain: [
1037
+ { name: "Napa", brand: "Beximco", dose: "1+1+1", duration: "3 days", type: "tablet" },
1038
+ { name: "Maxpro (Esomeprazole)", brand: "Renata", dose: "1+0+1", duration: "7 days", type: "tablet" }
1039
+ ],
1040
+ gastric: [
1041
+ { name: "Seclo (Omeprazole)", brand: "Square", dose: "1+0+1", duration: "14 days", type: "capsule" },
1042
+ { name: "Gaviscon", brand: "Reckitt", dose: "2 tsp", duration: "SOS", type: "syrup" }
1043
+ ],
1044
+ allergy: [
1045
+ { name: "Fexo (Fexofenadine)", brand: "Square", dose: "0+0+1", duration: "7 days", type: "tablet" },
1046
+ { name: "Cetrin (Cetirizine)", brand: "Square", dose: "0+0+1", duration: "7 days", type: "tablet" }
1047
+ ],
1048
+ cough: [
1049
+ { name: "Sedil (Dextromethorphan)", brand: "Beximco", dose: "2 tsp", duration: "3 times daily", type: "syrup" },
1050
+ { name: "Monas (Montelukast)", brand: "Square", dose: "0+0+1", duration: "7 days", type: "tablet" }
1051
+ ],
1052
+ diarrhea: [
1053
+ { name: "Orsaline-N", brand: "Opsonin", dose: "After each stool", duration: "As needed", type: "sachet" },
1054
+ { name: "Flagyl (Metronidazole)", brand: "Aristopharma", dose: "1+1+1", duration: "5 days", type: "tablet" }
1055
+ ],
1056
+ antibiotic: [
1057
+ { name: "Moxacil (Amoxicillin)", brand: "Square", dose: "1+1+1", duration: "7 days", type: "capsule" },
1058
+ { name: "Napa", brand: "Beximco", dose: "1+1+1", duration: "3 days", type: "tablet" }
1059
+ ],
1060
+ vitamin: [
1061
+ { name: "Becosules", brand: "Pfizer", dose: "1+0+1", duration: "30 days", type: "capsule" },
1062
+ { name: "Calcitor D", brand: "Square", dose: "0+0+1", duration: "30 days", type: "tablet" }
1063
+ ]
1064
+ };
1065
+
1066
+ const diseasePatterns = {
1067
+ fever: ['fever', 'jvar', 'তাপমাত্রা', 'জ্বর', 'hot body'],
1068
+ headache: ['headache', 'matha', 'মাথা', 'ব্যথা', 'head pain'],
1069
+ stomach: ['stomach', 'pet', 'পেট', 'গ্যাস', 'gastric', 'bhat', 'পাতলা', 'diarrhea'],
1070
+ cough: ['cough', 'coughing', 'কাশি', 'throat', 'গলা'],
1071
+ allergy: ['allergy', 'itching', 'চুলকানি', 'rash', 'ফোসকা', 'skin'],
1072
+ pain: ['pain', 'ব্যথা', 'ache', 'hurt']
1073
+ };
1074
+
1075
+ function handleKeyPress(e) {
1076
+ if (e.key === 'Enter') sendMessage();
1077
+ }
1078
+
1079
+ function sendQuickSymptom(symptom) {
1080
+ userInput.value = symptom;
1081
+ sendMessage();
1082
+ }
1083
+
1084
+ function sendMessage() {
1085
+ const text = userInput.value.trim();
1086
+ if (!text) return;
1087
+
1088
+ // Add user message
1089
+ addMessage(text, 'user');
1090
+ userInput.value = '';
1091
+
1092
+ // Show typing indicator
1093
+ showTyping();
1094
+
1095
+ // Process AI response
1096
+ setTimeout(() => {
1097
+ removeTyping();
1098
+ const response = processSymptoms(text);
1099
+ addMessage(response.message, 'ai');
1100
+
1101
+ if (response.prescription) {
1102
+ updatePrescription(response.prescription);
1103
+ setTimeout(() => {
1104
+ showPrescriptionModal(response.prescription);
1105
+ }, 1000);
1106
+ }
1107
+ }, 1500);
1108
+ }
1109
+
1110
+ function addMessage(text, sender) {
1111
+ const div = document.createElement('div');
1112
+ div.className = `message ${sender}`;
1113
+
1114
+ const time = new Date().toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' });
1115
+
1116
+ div.innerHTML = `
1117
+ <div>${text}</div>
1118
+ <div class="message-time">${time