Changed around line 1
+ const secretInput = document.getElementById('secret-input');
+ const fireBtn = document.getElementById('fire-btn');
+ const codeSection = document.getElementById('code-section');
+ const codeDisplay = document.getElementById('code-display');
+ const copyBtn = document.getElementById('copy-btn');
+
+ fireBtn.addEventListener('click', () => {
+ const secret = secretInput.value.trim();
+
+ if (secret) {
+ // Generate unique code
+ const code = generateUniqueCode();
+
+ // Display code section
+ codeDisplay.textContent = code;
+ codeSection.classList.remove('hidden');
+
+ // Clear input
+ secretInput.value = '';
+
+ // Simulate burning effect
+ setTimeout(() => {
+ secretInput.style.transition = 'opacity 1s';
+ secretInput.style.opacity = '0';
+ setTimeout(() => {
+ secretInput.style.opacity = '1';
+ }, 1000);
+ }, 500);
+ }
+ });
+
+ copyBtn.addEventListener('click', () => {
+ const code = codeDisplay.textContent;
+ navigator.clipboard.writeText(code)
+ .then(() => {
+ copyBtn.textContent = '✅ Copied!';
+ setTimeout(() => {
+ copyBtn.textContent = '📋 Copy Code';
+ }, 2000);
+ });
+ });
+
+ function generateUniqueCode() {
+ const timestamp = Date.now().toString(36);
+ const random = Math.random().toString(36).substr(2, 5);
+ return `${timestamp}-${random}`.toUpperCase();
+ }