<!-- 

        __   .__          ___.                 
  _____|  | _|__|_____    \_ |__ _____ _______  |  Made with 💖 by skip.bar
 /  ___/  |/ /  \____ \    | __ \\__  \\_  __ \ |  With help of six
 \___ \|    <|  |  |_> >   | \_\ \/ __ \|  | \/ |  And big nigga under my desk
/____  >__|_ \__|   __/ /\ |___  (____  /__|    |  Femboy twink looking for a bf
     \/     \/  |__|    \/     \/     \/        |  ryz is a skid

-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>restrain.cc | home</title>
    <script src="https://unpkg.com/typewriter-effect@latest/dist/core.js"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        ::selection {
             background: #262649;
        }

        body {
            background-color: #0a0a0a;
            color: white;
            font-family: Poppins, sans-serif;
            font-weight: 700;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            height: 100vh;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        body::before, body::after {
            content: "";
            position: absolute;
            width: 2000px; 
            height: 2000px; 
            border-radius: 50%;
            filter: blur(10px);
            backdrop-filter: blur(50px);
            background: radial-gradient(circle, #222241, transparent 50%);
            z-index: -1;
        }

        body::before {
            top: -1000px;
            left: -1000px; 
        }

        body::after {
            bottom: -1100px; 
            right: -1000px; 
        }

        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .header, .main-content, .footer {
            opacity: 0;
            transform: translateY(50px); 
        }

        .header {
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            margin-top: 20px;
            margin-bottom: 20px;
            animation: slideUp 1s ease-out;
            animation-delay: 0s;
            animation-fill-mode: forwards;
        }

        .navbar {
            display: flex;
            justify-content: center;
            gap: 25px;
            padding: 5px 5px;
            background: linear-gradient(145deg, rgba(68, 68, 68, 0.15), rgba(68, 68, 68, 0.05));
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(12px);
            width: min(25%, 500px);
            border-radius: 100px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .navbar a {
            color: white;
            text-decoration: none;
            font-size: 16px;
            padding: 10px 20px;
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }


        .main-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            flex-grow: 1;
            margin-top: 0px;
            gap: 20px;
            animation: slideUp 1s ease-out;
            animation-delay: 1s;
            animation-fill-mode: forwards;
        }

        .logo {
            font-size: 36px;
            color: #7878e9;
            filter: drop-shadow(0 0 10px #7878e9);
        }

        .subtitle {
            font-size: 18px;
        }

        .form {
            display: flex;
            gap: 10px;
        }

        .form input {
            background: #1d1d1d2d; 
            backdrop-filter: blur(12px);
            font-family: Poppins, sans-serif;
            font-weight: 700;
            border-radius: 22px;
            padding: 12px 20px;
            font-size: 16px;
            color: white;
            outline: none;
            box-shadow: 0 0px 10px #00000033;
            transition: all 0.3s ease;
            border: #444444 1px solid;
        }

        .form input:focus {
            box-shadow: 0 0 12px #2e2e2e;
        }

        .form button {
            background-color: #131324;  
            color: white;
            font-size: 16px;
            padding: 12px 25px;
            border-radius: 22px;
            border: #262649 1px solid;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 10px #00000033;
            outline: none;
        }

        .form button:hover {
            background-color: #131324; 
            box-shadow: 0 0 12px #131324;
        }

        .footer {
            margin-bottom: 25px;
            animation: slideUp 1s ease-out;
            animation-delay: 0.5s;
            animation-fill-mode: forwards;
        }

        .footer a {
            margin: 0 10px;
            text-decoration: none;
            font-size: 14px;
            color: #696969;
            padding-bottom: 15px;
        }

        .typewriter {
            color: #4b4b91;
            font-size: 19px;
            text-shadow: 0xp 0px 10px #4b4b91;
            filter: drop-shadow(0 0 10px #4b4b91);
            line-height: 1;
            vertical-align: baseline;
            position: relative;
            top: 2px;
        }
    </style>
</head>
<body>
<!--
    <div class="header">
        <div class="navbar">
            <a href="#">Discord</a>
            <a href="#">Register</a>
            <a href="#">Login</a>
        </div>
    </div>

-->

    <div class="main-content">
        <div class="logo">
            restrain.cc
        </div>
        <div class="subtitle">
            Your all-in-one <span class="typewriter" id="app"></span> solution
        </div>
        <div class="form">
            <input 
                type="text" 
                id="input-field" 
                value="restrain.cc/" 
                oninput="ensurePrefix()" 
                placeholder="restrain.cc/" />
            <button onclick="register()" href="register">register</button>
        </div>
    </div>

    <div class="footer">
        <a href="seceret">Seceret</a>
        <a> • </a>
        <a href="https://discord.gg/restrain">Discord</a>
        <a> • </a>
        <a href="seceret">Seceret</a>
    </div>

    <script>
        var app = document.getElementById('app');
        var typewriter = new Typewriter(app, {
            loop: true,
            cursor: '|'
        });
        typewriter.typeString('biolink')
            .pauseFor(1000)
            .deleteAll()
            .typeString('file hosting')
            .pauseFor(1000)
            .start();
    </script>

    <script>
    function register() {
        var inputField = document.getElementById('input-field');
        var username = inputField.value.replace('restrain.cc/', '');
        window.location.href = '/register?u=' + encodeURIComponent(username);
    }

        const prefix = "restrain.cc/";

        function ensurePrefix() {
            const inputField = document.getElementById('input-field');
            
            if (!inputField.value.startsWith(prefix)) {
                inputField.value = prefix;
            }
     
            if (inputField.selectionStart < prefix.length) {
                inputField.selectionStart = inputField.selectionEnd = prefix.length;
            }
        }
    </script>
</body>
</html>
