vitality-tracker-pro / index.html
CSNET's picture
Create a complete mobile-style HTML5 web app demo in a SINGLE FILE (HTML + CSS + JS inline, no external libraries, no CDN, no images except inline SVG).
db38bd0 verified
Raw History Blame Contribute Delete
47.3 kB
<!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>
<!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;