ById('previewText');
    const downloadBtn = document.getElementById('downloadBtn');
    const copyBtn = document.getElementById('copyBtn');
    
    let originalSrc;
    let optimizedSrc;
    let isShowingOriginal = false;
    let isPressed = false;

    // File input handlers
    dropzone.addEventListener('click', () => {
      fileInput.click();
    });

    fileInput.addEventListener('change', () => {
      const file = fileInput.files[0];
      if (file && file.type.startsWith('image/')) {
        cons