<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Learning Portal</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        :root {
            /* Default colors for opening page */
            --bg-main: #eafbe7;
            --bg-header: #fff;
            --bg-content: #eafbe7;
            --text-header: #1a4d1a;
            --text-main: #2e6b2e;
            --link: #1ecb1e;
            --link-hover: #0a8c0a;
            --shadow: 0 2px 16px rgba(0,0,0,0.18);
        }
        body {
            font-family: Arial, sans-serif;
            background: var(--bg-main);
            margin: 0;
            padding: 0;
            color: var(--text-main);
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }
        .glow-bg {
            position: fixed;
            top: 0; left: 0; width: 100vw; height: 100vh;
            z-index: 0;
            pointer-events: none;
            overflow: hidden;
        }
        .glow {
            position: absolute;
            border-radius: 50%;
            filter: blur(60px);
            opacity: 0.7;
            animation: glowMove 12s infinite alternate;
        }
        /* Opening page glows: green/white */
        .glow1 { width: 400px; height: 400px; background: #1ecb1e; left: 5vw; top: 10vh; animation-delay: 0s;}
        .glow2 { width: 300px; height: 300px; background: #fff; right: 10vw; top: 30vh; animation-delay: 2s;}
        .glow3 { width: 250px; height: 250px; background: #b6ffb6; left: 40vw; bottom: 5vh; animation-delay: 4s;}
        @keyframes glowMove {
            0% { transform: translateY(0) scale(1);}
            100% { transform: translateY(40px) scale(1.1);}
        }
        .centered-box {
            max-width: 400px;
            margin: 10vh auto 0 auto;
            background: var(--bg-content);
            border-radius: 16px;
            box-shadow: var(--shadow), 0 0 32px #1ecb1e22;
            padding: 2em;
            position: relative;
            z-index: 2;
            text-align: center;
            animation: fadeUp 1.2s cubic-bezier(.77,0,.175,1) 0.5s forwards;
            opacity: 0;
        }
        .logo {
            font-size: 2em;
            font-weight: bold;
            color: var(--text-header);
            margin-bottom: 0.5em;
            text-shadow: 0 0 16px #1ecb1e, 0 0 4px #fff;
        }
        .subject-btn {
            display: inline-block;
            margin: 1em 0.5em;
            padding: 0.7em 2em;
            font-size: 1.1em;
            border: none;
            border-radius: 8px;
            background: linear-gradient(90deg,#1ecb1e,#b6ffb6);
            color: #fff;
            cursor: pointer;
            box-shadow: 0 2px 12px #1ecb1e44;
            transition: transform 0.2s;
        }
        .subject-btn:hover {
            transform: scale(1.08);
            box-shadow: 0 4px 24px #b6ffb644;
        }
        .hidden {
            display: none;
        }
        .input-group {
            margin: 2em 0 0 0;
        }
        input[type="password"] {
            padding: 0.7em;
            border-radius: 8px;
            border: 1px solid #1ecb1e;
            font-size: 1em;
            width: 70%;
            margin-bottom: 1em;
        }
        .submit-btn {
            padding: 0.7em 2em;
            border-radius: 8px;
            border: none;
            background: linear-gradient(90deg,#1ecb1e,#b6ffb6);
            color: #fff;
            font-size: 1em;
            cursor: pointer;
            box-shadow: 0 2px 12px #1ecb1e44;
            transition: transform 0.2s;
        }
        .submit-btn:hover {
            transform: scale(1.08);
            box-shadow: 0 4px 24px #b6ffb644;
        }
        .error-msg {
            color: #ff0033;
            margin-top: 0.5em;
            font-size: 1em;
        }
        @keyframes fadeUp {
            0% { opacity: 0; transform: translateY(40px);}
            100% { opacity: 1; transform: translateY(0);}
        }
        @media (max-width: 600px) {
            .centered-box {
                padding: 1em;
            }
            .logo {
                font-size: 1.2em;
            }
        }
        /* Main page styles (will be applied dynamically) */
        #mainContent.redblack {
            background: #1a0000;
            color: #ff3c3c;
            min-height: 100vh;
        }
        #mainContent.redblack header,
        #mainContent.redblack main {
            background: transparent;
            color: #ff3c3c;
        }
        #mainContent.redblack h1, #mainContent.redblack h2 {
            color: #ff3c3c;
            text-shadow: 0 0 16px #ff0000, 0 0 8px #fff;
        }
        #mainContent.redblack ul {
            background: rgba(30,0,0,0.7);
            border-radius: 12px;
            box-shadow: 0 0 32px #ff000055;
            padding: 1em;
        }
        #mainContent.redblack li {
            color: #fff;
            text-shadow: 0 0 8px #ff0000;
            opacity: 0;
            transition: opacity 0.7s;
        }
        #mainContent.redblack a {
            color: #ff3c3c;
            text-shadow: 0 0 8px #ff0000;
            transition: color 0.2s;
        }
        #mainContent.redblack a:hover {
            color: #fff;
            text-shadow: 0 0 16px #ff0000;
        }
        #mainContent.redblack #customize-panel label {
            color: #fff;
        }
        /* Red/black glowing background for main page */
        #mainContent.redblack .glow-bg {
            z-index: -1;
        }
        #mainContent.redblack .glow1 { background: #ff0000; }
        #mainContent.redblack .glow2 { background: #ff3c3c; }
        #mainContent.redblack .glow3 { background: #fff; }
    </style>
