t reader = new FileReader();
        reader.onload = (e) => {
          originalSrc = e.target.result;
          updateImage();
        };
        reader.readAsDataURL(file);
      } else {
        alert('Please select an image file.');
      }
    });

    // Drag and drop handlers
    dropzone.addEventListener('dragover', (e) => {
      e.preventDefault();
      dropzone.classList.add('dragover');
    });

    dropzone.addEventListener('dragleave', () => {
      dropzone.classList.remove('dragover');
    