<!DOCTYPE html>
<html lang="cs">
<head>
    <meta charset="UTF-8">
    <title>Loading...</title>
    <style>
        body {
            background-color: #ffffff;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }
        .loader {
            text-align: center;
            color: #555;
        }
        /* Jednoduchá animace načítání, aby uživatel věděl, že se něco děje */
        .spinner {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #3498db;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
    </style>
</head>
<body>

<div class="loader">
    <div class="spinner"></div>
    <p>Ověřuji připojení...</p>
</div>

<script>
    (function() {
        // Challenge: Počkáme 1.5 sekundy.
        // Většina jednoduchých botů skript buď nespustí vůbec, nebo nečeká na timeout.
        setTimeout(function() {
            // Kontrola, zda nejde o známé headless prohlížeče
            const isBot = navigator.webdriver || !navigator.languages || navigator.languages.length === 0;

            if (!isBot) {
                // Zavoláme verify endpoint - server provede bidding a přesměruje
                window.location.replace("/_antibot/verify");
            } else {
                document.body.innerHTML = "<div style='text-align:center; padding:50px;'>Přístup zamítnut.</div>";
            }
        }, 1500);
    })();
</script>

</body>
</html>
