import type { Metadata } from 'next';

export const metadata: Metadata = {
  title: 'Responsible Gambling',
  description:
    'VYNDR is an analytics tool, not a sportsbook. 21+. If gambling stops being fun, stop. Call or text 1-800-GAMBLER.',
};

// Session 2 (A1 board) — rebuilt sincerely per NORTH STAR v1.1: "Responsible
// gaming built sincerely. The company that lasts is the one users don't
// resent in five years." Server component. No marketing adjacency on this
// page — no pricing links, no upsell, no product pitch.

const STATE_RESOURCES: { state: string; phone: string; tel: string }[] = [
  { state: 'Arizona', phone: '1-800-NEXT-STEP', tel: '18006398783' },
  { state: 'Colorado', phone: '1-800-522-4700', tel: '18005224700' },
  { state: 'Illinois', phone: '1-800-GAMBLER', tel: '18004262537' },
  { state: 'Indiana', phone: '1-800-994-8448', tel: '18009948448' },
  { state: 'Kansas', phone: '1-800-522-4700', tel: '18005224700' },
  { state: 'Louisiana', phone: '1-877-770-7867', tel: '18777707867' },
  { state: 'Maryland', phone: '1-800-GAMBLER', tel: '18004262537' },
  { state: 'Massachusetts', phone: '1-800-327-5050', tel: '18003275050' },
  { state: 'Michigan', phone: '1-800-270-7117', tel: '18002707117' },
  { state: 'Nevada', phone: '1-800-522-4700', tel: '18005224700' },
  { state: 'New Jersey', phone: '1-800-GAMBLER', tel: '18004262537' },
  { state: 'New York', phone: '1-877-846-7369', tel: '18778467369' },
  { state: 'North Carolina', phone: '1-877-718-5543', tel: '18777185543' },
  { state: 'Ohio', phone: '1-800-589-9966', tel: '18005899966' },
  { state: 'Pennsylvania', phone: '1-800-GAMBLER', tel: '18004262537' },
  { state: 'Tennessee', phone: '1-800-889-9789', tel: '18008899789' },
  { state: 'Virginia', phone: '1-888-532-3500', tel: '18885323500' },
];

const WARNING_SIGNS = [
  'Betting more than you planned, or more than you can afford to lose.',
  'Chasing losses — betting bigger to win back what you dropped.',
  'Hiding bets, or lying about them, to people you care about.',
  'Betting with money meant for rent, bills, or debts.',
  'Feeling restless or irritable when you try to cut back.',
  'Gambling to escape stress, anxiety, or a bad day.',
  'Borrowing money to bet.',
];

const h2: React.CSSProperties = { fontSize: 18, fontWeight: 700, marginBottom: 12, color: 'var(--text-0)' };
const body: React.CSSProperties = { color: 'var(--text-1)', lineHeight: 1.7, fontSize: 15 };

