DermaScan Pro – AI Skin Analysis
Step 1: Capture Your Face
Ready to Scan
Position face in frame with good lighting
Analyzing Your Skin…
Processing skin analysis…
Analysis Results
Skin Health Score
85%
Combination Skin
Estimated Age: 25-30 years
Personalized Solutions
Disclaimer: This is an AI-based educational tool. Consult a dermatologist for medical advice.
`).join(''); // Generate solutions displaySolutions(results); } function displaySolutions(results) { const solutionsContainer = document.getElementById('solutionsContainer'); const isChildMode = results.mode === 'child'; const solutions = isChildMode ? [ { title: "Gentle Care Routine", items: [ "Use hypoallergenic, fragrance-free products", "Apply moisturizer immediately after bathing", "Use mineral sunscreen SPF 30+ daily", "Avoid harsh soaps and hot water" ] }, { title: "Protection Tips", items: [ "Dress in soft, breathable cotton clothing", "Keep nails short to prevent scratching", "Use humidifier in dry environments", "Avoid known irritants and allergens" ] } ] : [ { title: "Treatment Plan", items: [ "Salicylic acid cleanser twice daily", "Retinol serum 2-3 times weekly", "Vitamin C serum every morning", "SPF 50+ sunscreen daily" ] }, { title: "Lifestyle Recommendations", items: [ "Drink 8-10 glasses of water daily", "Balanced diet rich in antioxidants", "7-8 hours of quality sleep", "Stress management techniques" ] } ]; solutionsContainer.innerHTML = solutions.map(category => `
${category.title}
${category.items.map(item => `- ${item}
`).join('')}
`).join(''); } function showStep(stepNumber) { // Hide all steps document.querySelectorAll('.step').forEach(step => { step.classList.remove('active'); }); // Show current step document.getElementById(`step${stepNumber}`).classList.add('active'); currentStep = stepNumber; } function resetToStep1() { // Reset everything if (stream) { stream.getTracks().forEach(track => track.stop()); } capturedImage = null; fileInput.value = ''; previewContainer.style.display = 'none'; document.getElementById('cameraPlaceholder').style.display = 'block'; video.style.display = 'none'; startCameraBtn.innerHTML = '
Start Camera'; startCameraBtn.style.background = ''; captureBtn.disabled = true; showStep(1); } });