File size: 43,136 Bytes
df62a7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6365de3
 
 
df62a7a
 
 
 
 
 
6365de3
 
 
df62a7a
 
 
 
 
6365de3
df62a7a
 
 
 
6365de3
 
 
df62a7a
 
6365de3
 
 
df62a7a
6365de3
df62a7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6365de3
 
df62a7a
6365de3
 
 
 
df62a7a
6365de3
df62a7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6365de3
df62a7a
6365de3
df62a7a
 
 
6365de3
 
df62a7a
 
6365de3
 
df62a7a
 
6365de3
 
df62a7a
 
 
6365de3
df62a7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6365de3
 
df62a7a
6365de3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
df62a7a
 
 
 
 
 
 
 
 
6365de3
df62a7a
 
 
6365de3
df62a7a
 
 
 
 
 
 
 
 
 
6365de3
 
 
 
 
 
 
 
 
df62a7a
 
6365de3
df62a7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6365de3
 
df62a7a
 
 
 
 
6365de3
 
df62a7a
 
6365de3
df62a7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="th">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ชีพจร - Pulse Tracker</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <style>
        .gradient-health {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .text-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .card-shadow {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
        .pulse-animation {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: .5; }
        }
        .circular-progress {
            transform: rotate(-90deg);
            transform-origin: 50% 50%;
        }
        .page-content {
            display: none;
        }
        .page-content.active {
            display: block;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Navigation Bar -->
    <nav-custom></nav-custom>
    
    <!-- Main Content -->
    <main class="container mx-auto px-4 pb-20">
        <!-- Dashboard Page -->
        <div id="dashboard" class="page-content active">
            <div class="py-6">
                <div class="mb-6">
                    <h1 class="text-3xl font-bold text-gray-900 mb-2">วันนี้</h1>
                    <p class="text-gray-600" id="todayDate">วันจันทร์ที่ 11 ธันวาคม 2566</p>
                </div>
                
                <!-- Main Vitals -->
                <div class="grid grid-cols-3 gap-4 mb-6">
                    <vital-circle value="72" max="100" color="green" label="Recovery" sublabel="ฟื้นตัวดี"></vital-circle>
                    <vital-circle value="8.5" max="21" color="blue" label="Strain" sublabel="กำลังดี"></vital-circle>
                    <vital-circle value="7.8" max="12" color="purple" label="Sleep" sublabel="คืนนี้"></vital-circle>
                </div>
                
                <!-- AI Coach Summary -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <div class="flex items-center mb-4">
                        <div class="w-12 h-12 bg-gradient-to-r from-purple-500 to-indigo-500 rounded-full flex items-center justify-center mr-4">
                            <i data-feather="zap" class="w-6 h-6 text-white"></i>
                        </div>
                        <h2 class="text-xl font-bold text-gray-900">AI Coach แนะนำ</h2>
                    </div>
                    <div class="text-gray-700 leading-relaxed">
                        <p class="mb-2">วันนี้คุณฟื้นตัว 72% (สีเขียว) เพราะ เมื่อคืนค่า PM2.5 สูง ทำให้การหายใจติดขัด (Respiratory Rate สูง) และการจราจรที่ติดหนักเมื่อวาน ทำให้คุณเครียดสะสม (HRV ต่ำ)</p>
                        <p class="text-indigo-600 font-semibold">ดังนั้น วันนี้ AI แนะนำให้งดเวทหนัก เปลี่ยนเป็นโยคะในบ้าน และดื่มน้ำให้มากขึ้นครับ</p>
                    </div>
                </div>
                <!-- Contextual Vitals -->
                <div class="grid grid-cols-2 gap-4 mb-6">
                    <div class="bg-gradient-to-br from-orange-400 to-red-500 rounded-2xl p-4 text-white">
                        <div class="flex items-center justify-between mb-2">
                            <span class="text-sm opacity-90">คุณภาพอากาศ</span>
                            <i data-feather="alert-triangle" class="w-5 h-5"></i>
                        </div>
                        <div class="text-2xl font-bold" data-weather="pm25">PM2.5: 85</div>
                        <div class="text-sm mt-1" data-weather="location">กรุงเทพฯ - ฝุ่นสูง!</div>
                        <div class="text-xs mt-2 opacity-80">ลดการออกกำลังกายกลางแจ้ง</div>
                    </div>
                    <div class="bg-gradient-to-br from-yellow-400 to-orange-500 rounded-2xl p-4 text-white">
                        <div class="flex items-center justify-between mb-2">
                            <span class="text-sm opacity-90">ดัชนีความร้อน</span>
                            <i data-feather="sun" class="w-5 h-5"></i>
                        </div>
                        <div class="text-2xl font-bold" data-weather="temperature">38°C</div>
                        <div class="text-sm mt-1">UV: 10 - รุนแรง</div>
                        <div class="text-xs mt-2 opacity-80">เสี่ยงฮีทสโตรก ดื่มน้ำเพิ่ม</div>
                    </div>
                </div>
                <!-- Traffic Alert -->
                <div class="bg-gradient-to-r from-blue-500 to-purple-600 rounded-2xl p-4 text-white mb-6">
                    <div class="flex items-center justify-between">
                        <div class="flex-1">
                            <div class="flex items-center mb-1">
                                <i data-feather="navigation" class="w-5 h-5 mr-2"></i>
                                <span class="text-sm">การจราจร</span>
                            </div>
                            <div class="text-lg font-bold" data-traffic="time">เดินทางไปทำงาน: 45 นาที</div>
                            <div class="text-sm opacity-90" data-traffic="route">สุขุมวิท - อโศก • รถติดหนัก</div>
                            <div class="text-xs mt-1 opacity-80">เผื่อเวลาเดินทาง และระวังความเครียดสะสม</div>
                        </div>
                    </div>
                    <div class="traffic-alternatives mt-3">
                        <!-- Alternative routes will be inserted here -->
                    </div>
                </div>
<!-- Quick Actions -->
                <div class="grid grid-cols-2 gap-4">
                    <button class="bg-white rounded-2xl p-4 card-shadow flex items-center justify-between hover:shadow-lg transition-shadow">
                        <div class="flex items-center">
                            <div class="w-10 h-10 bg-indigo-100 rounded-full flex items-center justify-center mr-3">
                                <i data-feather="camera" class="w-5 h-5 text-indigo-600"></i>
                            </div>
                            <div class="text-left">
                                <div class="font-semibold text-gray-900">บันทึกอาหาร</div>
                                <div class="text-sm text-gray-500">ถ่ายรูปแทน</div>
                            </div>
                        </div>
                        <i data-feather="chevron-right" class="w-5 h-5 text-gray-400"></i>
                    </button>
                    <button class="bg-white rounded-2xl p-4 card-shadow flex items-center justify-between hover:shadow-lg transition-shadow">
                        <div class="flex items-center">
                            <div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center mr-3">
                                <i data-feather="activity" class="w-5 h-5 text-green-600"></i>
                            </div>
                            <div class="text-left">
                                <div class="font-semibold text-gray-900">บันทึกกิจกรรม</div>
                                <div class="text-sm text-gray-500">เพิ่งออกกำลังกาย?</div>
                            </div>
                        </div>
                        <i data-feather="chevron-right" class="w-5 h-5 text-gray-400"></i>
                    </button>
                </div>
            </div>
        </div>
        
        <!-- Sleep Page -->
        <div id="sleep" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">การนอนหลับ</h1>
                
                <!-- Sleep Score -->
                <div class="bg-gradient-to-br from-indigo-500 to-purple-600 rounded-2xl p-6 text-white mb-6">
                    <div class="text-center">
                        <div class="text-5xl font-bold mb-2">85%</div>
                        <div class="text-lg opacity-90">Sleep Performance</div>
                        <div class="text-sm mt-2 opacity-80">คุณภาพการนอนดีเยี่ยม</div>
                    </div>
                </div>
                
                <!-- Sleep Details -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">รายละเอียดการนอน</h2>
                    <div class="space-y-4">
                        <div class="flex justify-between items-center">
                            <span class="text-gray-600">เวลาเข้านอน</span>
                            <span class="font-semibold">22:30</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <span class="text-gray-600">เวลาตื่นนอน</span>
                            <span class="font-semibold">06:15</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <span class="text-gray-600">รวมทั้งหมด</span>
                            <span class="font-semibold">7 ชั่วโมง 45 นาที</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <span class="text-gray-600">ความสม่ำเสมอ</span>
                            <span class="font-semibold text-green-600">92%</span>
                        </div>
                    </div>
                </div>
                
                <!-- Sleep Stages -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ช่วงการนอน</h2>
                    <div class="space-y-3">
                        <div>
                            <div class="flex justify-between items-center mb-1">
                                <span class="text-sm text-gray-600">Deep Sleep</span>
                                <span class="text-sm font-semibold">1h 45m (23%)</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-purple-600 h-2 rounded-full" style="width: 23%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between items-center mb-1">
                                <span class="text-sm text-gray-600">REM Sleep</span>
                                <span class="text-sm font-semibold">1h 30m (19%)</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-indigo-600 h-2 rounded-full" style="width: 19%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between items-center mb-1">
                                <span class="text-sm text-gray-600">Light Sleep</span>
                                <span class="text-sm font-semibold">4h 15m (55%)</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-blue-400 h-2 rounded-full" style="width: 55%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between items-center mb-1">
                                <span class="text-sm text-gray-600">Awake</span>
                                <span class="text-sm font-semibold">15m (3%)</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-red-400 h-2 rounded-full" style="width: 3%"></div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Smart Alarm -->
                <div class="bg-gradient-to-r from-green-500 to-teal-600 rounded-2xl p-6 text-white">
                    <div class="flex items-center mb-4">
                        <i data-feather="clock" class="w-6 h-6 mr-3"></i>
                        <h3 class="text-lg font-bold">Smart Alarm</h3>
                    </div>
                    <p class="text-sm mb-4">ตั้งเวลาปลุกอัจฉริยะ ปลุกในช่วง Light Sleep เพื่อการตื่นนอนที่สดใส</p>
                    <button class="bg-white text-green-600 px-4 py-2 rounded-lg font-semibold hover:bg-gray-100 transition">
                        ตั้งเวลาปลุก
                    </button>
                </div>
            </div>
        </div>
        
        <!-- Activity Page -->
        <div id="activity" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">กิจกรรม</h1>
                <!-- Today's Activities -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">กิจกรรมวันนี้</h2>
                    <div class="activities-list space-y-3">
                        <!-- Activities will be dynamically inserted here -->
                    </div>
                    <button class="w-full mt-4 bg-indigo-50 text-indigo-600 rounded-lg py-2 font-semibold hover:bg-indigo-100 transition">
                        <i data-feather="plus" class="w-4 h-4 inline mr-2"></i>
                        เพิ่มกิจกรรม
                    </button>
                </div>
<!-- Quick Log -->
                <div class="grid grid-cols-2 gap-4 mb-6">
                    <button class="bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-2xl p-4 flex items-center justify-center hover:shadow-lg transition">
                        <i data-feather="plus-circle" class="w-5 h-5 mr-2"></i>
                        <span class="font-semibold">เพิ่มกิจกรรม</span>
                    </button>
                    <button class="bg-gradient-to-r from-purple-500 to-purple-600 text-white rounded-2xl p-4 flex items-center justify-center hover:shadow-lg transition">
                        <i data-feather="camera" class="w-5 h-5 mr-2"></i>
                        <span class="font-semibold">ถ่ายรูป</span>
                    </button>
                </div>
                
                <!-- Thai Activities -->
                <div class="bg-white rounded-2xl p-6 card-shadow">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">กิจกรรมไทยยอดนิยม</h2>
                    <div class="grid grid-cols-3 gap-3">
                        <button class="p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition">
                            <div class="text-2xl mb-1">🥊</div>
                            <div class="text-xs">มวยไทย</div>
                        </button>
                        <button class="p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition">
                            <div class="text-2xl mb-1">🏸</div>
                            <div class="text-xs">แบดมินตัน</div>
                        </button>
                        <button class="p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition">
                            <div class="text-2xl mb-1">🧘</div>
                            <div class="text-xs">โยคะ</div>
                        </button>
                        <button class="p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition">
                            <div class="text-2xl mb-1">🏋️</div>
                            <div class="text-xs">เวทเทรน</div>
                        </button>
                        <button class="p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition">
                            <div class="text-2xl mb-1">🏃</div>
                            <div class="text-xs">วิ่ง</div>
                        </button>
                        <button class="p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition">
                            <div class="text-2xl mb-1">🙏</div>
                            <div class="text-xs">นั่งสมาธิ</div>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Strain Page -->
        <div id="strain" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">Strain</h1>
                
                <!-- Current Strain -->
                <div class="bg-gradient-to-br from-blue-500 to-indigo-600 rounded-2xl p-8 text-white mb-6">
                    <div class="text-center">
                        <div class="text-6xl font-bold mb-2">8.5</div>
                        <div class="text-xl opacity-90">Strain วันนี้</div>
                        <div class="text-sm mt-2 opacity-80">ปานกลาง - กำลังดี</div>
                    </div>
                    <div class="mt-6">
                        <div class="flex justify-between text-sm mb-2">
                            <span>เป้าหมาย: 10.0-12.0</span>
                            <span>สูงสุด: 21.0</span>
                        </div>
                        <div class="w-full bg-white bg-opacity-30 rounded-full h-3">
                            <div class="bg-white h-3 rounded-full" style="width: 40%"></div>
                        </div>
                    </div>
                </div>
                
                <!-- Strain Coach -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <div class="flex items-center mb-4">
                        <i data-feather="trending-up" class="w-6 h-6 text-indigo-600 mr-3"></i>
                        <h2 class="text-lg font-bold text-gray-900">Strain Coach</h2>
                    </div>
                    <div class="bg-indigo-50 rounded-lg p-4">
                        <p class="text-sm text-indigo-900 mb-3">AI แนะนำวันนี้:</p>
                        <ul class="space-y-2 text-sm text-gray-700">
                            <li class="flex items-start">
                                <i data-feather="check-circle" class="w-4 h-4 text-green-500 mr-2 mt-0.5"></i>
                                <span>เป้าหมาย Strain 10.5-12.0 เหมาะกับการฟื้นตัว 72%</span>
                            </li>
                            <li class="flex items-start">
                                <i data-feather="check-circle" class="w-4 h-4 text-green-500 mr-2 mt-0.5"></i>
                                <span>อากาศร้อนและ PM2.5 สูง ลด Strain 20% อัตโนมัติ</span>
                            </li>
                            <li class="flex items-start">
                                <i data-feather="check-circle" class="w-4 h-4 text-green-500 mr-2 mt-0.5"></i>
                                <span>แนะนำ: ออกกำลังกายในร่ม เช่น ว่ายน้ำ หรือโยคะ</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- Strain History -->
                <div class="bg-white rounded-2xl p-6 card-shadow">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ประวัติ 7 วันล่าสุด</h2>
                    <div class="space-y-3">
                        <div class="flex items-center justify-between">
                            <span class="text-gray-600">จันทร์</span>
                            <div class="flex-1 mx-4">
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-blue-600 h-2 rounded-full" style="width: 40%"></div>
                                </div>
                            </div>
                            <span class="font-semibold">8.5</span>
                        </div>
                        <div class="flex items-center justify-between">
                            <span class="text-gray-600">อาทิตย์</span>
                            <div class="flex-1 mx-4">
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-blue-600 h-2 rounded-full" style="width: 30%"></div>
                                </div>
                            </div>
                            <span class="font-semibold">6.3</span>
                        </div>
                        <div class="flex items-center justify-between">
                            <span class="text-gray-600">เสาร์</span>
                            <div class="flex-1 mx-4">
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-blue-600 h-2 rounded-full" style="width: 75%"></div>
                                </div>
                            </div>
                            <span class="font-semibold">15.8</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Recovery Page -->
        <div id="recovery" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">การฟื้นตัว</h1>
                
                <!-- Recovery Score -->
                <div class="bg-gradient-to-br from-green-500 to-teal-600 rounded-2xl p-8 text-white mb-6">
                    <div class="text-center">
                        <div class="text-6xl font-bold mb-2">72%</div>
                        <div class="text-xl opacity-90">Recovery Score</div>
                        <div class="text-sm mt-2 opacity-80">ฟื้นตัวดี</div>
                    </div>
                </div>
                
                <!-- Key Metrics -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ตัวชี้วัดหลัก</h2>
                    <div class="grid grid-cols-2 gap-4">
                        <div class="text-center p-4 bg-gray-50 rounded-lg">
                            <div class="text-2xl font-bold text-indigo-600">52</div>
                            <div class="text-sm text-gray-600">HRV (ms)</div>
                        </div>
                        <div class="text-center p-4 bg-gray-50 rounded-lg">
                            <div class="text-2xl font-bold text-blue-600">58</div>
                            <div class="text-sm text-gray-600">RHR (bpm)</div>
                        </div>
                    </div>
                </div>
                
                <!-- Factor Analysis -->
                <div class="bg-white rounded-2xl p-6 card-shadow">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ปัจจัยที่ส่งผล</h2>
                    <div class="space-y-3">
                        <div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
                            <div class="flex items-center">
                                <i data-feather="trending-up" class="w-5 h-5 text-green-600 mr-3"></i>
                                <span class="text-sm">การนอนหลับ (Deep Sleep เยอะ)</span>
                            </div>
                            <span class="font-bold text-green-600">+20%</span>
                        </div>
                        <div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
                            <div class="flex items-center">
                                <i data-feather="trending-up" class="w-5 h-5 text-green-600 mr-3"></i>
                                <span class="text-sm">การออกกำลังกาย (เหมาะสม)</span>
                            </div>
                            <span class="font-bold text-green-600">+10%</span>
                        </div>
                        <div class="flex items-center justify-between p-3 bg-red-50 rounded-lg">
                            <div class="flex items-center">
                                <i data-feather="trending-down" class="w-5 h-5 text-red-600 mr-3"></i>
                                <span class="text-sm">PM2.5 (จาก API)</span>
                            </div>
                            <span class="font-bold text-red-600">-15%</span>
                        </div>
                        <div class="flex items-center justify-between p-3 bg-red-50 rounded-lg">
                            <div class="flex items-center">
                                <i data-feather="trending-down" class="w-5 h-5 text-red-600 mr-3"></i>
                                <span class="text-sm">ความเครียด (จากจราจร)</span>
                            </div>
                            <span class="font-bold text-red-600">-5%</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Nutrition Page -->
        <div id="nutrition" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">โภชนาการ</h1>
                <!-- Today's Summary -->
                <div class="bg-gradient-to-br from-orange-500 to-red-600 rounded-2xl p-6 text-white mb-6">
                    <div class="text-center">
                        <div class="text-3xl font-bold mb-2" data-nutrition="calories">1,250 / 2,000</div>
                        <div class="text-lg opacity-90">แคลอรี่วันนี้</div>
                        <div class="text-sm mt-2 opacity-80">คงเหลือ 750 แคล • เผาผลาญ 320 แคล</div>
                    </div>
                    <div class="grid grid-cols-3 gap-4 mt-6">
                        <div class="text-center">
                            <div class="text-xl font-bold" data-nutrition="protein">45g</div>
                            <div class="text-xs opacity-80">โปรตีน (60%)</div>
                        </div>
                        <div class="text-center">
                            <div class="text-xl font-bold" data-nutrition="carbs">180g</div>
                            <div class="text-xs opacity-80">คาร์บ (72%)</div>
                        </div>
                        <div class="text-center">
                            <div class="text-xl font-bold" data-nutrition="fat">55g</div>
                            <div class="text-xs opacity-80">ไขมัน (85%)</div>
                        </div>
                    </div>
                </div>
<!-- Quick Actions -->
                <div class="grid grid-cols-2 gap-4 mb-6">
                    <button class="bg-white rounded-2xl p-4 card-shadow flex items-center justify-between hover:shadow-lg transition">
                        <div class="flex items-center">
                            <i data-feather="camera" class="w-6 h-6 text-orange-600 mr-3"></i>
                            <span class="font-semibold">ถ่ายรูปอาหาร</span>
                        </div>
                    </button>
                    <button class="bg-white rounded-2xl p-4 card-shadow flex items-center justify-between hover:shadow-lg transition">
                        <div class="flex items-center">
                            <i data-feather="grid" class="w-6 h-6 text-orange-600 mr-3"></i>
                            <span class="font-semibold">สแกนบาร์โค้ด</span>
                        </div>
                    </button>
                </div>
                <!-- Today's Meals -->
                <div class="bg-white rounded-2xl p-6 card-shadow">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">มื้ออาหารวันนี้</h2>
                    <div class="space-y-3" id="meals-list">
                        <!-- Meals will be dynamically inserted here -->
                    </div>
                    <button class="w-full mt-4 bg-orange-50 text-orange-600 rounded-lg py-2 font-semibold hover:bg-orange-100 transition">
                        <i data-feather="camera" class="w-4 h-4 inline mr-2"></i>
                        ถ่ายรูปเพิ่มอาหาร
                    </button>
                </div>
                <!-- Water Intake -->
                <div class="bg-gradient-to-r from-blue-500 to-cyan-600 rounded-2xl p-6 text-white mt-6">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-lg font-bold">การดื่มน้ำ</h3>
                        <span class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm">วันนี้</span>
                    </div>
                    <div class="text-center mb-4">
                        <div class="text-3xl font-bold mb-2" data-water="text">1,600 / 2,500 ml</div>
                        <div class="text-sm opacity-90">เป้าหมายประจำวัน</div>
                    </div>
                    <div class="w-full bg-white bg-opacity-30 rounded-full h-3 mb-4">
                        <div class="bg-white h-3 rounded-full transition-all duration-500" data-water="progress" style="width: 64%"></div>
                    </div>
                    <button class="w-full bg-white bg-opacity-20 text-white rounded-lg py-2 font-semibold hover:bg-opacity-30 transition">
                        <i data-feather="plus-circle" class="w-4 h-4 inline mr-2"></i>
                        เพิ่ม 250 มล.
                    </button>
                </div>
                
                <!-- IF Tracker -->
                <div class="bg-gradient-to-r from-purple-500 to-indigo-600 rounded-2xl p-6 text-white mt-6">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-lg font-bold">Intermittent Fasting</h3>
                        <span class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm">16:8</span>
                    </div>
                    <div class="text-center">
                        <div class="text-3xl font-bold mb-2 current-time">06:45:30</div>
                        <div class="text-sm opacity-90">เวลาที่เหลือ</div>
                    </div>
                </div>
</div>
        </div>
        
        <!-- Mental Page -->
        <div id="mental" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">สุขภาพจิต</h1>
                <!-- Current Mood -->
                <div class="bg-gradient-to-br from-purple-500 to-pink-600 rounded-2xl p-6 text-white mb-6">
                    <h2 class="text-lg font-bold mb-4">อารมณ์วันนี้</h2>
                    <div class="flex justify-around">
                        <button class="text-4xl hover:scale-110 transition mood-button" data-mood="happy">😊</button>
                        <button class="text-4xl hover:scale-110 transition mood-button" data-mood="neutral">😐</button>
                        <button class="text-4xl hover:scale-110 transition mood-button" data-mood="sad">😔</button>
                        <button class="text-4xl hover:scale-110 transition mood-button" data-mood="anxious">😰</button>
                        <button class="text-4xl hover:scale-110 transition mood-button" data-mood="angry">😡</button>
                    </div>
                    <div class="mt-4 text-center">
                        <div class="text-sm opacity-90">ระดับความเครียด:</div>
                        <div class="text-2xl font-bold" data-mental="stress">45%</div>
                    </div>
                </div>
<!-- Stress Level -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ระดับความเครียด</h2>
                    <div class="text-center mb-4">
                        <div class="text-4xl font-bold text-orange-500">45%</div>
                        <div class="text-gray-600">ปานกลาง</div>
                    </div>
                    <div class="space-y-2">
                        <div class="flex items-center">
                            <i data-feather="navigation" class="w-4 h-4 text-red-500 mr-2"></i>
                            <span class="text-sm">การจราจรติดขัด</span>
                        </div>
                        <div class="flex items-center">
                            <i data-feather="alert-triangle" class="w-4 h-4 text-orange-500 mr-2"></i>
                            <span class="text-sm">PM2.5 สูง</span>
                        </div>
                    </div>
                </div>
                
                <!-- Guided Meditation -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">นำสมาธิ</h2>
                    <div class="space-y-3">
                        <button class="w-full flex items-center justify-between p-3 bg-indigo-50 rounded-lg hover:bg-indigo-100 transition">
                            <div class="flex items-center">
                                <i data-feather="play-circle" class="w-6 h-6 text-indigo-600 mr-3"></i>
                                <div class="text-left">
                                    <div class="font-semibold">นั่งสมาธิ 5 นาที</div>
                                    <div class="text-sm text-gray-500">สำหรับผู้เริ่มต้น</div>
                                </div>
                            </div>
                            <span class="text-sm text-gray-500">5:00</span>
                        </button>
                        <button class="w-full flex items-center justify-between p-3 bg-indigo-50 rounded-lg hover:bg-indigo-100 transition">
                            <div class="flex items-center">
                                <i data-feather="play-circle" class="w-6 h-6 text-indigo-600 mr-3"></i>
                                <div class="text-left">
                                    <div class="font-semibold">สวดมนต์ ชินบัญชร</div>
                                    <div class="text-sm text-gray-500">เพื่อความสงบ</div>
                                </div>
                            </div>
                            <span class="text-sm text-gray-500">10:00</span>
                        </button>
                    </div>
                </div>
                
                <!-- Office Syndrome Alert -->
                <div class="bg-gradient-to-r from-yellow-400 to-orange-500 rounded-2xl p-4 text-white">
                    <div class="flex items-center justify-between">
                        <div>
                            <div class="font-bold mb-1">อย่าลืมเคลื่อนไหว!</div>
                            <div class="text-sm">นั่งนิ่งมา 45 นาทีแล้ว ลุกขึ้นยืนเดินเลย</div>
                        </div>
                        <button class="bg-white text-orange-500 px-4 py-2 rounded-lg font-semibold text-sm hover:bg-gray-100 transition">
                            ท่ากายบริหาร
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Community Page -->
        <div id="community" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">ชุมชน</h1>
                <!-- My Teams -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ทีมของฉัน</h2>
                    <div class="teams-list space-y-3">
                        <!-- Teams will be dynamically inserted here -->
                    </div>
                </div>
                <!-- Active Challenges -->
                <div class="bg-white rounded-2xl p-6 card-shadow">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">Challenge ที่กำลังทำ</h2>
                    <div class="challenges-list space-y-4">
                        <!-- Challenges will be dynamically inserted here -->
                    </div>
                </div>
</div>
        </div>
        
        <!-- Settings Page -->
        <div id="settings" class="page-content">
            <div class="py-6">
                <h1 class="text-3xl font-bold text-gray-900 mb-6">การตั้งค่า</h1>
                
                <!-- Profile -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <div class="flex items-center mb-4">
                        <div class="w-20 h-20 bg-gradient-to-r from-purple-500 to-indigo-500 rounded-full flex items-center justify-center text-white text-2xl font-bold mr-4">
                            จ
                        </div>
                        <div>
                            <div class="text-xl font-bold">จอห์น โด</div>
                            <div class="text-gray-500">john.doe@email.com</div>
                        </div>
                    </div>
                    <button class="w-full bg-indigo-600 text-white rounded-lg py-2 font-semibold hover:bg-indigo-700 transition">
                        แก้ไขโปรไฟล์
                    </button>
                </div>
                
                <!-- Addresses -->
                <div class="bg-white rounded-2xl p-6 card-shadow mb-6">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ที่อยู่</h2>
                    <div class="space-y-3">
                        <div class="p-3 bg-gray-50 rounded-lg">
                            <div class="font-semibold mb-1">บ้าน</div>
                            <div class="text-sm text-gray-600">123 ถนนสุขุมวิท แขวงคลองเตย เขตคลองเตย กรุงเทพฯ</div>
                        </div>
                        <div class="p-3 bg-gray-50 rounded-lg">
                            <div class="font-semibold mb-1">ที่ทำงาน</div>
                            <div class="text-sm text-gray-600">456 ถนนพระราม 4 แขวงคลองเตย เขตคลองเตย กรุงเทพฯ</div>
                        </div>
                    </div>
                </div>
                
                <!-- Privacy Settings -->
                <div class="bg-white rounded-2xl p-6 card-shadow">
                    <h2 class="text-lg font-bold text-gray-900 mb-4">ความเป็นส่วนตัว (PDPA)</h2>
                    <div class="space-y-3">
                        <label class="flex items-center justify-between p-3">
                            <span class="text-sm">แชร์ตำแหน่งที่ตั้ง</span>
                            <input type="checkbox" checked class="w-5 h-5 text-indigo-600 rounded">
                        </label>
                        <label class="flex items-center justify-between p-3">
                            <span class="text-sm">ดึงข้อมูลจราจร</span>
                            <input type="checkbox" checked class="w-5 h-5 text-indigo-600 rounded">
                        </label>
                        <label class="flex items-center justify-between p-3">
                            <span class="text-sm">แชร์ข้อมูลสุขภาพ</span>
                            <input type="checkbox" class="w-5 h-5 text-indigo-600 rounded">
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </main>
    
    <!-- Bottom Navigation -->
    <bottom-nav></bottom-nav>
    
    <!-- Scripts -->
    <script src="components/navbar.js"></script>
    <script src="components/bottomNav.js"></script>
    <script src="components/vitalCircle.js"></script>
    <script src="script.js"></script>
    <script>feather.replace();</script>
</body>
</html>