document.addEventListener('DOMContentLoaded', function() { // Initialize terminal typing effect const terminalLines = document.querySelectorAll('.terminal-boot'); terminalLines.forEach((line, index) => { line.style.opacity = '0'; line.style.animationDelay = `${index * 0.2}s`; line.classList.add('terminal-boot'); }); // Handle console input const consoleInput = document.querySelector('input'); if (consoleInput) { consoleInput.addEventListener('keypress', function(e) { if (e.key === 'Enter') { const command = this.value.toLowerCase(); handleCommand(command); this.value = ''; } }); } // Command handler function handleCommand(command) { switch(command) { case 'help': alert('Available commands: about, chapters, status, clear'); break; case 'about': alert('Quantum Consciousness Terminal v1.0\nAn interface to reality\'s source code'); break; case 'chapters': alert('Navigate to chapters using the links above'); break; case 'status': alert('System operational\nReality rendering at 60fps'); break; case 'clear': alert('Terminal cleared (just kidding, this is a static interface)'); break; default: alert(`Command not found: ${command}\nType "help" for available commands`); } } });