import React from "react";
import Link from "next/link";

export const metadata = {
  title: "Terms of Service | BattlBuilder",
  description: "Terms of Service and legal disclaimers for rifle assembly and part compatibility.",
};

export default function TermsOfService() {
  const lastUpdated = "December 26, 2024";

  return (
    <div className="mx-auto max-w-4xl px-4 py-12">
      <div className="mb-10">
        <h1 className="text-4xl font-bold tracking-tight">Terms of Service</h1>
        <p className="mt-2 text-sm opacity-60">Last Updated: {lastUpdated}</p>
      </div>

      <div className="space-y-10 text-sm leading-relaxed text-white/90">
        {/* 1. Acceptance */}
        <section>
          <h2 className="mb-4 text-xl font-semibold text-white">1. Acceptance of Terms</h2>
          <p>
            By accessing or using Shadow GunBuilder AI (the "Site"), you agree to be bound by these Terms of Service. 
            This Site is intended for informational and entertainment purposes only, providing a platform to 
            visualize and plan AR-platform rifle builds using third-party components.
          </p>
        </section>

        {/* 2. Legal Compliance */}
        <section className="rounded-xl border border-orange-500/30 bg-orange-500/5 p-6">
          <h2 className="mb-4 text-xl font-semibold text-orange-200">2. Legal Compliance & Firearms Safety</h2>
          <div className="space-y-4">
            <p className="font-medium text-orange-100">
              IMPORTANT: It is your sole responsibility to ensure that any firearm configuration you assemble 
              complies with all applicable local, state, federal, and international laws.
            </p>
            <ul className="list-disc space-y-2 pl-5">
              <li>Laws regarding "assault weapons," magazine capacity, barrel length (NFA regulations), and specific features vary significantly by jurisdiction.</li>
              <li>The Site does not provide legal advice regarding the legality of any specific build in your area.</li>
              <li>Always consult with a qualified gunsmith or legal professional before commencing a physical build.</li>
            </ul>
          </div>
        </section>

        {/* 3. No Guarantee of Compatibility */}
        <section>
          <h2 className="mb-4 text-xl font-semibold text-white">3. Compatibility Disclaimer</h2>
          <p>
            While we strive for accuracy, the Site is a digital simulation. Compatibility data between parts 
            (e.g., gas block diameters, handguard clearances, or buffer weights) is based on manufacturer 
            specifications which are subject to change.
          </p>
          <p className="mt-4">
            Shadow GunBuilder AI does <strong>not</strong> guarantee that parts selected in the digital builder 
            will fit together physically or function safely. Mechanical tolerances and manufacturer variations 
            may exist.
          </p>
        </section>

        {/* 4. User Generated Content */}
        <section>
          <h2 className="mb-4 text-xl font-semibold text-white">4. User Builds and the "Vault"</h2>
          <p>
            When you save a build to your Vault or publish it to the community, you grant us a non-exclusive 
            license to display and store that data. You are responsible for the content of your descriptions 
            and ensuring they do not violate any laws or third-party rights.
          </p>
        </section>

        {/* 5. Affiliate and Pricing Disclosure */}
        <section>
          <h2 className="mb-4 text-xl font-semibold text-white">5. Affiliate & Pricing Data</h2>
          <p>
            Pricing and availability data are pulled from third-party retailers. We are not responsible 
            for pricing errors or out-of-stock items. We may receive commissions for purchases made 
            through links on the Site.
          </p>
        </section>

        {/* 6. Limitation of Liability */}
        <section className="border-t border-white/10 pt-10">
          <h2 className="mb-4 text-xl font-semibold text-white">6. Limitation of Liability</h2>
          <p className="uppercase text-xs opacity-70">
            SHADOW GUNBUILDER AI AND ITS OPERATORS SHALL NOT BE LIABLE FOR ANY DAMAGES, INJURIES, OR LEGAL 
            CONSEQUENCES ARISING FROM THE USE OF THIS SITE OR THE PHYSICAL ASSEMBLY OF FIREARMS BASED ON 
            PLANS CREATED HEREIN. USE AT YOUR OWN RISK.
          </p>
        </section>

        <div className="pt-10">
          <Link 
            href="/public"
            className="text-sm text-blue-400 hover:text-blue-300 transition-colors"
          >
            ← Return to Home
          </Link>
        </div>
      </div>
    </div>
  );
}
