<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>about:blank</title>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Roboto', sans-serif;
      background-color: #121212;
      color: #fff;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      height: 100vh;
      overflow: hidden;
    }

    #linkBar {
      background-color: #000;
      color: #fff;
      padding: 15px 30px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      max-width: 1200px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
      transition: transform 0.3s ease-in-out;
    }

    #linkBar.hidden {
      transform: translateY(-100%);
    }

    .search-container {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    input[type="text"] {
      padding: 10px;
      border-radius: 5px;
      border: 1px solid #444;
      width: 350px;
      font-size: 16px;
      background-color: #333;
      color: #fff;
    }

    .search-button {
      padding: 10px 15px;
      background-color: #3f51b5;
      color: white;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    .search-button:hover {
      background-color: #5c6bc0;
    }

    iframe {
      width: 100%;
      height: 100%;
      border: none;
      border-radius: 8px;
      background-color: #333;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    #hideButton {
      position: absolute;
      top: 20px;
      right: 20px;
      background-color: #ff4081;
      color: white;
      border: none;
      border-radius: 50%;
      padding: 15px;
      cursor: pointer;
      transition: background-color 0.3s ease;
      font-size: 18px;
    }

    #hideButton:hover {
      background-color: #f50057;
    }

    .check-button {
      background-color: #4caf50;
    }

    .check-button:hover {
      background-color: #45a049;
    }

    @media (max-width: 600px) {
      input[type="text"] {
        width: 250px;
      }

      iframe {
        height: 70vh;
      }
    }

  </style>
</head>
<body>

  <div id="linkBar">
    <div class="search-container">
      <input type="text" id="linkInput" placeholder="Enter a URL...">
      <button class="search-button" onclick="loadLink()">
        <i class="fas fa-link"></i>
      </button>
    </div>
  </div>

  <button id="hideButton" onclick="toggleLinkBar()">
    <i class="fas fa-times"></i>
  </button>
  
  <iframe id="iframe" src="" frameborder="0"></iframe>

  <script>
    function loadLink() {
      const link = document.getElementById('linkInput').value;
      const iframe = document.getElementById('iframe');
      if (link) {
        iframe.src = link;
      }
    }

    function toggleLinkBar() {
      const linkBar = document.getElementById('linkBar');
      const hideButton = document.getElementById('hideButton');
      const isHidden = linkBar.classList.contains('hidden');

      // Hide or show the link bar
      linkBar.classList.toggle('hidden');
      
      // Change the hide button icon to a check or an X
      if (isHidden) {
        hideButton.innerHTML = '<i class="fas fa-times"></i>';
      } else {
        hideButton.innerHTML = '<i class="fas fa-check"></i>';
        hideButton.classList.add('check-button');
      }

      // If hiding the bar, remove the "X" and re-add it later
      if (!isHidden) {
        setTimeout(() => {
          hideButton.innerHTML = '<i class="fas fa-times"></i>';
          hideButton.classList.remove('check-button');
        }, 300);
      }
    }
  </script>

</body>
</html>
