let startTime = null;
let correctGuesses = 0;
let wrongGuesses = 0;

function startStats() {
    startTime = Date.now();
    updateStats();
    setInterval(updateStats, 1000);
}

function updateStats() {
    const elapsed = Math.floor((Date.now() - startTime) / 1000);
    const minutes = String(Math.floor(elapsed / 60)).padStart(2, '0');
    const seconds = String(elapsed % 60).padStart(2, '0');
    document.getElementById('timer').textContent = `⏱️ ${minutes}:${seconds}`;
    document.getElementById('score').textContent = `✅ ${correctGuesses} | ❌ ${wrongGuesses}`;
}

function incrementCorrect() {
    correctGuesses++;
    updateStats();
}

function incrementWrong() {
    wrongGuesses++;
    updateStats();
}

