<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width,initial-scale=1" />
        <meta name="robots" content="noindex" />
        <title>Verify</title>
        <style>
            :root {
                --bg: #f5f5f5;
                --text: #111;
                --surface: #e2e2e2;
                --border: #bbb;
                --muted: #777;
                --link: #555;
                --error: #c00;
                --accent: {{ACCENT_COLOR}};
            }
            @media (prefers-color-scheme: dark) {
                :root {
                    --bg: #0a0a0a;
                    --text: #e0e0e0;
                    --surface: #1a1a1a;
                    --border: #333;
                    --muted: #555;
                    --link: #777;
                    --error: #f55;
                }
            }
            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }
            body {
                font-family: system-ui, sans-serif;
                display: flex;
                justify-content: center;
                align-items: center;
                height: 100vh;
                background: var(--bg);
                color: var(--text);
            }
            .box {
                text-align: center;
                max-width: 480px;
                width: 100%;
                padding: 2rem;
            }
            h2 {
                margin-bottom: 1.2rem;
                font-weight: 500;
            }
            .captcha-wrap {
                position: relative;
                display: inline-block;
                margin: 0 auto 1.2rem;
            }
            input[type='image'] {
                display: block;
                border-radius: 6px;
                max-width: 100%;
                cursor: crosshair;
                border: none;
            }
            .reload-btn {
                position: absolute;
                bottom: 6px;
                right: 6px;
                width: 32px;
                height: 32px;
                background: rgba(0, 0, 0, 0.45);
                border: none;
                border-radius: 4px;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 0;
                transition: background 0.15s;
            }
            .reload-btn:hover {
                background: rgba(0, 0, 0, 0.7);
            }
            .reload-btn svg {
                width: 18px;
                height: 18px;
                fill: none;
                stroke: #fff;
                stroke-width: 2;
                stroke-linecap: round;
                stroke-linejoin: round;
            }
            .branding {
                margin-top: 1.5rem;
                font-size: 0.7rem;
                color: var(--muted);
            }
            .branding a {
                color: var(--link);
                text-decoration: none;
            }
            .branding a:hover {
                text-decoration: underline;
            }
            .error {
                color: var(--error);
                font-size: 0.85rem;
                margin-bottom: 0.8rem;
            }
        </style>
    </head>
    <body>
        <div class="box">
            <h2>Click the incomplete circle</h2>
            {{ERROR}}
            <form method="POST" action="{{verifyPath}}">
                <input type="hidden" name="id" value="{{id}}" />
                <input type="hidden" name="redirect" value="{{redirect}}" />
                <div class="captcha-wrap">
                    <input
                        type="image"
                        name="nonce"
                        src="data:image/png;base64,{{image}}"
                        alt="CAPTCHA"
                    />
                    <button
                        type="button"
                        class="reload-btn"
                        title="New challenge"
                        onclick="location.href='{{redirect}}'"
                    >
                        <svg viewBox="0 0 24 24">
                            <path d="M1 4v6h6" />
                            <path d="M23 20v-6h-6" />
                            <path
                                d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4-4.64 4.36A9 9 0 0 1 3.51 15"
                            />
                        </svg>
                    </button>
                </div>
            </form>
            {{BRANDING}}
        </div>
    </body>
</html>
