import Link from "next/link"
import {
  ArrowLeft,
  Rocket,
  GraduationCap,
  TrendingUp,
  ShoppingBag,
  Users,
  Wallet,
  Sparkles,
  type LucideIcon,
} from "lucide-react"
import { Button } from "@/components/ui/button"

interface Feature {
  icon: LucideIcon
  color: string
  title: string
  body?: string
  points?: { label: string; text: string }[]
}

const features: Feature[] = [
  {
    icon: GraduationCap,
    color: "bg-indigo-100 text-indigo-600",
    title: "Learn & Master Affiliate Marketing",
    body: "Access comprehensive courses designed to take you from novice to expert. Learn proven strategies, marketing techniques, and industry secrets to maximize your earning potential. Our educational resources are constantly updated to reflect the latest trends in digital marketing, ensuring you stay ahead of the curve.",
  },
  {
    icon: TrendingUp,
    color: "bg-emerald-100 text-emerald-600",
    title: "Earn Money While You Learn",
    points: [
      { label: "Referral System", text: "Invite friends and earn a bonus when they join. Build your own network and benefit from multi-tier earning opportunities." },
      { label: "Daily Rewards", text: "Log in daily to claim rewards and boost your earnings. Consistency pays off on our platform." },
      { label: "Leaderboards", text: "Compete with other top earners and get recognized on our global leaderboard. Let your success inspire others." },
    ],
  },
  {
    icon: ShoppingBag,
    color: "bg-purple-100 text-purple-600",
    title: "Buy & Sell in the Marketplace",
    points: [
      { label: "Sell Your Products", text: "List your own digital or physical products and reach a wide audience of ready buyers." },
      { label: "Refer Sellers & Earn", text: "Refer sellers and earn a commission when they buy a Boost, Featured placement, or Renewal." },
      { label: "Direct Seller Contact", text: "Browse listings and contact sellers directly to negotiate, inspect, and arrange safe payment and delivery." },
    ],
  },
  {
    icon: Users,
    color: "bg-amber-100 text-amber-600",
    title: "Connect & Grow with the Community",
    points: [
      { label: "Community Hub", text: "Ask questions, share insights, and get answers from fellow marketers. Collaboration is key to rapid growth." },
      { label: "Live Chat", text: "Connect instantly with other users, sellers, or buyers to network and close deals in real-time." },
      { label: "Real-time Status", text: "See who's online and ready to chat, making networking seamless and immediate." },
    ],
  },
  {
    icon: Wallet,
    color: "bg-rose-100 text-rose-600",
    title: "Manage Your Business",
    points: [
      { label: "Wallet & Withdrawals", text: "Track your earnings in real-time and withdraw your funds directly to your bank account with low fees." },
      { label: "Order Management", text: "Keep track of your purchases and sales with an intuitive, easy-to-use dashboard." },
      { label: "Notifications", text: "Stay updated with instant alerts for new orders, messages, and rewards so you never miss an opportunity." },
    ],
  },
]

export default function AboutUsPage() {
  return (
    <div className="min-h-screen bg-slate-50 flex flex-col">
      {/* Header */}
      <div className="bg-white/80 backdrop-blur-md border-b sticky top-0 z-10">
        <div className="flex items-center p-4 max-w-3xl mx-auto w-full">
          <Link href="/" className="mr-3">
            <Button variant="ghost" size="icon" className="h-9 w-9 rounded-full hover:bg-slate-100">
              <ArrowLeft className="h-5 w-5 text-slate-700" />
            </Button>
          </Link>
          <h1 className="text-lg font-bold text-slate-900">About Us</h1>
        </div>
      </div>

      <main className="flex-1 px-4 pb-32 pt-6 md:max-w-3xl md:mx-auto md:w-full">
        {/* Hero */}
        <section className="relative overflow-hidden rounded-3xl bg-gradient-to-br from-purple-600 via-indigo-600 to-blue-600 p-8 text-white shadow-lg mb-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
          <div className="absolute -top-8 -right-8 h-32 w-32 rounded-full bg-white/10 blur-2xl"></div>
          <div className="absolute -bottom-10 -left-10 h-40 w-40 rounded-full bg-white/10 blur-2xl"></div>
          <div className="relative z-10 flex flex-col items-center text-center">
            <div className="mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-white/15 backdrop-blur">
              <Rocket className="h-8 w-8" />
            </div>
            <h2 className="text-2xl md:text-3xl font-bold">Affiliate+ Platform</h2>
            <p className="mt-2 text-sm md:text-base text-indigo-100">Your gateway to passive income mastery.</p>
          </div>
        </section>

        {/* Intro */}
        <p className="text-slate-600 leading-relaxed text-sm md:text-base mb-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
          Affiliate+ is the ultimate all-in-one platform designed to help you master the art of affiliate marketing, earn money through referrals, and grow your own digital business. Whether you're a beginner looking to learn or an experienced marketer ready to scale, Affiliate+ gives you the tools you need to succeed. Our mission is to empower individuals worldwide with high-income digital skills and a robust marketplace, providing the perfect environment to generate sustainable passive income.
        </p>

        {/* Features */}
        <div className="space-y-4">
          {features.map((feature, index) => {
            const Icon = feature.icon
            return (
              <section
                key={feature.title}
                className="rounded-2xl bg-white p-5 shadow-sm border border-slate-100 animate-in fade-in slide-in-from-bottom-4 duration-500"
                style={{ animationDelay: `${index * 80}ms`, animationFillMode: "both" }}
              >
                <div className="flex items-center gap-3 mb-3">
                  <div className={`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl ${feature.color}`}>
                    <Icon className="h-6 w-6" />
                  </div>
                  <h2 className="text-base md:text-lg font-bold text-slate-800">{feature.title}</h2>
                </div>
                {feature.body ? (
                  <p className="text-slate-600 leading-relaxed text-sm md:text-base">{feature.body}</p>
                ) : feature.points ? (
                  <ul className="list-disc pl-5 text-slate-600 leading-relaxed text-sm md:text-base space-y-2">
                    {feature.points.map((point) => (
                      <li key={point.label}>
                        <strong>{point.label}:</strong> {point.text}
                      </li>
                    ))}
                  </ul>
                ) : null}
              </section>
            )
          })}
        </div>

        {/* Closing */}
        <section className="mt-8 rounded-2xl bg-gradient-to-r from-indigo-600 to-purple-600 p-6 text-center text-white shadow-lg animate-in fade-in slide-in-from-bottom-4 duration-500">
          <Sparkles className="mx-auto mb-3 h-8 w-8" />
          <p className="text-sm md:text-base leading-relaxed">
            Join thousands of successful entrepreneurs who are already leveraging Affiliate+ to build their online empires. With our low barrier to entry, active community, and secure payment systems, there is no better place to start your journey. Unlock a world of possibilities and take control of your financial future today!
          </p>
          <Link href="/learn" className="mt-4 inline-block">
            <Button variant="secondary" className="bg-white text-indigo-600 hover:bg-indigo-50 border-0 font-semibold">
              Start Learning Now
            </Button>
          </Link>
        </section>
      </main>
    </div>
  )
}
