<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SURPRISE</title>
    <link rel="icon" href="https://issue.natanet.my.id/Asset/icon.png" type="image/png">
    
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Poppins:wght@400;600&display=swap" rel="stylesheet">
    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

    <style>
        body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            background: linear-gradient(to bottom right, #004d40, #003a35); 
            color: #ffffff;
            text-align: center;
            padding: 20px;
            box-sizing: border-box;
            overflow: hidden; 
            font-family: 'Poppins', sans-serif;
            position: relative; 
            z-index: 1; 
            /* Tambahkan ini untuk memastikan kursor default, particles.js akan mengubahnya untuk interaksi */
            cursor: default; 
        }

        /* --- Kontainer Partikel --- */
        #particles-js {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: -1; 
            background-color: transparent; 
            /* Tambahkan ini untuk memastikan interaksi mouse berfungsi */
            pointer-events: auto; 
        }

        /* --- Welcome Screen Styles --- */
        #welcome-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom right, #004d40, #003a35); 
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000; /* Paling atas saat aktif */
            opacity: 1;
            transition: opacity 0.5s ease-out;
            /* Pastikan welcome screen memblokir interaksi saat aktif */
            pointer-events: auto; 
        }

        #welcome-screen.hidden {
            opacity: 0;
            /* Pointer events dinonaktifkan saat hidden agar interaksi tembus ke belakang */
            pointer-events: none; 
        }

        #welcome-screen h1 {
            font-family: 'Montserrat', sans-serif; 
            font-size: 3.5em; 
            margin-bottom: 30px;
            color: #ffffff;
            letter-spacing: 1px; 
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); 
            opacity: 0; 
            transform: translateY(-20px); 
            animation: fadeInTop 0.8s ease-out forwards; 
        }

        #enter-button {
            background-color: #4CAF50;
            color: white;
            padding: 18px 40px; 
            border: none;
            border-radius: 50px; 
            cursor: pointer;
            font-size: 1.5em;
            font-family: 'Poppins', sans-serif; 
            font-weight: 600; 
            transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
            opacity: 0; 
            transform: translateY(20px); 
            animation: fadeInBottom 0.8s ease-out forwards; 
            animation-delay: 0.3s; 
        }

        #enter-button i { 
            margin-right: 10px;
            font-size: 1.2em;
        }

        #enter-button:hover {
            background-color: #45a049;
            transform: translateY(-3px) scale(1.02); 
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); 
        }

        /* Keyframes untuk animasi masuk */
        @keyframes fadeInTop {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInBottom {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* --- Main Content Styles (existing) --- */
        #main-content {
            display: none;
            width: 100%;
            flex-grow: 1;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding-top: 20px; 
            font-family: 'Poppins', sans-serif;
            position: relative; 
            z-index: 2; 
        }

        .container {
            max-width: 800px;
            padding: 30px;
            /* Opasitas background container dikurangi agar partikel lebih terlihat */
            background-color: rgba(0, 0, 0, 0.2); /* Dari 0.3 jadi 0.2 */
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            margin-bottom: 20px;
        }
        h1 {
            font-size: 2.5em;
            margin-bottom: 20px;
        }
        p {
            font-size: 1.2em;
            line-height: 1.6;
        }
        a {
            color: #81c784;
            text-decoration: none;
            font-weight: bold;
        }
        a:hover {
            text-decoration: underline;
        }
        #language-toggle-button {
            background-color: #4CAF50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1em;
            margin-top: 10px;
            transition: background-color 0.3s ease;
        }
        #language-toggle-button:hover {
            background-color: #45a049;
        }
        .footer {
            padding-top: 20px;
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.7);
        }

        /* Media queries for responsiveness on smaller screens */
        @media (max-width: 600px) {
            #welcome-screen h1 {
                font-size: 2em;
            }
            #enter-button {
                font-size: 1.2em;
                padding: 12px 25px;
            }
            h1 {
                font-size: 1.8em;
            }
            p {
                font-size: 1em;
            }
            .container {
                padding: 20px;
            }
        }
    </style>
