// Typewriter effect for the Terminal UI
const terminalText = [
    "import securet_ai",
    "securet.initialize_defenses()",
    "Loading cyber protocols... [OK]",
    "Access granted. Welcome to MyPython.org."
];

const typeWriterElement = document.getElementById('typewriter');
let lineIndex = 0;
let charIndex = 0;

function typeWriter() {
    if (lineIndex < terminalText.length) {
        if (charIndex < terminalText[lineIndex].length) {
            typeWriterElement.innerHTML += terminalText[lineIndex].charAt(charIndex);
            charIndex++;
            setTimeout(typeWriter, 50); // Typing speed
        } else {
            typeWriterElement.innerHTML += '<br>';
            lineIndex++;
            charIndex = 0;
            setTimeout(typeWriter, 500); // Pause between lines
        }
    }
}

// Start the animation when the page loads
window.onload = () => {
    setTimeout(typeWriter, 1000);
};