const Toast = { _container: null, _init() { if (this._container) return; this._container = document.createElement('div'); this._container.className = 'toast-container'; document.body.appendChild(this._container); }, show(message, type = 'info', duration = 3000) { this._init(); const toast = document.createElement('div'); toast.className = `toast ${type}`; toast.textContent = message; this._container.appendChild(toast); setTimeout(() => { toast.style.opacity = '0'; toast.style.transform = 'translateX(100%)'; toast.style.transition = 'all 0.3s ease'; setTimeout(() => toast.remove(), 300); }, duration); } }; window.Toast = Toast;