// Terms of Service page content
const Terms = () => {
  const linkStyle = {
    color: 'var(--brand-black)',
    textDecoration: 'underline',
    textUnderlineOffset: '2px',
    fontWeight: 600,
  };

  const sectionStyle = {
    paddingTop: 40,
    paddingBottom: 40,
    borderTop: '1px solid var(--brand-gray-2)',
  };

  const h2Style = {
    fontFamily: "'National Park', sans-serif",
    fontWeight: 700,
    fontSize: 28,
    lineHeight: 1.2,
    letterSpacing: '-0.01em',
    color: 'var(--brand-black)',
    margin: '0 0 16px',
  };

  const pStyle = {
    fontSize: 18,
    fontWeight: 500,
    lineHeight: 1.6,
    color: '#666666',
    margin: '0 0 14px',
  };

  return (
    <main className="terms-page" style={{ paddingTop: 136, paddingBottom: 0 }}>
      <div className="container" style={{ maxWidth: 720 }}>
        <h1 className="h-display center" style={{ marginTop: 24 }}>Terms of Service</h1>

        <div style={{ display: 'flex', justifyContent: 'center', marginTop: 28 }}>
          <div style={{
            display: 'inline-flex',
            alignItems: 'center',
            gap: 8,
            height: 40,
            background: 'var(--brand-gray)',
            color: 'var(--brand-black)',
            borderRadius: 'var(--radius-pill)',
            border: '1px solid #DDE5ED',
            padding: '0 16px',
            fontSize: 16,
            fontWeight: 500,
          }}>
            <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
              <circle cx="12" cy="12" r="9" />
              <path d="M12 7v5l3 2" />
            </svg>
            Last Updated: June 20, 2025
          </div>
        </div>

        <div style={{ marginTop: 72 }}>

          <section style={{ ...sectionStyle, borderTop: 'none', paddingTop: 0 }}>
            <h2 style={h2Style}>Your Acceptance</h2>
            <p style={pStyle}>
              These Terms of Service (&ldquo;Terms&rdquo;) govern access to and use of all mobile games (the &ldquo;Games&rdquo;) offered by BOBAFRIENDS (&ldquo;we,&rdquo; &ldquo;us,&rdquo; or &ldquo;our&rdquo;). By downloading, installing, or playing any Games, you agree to be bound by these Terms. If you do not agree, you must discontinue use immediately.
            </p>
            <p style={pStyle}>
              Unless applicable laws require different consent procedures, you consent to personal information usage as described in the <a href="privacy.html" style={linkStyle}>Privacy Policy</a>.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>License Grant</h2>
            <p style={pStyle}>
              Subject to your compliance with these Terms, BOBAFRIENDS grants you a limited, non-exclusive, non-transferable, revocable license to download, install, and play the Games on devices that you own or control, solely for your personal, non-commercial entertainment. All other rights are reserved by BOBAFRIENDS.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>User Conduct</h2>
            <p style={pStyle}>
              You agree not to use the Games for any unlawful purpose or in any way that could damage, disable, overburden, or impair our servers or networks. Reverse-engineering, decompiling, disassembling, or attempting to gain unauthorized access to any part of the Games is prohibited.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Advertising</h2>
            <p style={pStyle}>
              The Games are supported by advertisements served via Google AdMob. You may adjust ad tracking through your device settings, or uninstall the Games to opt out of further analytics collection.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Intellectual Property</h2>
            <p style={pStyle}>
              All content, designs, graphics, text, logos, and software within the Games are owned by or licensed to BOBAFRIENDS and are protected by intellectual property laws. No ownership rights are transferred to you, and any use of our trademarks requires our prior written permission.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Third-Party Services</h2>
            <p style={pStyle}>
              The Games may integrate third-party SDKs for analytics, advertising, and crash reporting. Your use of those services is subject to the third parties&rsquo; own terms and policies.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Disclaimers</h2>
            <p style={pStyle}>
              THE GAMES ARE PROVIDED &ldquo;AS IS&rdquo; AND &ldquo;AS AVAILABLE&rdquo; WITHOUT WARRANTY OF ANY KIND. To the fullest extent permitted by law, BOBAFRIENDS disclaims all warranties, including merchantability, fitness for a particular purpose, title, and non-infringement.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Limitation of Liability</h2>
            <p style={pStyle}>
              To the maximum extent permitted by law, BOBAFRIENDS shall not be liable for any indirect, incidental, special, or consequential damages arising from your use of the Games. Our total liability is limited to the amounts you paid for in-game purchases within the 12 months preceding the claim.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Indemnification</h2>
            <p style={pStyle}>
              You agree to defend, indemnify, and hold harmless BOBAFRIENDS and its representatives from and against any claims, damages, or expenses arising from your breach of these Terms or misuse of the Games.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Termination</h2>
            <p style={pStyle}>
              BOBAFRIENDS may suspend or terminate your access to the Games at any time, without notice, for conduct that we believe violates these Terms. All licenses granted to you cease immediately upon termination.
            </p>
          </section>

          <section style={sectionStyle}>
            <h2 style={h2Style}>Changes to These Terms</h2>
            <p style={pStyle}>
              We may revise these Terms from time to time by posting updates within the Games or on our website. Your continued use after such changes constitutes acceptance of the revised Terms.
            </p>
          </section>

          <section style={{ ...sectionStyle, paddingBottom: 0 }}>
            <h2 style={h2Style}>Contact Us</h2>
            <p style={pStyle}>
              If you have any questions about these Terms of Service, please contact us at <a href="mailto:hello@bobafriends.net" style={linkStyle}>hello@bobafriends.net</a>.
            </p>
          </section>

        </div>
      </div>

      <style>{`
        @media (max-width: 810px) {
          .terms-page p,
          .terms-page ol,
          .terms-page li {
            font-size: 16px !important;
          }
          .terms-page h2 {
            font-size: 24px !important;
          }
        }
      `}</style>
    </main>
  );
};

window.Terms = Terms;
