// Sporda — Phase F · Auth + Account. 6 mobile screens + 3 desktop.
// 045 Login already shipped (ScreenLogin in screens-2.jsx).

// Shared chrome for auth screens — atmospheric top + main content
const AuthFrame = ({ title, subtitle, children, back = true }) => (
  <div className="phone">
    <div className="viewport">
      <StatusBar/>
      {/* Header bar */}
      <div style={{ display: 'flex', alignItems: 'center', padding: '8px 16px 16px', gap: 12 }}>
        {back && <RoundBtn><I.chevL size={18}/></RoundBtn>}
        <div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 8 }}>
          <div style={{ width: 24, height: 24, borderRadius: 6, background: 'var(--accent)', display: 'flex', alignItems: 'center', justifyContent: 'center', color: 'var(--accent-ink)' }}>
            <svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor"><path d="M12 2 4 7v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V7l-8-5z"/></svg>
          </div>
          <span style={{ fontSize: 14, fontWeight: 800 }}>Sporda</span>
        </div>
        {back && <div style={{ width: 40 }}/>}
      </div>
      {/* Title block */}
      {title && (
        <div style={{ padding: '8px 24px 24px' }}>
          <div style={{ fontSize: 26, fontWeight: 800, letterSpacing: '-0.01em', lineHeight: 1.15, textWrap: 'balance' }}>{title}</div>
          {subtitle && <div style={{ marginTop: 8, fontSize: 14, color: 'var(--text-secondary)', textWrap: 'pretty' }}>{subtitle}</div>}
        </div>
      )}
      <div className="body">{children}</div>
    </div>
  </div>
);

// Form field component
const Field = ({ label, type = 'text', placeholder, value, hint, error, icon, trailing }) => (
  <div style={{ marginBottom: 16 }}>
    {label && <div style={{ fontSize: 11, fontWeight: 700, color: 'var(--text-secondary)', marginBottom: 6, letterSpacing: '0.04em', textTransform: 'uppercase' }}>{label}</div>}
    <div style={{
      display: 'flex', alignItems: 'center', gap: 10,
      background: 'var(--bg-inset)',
      border: '1px solid ' + (error ? 'rgba(255,113,133,0.40)' : 'var(--border-hairline)'),
      borderRadius: 14, padding: '0 14px', height: 52,
    }}>
      {icon && <span style={{ color: 'var(--text-muted)', display: 'flex' }}>{icon}</span>}
      <input
        type={type} placeholder={placeholder} defaultValue={value}
        style={{ flex: 1, border: 0, background: 'transparent', outline: 'none', color: 'var(--text-primary)', fontSize: 15, fontFamily: 'var(--font-ui)' }}
      />
      {trailing}
    </div>
    {(hint || error) && <div style={{ marginTop: 6, fontSize: 11, color: error ? 'var(--negative)' : 'var(--text-muted)' }}>{error || hint}</div>}
  </div>
);

// Big lime CTA button used across auth flows
const AuthPrimary = ({ label, sub }) => (
  <button style={{
    width: '100%', height: 52, borderRadius: 'var(--r-pill)',
    background: 'var(--accent)', color: 'var(--accent-ink)',
    fontWeight: 700, fontSize: 15,
    display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 8,
    marginTop: 6,
  }}>{label}{sub}</button>
);

