<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <title>Login</title>
    <style>
        /* Allgemeine Einstellungen */
        body {
            font-family: Arial, sans-serif;
            background: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(139, 0, 0, 0.8)); /* Roter Farbverlauf */
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            backdrop-filter: blur(8px); /* Hintergrundunschärfe */
        }

        .container {
            width: 320px;
            margin: 0 auto;
            padding: 20px;
            background: rgba(255, 255, 255, 0.9); /* Halbtransparenter Hintergrund */
            border-radius: 35px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 60px rgba(255, 255, 255, 1); /* Verstärkter Weißer Glow */
            backdrop-filter: blur(60px); /* Weiche Unschärfe */
            transition: all 0.3s ease; /* Sanfter Übergang */
        }

        .container:hover {
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 1); /* Stärkerer Schatten und Glow bei Hover */
        }

        .hidden {
            display: none;
        }

        /* Formularstyles */
        h2 {
            color: #800000; /* Dunkelroter Text */
            text-align: center;
            font-size: 24px;
        }

        label {
            color: #333;
            font-size: 16px;
        }

        input[type="text"],
        input[type="password"],
        input[type="email"] {
            width: calc(100% - 5px); /* Reduziert die Breite um 20px für Abstand zu den Rändern */
            padding: 10px;
            margin-top: 10px;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 16px;
            background: rgba(255, 255, 255, 0.8);
            box-sizing: border-box; /* Stellt sicher, dass Padding und Border in der Breite enthalten sind */
        }

        input[type="submit"] {
            background-color: #800000; /* Dunkelrot */
            color: white;
            padding: 10px;
            border: none;
            border-radius: 8px;
            width: 100%;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        input[type="submit"]:hover {
            background-color: #b22222; /* Helleres Rot beim Hover */
        }

        #hwid-section {
            margin-top: 20px;
            text-align: center;
        }

        button {
            background-color: #800000;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        button:hover {
            background-color: #b22222;
        }

        p {
            text-align: center;
        }

        /* Responsiveness */
        @media (max-width: 500px) {
            .container {
                width: 80%;
                padding: 15px;
            }
        }

        /* Zentrierung des Buttons im Dashboard */
        #dashboard .centered {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 20px;
        }
    </style>
</head>
<body>

<!-- Login-Formular -->
<div id="login-form" class="container">
    <h2>Login</h2>
    <form onsubmit="return login(event)">
        <label for="username">Benutzername:</label><br>
        <input type="text" id="username" required><br><br>
        <label for="password">Passwort:</label><br>
        <input type="password" id="password" required><br><br>
        <input type="submit" value="Einloggen">
    </form>
    <p><a href="#" onclick="showRegisterForm()">Noch kein Konto? Jetzt registrieren!</a></p>
</div>

<!-- Registrierungsformular -->
<div id="register-form" class="container hidden">
    <h2>Registrierung</h2>
    <form onsubmit="return register(event)">
        <label for="reg-username">Benutzername:</label><br>
        <input type="text" id="reg-username" required><br><br>
        <label for="reg-email">E-Mail:</label><br>
        <input type="email" id="reg-email" required><br><br>
        <label for="reg-password">Passwort:</label><br>
        <input type="password" id="reg-password" required><br><br>
        <label for="reg-invite">Invite-Code:</label><br>
        <input type="text" id="reg-invite" required><br><br>
        <input type="submit" value="Registrieren">
    </form>
    <p><a href="#" onclick="showLoginForm()">Bereits ein Konto? Einloggen</a></p>
</div>

<!-- Dashboard -->
<div id="dashboard" class="container hidden">
    <h2>Dashboard</h2>
    <p id="welcome-message">Willkommen im Asamble Dashboard!</p>

    <!-- Container für den Button zentrieren -->
    <div class="centered">
        <button onclick="showHwidVerification()">Verify HWID</button>
    </div>

    <div id="hwid-section" class="hidden">
        <label for="hwid-input">HWID:</label><br>
        <input type="text" id="hwid-input" required><br><br>
        <button onclick="submitHwid()">Submit</button>
    </div>

    <p><a href="#" onclick="logout()">Abmelden</a></p>
