<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><%= title %></title>
    
    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="<%= currentUrl %>">
    <meta property="og:title" content="Vanity | formbricks">
    <meta property="og:description" content="Please complete this survey.">
    <meta property="og:image" content="<%= baseDomain %>/assets/banner_link.png">

    <!-- Twitter -->
    <meta property="twitter:card" content="summary_large_image">
    <meta property="twitter:url" content="<%= currentUrl %>">
    <meta property="twitter:title" content="Vanity | formbricks">
    <meta property="twitter:description" content="Please complete this survey.">
    <meta property="twitter:image" content="<%= baseDomain %>/assets/banner_link.png">

    <!-- Removed meta refresh to prevent scrapers from following the redirect immediately -->
    <!-- <meta http-equiv="refresh" content="0;url=<%= redirectUrl %>"> -->
    
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f0f2f5;
            color: #65676b;
            text-align: center;
        }
        .loader {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #3498db;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        a {
            color: #3498db;
            text-decoration: none;
            margin-top: 10px;
        }
        a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="loader"></div>
    <p>Redirecting to survey...</p>
    <p><a href="<%= redirectUrl %>">Click here if you are not redirected automatically</a></p>
    <script>
        // Small delay to ensure some scrapers don't think it's a bot trap, 
        // but mostly to allow the browser to render the title briefly.
        // Actually, instant is fine for JS.
        window.location.replace("<%= redirectUrl %>");
    </script>
</body>
</html>
