File size: 47,293 Bytes
db38bd0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vitality Tracker Pro</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #fef3c7 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .phone-container {
            width: 100%;
            max-width: 430px;
            height: 900px;
            background: #ffffff;
            border-radius: 40px;
            box-shadow: 0 30px 60px rgba(0,0,0,0.12);
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .status-bar {
            height: 44px;
            background: linear-gradient(135deg, #10b981, #14b8a6);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            color: white;
            font-size: 14px;
            font-weight: 600;
        }

        .main-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            padding-bottom: 100px;
        }

        .screen {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .screen.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .card {
            background: white;
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.06);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .card:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 30px rgba(0,0,0,0.1);
        }

        .metric-card {
            background: linear-gradient(135deg, #10b981, #14b8a6);
            color: white;
            text-align: center;
            padding: 25px;
            border-radius: 20px;
            margin-bottom: 15px;
        }

        .score-circle {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: conic-gradient(#10b981 0deg 280deg, #e5e7eb 280deg);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            position: relative;
        }

        .score-circle::before {
            content: '';
            position: absolute;
            width: 100px;
            height: 100px;
            background: white;
            border-radius: 50%;
        }

        .score-text {
            position: relative;
            font-size: 28px;
            font-weight: bold;
            color: #10b981;
        }

        .bottom-nav {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 80px;
            background: white;
            border-top: 1px solid #e5e7eb;
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding-bottom: 10px;
        }

        .nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s;
            padding: 8px;
        }

        .nav-item:hover {
            transform: scale(1.1);
        }

        .nav-item.active {
            color: #10b981;
        }

        .nav-icon {
            width: 24px;
            height: 24px;
            margin-bottom: 4px;
        }

        .nav-label {
            font-size: 10px;
            font-weight: 500;
        }

        .mini-metric {
            background: #f9fafb;
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            margin-bottom: 10px;
        }

        .mini-metric-value {
            font-size: 20px;
            font-weight: bold;
            color: #10b981;
        }

        .mini-metric-label {
            font-size: 12px;
            color: #6b7280;
            margin-top: 4px;
        }

        .chart-container {
            background: #f9fafb;
            border-radius: 12px;
            padding: 15px;
            margin-top: 15px;
            height: 150px;
            position: relative;
        }

        .bar-chart {
            display: flex;
            align-items: flex-end;
            justify-content: space-around;
            height: 100%;
        }

        .bar {
            width: 30px;
            background: linear-gradient(to top, #10b981, #14b8a6);
            border-radius: 4px 4px 0 0;
            transition: all 0.3s;
            cursor: pointer;
        }

        .bar:hover {
            opacity: 0.8;
            transform: scaleY(1.05);
        }

        .line-chart {
            width: 100%;
            height: 100%;
            position: relative;
        }

        .line-chart svg {
            width: 100%;
            height: 100%;
        }

        .sleep-bar-container {
            display: flex;
            height: 60px;
            border-radius: 10px;
            overflow: hidden;
            margin: 20px 0;
        }

        .sleep-stage {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 600;
        }

        .awake { background: #ef4444; }
        .light { background: #3b82f6; }
        .deep { background: #6366f1; }
        .rem { background: #a855f7; }

        .body-silhouette {
            width: 200px;
            height: 300px;
            margin: 20px auto;
            transition: all 0.5s ease;
        }

        .body-silhouette.fat {
            transform: scale(1.1, 1.15);
            opacity: 0.8;
        }

        .body-silhouette.muscle {
            transform: scale(1.05, 1.1);
            opacity: 0.9;
        }

        .body-silhouette.visceral {
            transform: scale(1.1, 1.05);
            opacity: 0.85;
        }

        .toggle-button {
            background: #e5e7eb;
            border: none;
            padding: 10px 20px;
            border-radius: 20px;
            margin: 5px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 500;
        }

        .toggle-button:hover {
            background: #d1d5db;
            transform: translateY(-2px);
        }

        .toggle-button.active {
            background: linear-gradient(135deg, #10b981, #14b8a6);
            color: white;
        }

        .lab-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: #f9fafb;
            border-radius: 10px;
            margin-bottom: 10px;
        }

        .lab-label {
            font-weight: 500;
            color: #374151;
        }

        .lab-value {
            font-weight: bold;
            padding: 4px 12px;
            border-radius: 12px;
        }

        .lab-green { background: #d1fae5; color: #065f46; }
        .lab-yellow { background: #fef3c7; color: #92400e; }
        .lab-red { background: #fee2e2; color: #991b1b; }

        .risk-pill {
            display: inline-block;
            background: #fee2e2;
            color: #991b1b;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            margin: 4px;
        }

        .chat-bubble {
            background: #f3f4f6;
            border-radius: 18px;
            padding: 15px;
            margin: 10px 0;
            max-width: 85%;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from { transform: translateX(-20px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        .coach-bubble {
            background: linear-gradient(135deg, #10b981, #14b8a6);
            color: white;
            align-self: flex-start;
        }

        .user-bubble {
            background: #e5e7eb;
            color: #374151;
            align-self: flex-end;
            margin-left: auto;
        }

        .program-card {
            background: white;
            border-radius: 15px;
            padding: 15px;
            margin-bottom: 15px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
            cursor: pointer;
            transition: all 0.3s;
        }

        .program-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 20px rgba(0,0,0,0.12);
        }

        .difficulty-tag {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            margin-left: 10px;
        }

        .beginner { background: #d1fae5; color: #065f46; }
        .intermediate { background: #fef3c7; color: #92400e; }
        .advanced { background: #fee2e2; color: #991b1b; }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 20px;
            padding: 30px;
            max-width: 90%;
            max-height: 80%;
            overflow-y: auto;
            animation: modalSlide 0.3s ease;
        }

        @keyframes modalSlide {
            from { transform: translateY(50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .close-modal {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 30px;
            height: 30px;
            background: #e5e7eb;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .close-modal:hover {
            background: #d1d5db;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #e5e7eb;
            border-radius: 4px;
            overflow: hidden;
            margin: 10px 0;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #10b981, #14b8a6);
            border-radius: 4px;
            transition: width 1s ease;
        }

        .highlight-card {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            color: white;
            padding: 15px;
            border-radius: 15px;
            margin: 15px 0;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.02); }
        }
    </style>
</head>
<body>
    <div class="phone-container">
        <div class="status-bar">
            <span>9:41</span>
            <span>VITALITY PRO</span>
            <span>100% 🔋</span>
        </div>

        <div class="main-content">
            <!-- HOME SCREEN -->
            <div id="home-screen" class="screen active">
                <div class="card">
                    <h2 style="margin-bottom: 20px; color: #1f2937;">Today's Health Overview</h2>
                    <div style="display: flex; justify-content: space-around; text-align: center;">
                        <div>
                            <div class="score-circle">
                                <span class="score-text">78</span>
                            </div>
                            <div style="color: #6b7280; font-size: 12px;">Recovery</div>
                        </div>
                        <div>
                            <div class="score-circle" style="background: conic-gradient(#3b82f6 0deg 295deg, #e5e7eb 295deg);">
                                <span class="score-text" style="color: #3b82f6;">82</span>
                            </div>
                            <div style="color: #6b7280; font-size: 12px;">Sleep</div>
                        </div>
                        <div>
                            <div class="score-circle" style="background: conic-gradient(#f59e0b 0deg 273deg, #e5e7eb 273deg);">
                                <span class="score-text" style="color: #f59e0b;">9.4</span>
                            </div>
                            <div style="color: #6b7280; font-size: 12px;">Strain</div>
                        </div>
                    </div>
                </div>

                <div class="card">
                    <div style="display: flex; justify-content: space-between; margin-bottom: 15px;">
                        <div class="mini-metric" style="width: 30%;">
                            <div class="mini-metric-value">62 ms</div>
                            <div class="mini-metric-label">HRV</div>
                        </div>
                        <div class="mini-metric" style="width: 30%;">
                            <div class="mini-metric-value">58 bpm</div>
                            <div class="mini-metric-label">Resting HR</div>
                        </div>
                        <div class="mini-metric" style="width: 30%;">
                            <div class="mini-metric-value">+0.2°C</div>
                            <div class="mini-metric-label">Temp Dev</div>
                        </div>
                    </div>
                </div>

                <div class="chart-container">
                    <div style="font-size: 12px; color: #6b7280; margin-bottom: 10px;">7-Day Recovery Trend</div>
                    <div class="bar-chart" id="recovery-chart"></div>
                </div>

                <div class="chart-container">
                    <div style="font-size: 12px; color: #6b7280; margin-bottom: 10px;">7-Day Strain Levels</div>
                    <div class="bar-chart" id="strain-chart"></div>
                </div>
            </div>

            <!-- RECOVERY SCREEN -->
            <div id="recovery-screen" class="screen">
                <div class="metric-card">
                    <h1 style="font-size: 36px; margin-bottom: 10px;">Recovery 78</h1>
                    <div style="font-size: 18px; opacity: 0.9;">Green Zone</div>
                    <div style="margin-top: 20px; font-size: 14px;">
                        Your body is well-recovered and ready for optimal performance today.
                    </div>
                </div>

                <div class="card">
                    <h3 style="margin-bottom: 15px; color: #1f2937;">Recovery Breakdown</h3>
                    <div style="display: flex; justify-content: space-between; margin-bottom: 10px;">
                        <div style="text-align: center;">
                            <div style="font-size: 24px; font-weight: bold; color: #10b981;">85%</div>
                            <div style="font-size: 12px; color: #6b7280;">Sleep Quality</div>
                        </div>
                        <div style="text-align: center;">
                            <div style="font-size: 24px; font-weight: bold; color: #10b981;">62</div>
                            <div style="font-size: 12px; color: #6b7280;">HRV (ms)</div>
                        </div>
                        <div style="text-align: center;">
                            <div style="font-size: 24px; font-weight: bold; color: #10b981;">58</div>
                            <div style="font-size: 12px; color: #6b7280;">Resting HR</div>
                        </div>
                    </div>
                </div>

                <div class="chart-container">
                    <div style="font-size: 12px; color: #6b7280; margin-bottom: 10px;">HRV Trend (7 Days)</div>
                    <div class="line-chart" id="hrv-line-chart"></div>
                </div>

                <div class="card" style="background: linear-gradient(135deg, #f0fdf4, #dcfce7);">
                    <h4 style="color: #065f46; margin-bottom: 10px;">💡 Recovery Insight</h4>
                    <p style="color: #047857; font-size: 14px; line-height: 1.5;">
                        Your recovery score is in the green zone, indicating good physiological recovery. 
                        Continue maintaining consistent sleep patterns and consider moderate-intensity activities 
                        for optimal performance without overtraining.
                    </p>
                </div>
            </div>

            <!-- SLEEP SCREEN -->
            <div id="sleep-screen" class="screen">
                <div class="metric-card">
                    <h1 style="font-size: 36px; margin-bottom: 10px;">7h 25m</h1>
                    <div style="font-size: 18px; opacity: 0.9;">Sleep Performance: 82/100</div>
                </div>

                <div class="card">
                    <h3 style="margin-bottom: 15px; color: #1f2937;">Sleep Stages</h3>
                    <div class="sleep-bar-container">
                        <div class="sleep-stage awake" style="flex: 0.1;">5%</div>
                        <div class="sleep-stage light" style="flex: 0.5;">50%</div>
                        <div class="sleep-stage deep" style="flex: 0.2;">20%</div>
                        <div class="sleep-stage rem" style="flex: 0.2;">25%</div>
                    </div>
                    <div style="display: flex; justify-content: space-between; font-size: 11px; color: #6b7280;">
                        <span>Awake</span>
                        <span>Light</span>
                        <span>Deep</span>
                        <span>REM</span>
                    </div>
                </div>

                <div class="card">
                    <h3 style="margin-bottom: 15px; color: #1f2937;">Sleep Metrics</h3>
                    <div style="display: flex; justify-content: space-between;">
                        <div class="mini-metric" style="width: 30%;">
                            <div class="mini-metric-value">87%</div>
                            <div class="mini-metric-label">Consistency</div>
                        </div>
                        <div class="mini-metric" style="width: 30%;">
                            <div class="mini-metric-value">12 min</div>
                            <div class="mini-metric-label">Latency</div>
                        </div>
                        <div class="mini-metric" style="width: 30%;">
                            <div class="mini-metric-value">2</div>
                            <div class="mini-metric-label">Wake Episodes</div>
                        </div>
                    </div>
                </div>

                <div class="chart-container">
                    <div style="font-size: 12px; color: #6b7280; margin-bottom: 10px;">7-Day Sleep Duration</div>
                    <div class="bar-chart" id="sleep-chart"></div>
                </div>
            </div>

            <!-- STRAIN SCREEN -->
            <div id="strain-screen" class="screen">
                <div class="metric-card" style="background: linear-gradient(135deg, #f59e0b, #f97316);">
                    <h1 style="font-size: 36px; margin-bottom: 10px;">9.4</h1>
                    <div style="font-size: 18px; opacity: 0.9;">Moderate Strain</div>
                    <div class="progress-bar" style="margin-top: 20px;">
                        <div class="progress-fill" style="width: 94%;"></div>
                    </div>
                    <div style="font-size: 12px; opacity: 0.9;">Daily Strain Goal: 10.0</div>
                </div>

                <div class="card">
                    <h3 style="margin-bottom: 15px; color: #1f2937;">Today's Activities</h3>
                    <div style="padding: 10px 0; border-bottom: 1px solid #f3f4f6;">
                        <div style="display: flex; justify-content: space-between; align-items: center;">
                            <div>
                                <div style="font-weight: 600; color: #1f2937;">Morning Run</div>
                                <div style="font-size: 12px; color: #6b7280;">45 minutes</div>
                            </div>
                            <div style="font-weight: bold; color: #f59e0b;">6.2</div>
                        </div>
                    </div>
                    <div style="padding: 10px 0; border-bottom: 1px solid #f3f4f6;">
                        <div style="display: flex; justify-content: space-between; align-items: center;">
                            <div>
                                <div style="font-weight: 600; color: #1f2937;">Walking</div>
                                <div style="font-size: 12px; color: #6b7280;">25 minutes</div>
                            </div>
                            <div style="font-weight: bold; color: #f59e0b;">2.1</div>
                        </div>
                    </div>
                    <div style="padding: 10px 0;">
                        <div style="display: flex; justify-content: space-between; align-items: center;">
                            <div>
                                <div style="font-weight: 600; color: #1f2937;">Desk Work</div>
                                <div style="font-size: 12px; color: #6b7280;">120 minutes</div>
                            </div>
                            <div style="font-weight: bold; color: #f59e0b;">1.1</div>
                        </div>
                    </div>
                </div>

                <div class="chart-container">
                    <div style="font-size: 12px; color: #6b7280; margin-bottom: 10px;">7-Day Strain Trend</div>
                    <div class="line-chart" id="strain-line-chart"></div>
                </div>

                <div class="card" style="background: linear-gradient(135deg, #fef3c7, #fde68a);">
                    <h4 style="color: #92400e; margin-bottom: 10px;">📊 Target Range</h4>
                    <p style="color: #78350f; font-size: 14px;">
                        Recommended daily strain: 8-11 for optimal fitness gains without overtraining
                    </p>
                </div>
            </div>

            <!-- BODY SCREEN -->
            <div id="body-screen" class="screen">
                <div class="card">
                    <h2 style="margin-bottom: 20px; color: #1f2937; text-align: center;">Body Composition Simulator</h2>
                    
                    <svg class="body-silhouette" id="body-silhouette" viewBox="0 0 200 300">
                        <path d="M100 20 C120 20 140 40 140 60 L140 100 C140 120 135 140 125 160 L125 200 C125 220 120 240 100 240 C80 240 75 220 75 200 L75 160 C65 140 60 120 60 100 L60 60 C60 40 80 20 100 20 Z" 
                              fill="#e5e7eb" stroke="#9ca3af" stroke-width="2"/>
                        <circle cx="100" cy="50" r="25" fill="#e5e7eb" stroke="#9ca3af" stroke-width="2"/>
                    </svg>

                    <div style="text-align: center; margin-bottom: 20px;">
                        <button class="toggle-button" onclick="toggleBodyView('normal')">Normal</button>
                        <button class="toggle-button" onclick="toggleBodyView('fat')">View Fat</button>
                        <button class="toggle-button" onclick="toggleBodyView('muscle')">View Muscle</button>
                        <button class="toggle-button" onclick="toggleBodyView('visceral')">View Visceral</button>
                    </div>

                    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;">
                        <div class="mini-metric">
                            <div class="mini-metric-value">27.5%</div>
                            <div class="mini-metric-label">Body Fat</div>
                        </div>
                        <div class="mini-metric">
                            <div class="mini-metric-value">13</div>
                            <div class="mini-metric-label">Visceral Fat</div>
                        </div>
                        <div class="mini-metric">
                            <div class="mini-metric-value">34%</div>
                            <div class="mini-metric-label">Muscle Mass</div>
                        </div>
                        <div class="mini-metric">
                            <div class="mini-metric-value">78 kg</div>
                            <div class="mini-metric-label">Weight</div>
                        </div>
                    </div>
                </div>

                <div class="card">
                    <h3 style="margin-bottom: 15px; color: #1f2937;">30-Day Projection</h3>
                    <div style="margin-bottom: 10px;">
                        <div style="font-size: 14px; color: #6b7280;">Body Fat: 27.5% → 25.8%</div>
                        <div class="progress-bar">
                            <div class="progress-fill" style="width: 65%;"></div>
                        </div>
                    </div>
                    <div>
                        <div style="font-size: 14px; color: #6b7280;">Muscle Mass: 34% → 35.2%</div>
                        <div class="progress-bar">
                            <div class="progress-fill" style="width: 40%;"></div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- LABS SCREEN -->
            <div id="labs-screen" class="screen">
                <div class="card">
                    <h2 style="margin-bottom: 20px; color: #1f2937;">Key Biomarkers</h2>
                    
                    <div class="lab-row">
                        <span class="lab-label">Fasting Glucose</span>
                        <span class="lab-value lab-green">98 mg/dL</span>
                    </div>
                    <div class="lab-row">
                        <span class="lab-label">HbA1c</span>
                        <span class="lab-value lab-yellow">5.6%</span>
                    </div>
                    <div class="lab-row">
                        <span class="lab-label">Triglycerides</span>
                        <span class="lab-value lab-red">210 mg/dL</span>
                    </div>
                    <div class="lab-row">
                        <span class="lab-label">LDL</span>
                        <span class="lab-value lab-yellow">135 mg/dL</span>
                    </div>
                    <div class="lab-row">
                        <span class="lab-label">HDL</span>
                        <span class="lab-value lab-yellow">42 mg/dL</span>
                    </div>
                    <div class="lab-row">
                        <span class="lab-label">Vitamin D</span>
                        <span class="lab-value lab-red">18 ng/mL</span>
                    </div>
                    <div class="lab-row">
                        <span class="lab-label">hs-CRP</span>
                        <span class="lab-value lab-yellow">2.8 mg/L</span>
                    </div>
                </div>

                <div class="card">
                    <h3 style="margin-bottom: 15px; color: #1f2937;">Risk Assessment</h3>
                    <div style="margin-bottom: 15px;">
                        <span class="risk-pill">Metabolic Risk</span>
                        <span class="risk-pill">Visceral Fat High</span>
                        <span class="risk-pill">Vitamin D Low</span>
                    </div>
                </div>

                <div class="chart-container">
                    <div style="font-size: 12px; color: #6b7280; margin-bottom: 10px;">Health Scores</div>
                    <div style="margin-bottom: 10px;">
                        <div style="font-size: 12px; color: #374151;">Metabolic Score: 65/100</div>
                        <div class="progress-bar">
                            <div class="progress-fill" style="width: 65%;"></div>
                        </div>
                    </div>
                    <div style="margin-bottom: 10px;">
                        <div style="font-size: 12px; color: #374151;">Cardio Score: 72/100</div>
                        <div class="progress-bar">
                            <div class="progress-fill" style="width: 72%;"></div>
                        </div>
                    </div>
                    <div>
                        <div style="font-size: 12px; color: #374151;">Inflammation Score: 58/100</div>
                        <div class="progress-bar">
                            <div class="progress-fill" style="width: 58%;"></div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- COACH SCREEN -->
            <div id="coach-screen" class="screen">
                <div class="card">
                    <h2 style="margin-bottom: 20px; color: #1f2937;">AI Health Coach</h2>
                    
                    <div class="highlight-card">
                        <h3 style="margin-bottom: 10px;">Today's Focus: Recovery</h3>
                        <div style="font-size: 14px;">🎯 Key Action: Go to bed before 23:00</div>
                    </div>

                    <div style="display: flex; flex-direction: column; padding: 20px 0;">
                        <div class="chat-bubble coach-bubble">
                            Good morning! Your recovery score of 78 indicates you're well-rested. This is an excellent day for moderate to high-intensity training.
                        </div>
                        
                        <div class="chat-bubble user-bubble">
                            What type of workout would you recommend?
                        </div>
                        
                        <div class="chat-bubble coach-bubble">
                            Based on your strain history, a combination of cardio (45 min) and strength training (30 min) would be optimal. Aim for a total strain of 10-12.
                        </div>
                        
                        <div class="chat-bubble coach-bubble">
                            Also, remember to stay hydrated. Your temperature deviation suggests you may need extra fluids today.
                        </div>
                    </div>

                    <div style="display: flex; align-items: center; background: #f3f4f6; padding: 15px; border-radius: 30px;">
                        <span style="flex: 1; color: #9ca3af;">Type your message...</span>
                        <button style="background: #10b981; color: white; border: none; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center;">
                            ➤
                        </button>
                    </div>
                </div>
            </div>

            <!-- PROGRAMS SCREEN -->
            <div id="programs-screen" class="screen">
                <h2 style="margin-bottom: 20px; color: #1f2937;">Wellness Programs</h2>
                
                <div class="program-card" onclick="openProgramModal('Metabolic Reset')">
                    <div style="display: flex; justify-content: space-between; align-items: center;">
                        <div>
                            <h3 style="color: #1f2937; margin-bottom: 5px;">Metabolic Reset</h3>
                            <p style="font-size: 13px; color: #6b7280;">30 days to improve metabolic health</p>
                        </div>
                        <span class="difficulty-tag intermediate">Intermediate</span>
                    </div>
                </div>

                <div class="program-card" onclick="openProgramModal('Deep Sleep')">
                    <div style="display: flex; justify-content: space-between; align-items: center;">
                        <div>
                            <h3 style="color: #1f2937; margin-bottom: 5px;">Deep Sleep</h3>
                            <p style="font-size: 13px; color: #6b7280;">14 days to optimize sleep quality</p>
                        </div>
                        <span class="difficulty-tag beginner">Beginner</span>
                    </div>
                </div>

                <div class="program-card" onclick="openProgramModal('Stress Reset')">
                    <div style="display: flex; justify-content: space-between; align-items: center;">
                        <div>
                            <h3 style="color: #1f2937; margin-bottom: 5px;">Stress Reset Program</h3>
                            <p style="font-size: 13px; color: #6b7280;">21 days of mindfulness and recovery</p>
                        </div>
                        <span class="difficulty-tag beginner">Beginner</span>
                    </div>
                </div>

                <div class="program-card" onclick="openProgramModal('Muscle Gain')">
                    <div style="display: flex; justify-content: space-between; align-items: center;">
                        <div>
                            <h3 style="color: #1f2937; margin-bottom: 5px;">Muscle Gain</h3>
                            <p style="font-size: 13px; color: #6b7280;">60 days of progressive strength training</p>
                        </div>
                        <span class="difficulty-tag advanced">Advanced</span>
                    </div>
                </div>

                <div class="program-card" onclick="openProgramModal('Hormone Balance')">
                    <div style="display: flex; justify-content: space-between; align-items: center;">
                        <div>
                            <h3 style="color: #1f2937; margin-bottom: 5px;">Female Hormone Balance</h3>
                            <p style="font-size: 13px; color: #6b7280;">30 days cycle tracking support</p>
                        </div>
                        <span class="difficulty-tag intermediate">Intermediate</span>
                    </div>
                </div>
            </div>
        </div>

        <div class="bottom-nav">
            <div class="nav-item active" onclick="switchScreen('home')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
                </svg>
                <span class="nav-label">Home</span>
            </div>
            <div class="nav-item" onclick="switchScreen('recovery')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
                </svg>
                <span class="nav-label">Recovery</span>
            </div>
            <div class="nav-item" onclick="switchScreen('sleep')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M17.75 4.09l-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3 3.19.09m3.5 6.91l-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95 2.06.05m-2.28 4.95c.83-.08 1.72 1.1 1.88 1.85.27 1.3-.36 2.23-1.65 2.49s-2.19-.4-2.46-1.72c-.12-.59.25-2.41 1.23-2.62m-8.52 0c.98.21 1.35 2.03 1.23 2.62-.27 1.32-1.18 1.96-2.46 1.72S4.3 19.8 4.57 18.5c.16-.75 1.05-1.93 1.88-1.85m4.78 3.93c-.87-.39-1.58-1.24-1.58-2.15 0-1.18.87-2.14 1.95-2.14s1.95.96 1.95 2.14c0 .91-.71 1.76-1.58 2.15.75.43 1.28 1.12 1.28 1.96v2.23h-6.3v-2.23c0-.84.53-1.53 1.28-1.96z"/>
                </svg>
                <span class="nav-label">Sleep</span>
            </div>
            <div class="nav-item" onclick="switchScreen('strain')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/>
                </svg>
                <span class="nav-label">Strain</span>
            </div>
            <div class="nav-item" onclick="switchScreen('body')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/>
                </svg>
                <span class="nav-label">Body</span>
            </div>
            <div class="nav-item" onclick="switchScreen('labs')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/>
                </svg>
                <span class="nav-label">Labs</span>
            </div>
            <div class="nav-item" onclick="switchScreen('coach')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/>
                </svg>
                <span class="nav-label">Coach</span>
            </div>
            <div class="nav-item" onclick="switchScreen('programs')">
                <svg class="nav-icon" fill="currentColor" viewBox="0 0 24 24">
                    <path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/>
                </svg>
                <span class="nav-label">Programs</span>
            </div>
        </div>
    </div>

    <div class="modal" id="program-modal">
        <div class="modal-content">
            <button class="close-modal" onclick="closeProgramModal()">✕</button>
            <h2 id="modal-title" style="margin-bottom: 20px; color: #1f2937;"></h2>
            <p id="modal-description" style="margin-bottom: 20px; color: #6b7280; line-height: 1.6;"></p>
            
            <h3 style="margin-bottom: 15px; color: #1f2937;">4-Week Breakdown</h3>
            <div id="modal-weeks" style="margin-bottom: 20px;"></div>
            
            <button style="width: 100%; padding: 15px; background: linear-gradient(135deg, #10b981, #14b8a6); color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer;">
                Start Program
            </button>
        </div>
    </div>

    <script>
        function switchScreen(screen) {
            document.querySelectorAll('.screen').forEach(s => s.classList.remove('active'));
            document.getElementById(screen + '-screen').classList.add('active');
            
            document.querySelectorAll('.nav-item').forEach(n => n.classList.remove('active'));
            event.currentTarget.classList.add('active');
        }

        function toggleBodyView(view) {
            const silhouette = document.getElementById('body-silhouette');
            silhouette.className = 'body-silhouette';
            
            document.querySelectorAll('.toggle-button').forEach(btn => btn.classList.remove('active'));
            event.currentTarget.classList.add('active');
            
            if (view !== 'normal') {
                silhouette.classList.add(view);
            }
        }

        function openProgramModal(programName) {
            const modal = document.getElementById('program-modal');
            const title = document.getElementById('modal-title');
            const description = document.getElementById('modal-description');
            const weeks = document.getElementById('modal-weeks');
            
            const programData = {
                'Metabolic Reset': {
                    description: 'Transform your metabolic health through targeted nutrition, exercise, and lifestyle interventions. This program focuses on improving insulin sensitivity and reducing visceral fat.',
                    weeks: [
                        'Week 1: Foundation - Establish baseline metrics, start low-carb nutrition',
                        'Week 2: Acceleration - Add HIIT workouts, monitor glucose',
                        'Week 3: Optimization - Fine-tune macros, increase activity',
                        'Week 4: Consolidation - Build sustainable habits'
                    ]
                },
                'Deep Sleep': {
                    description: 'Master the art of restorative sleep. Learn sleep hygiene techniques, optimize your environment, and develop a consistent sleep routine.',
                    weeks: [
                        'Week 1: Assessment - Track current sleep patterns',
                        'Week 2: Environment - Optimize bedroom setup',
                        'Week 3: Routine - Establish wind-down protocols',
                        'Week 4: Optimization - Fine-tune timing and quality'
                    ]
                },
                'Stress Reset': {
                    description: 'Reduce chronic stress and build resilience through mindfulness, breathwork, and recovery-focused lifestyle changes.',
                    weeks: [
                        'Week 1: Awareness - Identify stress triggers',
                        'Week 2: Techniques - Learn breathing and meditation',
                        'Week 3: Application - Integrate practices into daily life',
                        'Week 4: Maintenance - Build long-term resilience'
                    ]
                },
                'Muscle Gain': {
                    description: 'Build lean muscle mass through progressive resistance training, optimal nutrition, and strategic recovery periods.',
                    weeks: [
                        'Week 1: Foundation - Master compound movements',
                        'Week 2: Volume - Increase training intensity',
                        'Week 3: Strength - Focus on progressive overload',
                        'Week 4: Hypertrophy - Optimize for muscle growth'
                    ]
                },
                'Hormone Balance': {
                    description: 'Support hormonal health through cycle-aligned training, nutrition, and recovery strategies tailored for female physiology.',
                    weeks: [
                        'Week 1: Tracking - Understand your cycle patterns',
                        'Week 2: Follicular Phase - High-intensity focus',
                        'Week 3: Ovulation - Peak performance window',
                        'Week 4: Luteal Phase - Recovery and maintenance'
                    ]
                }
            };
            
            const program = programData[programName];
            title.textContent = programName;
            description.textContent = program.description;
            
            weeks.innerHTML = program.weeks.map((week, index) => 
                `<div style="padding: 10px; background: #f9fafb; border-radius: 8px; margin-bottom: 10px;">
                    <strong>${week}</strong>
                </div>`
            ).join('');
            
            modal.classList.add('active');
        }

        function closeProgramModal() {
            document.getElementById('program-modal').classList.remove('active');
        }

        function createBarChart(containerId, data, color) {
            const container = document.getElementById(containerId);
            if (!container) return;
            
            container.innerHTML = data.map(value => 
                `<div class="bar" style="height: ${value}%; background: ${color || 'linear-gradient(to top, #10b981, #14b8a6)'};"></div>`
            ).join('');
        }

        function createLineChart(containerId, data, color) {
            const container = document.getElementById(containerId);
            if (!container) return;
            
            const width = 100;
            const height = 100;
            const points = data.map((value, index) => {
                const x = (index / (data.length - 1)) * width;
                const y = height - (value / 100) * height;
                return `${x},${y}`;
            }).join(' ');
            
            container.innerHTML = `
                <svg viewBox="0 0 100 100">
                    <polyline
                        points="${points}"
                        fill="none"
                        stroke="${color || '#10b981'}"
                        stroke-width="2"
                    />
                    ${data.map((value, index) => {
                        const x = (index / (data.length - 1)) * width;
                        const y = height - (value / 100) * height;
                        return `<circle cx="${x}" cy="${y}" r="3" fill="${color || '#10b981'}"/>`;
                    }).join('')}
                </svg>
            `;
        }

        // Initialize charts
        window.addEventListener('load', () => {
            // Recovery chart
            createBarChart('recovery-chart', [65, 72, 78, 70, 82, 75, 78]);
            
            // Strain chart
            createBarChart('strain-chart', [8.2, 9.1, 7.8, 10.2, 8.9, 9.7, 9.4], 'linear-gradient(to top, #f59e0b, #f97316)');
            
            // Sleep chart
            createBarChart('sleep-chart', [6.5, 7.2, 8.1, 6.8, 7.5, 7.8, 7.4], 'linear-gradient(to top, #3b82f6, #6366f1)');
            
            // HRV line chart
            createLineChart('hrv-line-chart', [55, 58, 62, 60, 64, 61, 62]);
            
            // Strain line chart
            createLineChart('strain-line-chart', [82, 91, 78, 102, 89, 97, 94], '#f59e0b');
        });

        // Close modal on outside click
        document.getElementById('program-modal').addEventListener('click', (e) => {
            if (e.target.id === 'program-modal') {
                closeProgramModal();
            }
        });
    </script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>