<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body {
            background: #2c2c2c;
            color: #fff;
            font-family: 'Orbitron', sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .container {
            text-align: center;
        }

        .loading-circle {
            border: 8px solid transparent;
            border-top: 8px solid #4a90e2; /* Soft blue */
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

        .button {
            padding: 15px 30px;
            background: #4a90e2; /* Soft blue */
            border: none;
            border-radius: 25px;
            font-size: 18px;
            color: #fff;
            text-transform: uppercase;
            cursor: pointer;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        .button:hover {
            background: #357ABD; /* Slightly darker blue */
            transform: scale(1.1);
        }

        .button:active {
            transform: scale(0.9);
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .wrapper {
            width: 200px;
            height: 60px;
            position: relative;
            z-index: 1;
        }

        .circle {
            width: 20px;
            height: 20px;
            position: absolute;
            border-radius: 50%;
            background-color: #4a90e2; /* Soft blue */
            left: 15%;
            transform-origin: 50%;
            animation: circle7124 .5s alternate infinite ease;
        }

        @keyframes circle7124 {
            0% {
                top: 60px;
                height: 5px;
                border-radius: 50px 50px 25px 25px;
                transform: scaleX(1.7);
            }

            40% {
                height: 20px;
                border-radius: 50%;
                transform: scaleX(1);
            }

            100% {
                top: 0%;
            }
        }

        .circle:nth-child(2) {
            left: 45%;
            animation-delay: .2s;
        }

        .circle:nth-child(3) {
            left: auto;
            right: 15%;
            animation-delay: .3s;
        }

        .shadow {
            width: 20px;
            height: 4px;
            border-radius: 50%;
            background-color: rgba(0, 0, 0, 0.6);
            position: absolute;
            top: 62px;
            transform-origin: 50%;
            z-index: -1;
            left: 15%;
            filter: blur(1px);
            animation: shadow046 .5s alternate infinite ease;
        }

        @keyframes shadow046 {
            0% {
                transform: scaleX(1.5);
            }

            40% {
                transform: scaleX(1);
                opacity: .7;
            }

            100% {
                transform: scaleX(.2);
                opacity: .4;
            }
        }

        .shadow:nth-child(4) {
            left: 45%;
            animation-delay: .2s
        }

        .shadow:nth-child(5) {
            left: auto;
            right: 15%;
            animation-delay: .3s;
        }
    </style>
</head>
<body>
    <div class="container">
        <div id="loadingCircle" class="loading-circle"></div>
        <div id="messageContent"></div>
    </div>

    <script>
        const url = 'https://forumapp.roomsapis.com/api/roomMessage?user_id=2689&page=1&limit=30';
        const headers = {
            'Host': 'forumapp.roomsapis.com',
            'Content-Type': 'application/json',
            'Connection': 'keep-alive',
            'Accept': 'application/json',
            'User-Agent': 'Rooms%20App/17.3 CFNetwork/1568.100.1.2.1 Darwin/24.0.0',
            'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2ZvcnVtYXBwLnJvb21zYXBpcy5jb20vYXBpL2F1dGgvcmVnaXN0ZXIiLCJpYXQiOjE3MzU0NDA2MDMsImV4cCI6MTc0MzIxNjYwMywibmJmIjoxNzM1NDQwNjAzLCJqdGkiOiI1TGFzaVBaNklRVWM2THFJIiwic3ViIjoiNjcxNyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.RHAefLRTC7J6Ra6ysAoklJv6A2_Uyb9BgC8GBjf0vqs',
            'Accept-Language': 'en-GB,en-US;q=0.9,en;q=0.8'
        };

        function checkForMessage() {
            fetch(url, { method: 'GET', headers: headers })
                .then(response => response.json())
                .then(data => {
                    if (data.success && data.data.messages) {
                        const latestMessage = data.data.messages[0].message;
                        const messageContent = document.getElementById('messageContent');
                        const loadingCircle = document.getElementById('loadingCircle');

                        if (latestMessage === 'vjmi') {
                        } else if (latestMessage.startsWith('https://www.tiktok.com')) {
                            loadingCircle.style.display = 'none';
                            const button = document.createElement('button');
                            button.classList.add('button');
                            button.innerHTML = "! 👀 اضغط";
                            button.onclick = () => window.location.href = latestMessage;
                            messageContent.innerHTML = "";
                            messageContent.appendChild(button);
                        }
                    }
                })
        }
        checkForMessage()
    </script>
</body>
</html>