<!DOCTYPE html>
<html lang="th">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Victory Payment API - ระบบชำระเงินอัตโนมัติ</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap">
    <script src="/static/prevent_debug.js"></script>
    <style>
        body {
            font-family: 'Prompt', sans-serif;
            scroll-behavior: smooth;
        }
        .gradient-text {
            background: linear-gradient(135deg, #3B82F6 0%, #4F46E5 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .gradient-bg {
            background: linear-gradient(135deg, #3B82F6 0%, #4F46E5 100%);
        }
        @media (max-width: 640px) {
            .mobile-menu {
                position: fixed;
                top: 0;
                right: -100%;
                bottom: 0;
                width: 80%;
                max-width: 300px;
                background: white;
                transition: all 0.3s ease;
                z-index: 50;
                overflow-y: auto;
                box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
            }
            .mobile-menu.active {
                right: 0;
            }
            .mobile-overlay {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                backdrop-filter: blur(4px);
                z-index: 40;
            }
            .mobile-overlay.active {
                display: block;
            }
            .hero-section {
                padding-top: 2rem;
                padding-bottom: 2rem;
            }
            .feature-grid {
                padding: 0 1rem;
            }
        }
        .announcement-popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 1rem;
            padding: 2rem;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            z-index: 50;
            max-width: 90%;
            width: 500px;
            display: none;
            border: 1px solid #e5e7eb;
        }
        @media (max-width: 640px) {
            .announcement-popup {
                padding: 1.5rem;
                max-width: 95%;
                margin: 0 10px;
            }
        }
        .announcement-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            z-index: 40;
            display: none;
        }
        .show {
            display: block;
            animation: fadeIn 0.3s ease-out;
        }
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translate(-50%, -48%);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%);
            }
        }
        .feature-card {
            transition: all 0.3s ease;
            border: 1px solid rgba(59, 130, 246, 0.1);
        }
        .feature-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
            border-color: rgba(59, 130, 246, 0.2);
        }
        .nav-link {
            position: relative;
            transition: all 0.2s ease;
        }
        .nav-link::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(135deg, #3B82F6 0%, #4F46E5 100%);
            transition: width 0.2s ease;
        }
        .nav-link:hover::after {
            width: 100%;
        }
        .scroll-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .scroll-to-top.visible {
            opacity: 1;
            visibility: visible;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Mobile Menu Overlay -->
    <div id="mobileOverlay" class="mobile-overlay"></div>

    <!-- Mobile Menu -->
    <div id="mobileMenu" class="mobile-menu sm:hidden">
        <div class="p-4">
            <div class="flex justify-between items-center mb-6">
                <h2 class="text-lg font-semibold text-gray-900">เมนู</h2>
                <button id="closeMobileMenu" class="text-gray-500 hover:text-gray-700 transition-colors">
                    <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                    </svg>
                </button>
            </div>
            <nav class="space-y-2">
                <a href="/howto" class="block px-4 py-2 text-gray-700 hover:bg-blue-50 rounded-lg transition-colors">คู่มือการใช้งาน</a>
                <a href="https://t.me/victorypayment" target="_blank" class="block px-4 py-2 text-gray-700 hover:bg-blue-50 rounded-lg transition-colors">ติดต่อเรา</a>
            </nav>
        </div>
    </div>

    <!-- Announcement Overlay -->
    <div id="announcementOverlay" class="announcement-overlay"></div>

    <!-- Announcement Popup -->
    <div id="announcementPopup" class="announcement-popup">
        <div class="flex justify-between items-start mb-4">
            <div class="flex items-center space-x-2">
                <svg class="w-8 h-8 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"></path>
                </svg>
                <h3 class="text-xl font-bold text-gray-900">ประกาศสำคัญ</h3>
            </div>
            <button id="closeAnnouncement" class="text-gray-400 hover:text-gray-500">
                <svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                </svg>
            </button>
        </div>
        <div class="space-y-4">
            <div class="bg-yellow-50 p-4 rounded-lg">
                <p class="text-yellow-800 font-medium">⚠️ คำเตือน: ระวังมิจฉาชีพแอบอ้าง</p>
                <p class="text-yellow-700 text-sm mt-1">กรุณาติดต่อผ่านช่องทางที่เป็นทางการเท่านั้น</p>
            </div>
            <div class="bg-blue-50 p-4 rounded-lg">
                <p class="text-blue-800 font-medium">💡 ข้อมูลบริการ</p>
                <ul class="text-blue-700 text-sm mt-2 space-y-1">
                    <li>• ค่าบริการเพียง 500 บาท/เดือน</li>
                    <li>• รองรับทุกธนาคารหลัก</li>
                    <li>• ระบบแจ้งเตือนอัตโนมัติ</li>
                    <li>• API ครบวงจร</li>
                </ul>
            </div>
            <div class="pt-2">
                <a href="https://t.me/victorypayment" target="_blank" class="inline-flex items-center justify-center w-full px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors">
                    <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 24 24">
                        <path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.562 8.161c-.18.717-.962 3.767-1.362 5.017-.4 1.25-.723 2.153-.723 2.153s-.051.143-.231.173c-.18.031-.436-.133-.436-.133s-1.07-.716-1.621-1.072c-.687-.446-1.355-.938-1.355-.938s-.154-.102-.154-.204c0-.102.154-.204.154-.204s1.842-1.68 1.842-1.68c.359-.359.359-.717-.051-.717-.154 0-1.329.938-2.864 2.052-1.535 1.113-2.813 1.93-2.813 1.93s-.205.102-.461.031l-2.196-.614c-.512-.154-.512-.512.051-.819 2.504-1.442 5.561-3.063 8.016-4.319 2.453-1.255 3.114-1.442 3.473-1.442.358 0 .767.154.767.614 0 .205-.051.461-.102.614z"/>
                    </svg>
                    ติดต่อผ่าน Telegram
                </a>
            </div>
        </div>
    </div>

    <!-- Hero Section -->
    <div class="min-h-screen flex flex-col">
        <nav class="bg-white shadow-sm sticky top-0 z-30">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="flex justify-between h-16">
                    <div class="flex items-center">
                        <h1 class="text-lg sm:text-xl md:text-2xl font-bold gradient-text">Victory Payment API</h1>
                    </div>
                    <!-- Desktop Menu -->
                    <div class="hidden sm:flex items-center space-x-6">
                        <a href="/howto" class="nav-link text-gray-600 hover:text-gray-900 font-medium transition-colors">คู่มือการใช้งาน</a>
                        <a href="https://t.me/victorypayment" target="_blank" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-lg text-white gradient-bg hover:opacity-90 transition-opacity">
                            ติดต่อเรา
                        </a>
                    </div>
                    <!-- Mobile Menu Button -->
                    <div class="flex sm:hidden items-center">
                        <button id="mobileMenuButton" class="text-gray-500 hover:text-gray-700 transition-colors">
                            <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
                            </svg>
                        </button>
                    </div>
                </div>
            </div>
        </nav>

        <main class="flex-grow">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12">
                <!-- Hero Content -->
                <div class="text-center hero-section">
                    <h2 class="text-3xl sm:text-4xl md:text-5xl font-bold text-gray-900 mb-4 sm:mb-6">
                        ระบบชำระเงินอัตโนมัติ<br/>
                        <span class="gradient-text">ครบวงจรที่สุด</span>
                    </h2>
                    <p class="text-lg sm:text-xl text-gray-600 mb-6 sm:mb-8 max-w-2xl mx-auto">รองรับทุกธนาคารหลัก พร้อมระบบแจ้งเตือนอัตโนมัติ</p>
                    <div class="flex flex-col sm:flex-row justify-center gap-3 sm:gap-4">
                        <a href="/howto" class="inline-flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white gradient-bg hover:opacity-90 transition-opacity shadow-sm">
                            เริ่มต้นใช้งาน
                        </a>
                        <a href="https://t.me/victorypayment" target="_blank" class="inline-flex items-center justify-center px-6 py-3 border border-gray-300 text-base font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50 transition-colors shadow-sm">
                            ติดต่อสอบถาม
                        </a>
                    </div>
                </div>

                <!-- Features Grid -->
                <div class="mt-16 sm:mt-20 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8 feature-grid">
                    <div class="feature-card bg-white p-6 rounded-xl">
                        <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">ราคาคุ้มค่า</h3>
                        <p class="text-gray-600">เพียง 500 บาท/เดือน สำหรับบริการครบวงจร</p>
                    </div>
                    <div class="feature-card bg-white p-6 rounded-xl">
                        <div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">รองรับทุกธนาคาร</h3>
                        <p class="text-gray-600">SCB, KTB, KBANK, GSB และอื่นๆ</p>
                    </div>
                    <div class="feature-card bg-white p-6 rounded-xl sm:col-span-2 lg:col-span-1">
                        <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">แจ้งเตือนทันที</h3>
                        <p class="text-gray-600">ระบบแจ้งเตือนอัตโนมัติผ่าน Line</p>
                    </div>
                </div>
            </div>
        </main>

        <!-- Additional Services Section -->
        <section class="bg-white py-16">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="text-center mb-12">
                    <h2 class="text-3xl font-bold text-gray-900">บริการอื่นของเรา</h2>
                    <p class="mt-4 text-lg text-gray-600">ครบวงจรด้วยบริการที่หลากหลายสำหรับธุรกิจของคุณ</p>
                </div>

                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
                    <!-- PG API Card -->
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-100 hover:shadow-lg transition-shadow">
                        <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">PG API</h3>
                        <p class="text-gray-600 mb-4">ปล่อย PG API ปรับแตก RTP สูงสุด 96%</p>
                    </div>

                    <!-- Unofficial API Card -->
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-100 hover:shadow-lg transition-shadow">
                        <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">API Unofficial</h3>
                        <p class="text-gray-600 mb-4">KPLUS, SCB EASY, BBL, KTB, BBL และอื่นๆ</p>
                    </div>

                    <!-- Mod Apk Card -->
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-100 hover:shadow-lg transition-shadow">
                        <div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">Mod Apk</h3>
                        <p class="text-gray-600 mb-4">Network Traffic Analysis โดยไม่ต้อง Root เครื่อง</p>
                    </div>

                    <!-- Payment Gateway Card -->
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-100 hover:shadow-lg transition-shadow">
                        <div class="w-12 h-12 bg-yellow-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-yellow-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">Payment Gateway</h3>
                        <p class="text-gray-600 mb-4">เริ่มต้นที่ 1.1% ถอน 0.3 เปอร์เซ็น</p>
                    </div>

                    <!-- Proxies Card -->
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-100 hover:shadow-lg transition-shadow">
                        <div class="w-12 h-12 bg-red-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">LTE 4G Proxies</h3>
                        <p class="text-gray-600 mb-4">บริการ Proxy สำหรับใช้กับธนาคารทุกธนาคาร</p>
                    </div>

                    <!-- Consulting Card -->
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-100 hover:shadow-lg transition-shadow">
                        <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-4">
                            <svg class="w-6 h-6 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"></path>
                            </svg>
                        </div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-2">บริการให้คำปรึกษา</h3>
                        <ul class="text-gray-600 space-y-2 text-sm">
                            <li>• รับ Encrypt Decrypt ทุกธนาคาร</li>
                            <li>• รับ Sniffer Traffic แบงค์</li>
                            <li>• ปรึกษาแก้ไขปัญหาเกี่ยวกับแบงค์</li>
                            <li>• แนะนำการทำ Request อย่างปลอดภัย</li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Footer -->
        <footer class="bg-white border-t border-gray-200 mt-12">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
                <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-4">Victory Payment API</h3>
                        <div class="space-y-2 text-sm text-gray-600">
                            <p>Official: <a href="https://t.me/victorypayment" class="text-blue-600 hover:text-blue-700 transition-colors">@victorypayment</a></p>
                            <p>Sell: <a href="https://t.me/vtrsync" class="text-blue-600 hover:text-blue-700 transition-colors">@vtrsync</a></p>
                        </div>
                    </div>
                    <div>
                        <h3 class="text-lg font-semibold text-gray-900 mb-4">ข้อควรระวัง</h3>
                        <p class="text-sm text-gray-600">กรุณาติดต่อผ่านช่องทางที่เป็นทางการเท่านั้น เพื่อป้องกันการถูกหลอกลวง</p>
                    </div>
                </div>
                <div class="mt-8 pt-8 border-t border-gray-100">
                    <p class="text-center text-sm text-gray-500">&copy; 2024 Victory Payment API. All rights reserved.</p>
                </div>
            </div>
        </footer>
    </div>

    <!-- Scroll to Top Button -->
    <button id="scrollToTop" class="scroll-to-top gradient-bg text-white p-3 rounded-full shadow-lg hover:opacity-90 transition-all">
        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18"></path>
        </svg>
    </button>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Announcement popup functionality
            const announcementPopup = document.getElementById('announcementPopup');
            const announcementOverlay = document.getElementById('announcementOverlay');
            const closeAnnouncement = document.getElementById('closeAnnouncement');
            
            // Mobile menu functionality
            const mobileMenu = document.getElementById('mobileMenu');
            const mobileOverlay = document.getElementById('mobileOverlay');
            const mobileMenuButton = document.getElementById('mobileMenuButton');
            const closeMobileMenu = document.getElementById('closeMobileMenu');

            // Scroll to top functionality
            const scrollToTopButton = document.getElementById('scrollToTop');

            // Show announcement popup after 1 second
            setTimeout(() => {
                announcementPopup.classList.add('show');
                announcementOverlay.classList.add('show');
            }, 1000);

            // Close announcement popup
            function closePopup() {
                announcementPopup.classList.remove('show');
                announcementOverlay.classList.remove('show');
            }

            closeAnnouncement.addEventListener('click', closePopup);
            announcementOverlay.addEventListener('click', closePopup);

            // Toggle mobile menu
            function toggleMobileMenu() {
                mobileMenu.classList.toggle('active');
                mobileOverlay.classList.toggle('active');
                document.body.style.overflow = mobileMenu.classList.contains('active') ? 'hidden' : '';
            }

            mobileMenuButton.addEventListener('click', toggleMobileMenu);
            closeMobileMenu.addEventListener('click', toggleMobileMenu);
            mobileOverlay.addEventListener('click', toggleMobileMenu);

            // Scroll to top functionality
            window.addEventListener('scroll', () => {
                if (window.pageYOffset > 300) {
                    scrollToTopButton.classList.add('visible');
                } else {
                    scrollToTopButton.classList.remove('visible');
                }
            });

            scrollToTopButton.addEventListener('click', () => {
                window.scrollTo({
                    top: 0,
                    behavior: 'smooth'
                });
            });

            // Close mobile menu on window resize
            window.addEventListener('resize', () => {
                if (window.innerWidth >= 640 && mobileMenu.classList.contains('active')) {
                    toggleMobileMenu();
                }
            });
        });
    </script>
</body>
</html> 