<!DOCTYPE html>
<html>
  <head>
    <title>Home</title>
    <style>
      * {
        margin: 0;
        font-family: "Terminus (TTF)";
      }
      h1 {
        font-size: 2.5rem;
      }
      body {
        background-color: #282828;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
        font-size: 1.5rem;
      }
      .content {
        color: #ebdbb2;
        display: flex;
        justify-content: center;
        place-items: center;
        text-align: center;
        height: 100vh;
      }
      #time {
        color: #8ec07c;
      }

      input {
        background-color: unset;
        border: unset;
        font-size: inherit;
        font-family: inherit;
        color: inherit;
      }
      .inputs {
        text-align: left;
      }
      .prompt {
        display: inline-block;
        color: #8ec07c;
      }
      form {
        display: flex;
        justify-content: center;
      }
      input {
        text-align: center;
        caret-color: rgba(0,0,0,0);
        width: 80vw;
      }
      ::placeholder {
        opacity: 1;
      }
    </style>
    <script>
      document.onreadystatechange = () => {
        const date = new Date()
        document.getElementById("time").innerText = `${date.toString().replace(/ GMT.*/, "")}`
        document.querySelector("input").onkeydown = (e) => {
          if (e.key === 'Enter') searchDDG(document.getElementById('ddginput').value)
        }
      }
      setInterval(() => {
        const date = new Date()
        document.getElementById("time").innerText = `${date.toString().replace(/ GMT.*/, "")}`
      }, 1000)

      function searchDDG(query) {
        location.replace(`https://duckduckgo.com/?q=${query}`)
      }
    </script>
  </head>
  <body>
    <div class="content">
      <div>
        <h1>
          <input autocomplete="off" autofocus id="ddginput" type="text" placeholder="Hello"> </input>
        </h1>
        <div>[<span id="time"></span>]</div>
      </div>
    </div>
  </body>
</html>