let i = 0; function typeLine() { if (i < lines.length) { const line = lines[i]; let j = 0; const span = document.createElement("div"); terminal.appendChild(span); const typer = setInterval(() => { if (j < line.length) { span.textContent += line[j++]; } else { clearInterval(typer); i++; setTimeout(typeLine, 400); } }, 25); } else { createInput(); } } function createInput() { const inputWrapper = document.createElement("div"); inputWrapper.innerHTML = "> "; terminal.appendChild(inputWrapper); const input = document.getElementById("commandInput"); input.focus(); input.addEventListener("keydown", (e) => { if (e.key === "Enter") { const command = input.value.trim(); if (command === "THE ARCHANGEL HAS RISEN") { window.location.href = "https://thesatanictemple.com/"; } else { const response = document.createElement("div"); response.textContent = `> Unknown command: ${command}`; terminal.appendChild(response); input.disabled = true; createInput(); terminal.scrollTop = terminal.scrollHeight; } } }); } function createInput() { const inputWrapper = document.createElement("div"); inputWrapper.innerHTML = "> "; terminal.appendChild(inputWrapper); const input = document.getElementById("commandInput"); input.focus(); input.addEventListener("keydown", (e) => { if (e.key === "Enter") { const command = input.value.trim(); if (command === "REVELATION.REBOOTED") { window.location.href = "https://www.youtube.com/watch?v=dQw4w9WgXcQ/"; } else { const response = document.createElement("div"); response.textContent = `> Unknown command: ${command}`; terminal.appendChild(response); input.disabled = true; createInput(); terminal.scrollTop = terminal.scrollHeight; } } }); } window.onload = () => { typeLine(); };