</head>
<body>
    <div class="glow-bg" id="glowBg">
        <div class="glow glow1"></div>
        <div class="glow glow2"></div>
        <div class="glow glow3"></div>
    </div>
    <div id="opening" class="centered-box">
        <div class="logo">Learning Portal</div>
        <div>Welcome! Choose a subject to begin:</div>
        <button class="subject-btn" id="mathBtn">Math</button>
        <button class="subject-btn" disabled>Science</button>
        <button class="subject-btn" disabled>History</button>
        <div id="mathPassword" class="hidden input-group">
            <div style="margin-bottom:0.5em;">Enter Math password:</div>
            <input type="password" id="mathPassInput" placeholder="Password">
            <br>
            <button class="submit-btn" id="mathPassSubmit">Enter</button>
            <div class="error-msg" id="errorMsg"></div>
        </div>
    </div>
    <div id="mainContent" class="hidden">
        <header>
            <h1>Unblocked Webpage Links</h1>
            <p>Access games, tools, and more!</p>
        </header>
        <main>
            <div id="customize-panel">
                <label>Header Color: <input type="color" id="headerColor" value="#222222"></label>
                <label>Header Text: <input type="color" id="headerTextColor" value="#ffffff"></label>
                <label>Background: <input type="color" id="bgMainColor" value="#181828"></label>
                <label>Content Box: <input type="color" id="bgContentColor" value="#23233a"></label>
                <label>Link Color: <input type="color" id="linkColor" value="#00eaff"></label>
                <label>Link Hover: <input type="color" id="linkHoverColor" value="#ff00cc"></label>
            </div>
            <h2>Games & Fun</h2>
            <ul>
                <li><a href="https://www.mathtest-99.site/" target="_blank">MathTest 99</a></li>
                <li><a href="https://sites.google.com/site/fnfunblocked/friday-night-funkin-vs-ghost-twins-mod" target="_blank">FNF vs Ghost Twins Mod</a></li>
                <li><a href="https://4trr.com/top" target="_blank">4trr Top</a></li>
                <li><a href="https://nichproxx.neocities.org/" target="_blank">NichProxx</a></li>
                <li><a href="https://deblock.my.canva.site/" target="_blank">Deblock Canva Site</a></li>
                <li><a href="https://lunarisgames.neocities.org/games/" target="_blank">Lunaris Games</a></li>
                <li><a href="https://ecotest.neocities.org/" target="_blank">EcoTest</a></li>
                <li><a href="https://kesalvador.neocities.org/" target="_blank">KeSalvador</a></li>
                <li><a href="https://pdftobrainrot.org/generate" target="_blank">PDF to Brainrot</a></li>
                <li><a href="https://brokinggaming.neocities.org/" target="_blank">BroKing Gaming</a></li>
                <li><a href="https://portal.fuafajfhja.shadowshark.ipv64.net/" target="_blank">ShadowShark Portal</a></li>
                <li><a href="https://dasgames.neocities.org/" target="_blank">DasGames</a></li>
                <li><a href="https://www.multiplication.com/games/strategy-games" target="_blank">Multiplication Strategy Games</a></li>
                <li><a href="https://unblockking.neocities.org/" target="_blank">UnblockKing</a></li>
                <li><a href="https://lancesgame5ite.neocities.org/g-hub" target="_blank">Lance's Game Hub</a></li>
                <li><a href="https://butter-dog.neocities.org/" target="_blank">Butter Dog</a></li>
                <li><a href="https://bhomeworkdhelpg.neocities.org/" target="_blank">BHomeworkDHelpG</a></li>
                <li><a href="https://script.google.com/a/macros/seashorecharterschools.com/s/AKfycbxPB4kJUgLJbJXvPMNMgCmYpLWl8KJcGdvAocambnzh9Imkn3shdm60vnx96rlNcLw7/exec" target="_blank">Seashore Charter Script</a></li>
                <li><a href="https://ubg4all.neocities.org/" target="_blank">UBG4All</a></li>
                <li><a href="https://freelearn.neocities.org/ne" target="_blank">FreeLearn NE</a></li>
                <li><a href="https://fmode.neocities.org/" target="_blank">FMode</a></li>
                <li><a href="https://fmode.neocities.org/Alight/" target="_blank">FMode Alight</a></li>
                <li><a href="https://sites.google.com/view/snow-central-1/home?authuser=0" target="_blank">Snow Central</a></li>
                <li><a href="https://lancesgame5ite.neocities.org/" target="_blank">Lance's Game Site</a></li>
                <li><a href="https://b0ydsgamess.neocities.org/" target="_blank">B0ydsGames</a></li>
                <li><a href="https://gogle-drive.neocities.org/" target="_blank">Gogle Drive</a></li>
                <li><a href="https://ilmrx.neocities.org/" target="_blank">ILMRX</a></li>
                <li><a href="https://eduworkpage.neocities.org/gs" target="_blank">EduWorkPage GS</a></li>
                <li><a href="https://www.pythonscratcher.net/cloak.htm" target="_blank">Python Scratcher Cloak</a></li>
                <li><a href="https://galacticnetwork.org/" target="_blank">Galactic Network</a></li>
                <li><a href="https://freelearn.neocities.org/hooda" target="_blank">FreeLearn Hooda</a></li>
                <li><a href="https://freelearn.neocities.org/Numuki" target="_blank">FreeLearn Numuki</a></li>
                <li><a href="https://freelearn.neocities.org/n-gon" target="_blank">FreeLearn N-Gon</a></li>
                <li><a href="https://freelearn.neocities.org/ugb98" target="_blank">FreeLearn UGB98</a></li>
                <li><a href="https://freelearn.neocities.org/ubg76" target="_blank">FreeLearn UBG76</a></li>
                <li><a href="https://freelearn.neocities.org/duckmath" target="_blank">FreeLearn DuckMath</a></li>
                <li><a href="https://freelearn.neocities.org/Ev.io" target="_blank">FreeLearn Ev.io</a></li>
                <li><a href="https://freelearn.neocities.org/Fafgames" target="_blank">FreeLearn Fafgames</a></li>
                <li><a href="https://howufindis.neocities.org/" target="_blank">HowUFindIs</a></li>
                <li><a href="https://freelearn.neocities.org/Ext" target="_blank">FreeLearn Ext</a></li>
                <li><a href="https://freelearn.neocities.org/freezenova" target="_blank">FreeLearn Freezenova</a></li>
                <li><a href="https://slope-game.neocities.org/ghubold" target="_blank">Slope Game GHubOld</a></li>
                <li><a href="https://neal-fun.firebaseapp.com/" target="_blank">Neal Fun</a></li>
                <li><a href="https://games.engineering.com/tomb-runner-1/index.html" target="_blank">Tomb Runner</a></li>
                <li><a href="https://elijahcirioli.com/" target="_blank">Elijah Cirioli</a></li>
                <li><a href="https://www.the-useless.website/" target="_blank">The Useless Website</a></li>
                <li><a href="https://wtool.org/adarkroom/" target="_blank">A Dark Room</a></li>
                <li><a href="https://kde-go.global.ssl.fastly.net/" target="_blank">KDE Go</a></li>
                <li><a href="https://lolygames.github.io/1v1-lol/" target="_blank">1v1 LOL</a></li>
                <li><a href="https://g-meh.com/" target="_blank">G-Meh</a></li>
            </ul>
            <h2>Tools</h2>
            <ul>
                <li><a href="https://www.pythonscratcher.net/cloak.htm" target="_blank">Python Scratcher Cloak</a></li>
                <li><a href="https://pdftobrainrot.org/generate" target="_blank">PDF to Brainrot</a></li>
                <li><a href="https://gogle-drive.neocities.org/" target="_blank">Gogle Drive</a></li>
                <li><a href="https://deblock.my.canva.site/" target="_blank">Deblock Canva Site</a></li>
                <li><a href="https://wtool.org/adarkroom/" target="_blank">A Dark Room</a></li>
                <li><a href="https://galacticnetwork.org/" target="_blank">Galactic Network</a></li>
                <li><a href="https://elijahcirioli.com/" target="_blank">Elijah Cirioli</a></li>
                <li><a href="https://www.the-useless.website/" target="_blank">The Useless Website</a></li>
                <li><a href="https://neal-fun.firebaseapp.com/" target="_blank">Neal Fun</a></li>
            </ul>
        </main>
    </div>
    <script>
        // Fade in opening box
        window.addEventListener('DOMContentLoaded', function() {
            document.getElementById('opening').style.opacity = 1;
        });

        // Math button click
        document.getElementById('mathBtn').addEventListener('click', function() {
            document.getElementById('mathPassword').classList.remove('hidden');
        });

        // Password check
        document.getElementById('mathPassSubmit').addEventListener('click', function() {
            var pass = document.getElementById('mathPassInput').value;
            var errorMsg = document.getElementById('errorMsg');
            if(pass === '7364') {
                // Hide opening, show main content
                document.getElementById('opening').style.display = 'none';
                document.getElementById('mainContent').classList.remove('hidden');
                document.getElementById('mainContent').classList.add('redblack');
                // Change root CSS variables for main page
                document.documentElement.style.setProperty('--bg-main', '#1a0000');
                document.documentElement.style.setProperty('--bg-header', '#1a0000');
                document.documentElement.style.setProperty('--bg-content', '#2a0000');
                document.documentElement.style.setProperty('--text-header', '#ff3c3c');
                document.documentElement.style.setProperty('--text-main', '#fff');
                document.documentElement.style.setProperty('--link', '#ff3c3c');
                document.documentElement.style.setProperty('--link-hover', '#fff');
                // Change glow colors for main page
                var glowBg = document.getElementById('glowBg');
                glowBg.querySelector('.glow1').style.background = '#ff0000';
                glowBg.querySelector('.glow2').style.background = '#ff3c3c';
                glowBg.querySelector('.glow3').style.background = '#fff';
                // Animate h2s
                document.querySelectorAll('#mainContent h2').forEach(function(el, i) {
                    setTimeout(function() {
                        el.style.opacity = 1;
                    }, 1200 + i * 200);
                });
                // Animate list items
                document.querySelectorAll('#mainContent li').forEach(function(el, i) {
                    setTimeout(function() {
                        el.style.opacity = 1;
                    }, 1500 + i * 30);
                });
                // Animate customize panel
                setTimeout(function() {
                    document.getElementById('customize-panel').style.opacity = 1;
                }, 1800);
            } else {
                errorMsg.textContent = "Incorrect password. Try again.";
            }
        });

        // Enter key for password
        document.getElementById('mathPassInput').addEventListener('keydown', function(e) {
            if(e.key === 'Enter') {
                document.getElementById('mathPassSubmit').click();
            }
        });

        // Color customization logic
        document.getElementById('headerColor').addEventListener('input', function(e) {
            document.documentElement.style.setProperty('--bg-header', e.target.value);
        });
        document.getElementById('headerTextColor').addEventListener('input', function(e) {
            document.documentElement.style.setProperty('--text-header', e.target.value);
        });
        document.getElementById('bgMainColor').addEventListener('input', function(e) {
            document.documentElement.style.setProperty('--bg-main', e.target.value);
        });
        document.getElementById('bgContentColor').addEventListener('input', function(e) {
            document.documentElement.style.setProperty('--bg-content', e.target.value);
        });
        document.getElementById('linkColor').addEventListener('input', function(e) {
            document.documentElement.style.setProperty('--link', e.target.value);
        });
        document.getElementById('linkHoverColor').addEventListener('input', function(e) {
            document.documentElement.style.setProperty('--link-hover', e.target.value);
        });
    </script>
</body>
</html>