<style>
  .tp-btn {
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    text-transform: uppercase;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out
  }

  .tp98-top {
    clear: both;
    width: auto;
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    padding: 10px
  }

  .tp98-bottom {
    clear: both;
    width: auto;
    text-align: center;
    margin-top: 0;
    padding-top: 60px
  }

  #tp98-generate {
    display: none
  }

  #tp98-wait2 {
    display: none
  }

  #tp98-snp {
    display: none
  }

  #tp98 {
    display: none
  }

  #back-top a:hover span,
  .btn,
  .more-link a,
  .pagination .next,
  .read-more a,
  .sidebar .widget ul li:hover:before,
  button,
  input[type=button],
  input[type=reset],
  input[type=submit] {
    background-color: #007bff
  }

  .site-container button:disabled,
  .site-container button:disabled:hover,
  .site-container input:disabled,
  .site-container input:disabled:hover,
  .site-container input[type=button]:disabled,
  .site-container input[type=button]:disabled:hover,
  .site-container input[type=reset]:disabled,
  .site-container input[type=reset]:disabled:hover,
  .site-container input[type=submit]:disabled,
  .site-container input[type=submit]:disabled:hover {
    background-color: #007bff;
    border-width: 0;
    color: #fff;
    cursor: not-allowed
  }

  .eleven40-pro-blue .archive-pagination a:hover,
  .eleven40-pro-blue .archive-pagination li.active a,
  .eleven40-pro-blue .button:hover,
  .eleven40-pro-blue button:hover,
  .eleven40-pro-blue input:hover[type=button],
  .eleven40-pro-blue input:hover[type=reset],
  .eleven40-pro-blue input:hover[type=submit] {
    background-color: #0062cc
  }

  .inline-block-child {
    display: inline-block
  }

  .btn {
    border-radius: 4px;
    text-transform: none;
    font-size: 16px;
    font-family: 'Open Sans';
    font-weight: 400;
    letter-spacing: normal;
    padding: 6px 12px;
    color: #fff !important;
    cursor: pointer;
    border: none !important;
    line-height: 1.5;
    height: auto;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  }
</style>
<!-- ad code here -->
<center><div class="alert alert-light mt-1 captcha-check"
  style="font-size: 16px;font-family: 'Open Sans', sans-serif;color: #818182;margin: 0;line-height: normal;"
  role="alert"><strong>You are currently on step <span class="text-danger" style="color:red;">1/2</span>.</strong>
	</div></center>
<br>
<br>
<!-- ad code here -->


<center><p style="font-size: 16px;font-family: 'Open Sans', sans-serif;color: #818182;margin: 0;line-height: normal;">
                Please wait <span id="tp-time">15</span> seconds</p></center>
<br>

<br>
<!-- ad code here -->


<?php
function get_random_post_link() {


    // Get a random post
    $args = array(
        'post_type' => 'post',  // You can change the post type if needed
        'orderby'   => 'rand',
        'posts_per_page' => 1,
    );

    $random_post = get_posts($args);

    // Check if there are any random posts
    if ($random_post) {
        // Get the random post's permalink
        $post_link = get_permalink($random_post[0]->ID);
        return esc_url($post_link);
    } else {
        return '#';
    }
}

// Usage example:
$random_post_link = get_random_post_link();
?>

<center><button id="link" type="button" class="btn btn-primary" disabled="" style="opacity: 0.4;">Click here to continue</button></center>
<form name="tp" action="<?php echo $random_post_link; ?>" method="post">
    <input type="hidden" name="tp2" value="<?php echo $_COOKIE["tp"]; ?>">
<center><button id="tp98" style="display: none;" class="btn btn-primary" >Click here to continue</button></center>
	
	</form>
<!-- ad code here -->
<script type="text/javascript">
    var count = 6;
    var counter = setInterval(timer, 1300);
    function timer() {
        count = count - 1;
        if (count <= 0) {
            document.getElementById('link').style.display = 'none';
            document.getElementById('tp98').style.display = 'block';
           document.getElementById("tp-time").innerHTML = "0";

            clearInterval(counter);
            return;
        }
        document.getElementById("tp-time").innerHTML = count;
    }


</script>
