t for HTTP contexts
    function copyToClipboard(text, callback) {
      // Modern clipboard API (requires HTTPS or localhost)
      if (navigator.clipboard && window.isSecureContext) {
        navigator.clipboard.writeText(text).then(() => {
          if (callback) callback(true);
        }).catch(err => {
          console.warn('Clipboard API failed, trying fallback:', err);
          fallbackCopy(text, callback);
        });
      } else {
        // Fallback for HTTP contexts
        fallbackCopy(text, 