</head>
<body>

    <div id="particles-js"></div>

    <div id="welcome-screen">
        <h1>Message From Server</h1>
        <button id="enter-button">
            <i class="fas fa-envelope"></i> Open Message
        </button>
    </div>

    <div id="main-content">
        <div class="container">
            <p data-lang-en="Your service is currently suspended."
               data-lang-id="Saat ini layanan anda ditangguhkan.">
                Your service is currently suspended.
            </p>
            <p data-lang-en="Contact us immediately via email at <a href='mailto:ask@natanetwork.co.id'>ask@natanetwork.co.id</a> using your registered email."
               data-lang-id="Segera Hubungi kami melalui email <a href='mailto:ask@natanetwork.co.id'>ask@natanetwork.co.id</a> menggunakan email terdaftar.">
                Contact them immediately via email at <a href="mailto:ask@natanetwork.co.id">ask@natanetwork.co.id</a> using your registered email.
            </p>
            <p data-lang-en="Thank you." data-lang-id="Terima Kasih.">
                Thank you.
            </p>
        </div>

        <button id="language-toggle-button" aria-label="Toggle language">
            Ubah ke Bahasa Indonesia
        </button>

        <div class="footer">
            <p>© Copyright 2025 CV. NATANETWORK SOLUTION</p>
        </div>
    </div>

    <audio id="background-music" loop>
        <source src="https://issue.natanet.my.id/Asset/rickroll.mp3" type="audio/mpeg">
        Your browser does not support the audio element.
    </audio>

    <script src="https://cdn.jsdelivr.net/npm/particles.js@2.0.0/particles.min.js"></script>
    <script>
        const welcomeScreen = document.getElementById('welcome-screen');
        const enterButton = document.getElementById('enter-button');
        const mainContent = document.getElementById('main-content');
        const languageToggleButton = document.getElementById('language-toggle-button');
        const backgroundMusic = document.getElementById('background-music');

        let currentLang = 'en'; // Default language is English

        // Function to update content based on language
        function updateContent(lang) {
            document.querySelectorAll('[data-lang-en], [data-lang-id]').forEach(element => {
                const enContent = element.getAttribute('data-lang-en');
                const idContent = element.getAttribute('data-lang-id');
                if (lang === 'en') {
                    element.innerHTML = enContent;
                } else {
                    element.innerHTML = idContent;
                }
            });

            // Update button text
            if (lang === 'en') {
                languageToggleButton.textContent = 'Ubah ke Bahasa Indonesia';
                languageToggleButton.setAttribute('aria-label', 'Switch to Indonesian language');
                document.documentElement.lang = 'en'; // Update HTML lang attribute
            } else {
                languageToggleButton.textContent = 'Switch to English';
                languageToggleButton.setAttribute('aria-label', 'Switch to English language');
                document.documentElement.lang = 'id'; // Update HTML lang attribute
            }
        }
        
        // --- Fitur Redirect Otomatis ---
        let idleTimeout;
        const redirectUrl = "https://www.natanetwork.com/portal/aff.php?aff=337";
        const idleTime = 15000; // 15 detik dalam milidetik

        function resetIdleTimer() {
            clearTimeout(idleTimeout);
            idleTimeout = setTimeout(() => {
                window.location.href = redirectUrl;
            }, idleTime);
        }

        function startIdleTimer() {
            document.addEventListener('mousemove', resetIdleTimer);
            document.addEventListener('keypress', resetIdleTimer);
            document.addEventListener('click', resetIdleTimer);
            document.addEventListener('scroll', resetIdleTimer);
            resetIdleTimer(); // Start the timer initially
        }
        // --- Akhir Fitur Redirect Otomatis ---

        // Event listener for the "Enter" button on the welcome screen
        enterButton.addEventListener('click', () => {
            welcomeScreen.classList.add('hidden');
            
            setTimeout(() => {
                welcomeScreen.style.display = 'none'; 
                mainContent.style.display = 'flex'; 

                backgroundMusic.play().then(() => {
                    console.log("Music started playing after user interaction.");
                }).catch(error => {
                    console.error("Failed to play music after user interaction:", error);
                });

                startIdleTimer(); 
            }, 100); 
        });

        // Initial setup when DOM is ready (before any user interaction)
        document.addEventListener('DOMContentLoaded', () => {
            updateContent(currentLang);
            
            // Inisialisasi particles.js
            particlesJS('particles-js', {
                "particles": {
                    "number": {
                        "value": 150, /* Jumlah partikel ditingkatkan */
                        "density": {
                            "enable": true,
                            "value_area": 800
                        }
                    },
                    "color": {
                        "value": "#81c784" 
                    },
                    "shape": {
                        "type": "circle",
                        "stroke": {
                            "width": 0,
                            "color": "#000000"
                        },
                        "polygon": {
                            "nb_sides": 5
                        },
                    },
                    "opacity": {
                        "value": 0.5, /* Opasitas partikel ditingkatkan */
                        "random": false,
                        "anim": {
                            "enable": false,
                            "speed": 1,
                            "opacity_min": 0.1,
                            "sync": false
                        }
                    },
                    "size": {
                        "value": 3, 
                        "random": true,
                        "anim": {
                            "enable": false,
                            "speed": 40,
                            "size_min": 0.1,
                            "sync": false
                        }
                    },
                    "line_linked": {
                        "enable": true,
                        "distance": 150, /* Jarak garis penghubung sedikit diperpendek */
                        "color": "#81c784", 
                        "opacity": 0.6, /* Opasitas garis ditingkatkan */
                        "width": 1.5 /* Ketebalan garis ditingkatkan */
                    },
                    "move": {
                        "enable": true,
                        "speed": 3, 
                        "direction": "none",
                        "random": false,
                        "straight": false,
                        "out_mode": "out",
                        "bounce": false,
                        "attract": {
                            "enable": false,
                            "rotateX": 600,
                            "rotateY": 1200
                        }
                    }
                },
                "interactivity": {
                    "detect_on": "canvas",
                    "events": {
                        "onhover": {
                            "enable": true,
                            "mode": "grab" 
                        },
                        "onclick": {
                            "enable": true,
                            "mode": "push" 
                        },
                        "resize": true
                    },
                    "modes": {
                        "grab": {
                            "distance": 150, /* Jarak grab sedikit diperpendek, lebih responsif */
                            "line_linked": {
                                "opacity": 1
                            }
                        },
                        "bubble": {
                            "distance": 400,
                            "size": 40,
                            "duration": 2,
                            "opacity": 8,
                            "speed": 3
                        },
                        "repulse": {
                            "distance": 200,
                            "duration": 0.4
                        },
                        "push": {
                            "particles_nb": 4
                        },
                        "remove": {
                            "particles_nb": 2
                        }
                    }
                },
                "retina_detect": true
            });
        });

        // Event listener for the language toggle button (in main content)
        languageToggleButton.addEventListener('click', () => {
            currentLang = (currentLang === 'en') ? 'id' : 'en';
            updateContent(currentLang);
            resetIdleTimer(); 
        });
    </script>
</body>
</html>
