import { Box, Typography } from '@mui/material';
import Link from 'next/link';

export function TermsContent() {
  return (
    <Box sx={{ '& h5': { mt: 3, mb: 1, fontWeight: 'bold' }, '& h6': { mt: 2, mb: 1, fontWeight: 'bold' }, '& p': { mb: 2 }, '& ul': { mb: 2 } }}>
      <Typography variant="h5">1. Acceptance of Terms</Typography>
      <Typography paragraph>
        By accessing or using ParentFlow (the "Service"), you agree to be bound by these Terms of Service ("Terms").
        If you do not agree to these Terms, do not use the Service.
      </Typography>
      <Typography paragraph>
        These Terms constitute a legally binding agreement between you and ParentFlow ("we," "us," or "our").
      </Typography>

      <Typography variant="h5">2. Description of Service</Typography>
      <Typography paragraph>
        ParentFlow is a parenting organization and tracking application designed to help parents and caregivers manage
        childcare for children aged 0-6 years. The Service includes:
      </Typography>
      <Typography component="ul">
        <li>Activity tracking (feeding, sleep, diapers, medicine, milestones)</li>
        <li>AI-powered parenting support and guidance</li>
        <li>Family synchronization and collaboration tools</li>
        <li>Analytics and insights about your child's patterns</li>
        <li>Voice input capabilities</li>
        <li>Photo storage and milestone tracking</li>
      </Typography>

      <Typography variant="h5">3. User Accounts</Typography>
      <Typography variant="h6">3.1 Account Creation</Typography>
      <Typography paragraph>To use the Service, you must create an account. You agree to:</Typography>
      <Typography component="ul">
        <li>Provide accurate and complete information</li>
        <li>Maintain the security of your account credentials</li>
        <li>Notify us immediately of any unauthorized access</li>
        <li>Be responsible for all activities under your account</li>
      </Typography>

      <Typography variant="h6">3.2 Age Requirements</Typography>
      <Typography paragraph>
        You must be at least 18 years old (or the age of majority in your jurisdiction) to create an account.
        Users between 13-17 years old may only use the Service with parental consent.
      </Typography>

      <Typography variant="h5">4. Acceptable Use</Typography>
      <Typography paragraph>You agree NOT to:</Typography>
      <Typography component="ul">
        <li>Use the Service for any illegal purpose</li>
        <li>Violate any laws or regulations</li>
        <li>Infringe on intellectual property rights</li>
        <li>Upload malicious code or viruses</li>
        <li>Attempt to gain unauthorized access to our systems</li>
        <li>Harass, abuse, or harm other users</li>
        <li>Share inappropriate content involving minors</li>
        <li>Use automated tools to access the Service (bots, scrapers)</li>
        <li>Reverse engineer or decompile the Service</li>
      </Typography>

      <Typography variant="h5">5. Medical Disclaimer</Typography>
      <Typography paragraph sx={{ fontWeight: 'bold', color: 'error.main' }}>
        THE SERVICE IS NOT A SUBSTITUTE FOR PROFESSIONAL MEDICAL ADVICE.
      </Typography>
      <Typography paragraph>
        Our AI assistant and tracking features provide general information and insights only. They do not constitute
        medical advice, diagnosis, or treatment. Always consult with qualified healthcare professionals for medical concerns.
      </Typography>
      <Typography component="div" paragraph>
        <strong>In case of emergency, call your local emergency services immediately.</strong>
        <ul>
          <li>United States: 911</li>
          <li>United Kingdom: 999</li>
          <li>European Union: 112</li>
        </ul>
      </Typography>

      <Typography variant="h5">6. User Content</Typography>
      <Typography variant="h6">6.1 Your Content</Typography>
      <Typography paragraph>
        You retain ownership of all content you upload to the Service (photos, data, messages).
        By uploading content, you grant us a license to use, store, and process it to provide the Service.
      </Typography>

      <Typography variant="h6">6.2 Content Responsibility</Typography>
      <Typography paragraph>
        You are solely responsible for your content. You represent that you have the necessary rights and permissions
        to upload and share your content, including photos of your children.
      </Typography>

      <Typography variant="h5">7. Intellectual Property</Typography>
      <Typography paragraph>
        The Service, including its design, features, code, and content (excluding user content), is owned by ParentFlow
        and protected by copyright, trademark, and other intellectual property laws.
      </Typography>
      <Typography paragraph>
        You may not copy, modify, distribute, sell, or create derivative works based on the Service without our written permission.
      </Typography>

      <Typography variant="h5">8. Subscription and Payment</Typography>
      <Typography variant="h6">8.1 Free and Premium Features</Typography>
      <Typography paragraph>
        We offer both free and premium subscription tiers. Premium features may include unlimited AI queries, advanced analytics,
        and priority support.
      </Typography>

      <Typography variant="h6">8.2 Billing</Typography>
      <Typography paragraph>
        Premium subscriptions are billed monthly or annually. Payments are processed through third-party payment processors.
        By subscribing, you authorize us to charge your payment method.
      </Typography>

      <Typography variant="h6">8.3 Cancellation and Refunds</Typography>
      <Typography paragraph>
        You may cancel your subscription at any time. Cancellations take effect at the end of the current billing period.
        We do not offer refunds for partial subscription periods, except as required by law.
      </Typography>

      <Typography variant="h5">9. Privacy</Typography>
      <Typography paragraph>
        Your use of the Service is also governed by our Privacy Policy. Please review it to understand how we collect, use, and protect your information.
      </Typography>

      <Typography variant="h5">10. Termination</Typography>
      <Typography variant="h6">10.1 Termination by You</Typography>
      <Typography paragraph>
        You may terminate your account at any time through the app settings. Upon termination, your data will be deleted
        in accordance with our Privacy Policy.
      </Typography>

      <Typography variant="h6">10.2 Termination by Us</Typography>
      <Typography paragraph>
        We reserve the right to suspend or terminate your account if you violate these Terms or engage in harmful behavior.
        We will provide notice where reasonably possible.
      </Typography>

      <Typography variant="h5">11. Disclaimers</Typography>
      <Typography paragraph sx={{ fontWeight: 'bold' }}>
        THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND.
      </Typography>
      <Typography paragraph>
        We disclaim all warranties, express or implied, including warranties of merchantability, fitness for a particular purpose,
        and non-infringement. We do not guarantee that the Service will be error-free, secure, or uninterrupted.
      </Typography>

      <Typography variant="h5">12. Limitation of Liability</Typography>
      <Typography paragraph>
        TO THE MAXIMUM EXTENT PERMITTED BY LAW, WE SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE
        DAMAGES ARISING FROM YOUR USE OF THE SERVICE.
      </Typography>
      <Typography paragraph>
        Our total liability shall not exceed the amount you paid us in the 12 months preceding the claim, or $100, whichever is greater.
      </Typography>

      <Typography variant="h5">13. Indemnification</Typography>
      <Typography paragraph>
        You agree to indemnify and hold harmless ParentFlow and its officers, directors, employees, and agents from any claims,
        damages, or expenses arising from your use of the Service or violation of these Terms.
      </Typography>

      <Typography variant="h5">14. Dispute Resolution</Typography>
      <Typography variant="h6">14.1 Informal Resolution</Typography>
      <Typography paragraph>
        Before filing a legal claim, you agree to contact us at <strong>hello@parentflow.com</strong> to attempt to resolve
        the dispute informally.
      </Typography>

      <Typography variant="h6">14.2 Arbitration</Typography>
      <Typography paragraph>
        Any disputes that cannot be resolved informally will be settled by binding arbitration in accordance with the
        American Arbitration Association rules, except where prohibited by law.
      </Typography>

      <Typography variant="h5">15. Governing Law</Typography>
      <Typography paragraph>
        These Terms are governed by the laws of [Your Jurisdiction], without regard to conflict of law principles.
      </Typography>

      <Typography variant="h5">16. Changes to Terms</Typography>
      <Typography paragraph>
        We may update these Terms from time to time. We will notify you of material changes by email or through the app.
        Your continued use of the Service after changes constitutes acceptance of the updated Terms.
      </Typography>

      <Typography variant="h5">17. Severability</Typography>
      <Typography paragraph>
        If any provision of these Terms is found to be invalid or unenforceable, the remaining provisions will continue in full force.
      </Typography>

      <Typography variant="h5">18. Contact Us</Typography>
      <Typography paragraph>
        If you have questions about these Terms, please contact us:
      </Typography>
      <Typography component="div" paragraph>
        <strong>Email:</strong> hello@parentflow.com<br />
        <strong>Address:</strong> Serbota 3, Bucharest, Romania
      </Typography>
    </Box>
  );
}
