function handleSubmit(event) {
event.preventDefault();
const form = event.target;
const doshaScores = { vata: 0, pitta: 0, kapha: 0 };
for (let i = 1; i <= 10; i++) {
const answer = form['q' + i].value;
doshaScores[answer]++;
}
const maxScore = Math.max(...Object.values(doshaScores));
const topDoshas = Object.keys(doshaScores).filter(d => doshaScores[d] === maxScore);
const finalDosha = topDoshas.join('/').toUpperCase();
document.getElementById('doshaResult').value = finalDosha;
const resultDiv = document.getElementById('quizResult');
const doshaDescriptions = {
VATA: "Energetic, creative, and quick-moving. Balance Vata with grounding routines, warm nourishing foods, and calming practices.",
PITTA: "Focused, driven, and fiery. Support Pitta with cooling foods, stress management, and work-life balance.",
KAPHA: "Grounded, calm, and strong. Stimulate Kapha with movement, light food, and new challenges.",
"VATA/PITTA": "You have a mix of Vata and Pitta qualities: creative energy with strong focus. Balance is key.",
"VATA/KAPHA": "You have a mix of Vata and Kapha: dynamic yet grounded. Focus on adapting routines.",
"PITTA/KAPHA": "You have a mix of Pitta and Kapha: driven but steady. Support with balanced diet and exercise.",
"VATA/PITTA/KAPHA": "You have a balanced tri-dosha constitution."
};
resultDiv.style.display = 'block';
resultDiv.innerHTML = `