function updateCounter() {
    const textarea = document.getElementById("textarea");
    const counter = document.getElementById("charCounter");
    counter.textContent = `${textarea.value.length}/500`;
}
