     const file = e.target.files[0];
      if (file) {
        fileName.textContent = file.name;
        fileSize.textContent = formatBytes(file.size);
        fileInfo.classList.remove('hidden');
        uploadButton.disabled = false;
        // Reset any previous success messages when a new file is selected
        successMessage.classList.add('hidden');
        progressSection.classList.add('hidden');
        buttonText.textContent = 'Upload File';
      } else {
        fileInfo.classList.add('hidden');