// ===========================================================================
// 046 — SIGN UP
// ===========================================================================
const ScreenSignup = () => (
  <AuthFrame
    title={<>Create your<br/>account.</>}
    subtitle="Sync your follows, alerts, and watch history across devices."
  >
    <div style={{ padding: '0 24px 32px' }}>
      {/* Social sign-up first — single tap path */}
      <button style={{
        width: '100%', height: 52, borderRadius: 'var(--r-pill)',
        background: 'var(--bg-surface)', border: '1px solid var(--border-strong)',
        color: 'var(--text-primary)', fontWeight: 600, fontSize: 14,
        display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 10, marginBottom: 10,
      }}>
        <svg width="18" height="18" viewBox="0 0 24 24"><path fill="#fff" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"/><path fill="#FBBC05" d="M5.84 14.1A6.6 6.6 0 0 1 5.5 12c0-.73.13-1.44.34-2.1V7.07H2.18A11 11 0 0 0 1 12c0 1.77.42 3.45 1.18 4.93l3.66-2.83z"/><path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.65l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.83C6.71 7.31 9.14 5.38 12 5.38z"/></svg>
        Sign up with Google
      </button>
      <button style={{
        width: '100%', height: 52, borderRadius: 'var(--r-pill)',
        background: 'var(--bg-surface)', border: '1px solid var(--border-strong)',
        color: 'var(--text-primary)', fontWeight: 600, fontSize: 14,
        display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 10, marginBottom: 20,
      }}>
        <svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M17.6 12.5c0-2.7 2.2-4 2.3-4.1-1.3-1.8-3.3-2.1-4-2.1-1.7-.2-3.3 1-4.2 1-.9 0-2.2-1-3.6-.9-1.9 0-3.6 1.1-4.6 2.8-2 3.4-.5 8.4 1.4 11.2.9 1.3 2 2.8 3.5 2.7 1.4-.1 1.9-.9 3.6-.9s2.2.9 3.6.9c1.5 0 2.5-1.3 3.4-2.7.7-1 1.2-2.1 1.5-3.2-.1 0-2.9-1.1-2.9-4.7z"/></svg>
        Sign up with Apple
      </button>

      {/* Divider */}
      <div style={{ display: 'flex', alignItems: 'center', gap: 12, marginBottom: 20 }}>
        <div style={{ flex: 1, height: 1, background: 'var(--border-hairline)' }}/>
        <span style={{ fontSize: 10, color: 'var(--text-muted)', fontWeight: 700, letterSpacing: '0.08em' }}>OR WITH EMAIL</span>
        <div style={{ flex: 1, height: 1, background: 'var(--border-hairline)' }}/>
      </div>

      {/* Email form */}
      <Field label="Email" type="email" placeholder="you@example.com" value="ben@rascals.co"
             icon={<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.75"><path d="M3 7l9 6 9-6M5 5h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z"/></svg>}/>
      <Field label="Password" type="password" placeholder="At least 8 characters" value="password123"
             icon={<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>}
             trailing={<button style={{ color: 'var(--text-secondary)', fontSize: 12, fontWeight: 600 }}>Show</button>}
             hint="Mix of upper, lower, and a number"/>
      <Field label="Display name" placeholder="Ben Rascals" value="Ben Rascals"
             icon={<I.user size={18}/>}/>

      {/* Marketing opt-in */}
      <div style={{ display: 'flex', alignItems: 'flex-start', gap: 10, padding: '4px 0 14px' }}>
        <div style={{
          width: 20, height: 20, borderRadius: 6,
          background: 'var(--accent)', color: 'var(--accent-ink)',
          display: 'flex', alignItems: 'center', justifyContent: 'center', flex: 'none',
        }}><I.check size={12}/></div>
        <span style={{ fontSize: 12, color: 'var(--text-secondary)' }}>Email me weekend match digests · I can unsubscribe anytime</span>
      </div>

      <AuthPrimary label="Create account"/>

      <div style={{ marginTop: 14, fontSize: 11, color: 'var(--text-muted)', textAlign: 'center', lineHeight: 1.5, textWrap: 'pretty' }}>
        By signing up you agree to our <span style={{ textDecoration: 'underline' }}>Terms</span> and <span style={{ textDecoration: 'underline' }}>Privacy Policy</span>.
      </div>

      <div style={{ marginTop: 24, fontSize: 13, textAlign: 'center', color: 'var(--text-secondary)' }}>
        Already have an account? <span style={{ color: 'var(--accent)', fontWeight: 700 }}>Sign in</span>
      </div>
    </div>
  </AuthFrame>
);

// ===========================================================================
// 047 — FORGOT PASSWORD
// ===========================================================================
const ScreenForgot = () => (
  <AuthFrame
    title={<>Reset your<br/>password.</>}
    subtitle="Enter the email tied to your account. We'll send a link valid for 30 minutes."
  >
    <div style={{ padding: '0 24px 32px' }}>
      <Field label="Email" type="email" placeholder="you@example.com"
             icon={<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.75"><path d="M3 7l9 6 9-6M5 5h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z"/></svg>}/>

      <AuthPrimary label="Send reset link"/>

      {/* Inline help */}
      <div style={{
        marginTop: 24,
        background: 'var(--hero-grad)',
        border: '1px solid rgba(200,255,62,0.12)',
        borderRadius: 14, padding: 14,
      }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 8 }}>
          <div style={{ width: 28, height: 28, borderRadius: 8, background: 'rgba(200,255,62,0.15)', color: 'var(--accent)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
            <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01"/></svg>
          </div>
          <span style={{ fontSize: 13, fontWeight: 700 }}>Didn't get the link?</span>
        </div>
        <ul style={{ margin: 0, paddingLeft: 14, fontSize: 11, color: 'var(--text-secondary)', lineHeight: 1.6 }}>
          <li>Check your spam folder.</li>
          <li>The link only goes to the email you signed up with.</li>
          <li>If you used Google or Apple sign-in, there's no password to reset.</li>
        </ul>
      </div>

      <div style={{ marginTop: 24, fontSize: 13, textAlign: 'center', color: 'var(--text-secondary)' }}>
        Remember it? <span style={{ color: 'var(--accent)', fontWeight: 700 }}>Sign in</span>
      </div>
    </div>
  </AuthFrame>
);

// ===========================================================================
// 048 — VERIFY EMAIL (6-digit code input)
// ===========================================================================
const ScreenVerify = () => {
  const digits = ['4', '8', '2', '1', '', ''];
  return (
    <AuthFrame
      title={<>Check your<br/>inbox.</>}
      subtitle={<>We sent a 6-digit code to <strong style={{ color: 'var(--text-primary)' }}>ben@rascals.co</strong>. It expires in 9:42.</>}
    >
      <div style={{ padding: '0 24px 32px' }}>
        {/* 6-digit input */}
        <div style={{ display: 'flex', gap: 8, justifyContent: 'space-between', marginBottom: 24 }}>
          {digits.map((d, i) => {
            const focused = i === 4;
            return (
              <div key={i} style={{
                width: 48, height: 56, borderRadius: 12,
                background: d ? 'var(--bg-inset)' : 'transparent',
                border: '1px solid ' + (focused ? 'var(--accent)' : 'var(--border-hairline)'),
                display: 'flex', alignItems: 'center', justifyContent: 'center',
                fontSize: 22, fontWeight: 800, fontFamily: 'var(--font-mono)',
                position: 'relative',
              }}>
                {d || (focused && <span style={{ width: 1, height: 24, background: 'var(--accent)', animation: 'pulse 1.0s infinite' }}/>)}
              </div>
            );
          })}
        </div>

        {/* Resend timer */}
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 4px', marginBottom: 16 }}>
          <span style={{ fontSize: 12, color: 'var(--text-secondary)' }}>Didn't get it?</span>
          <button style={{ fontSize: 12, color: 'var(--text-muted)', fontWeight: 600 }} disabled>
            Resend in <span className="mono">0:43</span>
          </button>
        </div>

        <AuthPrimary label="Verify & continue"/>

        {/* Edit email link */}
        <div style={{ marginTop: 22, padding: '12px 14px', background: 'var(--bg-inset)', borderRadius: 12, display: 'flex', alignItems: 'center', gap: 10 }}>
          <I.bell size={14}/>
          <div style={{ flex: 1 }}>
            <div style={{ fontSize: 12, fontWeight: 600 }}>Wrong email?</div>
            <div style={{ fontSize: 11, color: 'var(--text-muted)' }}>Change it without losing your progress</div>
          </div>
          <button style={{ fontSize: 12, color: 'var(--accent)', fontWeight: 700 }}>Edit</button>
        </div>
      </div>
    </AuthFrame>
  );
};

// ===========================================================================
// 049 — 2FA SETUP
// ===========================================================================
const Screen2FA = () => (
  <AuthFrame
    title={<>Protect your<br/>account.</>}
    subtitle="Add a second factor so even a stolen password can't get in."
  >
    <div style={{ padding: '0 24px 32px' }}>
      {/* Recommended */}
      <div className="tag-micro" style={{ color: 'var(--text-secondary)', marginBottom: 10 }}>Recommended</div>
      <div style={{
        background: 'var(--hero-grad)',
        border: '1px solid rgba(200,255,62,0.20)',
        borderRadius: 16, padding: 16, marginBottom: 14,
      }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 12, marginBottom: 10 }}>
          <div style={{ width: 40, height: 40, borderRadius: 10, background: 'var(--accent)', color: 'var(--accent-ink)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
            <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="11" width="18" height="11" rx="2"/><circle cx="12" cy="16" r="1.5"/></svg>
          </div>
          <div style={{ flex: 1 }}>
            <div style={{ fontSize: 14, fontWeight: 700 }}>Authenticator app</div>
            <div style={{ fontSize: 11, color: 'var(--text-secondary)' }}>1Password · Authy · Google Authenticator</div>
          </div>
        </div>
        <button style={{
          width: '100%', padding: '12px', borderRadius: 12,
          background: '#0A1400', color: 'var(--accent)',
          fontWeight: 700, fontSize: 13,
        }}>Set up authenticator</button>
      </div>

      {/* Other options */}
      <div className="tag-micro" style={{ color: 'var(--text-secondary)', marginBottom: 10 }}>Other options</div>
      {[
        { icon: <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.75"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>, title: 'Text message (SMS)', sub: 'Less secure but works without an app' },
        { icon: <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.75"><rect x="3" y="4" width="18" height="18" rx="3"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>, title: 'Backup codes', sub: '10 one-time codes to print or save' },
        { icon: <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.75"><circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="3"/></svg>, title: 'Passkey / hardware key', sub: 'YubiKey, FIDO2, Touch ID' },
      ].map((opt, i) => (
        <div key={i} style={{
          background: 'var(--bg-surface)', border: '1px solid var(--border-hairline)',
          borderRadius: 14, padding: 14, marginBottom: 8,
          display: 'flex', alignItems: 'center', gap: 12,
        }}>
          <div style={{ width: 36, height: 36, borderRadius: 10, background: 'var(--bg-inset)', color: 'var(--text-secondary)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
            {opt.icon}
          </div>
          <div style={{ flex: 1 }}>
            <div style={{ fontSize: 13, fontWeight: 600 }}>{opt.title}</div>
            <div style={{ fontSize: 11, color: 'var(--text-muted)' }}>{opt.sub}</div>
          </div>
          <I.chevR/>
        </div>
      ))}

      <button style={{
        width: '100%', height: 48, marginTop: 16,
        background: 'transparent', color: 'var(--text-secondary)',
        fontSize: 13, fontWeight: 600,
      }}>Skip for now</button>
    </div>
  </AuthFrame>
);

// ===========================================================================
// 050 — CONNECT SOCIALS
// ===========================================================================
const ScreenSocials = () => {
  const accounts = [
    { name: 'Google', sub: 'ben@gmail.com', connected: true, bg: '#FFFFFF', glyph: <svg width="20" height="20" viewBox="0 0 24 24"><path fill="#fff" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"/><path fill="#FBBC05" d="M5.84 14.1A6.6 6.6 0 0 1 5.5 12c0-.73.13-1.44.34-2.1V7.07H2.18A11 11 0 0 0 1 12c0 1.77.42 3.45 1.18 4.93l3.66-2.83z"/><path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.65l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.83C6.71 7.31 9.14 5.38 12 5.38z"/></svg> },
    { name: 'Apple',  sub: 'Hidden email', connected: false, bg: '#0A0F0C', glyph: <svg width="20" height="20" viewBox="0 0 24 24" fill="white"><path d="M17.6 12.5c0-2.7 2.2-4 2.3-4.1-1.3-1.8-3.3-2.1-4-2.1-1.7-.2-3.3 1-4.2 1-.9 0-2.2-1-3.6-.9-1.9 0-3.6 1.1-4.6 2.8-2 3.4-.5 8.4 1.4 11.2.9 1.3 2 2.8 3.5 2.7 1.4-.1 1.9-.9 3.6-.9s2.2.9 3.6.9c1.5 0 2.5-1.3 3.4-2.7.7-1 1.2-2.1 1.5-3.2-.1 0-2.9-1.1-2.9-4.7z"/></svg> },
    { name: 'X (Twitter)', sub: 'Share scorelines automatically', connected: false, bg: '#000', glyph: <span style={{ color: 'white', fontWeight: 800, fontSize: 16 }}>𝕏</span> },
    { name: 'Instagram', sub: 'Share scoreline graphics', connected: false, bg: 'linear-gradient(135deg, #EC4899, #FFE66D)', glyph: <span style={{ color: 'white', fontSize: 18 }}>📷</span> },
    { name: 'Discord',   sub: 'Sync follows with your server', connected: true, bg: '#5865F2', glyph: <span style={{ color: 'white', fontWeight: 800 }}>D</span> },
    { name: 'Apple Calendar', sub: 'Auto-add fixtures', connected: false, bg: '#FF3B30', glyph: <span style={{ color: 'white', fontSize: 14 }}>📅</span> },
  ];
  return (
    <AuthFrame
      title="Connect accounts"
      subtitle="Sign in with these, sync your data, or share to them directly."
    >
      <div style={{ padding: '0 24px 32px' }}>
        {accounts.map(a => (
          <div key={a.name} style={{
            display: 'flex', alignItems: 'center', gap: 12,
            padding: '14px 14px', marginBottom: 8,
            background: 'var(--bg-surface)', border: '1px solid var(--border-hairline)',
            borderRadius: 14,
          }}>
            <div style={{ width: 40, height: 40, borderRadius: 10, background: a.bg, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
              {a.glyph}
            </div>
            <div style={{ flex: 1, minWidth: 0 }}>
              <div style={{ fontSize: 14, fontWeight: 700 }}>{a.name}</div>
              <div style={{ fontSize: 11, color: 'var(--text-secondary)' }}>{a.sub}</div>
            </div>
            {a.connected ? (
              <button style={{
                padding: '8px 14px', borderRadius: 999,
                background: 'rgba(200,255,62,0.10)', border: '1px solid rgba(200,255,62,0.30)',
                color: 'var(--accent)', fontSize: 11, fontWeight: 700,
                display: 'inline-flex', alignItems: 'center', gap: 4,
              }}>
                <I.check size={12}/> Connected
              </button>
            ) : (
              <button style={{
                padding: '8px 14px', borderRadius: 999,
                background: 'transparent', border: '1px solid var(--border-strong)',
                color: 'var(--text-primary)', fontSize: 12, fontWeight: 700,
              }}>Connect</button>
            )}
          </div>
        ))}

        <div style={{ marginTop: 20, padding: '12px 14px', background: 'var(--bg-inset)', borderRadius: 12, fontSize: 11, color: 'var(--text-secondary)', lineHeight: 1.6 }}>
          <strong style={{ color: 'var(--text-primary)' }}>What we don't do:</strong> we never post on your behalf without your tap. Disconnecting any account here erases its tokens within 24 hours.
        </div>
      </div>
    </AuthFrame>
  );
};

// ===========================================================================
// 051 — ACCOUNT DELETION CONFIRM
// ===========================================================================
const ScreenAccountDelete = () => (
  <AuthFrame
    title={<>Delete your<br/>account?</>}
    subtitle="This is permanent. We're sad to see you go."
  >
    <div style={{ padding: '0 24px 32px' }}>
      {/* What will happen */}
      <div style={{
        background: 'rgba(255,113,133,0.06)',
        border: '1px solid rgba(255,113,133,0.20)',
        borderRadius: 16, padding: 16, marginBottom: 16,
      }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 }}>
          <div style={{ width: 32, height: 32, borderRadius: 8, background: 'rgba(255,113,133,0.15)', color: 'var(--negative)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
            <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 8v4M12 16h.01"/></svg>
          </div>
          <div style={{ fontSize: 13, fontWeight: 700 }}>What we'll do</div>
        </div>
        {[
          'Delete your account and profile within 24 hours',
          'Remove your followed teams, players, and leagues',
          '142 watched matches will be lost',
          'Connected social accounts will be disconnected',
          'You\'ll be signed out on all devices',
        ].map((line, i) => (
          <div key={i} style={{ display: 'flex', alignItems: 'flex-start', gap: 10, padding: '6px 0', fontSize: 12, color: 'var(--text-secondary)' }}>
            <span style={{ width: 4, height: 4, borderRadius: '50%', background: 'var(--negative)', marginTop: 7, flex: 'none' }}/>
            <span>{line}</span>
          </div>
        ))}
      </div>

      {/* Soft alternative */}
      <button style={{
        width: '100%', padding: 14,
        background: 'var(--bg-surface)', border: '1px solid var(--border-strong)',
        borderRadius: 14, textAlign: 'left',
        display: 'flex', alignItems: 'center', gap: 12, marginBottom: 16,
      }}>
        <div style={{ width: 32, height: 32, borderRadius: 8, background: 'rgba(255,181,71,0.12)', color: 'var(--warning)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
          <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>
        </div>
        <div style={{ flex: 1 }}>
          <div style={{ fontSize: 13, fontWeight: 700 }}>Pause your account instead?</div>
          <div style={{ fontSize: 11, color: 'var(--text-muted)', marginTop: 2 }}>Hide everything, keep your data. Reactivate anytime.</div>
        </div>
        <I.chevR/>
      </button>

      {/* Type to confirm */}
      <Field
        label="Type DELETE to confirm"
        placeholder="DELETE"
        value=""
        icon={<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" strokeWidth="1.75"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>}
      />

      <button style={{
        width: '100%', height: 52, borderRadius: 'var(--r-pill)',
        background: 'var(--bg-surface)', border: '1px solid var(--negative)',
        color: 'var(--negative)', fontWeight: 700, fontSize: 14,
        marginTop: 8,
      }} disabled>
        Permanently delete account
      </button>

      <div style={{ marginTop: 14, fontSize: 11, color: 'var(--text-muted)', textAlign: 'center' }}>
        Need help? <span style={{ color: 'var(--text-secondary)', textDecoration: 'underline' }}>Contact support</span>
      </div>
    </div>
  </AuthFrame>
);

Object.assign(window, {
  AuthFrame, Field, AuthPrimary,
  ScreenSignup, ScreenForgot, ScreenVerify, Screen2FA, ScreenSocials, ScreenAccountDelete,
});
