CSNET commited on
Commit
b291c07
·
verified ·
1 Parent(s): 3dfed1b

ทำเว็บแอพ html5 หนึ่งหน้าที่มี Feature ใช้งานได้จริงทั้งหมดตามแอพ Whoop version ล่าสุด เอาหน้าจอทุกอย่างเหมือนเป๊ะเลยนะ

Browse files
Files changed (4) hide show
  1. README.md +8 -5
  2. index.html +530 -19
  3. script.js +369 -0
  4. style.css +179 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Whoopfit Tracker
3
- emoji: 🏢
4
- colorFrom: blue
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: WhoopFit Tracker 🏃‍♂️
3
+ colorFrom: red
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
index.html CHANGED
@@ -1,19 +1,530 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>WhoopFit Tracker - Your Health Performance</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
12
+ </head>
13
+ <body class="bg-gray-50 font-sans">
14
+ <!-- Main Container -->
15
+ <div class="max-w-md mx-auto bg-white min-h-screen relative">
16
+
17
+ <!-- Header -->
18
+ <header class="bg-white border-b border-gray-200 sticky top-0 z-50">
19
+ <div class="flex items-center justify-between p-4">
20
+ <div class="flex items-center space-x-3">
21
+ <div class="w-10 h-10 bg-emerald-500 rounded-full flex items-center justify-center">
22
+ <span class="text-white font-bold text-lg">W</span>
23
+ </div>
24
+ <div>
25
+ <h1 class="text-lg font-semibold text-gray-900">WhoopFit</h1>
26
+ <p class="text-xs text-gray-500">Member since 2024</p>
27
+ </div>
28
+ </div>
29
+ <div class="flex items-center space-x-3">
30
+ <button class="relative p-2 hover:bg-gray-100 rounded-lg transition">
31
+ <i data-feather="bell" class="w-5 h-5 text-gray-700"></i>
32
+ <span class="absolute top-1 right-1 w-2 h-2 bg-red-500 rounded-full"></span>
33
+ </button>
34
+ <button onclick="showProfile()" class="w-10 h-10 rounded-full overflow-hidden border-2 border-emerald-500">
35
+ <img src="http://static.photos/people/100x100/45" alt="Profile" class="w-full h-full object-cover">
36
+ </button>
37
+ </div>
38
+ </div>
39
+ </header>
40
+
41
+ <!-- Main Content Area -->
42
+ <main id="mainContent" class="pb-20">
43
+ <!-- Dashboard View -->
44
+ <div id="dashboardView" class="view">
45
+ <!-- Date Selector -->
46
+ <div class="bg-white px-4 py-3 flex items-center justify-between border-b border-gray-100">
47
+ <button class="p-1">
48
+ <i data-feather="chevron-left" class="w-5 h-5 text-gray-600"></i>
49
+ </button>
50
+ <div class="text-center">
51
+ <p class="text-sm font-medium text-gray-900">Today</p>
52
+ <p class="text-xs text-gray-500">December 15, 2024</p>
53
+ </div>
54
+ <button class="p-1">
55
+ <i data-feather="chevron-right" class="w-5 h-5 text-gray-600"></i>
56
+ </button>
57
+ </div>
58
+
59
+ <!-- Primary Metrics -->
60
+ <div class="p-4 space-y-4">
61
+ <!-- Recovery Score -->
62
+ <div class="bg-gradient-to-br from-emerald-50 to-emerald-100 rounded-2xl p-5 border border-emerald-200">
63
+ <div class="flex items-start justify-between mb-3">
64
+ <div>
65
+ <p class="text-sm font-medium text-emerald-900">Recovery</p>
66
+ <p class="text-3xl font-bold text-emerald-900 mt-1">78%</p>
67
+ </div>
68
+ <div class="bg-white rounded-full p-2">
69
+ <i data-feather="activity" class="w-6 h-6 text-emerald-600"></i>
70
+ </div>
71
+ </div>
72
+ <div class="flex items-center space-x-2 text-sm text-emerald-700">
73
+ <i data-feather="trending-up" class="w-4 h-4"></i>
74
+ <span>Good recovery</span>
75
+ </div>
76
+ <div class="mt-3 bg-white bg-opacity-60 rounded-full h-2 overflow-hidden">
77
+ <div class="bg-emerald-500 h-full rounded-full" style="width: 78%"></div>
78
+ </div>
79
+ </div>
80
+
81
+ <!-- Strain Score -->
82
+ <div class="bg-gradient-to-br from-yellow-50 to-yellow-100 rounded-2xl p-5 border border-yellow-200">
83
+ <div class="flex items-start justify-between mb-3">
84
+ <div>
85
+ <p class="text-sm font-medium text-yellow-900">Day Strain</p>
86
+ <p class="text-3xl font-bold text-yellow-900 mt-1">12.3</p>
87
+ </div>
88
+ <div class="bg-white rounded-full p-2">
89
+ <i data-feather="zap" class="w-6 h-6 text-yellow-600"></i>
90
+ </div>
91
+ </div>
92
+ <div class="flex items-center space-x-2 text-sm text-yellow-700">
93
+ <i data-feather="info" class="w-4 h-4"></i>
94
+ <span>Moderate intensity</span>
95
+ </div>
96
+ <div class="mt-3 bg-white bg-opacity-60 rounded-full h-2 overflow-hidden">
97
+ <div class="bg-yellow-500 h-full rounded-full" style="width: 41%"></div>
98
+ </div>
99
+ </div>
100
+
101
+ <!-- Sleep Score -->
102
+ <div class="bg-gradient-to-br from-indigo-50 to-indigo-100 rounded-2xl p-5 border border-indigo-200">
103
+ <div class="flex items-start justify-between mb-3">
104
+ <div>
105
+ <p class="text-sm font-medium text-indigo-900">Sleep Performance</p>
106
+ <p class="text-3xl font-bold text-indigo-900 mt-1">85%</p>
107
+ </div>
108
+ <div class="bg-white rounded-full p-2">
109
+ <i data-feather="moon" class="w-6 h-6 text-indigo-600"></i>
110
+ </div>
111
+ </div>
112
+ <div class="flex items-center space-x-2 text-sm text-indigo-700">
113
+ <i data-feather="clock" class="w-4 h-4"></i>
114
+ <span>7h 42m total</span>
115
+ </div>
116
+ <div class="mt-3 bg-white bg-opacity-60 rounded-full h-2 overflow-hidden">
117
+ <div class="bg-indigo-500 h-full rounded-full" style="width: 85%"></div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+
122
+ <!-- Quick Stats -->
123
+ <div class="px-4 pb-4">
124
+ <h3 class="text-sm font-semibold text-gray-700 mb-3">Today's Snapshot</h3>
125
+ <div class="grid grid-cols-2 gap-3">
126
+ <div class="bg-white border border-gray-200 rounded-xl p-3">
127
+ <div class="flex items-center space-x-2 mb-1">
128
+ <i data-feather="heart" class="w-4 h-4 text-red-500"></i>
129
+ <span class="text-xs text-gray-600">Resting HR</span>
130
+ </div>
131
+ <p class="text-xl font-bold text-gray-900">54 bpm</p>
132
+ </div>
133
+ <div class="bg-white border border-gray-200 rounded-xl p-3">
134
+ <div class="flex items-center space-x-2 mb-1">
135
+ <i data-feather="trending-up" class="w-4 h-4 text-emerald-500"></i>
136
+ <span class="text-xs text-gray-600">HRV</span>
137
+ </div>
138
+ <p class="text-xl font-bold text-gray-900">42 ms</p>
139
+ </div>
140
+ <div class="bg-white border border-gray-200 rounded-xl p-3">
141
+ <div class="flex items-center space-x-2 mb-1">
142
+ <i data-feather="thermometer" class="w-4 h-4 text-orange-500"></i>
143
+ <span class="text-xs text-gray-600">Skin Temp</span>
144
+ </div>
145
+ <p class="text-xl font-bold text-gray-900">98.2°F</p>
146
+ </div>
147
+ <div class="bg-white border border-gray-200 rounded-xl p-3">
148
+ <div class="flex items-center space-x-2 mb-1">
149
+ <i data-feather="wind" class="w-4 h-4 text-blue-500"></i>
150
+ <span class="text-xs text-gray-600">Resp Rate</span>
151
+ </div>
152
+ <p class="text-xl font-bold text-gray-900">14.2</p>
153
+ </div>
154
+ </div>
155
+ </div>
156
+
157
+ <!-- Journal Button -->
158
+ <div class="px-4 pb-4">
159
+ <button onclick="showJournal()" class="w-full bg-emerald-500 hover:bg-emerald-600 text-white font-medium py-3 px-4 rounded-xl flex items-center justify-center space-x-2 transition">
160
+ <i data-feather="edit-3" class="w-5 h-5"></i>
161
+ <span>Log Journal Entry</span>
162
+ </button>
163
+ </div>
164
+ </div>
165
+
166
+ <!-- Strain View -->
167
+ <div id="strainView" class="view hidden">
168
+ <div class="bg-white border-b border-gray-200 p-4">
169
+ <h2 class="text-xl font-bold text-gray-900 mb-1">Strain Analysis</h2>
170
+ <p class="text-sm text-gray-600">Today's cardiovascular load</p>
171
+ </div>
172
+
173
+ <div class="p-4">
174
+ <!-- Current Strain -->
175
+ <div class="bg-yellow-50 border border-yellow-200 rounded-2xl p-4 mb-4">
176
+ <div class="flex items-center justify-between mb-3">
177
+ <div>
178
+ <p class="text-sm text-yellow-700 font-medium">Current Strain</p>
179
+ <p class="text-4xl font-bold text-yellow-900">12.3</p>
180
+ </div>
181
+ <div class="relative w-24 h-24">
182
+ <canvas id="strainGauge"></canvas>
183
+ </div>
184
+ </div>
185
+ <p class="text-sm text-yellow-700">Moderate intensity workout day</p>
186
+ </div>
187
+
188
+ <!-- Hourly Strain Chart -->
189
+ <div class="bg-white border border-gray-200 rounded-xl p-4 mb-4">
190
+ <h3 class="text-sm font-semibold text-gray-700 mb-3">Hourly Strain</h3>
191
+ <canvas id="hourlyStrainChart" height="150"></canvas>
192
+ </div>
193
+
194
+ <!-- Activities -->
195
+ <div class="bg-white border border-gray-200 rounded-xl p-4">
196
+ <h3 class="text-sm font-semibold text-gray-700 mb-3">Detected Activities</h3>
197
+ <div class="space-y-3">
198
+ <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
199
+ <div class="flex items-center space-x-3">
200
+ <div class="w-10 h-10 bg-yellow-200 rounded-full flex items-center justify-center">
201
+ <i data-feather="target" class="w-5 h-5 text-yellow-700"></i>
202
+ </div>
203
+ <div>
204
+ <p class="font-medium text-gray-900">Running</p>
205
+ <p class="text-xs text-gray-500">7:30 AM - 8:15 AM</p>
206
+ </div>
207
+ </div>
208
+ <span class="text-lg font-bold text-yellow-600">6.8</span>
209
+ </div>
210
+ <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
211
+ <div class="flex items-center space-x-3">
212
+ <div class="w-10 h-10 bg-blue-200 rounded-full flex items-center justify-center">
213
+ <i data-feather="package" class="w-5 h-5 text-blue-700"></i>
214
+ </div>
215
+ <div>
216
+ <p class="font-medium text-gray-900">Weight Training</p>
217
+ <p class="text-xs text-gray-500">12:00 PM - 1:00 PM</p>
218
+ </div>
219
+ </div>
220
+ <span class="text-lg font-bold text-yellow-600">5.5</span>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+ </div>
226
+
227
+ <!-- Sleep View -->
228
+ <div id="sleepView" class="view hidden">
229
+ <div class="bg-white border-b border-gray-200 p-4">
230
+ <h2 class="text-xl font-bold text-gray-900 mb-1">Sleep Analysis</h2>
231
+ <p class="text-sm text-gray-600">Last night's performance</p>
232
+ </div>
233
+
234
+ <div class="p-4">
235
+ <!-- Sleep Score -->
236
+ <div class="bg-indigo-50 border border-indigo-200 rounded-2xl p-4 mb-4">
237
+ <div class="flex items-center justify-between mb-3">
238
+ <div>
239
+ <p class="text-sm text-indigo-700 font-medium">Sleep Performance</p>
240
+ <p class="text-4xl font-bold text-indigo-900">85%</p>
241
+ </div>
242
+ <div class="text-right">
243
+ <p class="text-sm text-indigo-700">Duration</p>
244
+ <p class="text-lg font-bold text-indigo-900">7h 42m</p>
245
+ </div>
246
+ </div>
247
+ </div>
248
+
249
+ <!-- Sleep Stages -->
250
+ <div class="bg-white border border-gray-200 rounded-xl p-4 mb-4">
251
+ <h3 class="text-sm font-semibold text-gray-700 mb-3">Sleep Stages</h3>
252
+ <canvas id="sleepStagesChart" height="150"></canvas>
253
+ <div class="mt-4 space-y-2">
254
+ <div class="flex items-center justify-between text-sm">
255
+ <div class="flex items-center space-x-2">
256
+ <div class="w-3 h-3 bg-purple-500 rounded-full"></div>
257
+ <span class="text-gray-700">Deep Sleep</span>
258
+ </div>
259
+ <span class="font-medium">1h 45m</span>
260
+ </div>
261
+ <div class="flex items-center justify-between text-sm">
262
+ <div class="flex items-center space-x-2">
263
+ <div class="w-3 h-3 bg-blue-400 rounded-full"></div>
264
+ <span class="text-gray-700">REM Sleep</span>
265
+ </div>
266
+ <span class="font-medium">1h 30m</span>
267
+ </div>
268
+ <div class="flex items-center justify-between text-sm">
269
+ <div class="flex items-center space-x-2">
270
+ <div class="w-3 h-3 bg-blue-200 rounded-full"></div>
271
+ <span class="text-gray-700">Light Sleep</span>
272
+ </div>
273
+ <span class="font-medium">4h 15m</span>
274
+ </div>
275
+ <div class="flex items-center justify-between text-sm">
276
+ <div class="flex items-center space-x-2">
277
+ <div class="w-3 h-3 bg-gray-300 rounded-full"></div>
278
+ <span class="text-gray-700">Awake</span>
279
+ </div>
280
+ <span class="font-medium">12m</span>
281
+ </div>
282
+ </div>
283
+ </div>
284
+
285
+ <!-- Sleep Metrics -->
286
+ <div class="grid grid-cols-2 gap-3">
287
+ <div class="bg-white border border-gray-200 rounded-xl p-3">
288
+ <div class="flex items-center space-x-2 mb-1">
289
+ <i data-feather="moon" class="w-4 h-4 text-indigo-500"></i>
290
+ <span class="text-xs text-gray-600">Sleep Debt</span>
291
+ </div>
292
+ <p class="text-xl font-bold text-gray-900">-18m</p>
293
+ </div>
294
+ <div class="bg-white border border-gray-200 rounded-xl p-3">
295
+ <div class="flex items-center space-x-2 mb-1">
296
+ <i data-feather="sun" class="w-4 h-4 text-orange-500"></i>
297
+ <span class="text-xs text-gray-600">Sleep Consistency</span>
298
+ </div>
299
+ <p class="text-xl font-bold text-gray-900">92%</p>
300
+ </div>
301
+ </div>
302
+ </div>
303
+ </div>
304
+
305
+ <!-- Recovery View -->
306
+ <div id="recoveryView" class="view hidden">
307
+ <div class="bg-white border-b border-gray-200 p-4">
308
+ <h2 class="text-xl font-bold text-gray-900 mb-1">Recovery Status</h2>
309
+ <p class="text-sm text-gray-600">Your body's readiness to perform</p>
310
+ </div>
311
+
312
+ <div class="p-4">
313
+ <!-- Recovery Score -->
314
+ <div class="bg-emerald-50 border border-emerald-200 rounded-2xl p-4 mb-4">
315
+ <div class="flex items-center justify-between mb-4">
316
+ <div>
317
+ <p class="text-5xl font-bold text-emerald-900">78%</p>
318
+ <p class="text-sm text-emerald-700 font-medium mt-1">Good Recovery</p>
319
+ </div>
320
+ <div class="w-28 h-28">
321
+ <canvas id="recoveryRing"></canvas>
322
+ </div>
323
+ </div>
324
+ </div>
325
+
326
+ <!-- Recovery Factors -->
327
+ <div class="bg-white border border-gray-200 rounded-xl p-4 mb-4">
328
+ <h3 class="text-sm font-semibold text-gray-700 mb-3">Key Factors</h3>
329
+ <div class="space-y-3">
330
+ <div>
331
+ <div class="flex justify-between text-sm mb-1">
332
+ <span class="text-gray-600">Heart Rate Variability</span>
333
+ <span class="font-medium">42 ms</span>
334
+ </div>
335
+ <div class="bg-gray-200 rounded-full h-2 overflow-hidden">
336
+ <div class="bg-emerald-500 h-full rounded-full" style="width: 85%"></div>
337
+ </div>
338
+ </div>
339
+ <div>
340
+ <div class="flex justify-between text-sm mb-1">
341
+ <span class="text-gray-600">Resting Heart Rate</span>
342
+ <span class="font-medium">54 bpm</span>
343
+ </div>
344
+ <div class="bg-gray-200 rounded-full h-2 overflow-hidden">
345
+ <div class="bg-emerald-500 h-full rounded-full" style="width: 90%"></div>
346
+ </div>
347
+ </div>
348
+ <div>
349
+ <div class="flex justify-between text-sm mb-1">
350
+ <span class="text-gray-600">Sleep Performance</span>
351
+ <span class="font-medium">85%</span>
352
+ </div>
353
+ <div class="bg-gray-200 rounded-full h-2 overflow-hidden">
354
+ <div class="bg-emerald-500 h-full rounded-full" style="width: 85%"></div>
355
+ </div>
356
+ </div>
357
+ <div>
358
+ <div class="flex justify-between text-sm mb-1">
359
+ <span class="text-gray-600">Respiratory Rate</span>
360
+ <span class="font-medium">14.2</span>
361
+ </div>
362
+ <div class="bg-gray-200 rounded-full h-2 overflow-hidden">
363
+ <div class="bg-emerald-500 h-full rounded-full" style="width: 75%"></div>
364
+ </div>
365
+ </div>
366
+ </div>
367
+ </div>
368
+
369
+ <!-- Recommendations -->
370
+ <div class="bg-blue-50 border border-blue-200 rounded-xl p-4">
371
+ <h3 class="text-sm font-semibold text-blue-900 mb-2">Recommendations</h3>
372
+ <ul class="space-y-2 text-sm text-blue-800">
373
+ <li class="flex items-start space-x-2">
374
+ <i data-feather="check-circle" class="w-4 h-4 mt-0.5 flex-shrink-0"></i>
375
+ <span>You're ready for moderate intensity training</span>
376
+ </li>
377
+ <li class="flex items-start space-x-2">
378
+ <i data-feather="check-circle" class="w-4 h-4 mt-0.5 flex-shrink-0"></i>
379
+ <span>Consider a light recovery session tomorrow</span>
380
+ </li>
381
+ <li class="flex items-start space-x-2">
382
+ <i data-feather="check-circle" class="w-4 h-4 mt-0.5 flex-shrink-0"></i>
383
+ <span>Stay hydrated and maintain your sleep schedule</span>
384
+ </li>
385
+ </ul>
386
+ </div>
387
+ </div>
388
+ </div>
389
+
390
+ <!-- Journal View -->
391
+ <div id="journalView" class="view hidden">
392
+ <div class="bg-white border-b border-gray-200 p-4">
393
+ <h2 class="text-xl font-bold text-gray-900 mb-1">Daily Journal</h2>
394
+ <p class="text-sm text-gray-600">Track factors affecting your performance</p>
395
+ </div>
396
+
397
+ <div class="p-4">
398
+ <form id="journalForm" class="space-y-4">
399
+ <!-- How Are You Feeling -->
400
+ <div>
401
+ <label class="text-sm font-semibold text-gray-700 block mb-2">How are you feeling?</label>
402
+ <div class="flex justify-between">
403
+ <button type="button" class="mood-btn" data-mood="1">😞</button>
404
+ <button type="button" class="mood-btn" data-mood="2">😕</button>
405
+ <button type="button" class="mood-btn" data-mood="3">😐</button>
406
+ <button type="button" class="mood-btn" data-mood="4">🙂</button>
407
+ <button type="button" class="mood-btn" data-mood="5">😄</button>
408
+ </div>
409
+ </div>
410
+
411
+ <!-- Energy Level -->
412
+ <div>
413
+ <label class="text-sm font-semibold text-gray-700 block mb-2">Energy Level</label>
414
+ <input type="range" id="energyLevel" min="1" max="10" value="7" class="w-full">
415
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
416
+ <span>Low</span>
417
+ <span id="energyValue" class="font-medium text-gray-700">7</span>
418
+ <span>High</span>
419
+ </div>
420
+ </div>
421
+
422
+ <!-- Stress Level -->
423
+ <div>
424
+ <label class="text-sm font-semibold text-gray-700 block mb-2">Stress Level</label>
425
+ <input type="range" id="stressLevel" min="1" max="10" value="3" class="w-full">
426
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
427
+ <span>Low</span>
428
+ <span id="stressValue" class="font-medium text-gray-700">3</span>
429
+ <span>High</span>
430
+ </div>
431
+ </div>
432
+
433
+ <!-- Activity Type -->
434
+ <div>
435
+ <label class="text-sm font-semibold text-gray-700 block mb-2">Planned Activities</label>
436
+ <div class="grid grid-cols-2 gap-2">
437
+ <label class="activity-label">
438
+ <input type="checkbox" class="activity-checkbox" value="running">
439
+ <span>🏃 Running</span>
440
+ </label>
441
+ <label class="activity-label">
442
+ <input type="checkbox" class="activity-checkbox" value="cycling">
443
+ <span>🚴 Cycling</span>
444
+ </label>
445
+ <label class="activity-label">
446
+ <input type="checkbox" class="activity-checkbox" value="swimming">
447
+ <span>🏊 Swimming</span>
448
+ </label>
449
+ <label class="activity-label">
450
+ <input type="checkbox" class="activity-checkbox" value="weights">
451
+ <span>🏋️ Weights</span>
452
+ </label>
453
+ <label class="activity-label">
454
+ <input type="checkbox" class="activity-checkbox" value="yoga">
455
+ <span>🧘 Yoga</span>
456
+ </label>
457
+ <label class="activity-label">
458
+ <input type="checkbox" class="activity-checkbox" value="rest">
459
+ <span>😴 Rest Day</span>
460
+ </label>
461
+ </div>
462
+ </div>
463
+
464
+ <!-- Nutrition -->
465
+ <div>
466
+ <label class="text-sm font-semibold text-gray-700 block mb-2">Nutrition</label>
467
+ <div class="space-y-2">
468
+ <label class="flex items-center space-x-2">
469
+ <input type="checkbox" class="nutrition-checkbox" value="caffeine">
470
+ <span class="text-sm text-gray-700">Had caffeine</span>
471
+ </label>
472
+ <label class="flex items-center space-x-2">
473
+ <input type="checkbox" class="nutrition-checkbox" value="alcohol">
474
+ <span class="text-sm text-gray-700">Had alcohol</span>
475
+ </label>
476
+ <label class="flex items-center space-x-2">
477
+ <input type="checkbox" class="nutrition-checkbox" value="balanced">
478
+ <span class="text-sm text-gray-700">Ate balanced meals</span>
479
+ </label>
480
+ </div>
481
+ </div>
482
+
483
+ <!-- Notes -->
484
+ <div>
485
+ <label class="text-sm font-semibold text-gray-700 block mb-2">Additional Notes</label>
486
+ <textarea id="journalNotes" rows="3" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500 text-sm" placeholder="How was your day? Any additional thoughts?"></textarea>
487
+ </div>
488
+
489
+ <!-- Submit Button -->
490
+ <button type="submit" class="w-full bg-emerald-500 hover:bg-emerald-600 text-white font-medium py-3 px-4 rounded-xl flex items-center justify-center space-x-2 transition">
491
+ <i data-feather="save" class="w-5 h-5"></i>
492
+ <span>Save Journal Entry</span>
493
+ </button>
494
+ </form>
495
+ </div>
496
+ </div>
497
+ </main>
498
+
499
+ <!-- Bottom Navigation -->
500
+ <nav class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 max-w-md mx-auto">
501
+ <div class="flex items-center justify-around py-2">
502
+ <button onclick="showView('dashboardView')" class="nav-btn active" data-view="dashboardView">
503
+ <i data-feather="home" class="w-5 h-5"></i>
504
+ <span class="text-xs mt-1">Home</span>
505
+ </button>
506
+ <button onclick="showView('strainView')" class="nav-btn" data-view="strainView">
507
+ <i data-feather="zap" class="w-5 h-5"></i>
508
+ <span class="text-xs mt-1">Strain</span>
509
+ </button>
510
+ <button onclick="showView('sleepView')" class="nav-btn" data-view="sleepView">
511
+ <i data-feather="moon" class="w-5 h-5"></i>
512
+ <span class="text-xs mt-1">Sleep</span>
513
+ </button>
514
+ <button onclick="showView('recoveryView')" class="nav-btn" data-view="recoveryView">
515
+ <i data-feather="activity" class="w-5 h-5"></i>
516
+ <span class="text-xs mt-1">Recovery</span>
517
+ </button>
518
+ <button onclick="showView('journalView')" class="nav-btn" data-view="journalView">
519
+ <i data-feather="edit-3" class="w-5 h-5"></i>
520
+ <span class="text-xs mt-1">Journal</span>
521
+ </button>
522
+ </div>
523
+ </nav>
524
+ </div>
525
+
526
+ <script src="script.js"></script>
527
+ <script>feather.replace();</script>
528
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
529
+ </body>
530
+ </html>
script.js ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Initialize app
2
+ let currentView = 'dashboardView';
3
+ let selectedMood = null;
4
+ let charts = {};
5
+
6
+ // View management
7
+ function showView(viewId) {
8
+ // Hide all views
9
+ document.querySelectorAll('.view').forEach(view => {
10
+ view.classList.add('hidden');
11
+ });
12
+
13
+ // Show selected view
14
+ document.getElementById(viewId).classList.remove('hidden');
15
+
16
+ // Update navigation
17
+ document.querySelectorAll('.nav-btn').forEach(btn => {
18
+ btn.classList.remove('active');
19
+ if (btn.dataset.view === viewId) {
20
+ btn.classList.add('active');
21
+ }
22
+ });
23
+
24
+ currentView = viewId;
25
+
26
+ // Initialize charts for specific views
27
+ if (viewId === 'strainView') {
28
+ initializeStrainCharts();
29
+ } else if (viewId === 'sleepView') {
30
+ initializeSleepCharts();
31
+ } else if (viewId === 'recoveryView') {
32
+ initializeRecoveryChart();
33
+ }
34
+
35
+ // Re-initialize feather icons
36
+ feather.replace();
37
+ }
38
+
39
+ function showJournal() {
40
+ showView('journalView');
41
+ }
42
+
43
+ function showProfile() {
44
+ // Placeholder for profile modal
45
+ alert('Profile feature coming soon!');
46
+ }
47
+
48
+ // Initialize charts
49
+ function initializeStrainCharts() {
50
+ // Strain Gauge
51
+ const strainGaugeCtx = document.getElementById('strainGauge');
52
+ if (strainGaugeCtx && !charts.strainGauge) {
53
+ charts.strainGauge = new Chart(strainGaugeCtx, {
54
+ type: 'doughnut',
55
+ data: {
56
+ datasets: [{
57
+ data: [41, 59],
58
+ backgroundColor: ['#eab308', '#fef3c7'],
59
+ borderWidth: 0
60
+ }]
61
+ },
62
+ options: {
63
+ responsive: true,
64
+ maintainAspectRatio: false,
65
+ cutout: '70%',
66
+ plugins: {
67
+ legend: { display: false },
68
+ tooltip: { enabled: false }
69
+ }
70
+ }
71
+ });
72
+ }
73
+
74
+ // Hourly Strain Chart
75
+ const hourlyStrainCtx = document.getElementById('hourlyStrainChart');
76
+ if (hourlyStrainCtx && !charts.hourlyStrain) {
77
+ const hours = Array.from({length: 24}, (_, i) => `${i}:00`);
78
+ const strainData = [
79
+ 2, 2, 1, 1, 2, 3, 8, 12, 5, 4, 3, 5, 8, 6, 4, 3, 4, 7, 3, 2, 2, 2, 1, 1
80
+ ];
81
+
82
+ charts.hourlyStrain = new Chart(hourlyStrainCtx, {
83
+ type: 'line',
84
+ data: {
85
+ labels: hours,
86
+ datasets: [{
87
+ label: 'Strain',
88
+ data: strainData,
89
+ borderColor: '#eab308',
90
+ backgroundColor: 'rgba(234, 179, 8, 0.1)',
91
+ fill: true,
92
+ tension: 0.4,
93
+ pointRadius: 2,
94
+ pointHoverRadius: 4
95
+ }]
96
+ },
97
+ options: {
98
+ responsive: true,
99
+ maintainAspectRatio: false,
100
+ scales: {
101
+ y: {
102
+ beginAtZero: true,
103
+ max: 21,
104
+ grid: {
105
+ color: 'rgba(0, 0, 0, 0.05)'
106
+ }
107
+ },
108
+ x: {
109
+ grid: {
110
+ display: false
111
+ }
112
+ }
113
+ },
114
+ plugins: {
115
+ legend: { display: false }
116
+ }
117
+ }
118
+ });
119
+ }
120
+ }
121
+
122
+ function initializeSleepCharts() {
123
+ // Sleep Stages Chart
124
+ const sleepStagesCtx = document.getElementById('sleepStagesChart');
125
+ if (sleepStagesCtx && !charts.sleepStages) {
126
+ const timeLabels = Array.from({length: 24}, (_, i) => {
127
+ const hour = i < 10 ? `0${i}:00` : `${i}:00`;
128
+ return hour;
129
+ });
130
+
131
+ const sleepData = timeLabels.map((_, i) => {
132
+ if (i < 22 || i > 23) return 0;
133
+ if (i === 22) return 2;
134
+ if (i === 23) return 3;
135
+ return i % 4 + 1;
136
+ });
137
+
138
+ charts.sleepStages = new Chart(sleepStagesCtx, {
139
+ type: 'bar',
140
+ data: {
141
+ labels: timeLabels,
142
+ datasets: [{
143
+ label: 'Sleep Stage',
144
+ data: sleepData,
145
+ backgroundColor: sleepData.map(value => {
146
+ if (value === 0) return '#e5e7eb';
147
+ if (value === 1) return '#ddd6fe';
148
+ if (value === 2) return '#93c5fd';
149
+ if (value === 3) return '#60a5fa';
150
+ return '#8b5cf6';
151
+ }),
152
+ borderWidth: 0
153
+ }]
154
+ },
155
+ options: {
156
+ responsive: true,
157
+ maintainAspectRatio: false,
158
+ scales: {
159
+ y: {
160
+ display: false,
161
+ max: 4
162
+ },
163
+ x: {
164
+ ticks: {
165
+ maxTicksLimit: 12
166
+ },
167
+ grid: {
168
+ display: false
169
+ }
170
+ }
171
+ },
172
+ plugins: {
173
+ legend: { display: false },
174
+ tooltip: {
175
+ callbacks: {
176
+ label: function(context) {
177
+ const stages = ['', 'Light Sleep', 'Deep Sleep', 'REM Sleep', 'Awake'];
178
+ return stages[context.parsed.y] || 'Awake';
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ });
185
+ }
186
+ }
187
+
188
+ function initializeRecoveryChart() {
189
+ // Recovery Ring Chart
190
+ const recoveryRingCtx = document.getElementById('recoveryRing');
191
+ if (recoveryRingCtx && !charts.recoveryRing) {
192
+ charts.recoveryRing = new Chart(recoveryRingCtx, {
193
+ type: 'doughnut',
194
+ data: {
195
+ datasets: [{
196
+ data: [78, 22],
197
+ backgroundColor: ['#10b981', '#d1fae5'],
198
+ borderWidth: 0
199
+ }]
200
+ },
201
+ options: {
202
+ responsive: true,
203
+ maintainAspectRatio: false,
204
+ cutout: '75%',
205
+ plugins: {
206
+ legend: { display: false },
207
+ tooltip: { enabled: false }
208
+ }
209
+ }
210
+ });
211
+ }
212
+ }
213
+
214
+ // Journal functionality
215
+ document.addEventListener('DOMContentLoaded', function() {
216
+ // Mood buttons
217
+ document.querySelectorAll('.mood-btn').forEach(btn => {
218
+ btn.addEventListener('click', function() {
219
+ document.querySelectorAll('.mood-btn').forEach(b => b.classList.remove('selected'));
220
+ this.classList.add('selected');
221
+ selectedMood = parseInt(this.dataset.mood);
222
+ });
223
+ });
224
+
225
+ // Energy slider
226
+ const energySlider = document.getElementById('energyLevel');
227
+ const energyValue = document.getElementById('energyValue');
228
+ if (energySlider && energyValue) {
229
+ energySlider.addEventListener('input', function() {
230
+ energyValue.textContent = this.value;
231
+ });
232
+ }
233
+
234
+ // Stress slider
235
+ const stressSlider = document.getElementById('stressLevel');
236
+ const stressValue = document.getElementById('stressValue');
237
+ if (stressSlider && stressValue) {
238
+ stressSlider.addEventListener('input', function() {
239
+ stressValue.textContent = this.value;
240
+ });
241
+ }
242
+
243
+ // Journal form submission
244
+ const journalForm = document.getElementById('journalForm');
245
+ if (journalForm) {
246
+ journalForm.addEventListener('submit', function(e) {
247
+ e.preventDefault();
248
+
249
+ const formData = {
250
+ mood: selectedMood,
251
+ energy: document.getElementById('energyLevel').value,
252
+ stress: document.getElementById('stressLevel').value,
253
+ activities: Array.from(document.querySelectorAll('.activity-checkbox:checked')).map(cb => cb.value),
254
+ nutrition: Array.from(document.querySelectorAll('.nutrition-checkbox:checked')).map(cb => cb.value),
255
+ notes: document.getElementById('journalNotes').value,
256
+ timestamp: new Date().toISOString()
257
+ };
258
+
259
+ // Save to localStorage (in real app, would send to server)
260
+ let journalEntries = JSON.parse(localStorage.getItem('journalEntries') || '[]');
261
+ journalEntries.push(formData);
262
+ localStorage.setItem('journalEntries', JSON.stringify(journalEntries));
263
+
264
+ // Show success message
265
+ showNotification('Journal entry saved successfully!');
266
+
267
+ // Reset form
268
+ journalForm.reset();
269
+ document.querySelectorAll('.mood-btn').forEach(b => b.classList.remove('selected'));
270
+ selectedMood = null;
271
+
272
+ // Go back to dashboard after a short delay
273
+ setTimeout(() => showView('dashboardView'), 1500);
274
+ });
275
+ }
276
+ });
277
+
278
+ // Notification system
279
+ function showNotification(message, type = 'success') {
280
+ const notification = document.createElement('div');
281
+ notification.className = `fixed top-20 left-4 right-4 max-w-md mx-auto px-4 py-3 rounded-lg shadow-lg z-50 transform transition-all duration-300 ${
282
+ type === 'success' ? 'bg-emerald-500 text-white' : 'bg-red-500 text-white'
283
+ }`;
284
+ notification.innerHTML = `
285
+ <div class="flex items-center space-x-2">
286
+ <i data-feather="${type === 'success' ? 'check-circle' : 'alert-circle'}" class="w-5 h-5"></i>
287
+ <span>${message}</span>
288
+ </div>
289
+ `;
290
+
291
+ document.body.appendChild(notification);
292
+ feather.replace();
293
+
294
+ // Animate in
295
+ setTimeout(() => {
296
+ notification.classList.add('translate-y-0');
297
+ }, 100);
298
+
299
+ // Remove after 3 seconds
300
+ setTimeout(() => {
301
+ notification.classList.add('translate-y-full', 'opacity-0');
302
+ setTimeout(() => notification.remove(), 300);
303
+ }, 3000);
304
+ }
305
+
306
+ // Simulate real-time data updates
307
+ function updateMetrics() {
308
+ // Update heart rate with slight variation
309
+ const heartRateElements = document.querySelectorAll('[data-metric="heart-rate"]');
310
+ heartRateElements.forEach(el => {
311
+ const currentRate = parseInt(el.textContent);
312
+ const variation = Math.floor(Math.random() * 3) - 1;
313
+ const newRate = Math.max(50, Math.min(60, currentRate + variation));
314
+ el.textContent = newRate + ' bpm';
315
+ });
316
+ }
317
+
318
+ // Initialize app on load
319
+ window.addEventListener('load', function() {
320
+ showView('dashboardView');
321
+
322
+ // Update metrics every 30 seconds
323
+ setInterval(updateMetrics, 30000);
324
+ });
325
+
326
+ // Handle page visibility changes
327
+ document.addEventListener('visibilitychange', function() {
328
+ if (!document.hidden) {
329
+ // Refresh data when page becomes visible again
330
+ if (currentView === 'strainView') {
331
+ initializeStrainCharts();
332
+ } else if (currentView === 'sleepView') {
333
+ initializeSleepCharts();
334
+ } else if (currentView === 'recoveryView') {
335
+ initializeRecoveryChart();
336
+ }
337
+ }
338
+ });
339
+
340
+ // Touch gestures for mobile
341
+ let touchStartX = 0;
342
+ let touchEndX = 0;
343
+
344
+ document.addEventListener('touchstart', function(e) {
345
+ touchStartX = e.changedTouches[0].screenX;
346
+ });
347
+
348
+ document.addEventListener('touchend', function(e) {
349
+ touchEndX = e.changedTouches[0].screenX;
350
+ handleSwipe();
351
+ });
352
+
353
+ function handleSwipe() {
354
+ const swipeThreshold = 50;
355
+ const diff = touchStartX - touchEndX;
356
+
357
+ if (Math.abs(diff) > swipeThreshold) {
358
+ const views = ['dashboardView', 'strainView', 'sleepView', 'recoveryView', 'journalView'];
359
+ const currentIndex = views.indexOf(currentView);
360
+
361
+ if (diff > 0 && currentIndex < views.length - 1) {
362
+ // Swipe left - next view
363
+ showView(views[currentIndex + 1]);
364
+ } else if (diff < 0 && currentIndex > 0) {
365
+ // Swipe right - previous view
366
+ showView(views[currentIndex - 1]);
367
+ }
368
+ }
369
+ }
style.css CHANGED
@@ -1,28 +1,188 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Custom Styles */
2
+ .nav-btn {
3
+ @apply flex flex-col items-center justify-center p-2 text-gray-500 hover:text-emerald-600 transition-colors rounded-lg;
4
  }
5
 
6
+ .nav-btn.active {
7
+ @apply text-emerald-600 bg-emerald-50;
 
8
  }
9
 
10
+ .view {
11
+ @apply min-h-screen;
 
 
 
12
  }
13
 
14
+ .mood-btn {
15
+ @apply text-3xl p-2 rounded-lg hover:bg-gray-100 transition-all;
 
 
 
 
16
  }
17
 
18
+ .mood-btn.selected {
19
+ @apply bg-emerald-100 ring-2 ring-emerald-500 transform scale-110;
20
  }
21
+
22
+ .activity-label {
23
+ @apply flex items-center space-x-2 p-2 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-50 transition;
24
+ }
25
+
26
+ .activity-label input:checked + span {
27
+ @apply text-emerald-600 font-medium;
28
+ }
29
+
30
+ .activity-label input:checked ~ span {
31
+ @apply text-emerald-600;
32
+ }
33
+
34
+ .activity-checkbox, .nutrition-checkbox {
35
+ @apply rounded text-emerald-600 focus:ring-emerald-500;
36
+ }
37
+
38
+ input[type="range"] {
39
+ @apply w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer;
40
+ }
41
+
42
+ input[type="range"]::-webkit-slider-thumb {
43
+ @apply appearance-none w-5 h-5 bg-emerald-500 rounded-full cursor-pointer;
44
+ }
45
+
46
+ input[type="range"]::-moz-range-thumb {
47
+ @apply w-5 h-5 bg-emerald-500 rounded-full cursor-pointer border-0;
48
+ }
49
+
50
+ /* Chart containers */
51
+ canvas {
52
+ max-width: 100%;
53
+ height: auto !important;
54
+ }
55
+
56
+ /* Animations */
57
+ @keyframes slideIn {
58
+ from {
59
+ transform: translateX(100%);
60
+ opacity: 0;
61
+ }
62
+ to {
63
+ transform: translateX(0);
64
+ opacity: 1;
65
+ }
66
+ }
67
+
68
+ .view {
69
+ animation: slideIn 0.3s ease-out;
70
+ }
71
+
72
+ /* Custom scrollbar */
73
+ ::-webkit-scrollbar {
74
+ width: 6px;
75
+ }
76
+
77
+ ::-webkit-scrollbar-track {
78
+ background: #f1f1f1;
79
+ }
80
+
81
+ ::-webkit-scrollbar-thumb {
82
+ background: #10b981;
83
+ border-radius: 3px;
84
+ }
85
+
86
+ ::-webkit-scrollbar-thumb:hover {
87
+ background: #059669;
88
+ }
89
+
90
+ /* Loading animation */
91
+ @keyframes pulse {
92
+ 0%, 100% {
93
+ opacity: 1;
94
+ }
95
+ 50% {
96
+ opacity: 0.5;
97
+ }
98
+ }
99
+
100
+ .loading {
101
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
102
+ }
103
+
104
+ /* Notification badge */
105
+ .notification-badge {
106
+ @apply absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full;
107
+ }
108
+
109
+ /* Card hover effects */
110
+ .hover-lift {
111
+ transition: transform 0.2s, box-shadow 0.2s;
112
+ }
113
+
114
+ .hover-lift:hover {
115
+ transform: translateY(-2px);
116
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
117
+ }
118
+
119
+ /* Gradient text */
120
+ .gradient-text {
121
+ background: linear-gradient(135deg, #10b981 0%, #eab308 100%);
122
+ -webkit-background-clip: text;
123
+ -webkit-text-fill-color: transparent;
124
+ background-clip: text;
125
+ }
126
+
127
+ /* Glass effect */
128
+ .glass {
129
+ background: rgba(255, 255, 255, 0.95);
130
+ backdrop-filter: blur(10px);
131
+ -webkit-backdrop-filter: blur(10px);
132
+ }
133
+
134
+ /* Focus states */
135
+ .focus-ring:focus {
136
+ @apply ring-2 ring-emerald-500 ring-offset-2 outline-none;
137
+ }
138
+
139
+ /* Status indicators */
140
+ .status-green {
141
+ @apply bg-emerald-100 text-emerald-800 border-emerald-200;
142
+ }
143
+
144
+ .status-yellow {
145
+ @apply bg-yellow-100 text-yellow-800 border-yellow-200;
146
+ }
147
+
148
+ .status-red {
149
+ @apply bg-red-100 text-red-800 border-red-200;
150
+ }
151
+
152
+ /* Metric cards */
153
+ .metric-card {
154
+ @apply bg-white border border-gray-200 rounded-xl p-4 hover:shadow-md transition-shadow;
155
+ }
156
+
157
+ .metric-value {
158
+ @apply text-2xl font-bold text-gray-900;
159
+ }
160
+
161
+ .metric-label {
162
+ @apply text-sm text-gray-600;
163
+ }
164
+
165
+ .metric-change {
166
+ @apply text-xs font-medium flex items-center space-x-1;
167
+ }
168
+
169
+ .metric-change.positive {
170
+ @apply text-emerald-600;
171
+ }
172
+
173
+ .metric-change.negative {
174
+ @apply text-red-600;
175
+ }
176
+
177
+ /* Responsive adjustments */
178
+ @media (max-width: 380px) {
179
+ .text-3xl {
180
+ @apply text-2xl;
181
+ }
182
+ .text-4xl {
183
+ @apply text-3xl;
184
+ }
185
+ .text-5xl {
186
+ @apply text-4xl;
187
+ }
188
+ }