// ============================================ // BUNNY RECKLESS โ Warren Explorer Scripts // ============================================ // Initialize Lucide Icons document.addEventListener('DOMContentLoaded', () => { lucide.createIcons(); initParticles(); initSplash(); initDoNotPress(); initCopyCode(); initTarot(); }); // ---- Splash Screen ---- function initSplash() { const splash = document.getElementById('splash'); const enterBtn = document.getElementById('enter-btn'); const mainContent = document.getElementById('main-content'); enterBtn.addEventListener('click', () => { splash.style.opacity = '0'; splash.style.transform = 'scale(1.1)'; splash.style.filter = 'blur(10px)'; setTimeout(() => { splash.style.display = 'none'; mainContent.style.opacity = '1'; }, 600); }); } // ---- Discovery System ---- const discovered = new Set(); const ROOMS = ['burrow', 'network', 'studio', 'lab', 'coven']; const ROOM_NAMES = { burrow: 'The Burrow', network: 'The Network', studio: 'The Studio', lab: 'The Lab', coven: 'The Coven', vault: 'The Vault ๐' }; const ROOM_COLORS = { burrow: '#ff2d95', network: '#00e5ff', studio: '#b44dff', lab: '#22c55e', coven: '#eab308', vault: '#ef4444' }; const ROOM_ICONS = { burrow: '๐ ', network: '๐', studio: '๐จ', lab: '๐งช', coven: 'โจ', vault: '๐' }; function toggleRoom(roomId) { const content = document.getElementById(`content-${roomId}`); const door = document.querySelector(`.room-door[data-room="${roomId}"]`); const chevron = door.querySelector('.door-chevron'); if (content.classList.contains('open')) { // Close content.classList.remove('open'); door.classList.remove('opened'); chevron.classList.remove('rotated'); } else { // Open content.classList.add('open'); door.classList.add('opened'); chevron.classList.add('rotated'); // Track discovery if (!discovered.has(roomId)) { discovered.add(roomId); updateProgress(); showToast(`Discovered ${ROOM_NAMES[roomId]}!`, ROOM_COLORS[roomId], ROOM_ICONS[roomId]); // Check if all rooms discovered if (discovered.size === ROOMS.length) { setTimeout(() => { unlockVault(); }, 1500); } } // Scroll to room setTimeout(() => { document.getElementById(`room-${roomId}`).scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 200); } } function updateProgress() { const count = discovered.size; document.getElementById('discovered-count').textContent = count; // Update progress fill const percentage = (count / ROOMS.length) * 100; document.getElementById('progress-fill').style.width = `${percentage}%`; // Update dots discovered.forEach(room => { const dot = document.querySelector(`.progress-dot[data-room="${room}"]`); if (dot) dot.classList.add('discovered'); }); } function unlockVault() { const vault = document.getElementById('room-vault'); vault.classList.remove('hidden'); vault.classList.add('reveal-animate'); // Update vault dot const vaultDot = document.querySelector('.progress-dot.secret'); if (vaultDot) vaultDot.classList.add('discovered'); // Flash effect document.body.classList.add('flash-effect'); setTimeout(() => document.body.classList.remove('flash-effect'), 1000); showToast('SECRET ROOM UNLOCKED! ๐', '#ef4444', '๐'); // Initialize tarot cards setTimeout(() => { initTarot(); }, 100); // Scroll to vault setTimeout(() => { vault.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 800); } // ---- Toast System ---- function showToast(message, color = '#ff2d95', icon = 'โจ') { const container = document.getElementById('toast-container'); const toast = document.createElement('div'); toast.className = 'toast'; toast.innerHTML = ` ${icon} ${message} `; toast.style.borderLeftColor = color; toast.style.borderLeftWidth = '3px'; container.appendChild(toast); setTimeout(() => { toast.classList.add('toast-exit'); setTimeout(() => toast.remove(), 300); }, 3000); } // ---- DO NOT PRESS Button ---- function initDoNotPress() { const btn = document.getElementById('do-not-press-btn'); if (!btn) return; btn.addEventListener('click', (e) => { e.preventDefault(); // If vault already visible, just scroll const vault = document.getElementById('room-vault'); if (!vault.classList.contains('hidden')) { vault.scrollIntoView({ behavior: 'smooth' }); return; } // Open the lab room first if not open const labContent = document.getElementById('content-lab'); if (!labContent.classList.contains('open')) { toggleRoom('lab'); } // Unlock vault setTimeout(() => { unlockVault(); }, 500); }); } // ---- Copy Discount Code ---- function initCopyCode() { const btn = document.getElementById('copy-code-btn'); if (!btn) return; btn.addEventListener('click', () => { navigator.clipboard.writeText('BITEBACK').then(() => { const span = btn.querySelector('span'); const originalText = span.textContent; span.textContent = 'Copied!'; btn.style.borderColor = 'rgba(255, 45, 149, 0.6)'; setTimeout(() => { span.textContent = originalText; btn.style.borderColor = ''; }, 2000); showToast('Discount code copied! ๐', '#ff2d95', '๐'); }).catch(() => { // Fallback for older browsers const textArea = document.createElement('textarea'); textArea.value = 'BITEBACK'; document.body.appendChild(textArea); textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); const span = btn.querySelector('span'); span.textContent = 'Copied!'; setTimeout(() => { span.textContent = 'Copy'; }, 2000); }); }); } // ---- Particle System ---- function initParticles() { const canvas = document.getElementById('particles'); const ctx = canvas.getContext('2d'); let width, height; const particles = []; const PARTICLE_COUNT = 40; function resize() { width = canvas.width = window.innerWidth; height = canvas.height = window.innerHeight; } resize(); window.addEventListener('resize', resize); class Particle { constructor() { this.reset(); } reset() { this.x = Math.random() * width; this.y = Math.random() * height; this.size = Math.random() * 2 + 0.5; this.speedX = (Math.random() - 0.5) * 0.3; this.speedY = (Math.random() - 0.5) * 0.3; this.opacity = Math.random() * 0.4 + 0.1; this.color = Math.random() > 0.5 ? '#ff2d95' : '#00e5ff'; } update() { this.x += this.speedX; this.y += this.speedY; if (this.x < 0 || this.x > width) this.speedX *= -1; if (this.y < 0 || this.y > height) this.speedY *= -1; } draw() { ctx.beginPath(); ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); ctx.fillStyle = this.color; ctx.globalAlpha = this.opacity; ctx.fill(); ctx.globalAlpha = 1; } } for (let i = 0; i < PARTICLE_COUNT; i++) { particles.push(new Particle()); } function animate() { ctx.clearRect(0, 0, width, height); particles.forEach(p => { p.update(); p.draw(); }); // Draw connections for (let i = 0; i < particles.length; i++) { for (let j = i + 1; j < particles.length; j++) { const dx = particles[i].x - particles[j].x; const dy = particles[i].y - particles[j].y; const dist = Math.sqrt(dx * dx + dy * dy); if (dist < 150) { ctx.beginPath(); ctx.moveTo(particles[i].x, particles[i].y); ctx.lineTo(particles[j].x, particles[j].y); ctx.strokeStyle = particles[i].color; ctx.globalAlpha = 0.05 * (1 - dist / 150); ctx.lineWidth = 0.5; ctx.stroke(); ctx.globalAlpha = 1; } } } requestAnimationFrame(animate); } animate(); } // ---- Keyboard Easter Egg ---- let konamiCode = []; const KONAMI = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a']; document.addEventListener('keydown', (e) => { konamiCode.push(e.key); konamiCode = konamiCode.slice(-10); if (konamiCode.join(',') === KONAMI.join(',')) { const vault = document.getElementById('room-vault'); if (vault.classList.contains('hidden')) { unlockVault(); } else { vault.scrollIntoView({ behavior: 'smooth' }); } showToast('KONAMI CODE ACTIVATED! ๐ฎ', '#eab308', '๐ฎ'); } }); // ---- Scroll-triggered door glow ---- const observerOptions = { threshold: 0.2, rootMargin: '0px' }; const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { const door = entry.target.querySelector('.room-door'); if (door && !door.classList.contains('opened')) { door.style.animation = 'none'; door.offsetHeight; // Trigger reflow } } }); }, observerOptions); document.querySelectorAll('[id^="room-"]').forEach(room => { observer.observe(room); }); // ---- Subscribe Button ---- document.addEventListener('click', (e) => { if (e.target.closest('button') && e.target.closest('button').textContent.includes('Subscribe')) { const input = e.target.closest('div').querySelector('input[type="email"]'); if (input && input.value && input.value.includes('@')) { showToast('Welcome to the Fluff Coven! โ๊ฉ', '#ff2d95', '๐ฐ'); input.value = ''; input.placeholder = 'You\'re in! ๐'; } else { showToast('Please enter a valid email', '#ef4444', 'โ ๏ธ'); input.focus(); } } }); // ---- Tarot Cards ---- const TAROT_PRIZES = [ { name: 'The Moon', symbol: 'โฝ', prize: 'discount', title: '20% Off Etsy', description: 'A discount for the misfits & dreamers', code: 'BITEBACK', link: 'https://softbitestudio.etsy.com/', linkText: 'Visit Shop โ', color: '#ff2d95', revealIcon: '๐' }, { name: 'The Star', symbol: 'โ ', prize: 'download', title: 'Free Digital Download', description: 'A gift from the warren, just for you', code: null, link: 'https://softbitestudio.etsy.com/', linkText: 'Claim Your Gift โ', color: '#00e5ff', revealIcon: 'โญ' }, { name: 'The Tower', symbol: 'โก', prize: 'secret', title: 'Secret Code', description: 'Whisper this to unlock hidden paths', code: 'FLUFFN FANGS', link: null, linkText: null, color: '#b44dff', revealIcon: '๐' } ]; let shuffledCards = []; let tarotInitialized = false; let fortuneDrawn = false; function initTarot() { if (tarotInitialized) return; tarotInitialized = true; const container = document.getElementById('tarot-cards'); const sealedDiv = document.getElementById('fortune-sealed'); if (!container) return; // Check localStorage const savedFortune = localStorage.getItem('warren_fortune'); if (savedFortune) { fortuneDrawn = true; try { const fortune = JSON.parse(savedFortune); renderCards(container, true); sealedDiv.classList.remove('hidden'); showPreviousFortune(fortune); } catch (e) { localStorage.removeItem('warren_fortune'); fortuneDrawn = false; } } if (!fortuneDrawn) { shuffledCards = [...TAROT_PRIZES].sort(() => Math.random() - 0.5); renderCards(container, false); container.addEventListener('click', (e) => { const card = e.target.closest('.tarot-card'); if (card && !card.classList.contains('revealed') && !card.classList.contains('dimmed') && !fortuneDrawn) { flipCard(parseInt(card.dataset.index)); } }); } } function renderCards(container, sealed) { const cards = sealed ? TAROT_PRIZES : shuffledCards; container.innerHTML = cards.map((card, i) => `