<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Panel Anda Siap!</title>
  <link href="https://fonts.googleapis.com/css2?family=Urbanist:wght@600&display=swap" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/particles.js@2.0.0/particles.min.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Urbanist', sans-serif;
      background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364);
      background-size: 400% 400%;
      animation: gradientBG 15s ease infinite;
      min-height: 100vh;
      overflow: hidden;
      color: #fff;
    }

    @keyframes gradientBG {
      0% {background-position: 0% 50%;}
      50% {background-position: 100% 50%;}
      100% {background-position: 0% 50%;}
    }

    #particles-js {
      position: fixed;
      width: 100%;
      height: 100%;
      z-index: -1;
    }

    .container {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 30px;
      min-height: 100vh;
    }

    .glass-panel {
      backdrop-filter: blur(20px);
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 20px;
      padding: 40px;
      width: 100%;
      max-width: 700px;
      box-shadow: 0 0 35px rgba(0, 255, 255, 0.3);
      animation: fadeInUp 1s ease;
    }

    @keyframes fadeInUp {
      0% {opacity: 0; transform: translateY(40px);}
      100% {opacity: 1; transform: translateY(0);}
    }

    h2 {
      text-align: center;
      font-size: 30px;
      margin-bottom: 25px;
      color: #ffffff;
      position: relative;
      overflow: hidden;
    }

    h2::after {
      content: '';
      position: absolute;
      top: 50%;
      left: -75%;
      width: 50%;
      height: 120%;
      background: rgba(255, 255, 255, 0.2);
      transform: rotate(25deg);
      animation: shine 3s infinite;
    }

    @keyframes shine {
      0% {left: -75%;}
      100% {left: 125%;}
    }

    .panel-link, .copy-link {
      background: rgba(255, 255, 255, 0.1);
      padding: 15px;
      margin-bottom: 15px;
      border-radius: 12px;
      word-break: break-word;
      transition: 0.3s ease;
      font-size: 15px;
      box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
      cursor: pointer;
    }

    .panel-link:hover, .copy-link:hover {
      background: rgba(255, 255, 255, 0.25);
      transform: scale(1.02);
    }

    .panel-link a {
      color: #fff;
      text-decoration: none;
    }

    .btn-glow {
      display: block;
      text-align: center;
      background: linear-gradient(90deg, #00f2fe, #4facfe);
      padding: 15px;
      color: white;
      font-weight: bold;
      border-radius: 12px;
      margin-top: 30px;
      text-decoration: none;
      transition: all 0.3s ease;
      box-shadow: 0 0 20px #4facfe, 0 0 40px #00f2fe;
    }

    .btn-glow:hover {
      background: white;
      color: #00bcd4;
      box-shadow: 0 0 30px #00f2fe;
    }

    .toast {
      position: fixed;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%);
      background: #0ff;
      color: #000;
      padding: 10px 20px;
      border-radius: 10px;
      box-shadow: 0 0 15px #0ff;
      font-weight: bold;
      display: none;
      z-index: 1000;
    }
  </style>
</head>
<body>
  <div id="particles-js"></div>
  <div class="toast" id="toast">Link berhasil disalin!</div>

  <div class="container">
    <div class="glass-panel">
      <h2>Berikut Detail Panel Anda!</h2>

      <?php
      if (isset($_GET['web'])) {
          $web = htmlspecialchars($_GET['web']);
          $host = $_SERVER['HTTP_HOST'];

          $apiLink = "https://$host/$web/apiii.php";
          $loginLink = "https://$host/$web/login";
          $settingLink = "https://$host/$web/ultimate";

          echo "<div class='copy-link' onclick=\"copyText('$apiLink')\">API PANEL:<br>$apiLink</div>";
          echo "<div class='panel-link'><a href='$loginLink' target='_blank'>SETTING MAX EMAIL:<br>$loginLink</a></div>";
          echo "<div class='panel-link'><a href='$settingLink' target='_blank'>PANEL SETING:<br>$settingLink</a></div>";
          echo "<a href='$settingLink' target='_blank' class='btn-glow'>Buka Panel</a>";
      } else {
          echo "<p class='panel-link' style='color: #ff5e5e;'>Tidak ada direktori web ditemukan.</p>";
      }
      ?>
    </div>
  </div>

  <script>
    function copyText(text) {
      navigator.clipboard.writeText(text).then(() => {
        const toast = document.getElementById("toast");
        toast.style.display = "block";
        setTimeout(() => {
          toast.style.display = "none";
        }, 2000);
      });
    }

    particlesJS("particles-js", {
      "particles": {
        "number": { "value": 100, "density": { "enable": true, "value_area": 800 } },
        "color": { "value": "#ffffff" },
        "shape": { "type": "circle" },
        "opacity": { "value": 0.3, "random": true },
        "size": { "value": 2.5, "random": true },
        "line_linked": { "enable": false },
        "move": {
          "enable": true,
          "speed": 0.6,
          "direction": "none",
          "random": true,
          "straight": false,
          "out_mode": "out"
        }
      },
      "interactivity": {
        "events": {
          "onhover": { "enable": true, "mode": "grab" },
          "onclick": { "enable": true, "mode": "push" }
        },
        "modes": {
          "grab": { "distance": 140, "line_linked": { "opacity": 0.2 } },
          "push": { "particles_nb": 4 }
        }
      },
      "retina_detect": true
    });
  </script>
</body>
</html>
