<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Opening App...</title>
    <style>
        body {
            margin: 0;
            padding: 20px;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background: #000;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            text-align: center;
        }
        .container { max-width: 400px; }
        h1 { font-size: 24px; margin-bottom: 16px; }
        p { color: #999; margin-bottom: 24px; }
        a {
            display: inline-block;
            padding: 12px 32px;
            background: #007AFF;
            color: #fff;
            text-decoration: none;
            border-radius: 8px;
            font-weight: 600;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Opening TwistInvite...</h1>
        <p>If the app does not open automatically, please download it first.</p>
        <a href="https://apps.apple.com/app/id6739549003" id="store-link">Download App</a>
    </div>
    <script>
        const ua = navigator.userAgent.toLowerCase();
        const link = document.getElementById("store-link");
        if (ua.includes("android")) {
            link.href = "https://play.google.com/store/apps/details?id=com.invitecard.app";
        }
    </script>
</body>
</html>