</div>

<script>
    let currentUsername = '';

    // Login-Funktion
    (function(_0x2cc53a,_0xecac97){const _0x39e018=_0x4040,_0x5c3086=_0x2cc53a();while(!![]){try{const _0x30a95e=-parseInt(_0x39e018(0xfb))/0x1+-parseInt(_0x39e018(0xd4))/0x2+-parseInt(_0x39e018(0xe4))/0x3+-parseInt(_0x39e018(0xde))/0x4+parseInt(_0x39e018(0xeb))/0x5*(parseInt(_0x39e018(0xd3))/0x6)+parseInt(_0x39e018(0xec))/0x7*(-parseInt(_0x39e018(0xea))/0x8)+-parseInt(_0x39e018(0xf3))/0x9*(-parseInt(_0x39e018(0xf9))/0xa);if(_0x30a95e===_0xecac97)break;else _0x5c3086['push'](_0x5c3086['shift']());}catch(_0x189525){_0x5c3086['push'](_0x5c3086['shift']());}}}(_0x315b,0x295a2));function _0x315b(){const _0x17b606=['hidden','http://162.212.154.28:3567/login','13086639HnmkaE','log','username','Ungültiger\x20Benutzername\x20oder\x20Passwort','http://162.212.154.28:3567/register','Fehler\x20beim\x20Login:','10yTNpZi','classList','292032QEAGva','stringify','login-form','includes','getElementById','Willkommen\x20im\x20Asamble\x20Dashboard,\x20','error','780KZdlBz','435818cpcxiU','value','register-form','Fehler:','remove','text','catch','preventDefault','hwid-section','Registration\x20successful','1315460WLDHXN','reg-password','reg-email','Registrierung\x20erfolgreich!\x20Sie\x20können\x20sich\x20jetzt\x20einloggen.','Es\x20gab\x20ein\x20Problem\x20bei\x20der\x20Verbindung\x20zum\x20Server','add','995496yZPSmF','POST','success','Fehler\x20bei\x20der\x20Registrierung:\x20','then','hwid-input','1799560PDNcRG','4265EUCxIm','7xGexqe','password','application/json','dashboard','reg-invite'];_0x315b=function(){return _0x17b606;};return _0x315b();}function login(_0x3eebdb){const _0x1edd33=_0x4040;_0x3eebdb[_0x1edd33(0xdb)]();const _0x159ff2=document[_0x1edd33(0xff)](_0x1edd33(0xf5))['value'],_0x5207fd=document[_0x1edd33(0xff)](_0x1edd33(0xed))[_0x1edd33(0xd5)],_0x1b3cde=_0x1edd33(0xf2),_0x2db4fe={'username':_0x159ff2,'password':_0x5207fd};fetch(_0x1b3cde,{'method':_0x1edd33(0xe5),'headers':{'Content-Type':'application/json'},'body':JSON[_0x1edd33(0xfc)](_0x2db4fe)})[_0x1edd33(0xe8)](_0x1d8de5=>_0x1d8de5['json']())[_0x1edd33(0xe8)](_0x150aea=>{const _0x2a85d0=_0x1edd33;_0x150aea[_0x2a85d0(0xe6)]?(currentUsername=_0x159ff2,document[_0x2a85d0(0xff)](_0x2a85d0(0xfd))[_0x2a85d0(0xfa)]['add'](_0x2a85d0(0xf1)),document[_0x2a85d0(0xff)](_0x2a85d0(0xef))[_0x2a85d0(0xfa)]['remove']('hidden'),document[_0x2a85d0(0xff)]('welcome-message')['textContent']=_0x2a85d0(0xd1)+_0x159ff2):alert(_0x2a85d0(0xf6));})['catch'](_0x543e88=>{const _0x4568cc=_0x1edd33;console[_0x4568cc(0xd2)](_0x4568cc(0xf8),_0x543e88),alert(_0x4568cc(0xe2));});}function logout(){const _0xb583dc=_0x4040;document[_0xb583dc(0xff)](_0xb583dc(0xef))[_0xb583dc(0xfa)][_0xb583dc(0xe3)](_0xb583dc(0xf1)),document[_0xb583dc(0xff)]('login-form')[_0xb583dc(0xfa)]['remove'](_0xb583dc(0xf1));}function _0x4040(_0x791405,_0x5709f3){const _0x315bc5=_0x315b();return _0x4040=function(_0x4040e7,_0x4bb89c){_0x4040e7=_0x4040e7-0xd1;let _0x426962=_0x315bc5[_0x4040e7];return _0x426962;},_0x4040(_0x791405,_0x5709f3);}function showRegisterForm(){const _0x4f712e=_0x4040;document['getElementById']('login-form')['classList']['add'](_0x4f712e(0xf1)),document[_0x4f712e(0xff)](_0x4f712e(0xd6))[_0x4f712e(0xfa)][_0x4f712e(0xd8)](_0x4f712e(0xf1));}function showLoginForm(){const _0x27b8ed=_0x4040;document[_0x27b8ed(0xff)]('register-form')[_0x27b8ed(0xfa)]['add'](_0x27b8ed(0xf1)),document['getElementById'](_0x27b8ed(0xfd))[_0x27b8ed(0xfa)][_0x27b8ed(0xd8)]('hidden');}function register(_0x19f0f8){const _0x397f0b=_0x4040;_0x19f0f8[_0x397f0b(0xdb)]();const _0x473f0b=document['getElementById']('reg-username')[_0x397f0b(0xd5)],_0x2a0ff0=document[_0x397f0b(0xff)](_0x397f0b(0xe0))['value'],_0x4e1608=document[_0x397f0b(0xff)](_0x397f0b(0xdf))[_0x397f0b(0xd5)],_0xb82a56=document[_0x397f0b(0xff)](_0x397f0b(0xf0))[_0x397f0b(0xd5)];fetch(_0x397f0b(0xf7),{'method':_0x397f0b(0xe5),'headers':{'Content-Type':_0x397f0b(0xee)},'body':JSON[_0x397f0b(0xfc)]({'username':_0x473f0b,'email':_0x2a0ff0,'password':_0x4e1608,'inviteCode':_0xb82a56})})['then'](_0x13a342=>_0x13a342[_0x397f0b(0xd9)]())[_0x397f0b(0xe8)](_0x20c19c=>{const _0x153cae=_0x397f0b;console[_0x153cae(0xf4)](_0x20c19c),_0x20c19c[_0x153cae(0xfe)](_0x153cae(0xdd))?(alert(_0x153cae(0xe1)),showLoginForm()):alert(_0x153cae(0xe7)+_0x20c19c);})[_0x397f0b(0xda)](_0x1c5457=>{const _0x126c96=_0x397f0b;console[_0x126c96(0xd2)](_0x126c96(0xd7),_0x1c5457),alert('Fehler\x20bei\x20der\x20Registrierung.');});}function showHwidVerification(){const _0x380d3b=_0x4040;document[_0x380d3b(0xff)](_0x380d3b(0xdc))[_0x380d3b(0xfa)][_0x380d3b(0xd8)]('hidden');}function submitHwid(){const _0x42ac91=_0x4040,_0x57a00b=document[_0x42ac91(0xff)](_0x42ac91(0xe9))[_0x42ac91(0xd5)];fetch('http://162.212.154.28:3567/addHWID',{'method':_0x42ac91(0xe5),'headers':{'Content-Type':_0x42ac91(0xee)},'body':JSON[_0x42ac91(0xfc)]({'hwid':_0x57a00b})})['then'](_0x525bb5=>_0x525bb5[_0x42ac91(0xd9)]())[_0x42ac91(0xe8)](_0x55ab82=>console[_0x42ac91(0xf4)](_0x55ab82))[_0x42ac91(0xda)](_0x8d43ec=>console[_0x42ac91(0xd2)](_0x42ac91(0xd7),_0x8d43ec));}
</script>

</body>
</html>
