* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Courier New", monospace;
  background: #020b18;
  color: #ffffff;
  overflow-x: hidden;
}

.navbar {
  width: 100%;
  height: 82px;
  padding: 0 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(3, 12, 28, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  letter-spacing: 1px;
  color: #ffffff;
}

.logo span {
  font-weight: 900;
  font-style: italic;
}

.logo strong {
  font-size: 17px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 44px;
}

.nav-links a,
.signin {
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.signin:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.join-btn {
  background: #55caff;
  color: #041220;
  padding: 16px 31px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 0 30px rgba(85, 202, 255, 0.25);
}

.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 82px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("testp.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.48;
  filter: blur(1px);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(12, 48, 74, 0.15), rgba(2, 11, 24, 0.75) 55%, #020b18 100%),
    linear-gradient(to bottom, rgba(2, 11, 24, 0.2), #020b18);
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 760px;
  text-align: center;
  margin-top: 30px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 32px;
  margin-bottom: 48px;
  border-radius: 999px;
  background: rgba(85, 202, 255, 0.08);
  border: 1px solid rgba(85, 202, 255, 0.22);
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.badge span {
  color: #55caff;
}

h1 {
  font-size: clamp(54px, 6vw, 86px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
}

h1 span {
  color: #55caff;
  text-shadow: 0 0 25px rgba(85, 202, 255, 0.35);
}

.hero-content p {
  max-width: 590px;
  margin: 34px auto 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 700;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 42px;
}

.primary-btn,
.secondary-btn {
  min-width: 190px;
  padding: 20px 34px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
  transition: all 0.2s ease;
}

.primary-btn {
  background: #55caff;
  color: #041220;
  box-shadow: 0 0 35px rgba(85, 202, 255, 0.25);
}

.secondary-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 11, 24, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(85, 202, 255, 0.4);
}

.secondary-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 900px) {
  .navbar {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    padding: 0 24px;
  }

  h1 {
    font-size: 54px;
    letter-spacing: 2px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 520px) {
  .logo strong {
    display: none;
  }

  .signin {
    display: none;
  }

  .join-btn {
    padding: 13px 20px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-content p {
    font-size: 15px;
  }
}


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Mosper AI Video Summarizer</title>
  <link rel="stylesheet" href="style.css" />
</head>
<body>

  <header class="navbar">
    <div class="logo">
      <span>MOSPER</span>
      <strong>AI Video Summarizer</strong>
    </div>

    <nav class="nav-links">
      <a href="#">Home</a>
      <a href="#summarizer">Summarizer</a>
      <a href="#">About</a>
    </nav>

    <div class="nav-actions">
      <a href="#summarizer" class="join-btn">Try It →</a>
    </div>
  </header>

  <main class="hero">
    <div class="hero-bg"></div>
    <div class="hero-overlay"></div>

    <section class="hero-content">
      <div class="badge">
        <span>Free</span> YouTube Transcript Summarizer
      </div>

      <h1>
        Paste a<br />
        YouTube Link.<br />
        Get the<br />
        <span>Summary.</span>
      </h1>

      <p>
        Mosper uses AI to fetch available YouTube captions and turn them
        into a clear, readable summary.
      </p>

      <div id="summarizer" class="summary-box">
        <input
          id="youtubeUrl"
          type="text"
          placeholder="Paste YouTube URL here"
        />

        <button onclick="summarizeVideo()" id="summaryButton">
          Summarize Video
        </button>

        <div id="loading" class="loading"></div>

        <pre id="summaryResult"></pre>
      </div>
    </section>
  </main>

  <script>
    async function summarizeVideo() {
      const youtubeUrl = document.getElementById("youtubeUrl").value.trim();
      const resultBox = document.getElementById("summaryResult");
      const loading = document.getElementById("loading");
      const button = document.getElementById("summaryButton");

      if (!youtubeUrl) {
        resultBox.textContent = "Please paste a YouTube URL first.";
        return;
      }

      resultBox.textContent = "";
      loading.textContent = "Getting transcript and summarizing. This can take 20–90 seconds...";
      button.disabled = true;

      try {
        const response = await fetch("/api/summarize-youtube", {
          method: "POST",
          headers: {
            "Content-Type": "application/json"
          },
          body: JSON.stringify({
            youtube_url: youtubeUrl
          })
        });

        const data = await response.json();

        if (!response.ok) {
          resultBox.textContent = data.detail || "Something went wrong.";
        } else {
          resultBox.textContent = data.summary;
        }
      } catch (error) {
        resultBox.textContent = "Could not connect to the server.";
      }

      loading.textContent = "";
      button.disabled = false;
    }
  </script>

</body>
</html>