<!DOCTYPE html>
<html lang="th">
<head>
  <meta charset="UTF-8" />
  <title>แจกโปรแกรมสุดเจ๋ง</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <style>
    /* รีเซ็ต margin/padding */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Sarabun", sans-serif;
    }

    /* พื้นหลังแบบ gradient */
    body {
      background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
      min-height: 100vh;
      color: #fff;
      display: flex;
      flex-direction: column;
    }

    /* ส่วนหัว (Header/Nav) */
    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 40px;
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(5px);
    }

    header h1 {
      font-size: 1.5rem;
    }

    nav a {
      color: #fff;
      text-decoration: none;
      margin-left: 20px;
      transition: color 0.3s ease;
    }

    nav a:hover {
      color: #00ffd5;
    }

    /* ส่วนหลัก (Content) */
    .container {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 40px 20px;
    }

    .container h2 {
      font-size: 2.5rem;
      margin-bottom: 20px;
      text-transform: uppercase;
      letter-spacing: 2px;
    }

    .container p {
      font-size: 1.2rem;
      max-width: 600px;
      margin: 0 auto 30px;
      line-height: 1.6;
    }

    /* รูปภาพหลักในหน้า */
    .main-image {
      max-width: 300px; /* ขนาดกว้างสุดของรูป */
      border-radius: 10px;
      margin-bottom: 20px; /* เว้นระยะก่อนเนื้อหาอื่น */
    }

    /* ปุ่ม */
    .btn-group {
      display: flex;
      gap: 20px;
      margin-top: 20px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .btn {
      background: #00ffd5;
      color: #000;
      border: none;
      padding: 15px 30px;
      font-size: 1rem;
      cursor: pointer;
      font-weight: bold;
      border-radius: 30px;
      transition: all 0.3s ease;
      text-transform: uppercase;
      text-decoration: none; /* สำหรับลิงก์ */
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .btn:hover {
      background: #00bfa5;
      color: #fff;
    }

    /* Modal (ป๊อปอัป) */
    .modal {
      display: none; /* ซ่อนก่อน */
      position: fixed; /* ลอยอยู่เหนือหน้า */
      z-index: 999; /* ให้อยู่บนสุด */
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto; /* เลื่อนถ้ามีเนื้อหาเยอะ */
      background-color: rgba(0, 0, 0, 0.8); /* พื้นหลังโปร่งแสงสีดำ */
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .modal-content-wrapper {
      max-width: 800px;
      width: 100%;
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(8px);
      border-radius: 10px;
      position: relative;
      padding: 20px;
      text-align: center;
    }

    .modal-content-wrapper img {
      max-width: 100%;
      border-radius: 10px;
      margin-bottom: 20px;
    }

    .close {
      position: absolute;
      top: 10px;
      right: 20px;
      color: #fff;
      font-size: 2rem;
      font-weight: bold;
      cursor: pointer;
      transition: color 0.3s ease;
    }

    .close:hover {
      color: #00ffd5;
    }

    /* Footer */
    footer {
      text-align: center;
      padding: 20px;
      background: rgba(255, 255, 255, 0.1);
    }

    footer p {
      font-size: 0.9rem;
    }
  </style>
</head>
<body>

  <!-- Header -->
  <header>
    <h1>Witthaya Thelegandary</h1>
  </header>

  <!-- Container -->
  <div class="container">
    <h2>FREE DOWNLOAD PROGRAM DDOS</h2>
    <p>
      ใช้เพื่อการศึกษาเท่านั้น โปรแกรมนี้พัฒนาโดย Witthaya Thelegandary
    </p>

    <!-- เพิ่มรูปภาพหลักในหน้าเว็บ -->
    <img 
      class="main-image"
      src="https://cdn.discordapp.com/attachments/1317798781558853636/1335150557039689832/witthayathelegandary.jpg?ex=679f1f5a&is=679dcdda&hm=3b6d6aaeb352747144e62f7ddda6e48eaae7614f8842f0e09213e50c2e020c9d&" 
      alt="รูปตัวอย่างจาก Imgur"
    >

    <!-- ปุ่มเปิด Modal -->
    <button class="btn" id="downloadBtn">ดาวน์โหลด</button>
  </div>

  <!-- Modal -->
  <div class="modal" id="myModal">
    <div class="modal-content-wrapper">
      <span class="close" id="closeModal">&times;</span>
      
      <!-- รูปโปรแกรม (แก้ลิงก์ได้ตามต้องการ) -->
      <img 
        id="imgModal" 
        src="https://cdn.discordapp.com/attachments/1317798781558853636/1335149975243329577/Screenshot_2025-02-01_142903.png?ex=679f1ecf&is=679dcd4f&hm=993fe8aa14fc411a42f88ad2275a2aad35f8286ceaeade98f94f23fe66cfeddc&" 
        alt="รูปโปรแกรมใน Modal">

      <!-- ปุ่มดาวน์โหลดไฟล์จริง (แก้ลิงก์ไฟล์ตามต้องการ) -->
      <a 
        class="btn" 
        href="https://cdn.discordapp.com/attachments/1317798781558853636/1335150036857782322/wth.js?ex=679f1ede&is=679dcd5e&hm=fba6a08d9dce2d4008862ddaa4cfc71dc30000ce317112f115550e6f0987b9bc&" 
        download="โปรแกรมDDOS.zip"
        style="background: #ffdf00; color: #000; margin-top: 10px;"
      >
        ดาวน์โหลดไฟล์
      </a>
    </div>
  </div>

  <!-- Footer -->
  <footer>
    <p>
      DDoS Free By | Witthaya Thelegandary
    </p>
  </footer>

  <!-- JavaScript สำหรับเปิด-ปิด Modal -->
  <script>
    const downloadBtn = document.getElementById('downloadBtn');
    const myModal = document.getElementById('myModal');
    const closeModal = document.getElementById('closeModal');

    // เมื่อคลิกปุ่ม "ดาวน์โหลด" บนหน้าเว็บให้เปิด Modal
    downloadBtn.addEventListener('click', function() {
      myModal.style.display = 'flex';
    });

    // เมื่อคลิกปุ่มปิด (x) ให้ปิด Modal
    closeModal.addEventListener('click', function() {
      myModal.style.display = 'none';
    });

    // เมื่อคลิกบริเวณนอก Modal ก็ปิดเช่นกัน
    window.addEventListener('click', function(event) {
      if (event.target === myModal) {
        myModal.style.display = 'none';
      }
    });
  </script>
</body>
</html>