export default function ResponsibleGamblingPage() {
  return (
    <section style={{ maxWidth: 680, margin: '0 auto', padding: '48px 16px 120px' }}>
      <header style={{ marginBottom: 28 }}>
        <h1 style={{ fontSize: 36, fontWeight: 700, letterSpacing: '-0.03em', marginBottom: 8, color: 'var(--text-0)' }}>
          If it stops being fun, stop.
        </h1>
        <p className="mono" style={{ fontSize: 12, color: 'var(--text-2)', letterSpacing: '0.05em' }}>
          RESPONSIBLE GAMBLING · 21+
        </p>
      </header>

      <div style={{ ...body, fontSize: 16 }}>
        <p style={{ marginBottom: 16 }}>
          VYNDR is a sports data intelligence platform. We do not take bets, hold funds, or pay out
          winnings. We are not a sportsbook. You must be 21 or older to use this product, and nothing
          on it is a promise that any bet wins. Our own ledger shows the model missing, in public,
          every week.
        </p>
        <p style={{ marginBottom: 16 }}>
          Sports betting is entertainment with a real cost attached. It should never feel like a job,
          an income plan, or an escape. If it has started to feel like any of those, the most useful
          thing this page can do is get you to the right phone number.
        </p>
      </div>

      {/* National helpline — the load-bearing element of this page. */}
      <section
        style={{
          padding: 24,
          marginTop: 24,
          background: 'var(--bg-1)',
          border: '1px solid var(--border)',
          borderLeft: '3px solid var(--amber)',
          borderRadius: 10,
        }}
      >
        <h2 style={h2}>Get help now</h2>
        <p style={{ ...body, marginBottom: 14 }}>
          The National Problem Gambling Helpline. Call or text, 24/7, free, confidential. It routes
          to trained counselors in your state.
        </p>
        <a
          href="tel:18004262537"
          className="mono"
          style={{ color: 'var(--amber)', fontSize: 28, fontWeight: 700, textDecoration: 'none', letterSpacing: '0.02em' }}
        >
          1-800-GAMBLER
        </a>
        <div className="mono" style={{ fontSize: 13, color: 'var(--text-1)', marginTop: 4 }}>
          (1-800-426-2537)
        </div>
        <ul style={{ display: 'grid', gap: 10, fontSize: 14, marginTop: 18, color: 'var(--text-1)' }}>
          <li>
            <a href="https://www.ncpgambling.org" target="_blank" rel="noopener noreferrer" style={{ color: 'var(--text-0)' }}>
              ncpgambling.org
            </a>{' '}
            — National Council on Problem Gambling. Screening tools, chat, treatment directory.
          </li>
          <li>
            <a href="https://www.gamblersanonymous.org" target="_blank" rel="noopener noreferrer" style={{ color: 'var(--text-0)' }}>
              gamblersanonymous.org
            </a>{' '}
            — free local meetings nationwide.
          </li>
          <li>
            <a href="https://www.gamtalk.org" target="_blank" rel="noopener noreferrer" style={{ color: 'var(--text-0)' }}>
              gamtalk.org
            </a>{' '}
            — free, moderated peer support, no signup required.
          </li>
        </ul>
      </section>

      <section style={{ marginTop: 36 }}>
        <h2 style={h2}>Warning signs</h2>
        <p style={{ ...body, marginBottom: 12 }}>
          None of these mean you are a bad person. They mean the odds have started working on you
          instead of for you.
        </p>
        <ul style={{ display: 'grid', gap: 8, ...body, paddingLeft: 18, listStyle: 'disc' }}>
          {WARNING_SIGNS.map((s) => (
            <li key={s}>{s}</li>
          ))}
        </ul>
        <p style={{ ...body, marginTop: 12 }}>
          If two or more of these sound familiar, call the number above. The call costs nothing and
          commits you to nothing.
        </p>
      </section>

      <section style={{ marginTop: 36 }}>
        <h2 style={h2}>State resources</h2>
        <p style={{ ...body, marginBottom: 14 }}>
          Every state with legal sports betting funds its own problem-gambling services. If your
          state is not listed, 1-800-GAMBLER still routes you to the right place.
        </p>
        <div style={{ background: 'var(--bg-1)', border: '1px solid var(--border)', borderRadius: 10, overflow: 'hidden' }}>
          {STATE_RESOURCES.map((r, i) => (
            <div
              key={r.state}
              style={{
                display: 'flex',
                justifyContent: 'space-between',
                alignItems: 'center',
                gap: 12,
                padding: '10px 16px',
                borderTop: i === 0 ? 'none' : '1px solid var(--border)',
              }}
            >
              <span style={{ fontSize: 14, color: 'var(--text-0)' }}>{r.state}</span>
              <a href={`tel:${r.tel}`} className="mono" style={{ fontSize: 13, color: 'var(--text-1)', textDecoration: 'none' }}>
                {r.phone}
              </a>
            </div>
          ))}
        </div>
      </section>

      <section style={{ marginTop: 36 }}>
        <h2 style={h2}>Self-exclusion</h2>
        <p style={{ ...body, marginBottom: 12 }}>
          Self-exclusion is a voluntary, binding ban from sportsbooks for a period you choose —
          usually one to five years, sometimes for life. It is run by your state, not by the books,
          which is why it works.
        </p>
        <ul style={{ display: 'grid', gap: 8, ...body, paddingLeft: 18, listStyle: 'disc' }}>
          <li>
            Your state gaming board runs the registry. Search &quot;[your state] gaming board
            self-exclusion&quot; — in Michigan it is the Michigan Gaming Control Board&apos;s
            Responsible Gaming Database.
          </li>
          <li>
            Every licensed sportsbook also offers account-level tools: deposit limits, wager limits,
            time-outs, and permanent closure. They are in the account settings the books keep quiet.
          </li>
        </ul>
      </section>

      <section style={{ marginTop: 36 }}>
        <h2 style={h2}>Tools on VYNDR</h2>
        <p style={{ ...body, marginBottom: 12 }}>
          We are an analytics product, so our levers are smaller than a sportsbook&apos;s — but they
          exist, and they are yours.
        </p>
        <ul style={{ display: 'grid', gap: 8, ...body, paddingLeft: 18, listStyle: 'disc' }}>
          <li>
            <a href="/settings" style={{ color: 'var(--text-0)' }}>Settings → Responsible Play</a> —
            set a weekly time limit on your account, or step away for a while.
          </li>
          <li>
            <a href="/settings" style={{ color: 'var(--text-0)' }}>Settings → Danger Zone</a> —
            delete your account permanently. Cancellation of any paid plan takes effect immediately
            with it.
          </li>
        </ul>
      </section>

      <section style={{ marginTop: 36 }}>
        <h2 style={h2}>Our position</h2>
        <p style={body}>
          We publish every grade our model produces, misses included, because we think honesty is
          the only durable way to run this business. The same honesty applies here: no analytics
          tool makes gambling safe, and no grade makes a bet a sure thing. If you need to walk away
          from sports betting entirely, that is the right call and we mean it. Cancel the
          subscription, delete the account, and use the number at the top of this page. It will
          still be here.
        </p>
      </section>
    </section>
  );
}
