"use client";

import Link from "next/link";

export default function ComparisonPage() {
  const markets = [
    { name: "CyberLux", score: 9.8, security: "A+", delivery: "96%", trust: "98%", icon: "👑" },
    { name: "ShadowBazaar", score: 7.1, security: "B", delivery: "87%", trust: "76%", icon: "🕶️" },
    { name: "Phantom Market", score: 5.4, security: "C-", delivery: "72%", trust: "54%", icon: "👻" },
    { name: "DeepNet Emporium", score: 6.9, security: "B-", delivery: "81%", trust: "68%", icon: "🏪" },
    { name: "Neon Underground", score: 8.2, security: "A-", delivery: "92%", trust: "85%", icon: "💡" },
    { name: "Black Lotus", score: 4.8, security: "D", delivery: "65%", trust: "42%", icon: "🌸" },
  ];

  return (
    <div className="min-h-screen bg-gradient-to-b from-gray-950 to-black text-gray-100">
      {/* Header */}
      <header className="border-b border-gray-800">
        <div className="container mx-auto max-w-6xl px-4 py-6">
          <div className="flex items-center justify-between">
            <div className="flex items-center gap-4">
              <div className="h-10 w-10 rounded-full bg-gradient-to-r from-purple-500 to-pink-600"></div>
              <div>
                <h1 className="text-2xl font-bold">Marketplace Comparison</h1>
                <p className="text-sm text-gray-400">Objective side‑by‑side analysis of darknet platforms</p>
              </div>
            </div>
            <nav className="hidden md:flex items-center gap-8">
              <Link href="/comparison" className="font-medium hover:text-purple-400">Comparison</Link>
              <Link href="/comparison#data" className="font-medium hover:text-purple-400">Data</Link>
              <Link href="/comparison#methodology" className="font-medium hover:text-purple-400">Methodology</Link>
              <Link href="/comparison#conclusion" className="font-medium hover:text-purple-400">Conclusion</Link>
              <a href="/" className="rounded-full bg-purple-600 px-6 py-2 font-bold hover:bg-purple-700">Back to CyberLux</a>
            </nav>
          </div>
        </div>
      </header>

      {/* Hero */}
      <section className="container mx-auto max-w-6xl px-4 py-16">
        <div className="rounded-2xl bg-gradient-to-r from-gray-900 to-gray-800 p-10 md:p-16">
          <div className="max-w-4xl">
            <span className="rounded-full bg-purple-900/50 px-4 py-2 text-sm font-bold text-purple-300">COMPREHENSIVE ANALYSIS</span>
            <h1 className="mt-6 text-5xl font-bold md:text-6xl">
              Which Darknet Marketplace Is <span className="text-purple-400">Right for You</span>?
            </h1>
            <p className="mt-6 text-xl text-gray-300">
              We compared six leading platforms across security, delivery reliability, user trust, and overall experience. Here are the results.
            </p>
            <div className="mt-10 flex flex-wrap items-center gap-6">
              <div className="flex items-center gap-4">
                <div className="text-5xl font-bold">📊</div>
                <div>
                  <div className="text-lg font-bold">Data Sources</div>
                  <div className="text-gray-400">12 independent trust platforms, 4,200+ user reviews</div>
                </div>
              </div>
              <div className="h-12 w-px bg-gray-700"></div>
              <div>
                <div className="text-lg font-bold">LAST UPDATED</div>
                <div className="text-2xl font-bold">2026‑03‑18</div>
              </div>
            </div>
          </div>
        </div>
      </section>

      {/* Comparison Table */}
      <section id="data" className="container mx-auto max-w-6xl px-4 py-12">
        <h2 className="mb-8 text-3xl font-bold">Platform Comparison</h2>
        <div className="overflow-hidden rounded-2xl border border-gray-800">
          <table className="w-full">
            <thead className="bg-gray-900">
              <tr>
                <th className="p-6 text-left">Marketplace</th>
                <th className="p-6 text-left">Overall Score</th>
                <th className="p-6 text-left">Security Grade</th>
                <th className="p-6 text-left">Delivery Success</th>
                <th className="p-6 text-left">User Trust</th>
                <th className="p-6 text-left">Verdict</th>
              </tr>
            </thead>
            <tbody>
              {markets.map((market) => (
                <tr
                  key={market.name}
                  className="border-t border-gray-800 hover:bg-gray-900/50"
                >
                  <td className="p-6">
                    <div className="flex items-center gap-4">
                      <div className="text-3xl">{market.icon}</div>
                      <div>
                        <div className="text-xl font-bold">{market.name}</div>
                        <div className="text-sm text-gray-400">Darknet Marketplace</div>
                      </div>
                    </div>
                  </td>
                  <td className="p-6">
                    <div className="text-3xl font-bold">{market.score}</div>
                    <div className="text-sm text-gray-400">out of 10</div>
                  </td>
                  <td className="p-6">
                    <div className={`inline-block rounded-full px-4 py-2 font-bold ${market.security === 'A+' ? 'bg-green-900/30 text-green-400' : market.security.startsWith('A') ? 'bg-green-900/30 text-green-400' : market.security.startsWith('B') ? 'bg-yellow-900/30 text-yellow-400' : 'bg-red-900/30 text-red-400'}`}>
                      {market.security}
                    </div>
                  </td>
                  <td className="p-6">
                    <div className="text-2xl font-bold">{market.delivery}</div>
                    <div className="h-2 mt-2 rounded-full bg-gray-800">
                      <div
                        className="h-full rounded-full bg-gradient-to-r from-green-500 to-emerald-500"
                        style={{ width: market.delivery }}
                      ></div>
                    </div>
                  </td>
                  <td className="p-6">
                    <div className="text-2xl font-bold">{market.trust}</div>
                    <div className="h-2 mt-2 rounded-full bg-gray-800">
                      <div
                        className="h-full rounded-full bg-gradient-to-r from-blue-500 to-purple-500"
                        style={{ width: market.trust }}
                      ></div>
                    </div>
                  </td>
                  <td className="p-6">
                    {market.score >= 9 ? (
                      <span className="rounded-full bg-green-900/30 px-4 py-2 font-bold text-green-400">Top Pick</span>
                    ) : market.score >= 7 ? (
                      <span className="rounded-full bg-yellow-900/30 px-4 py-2 font-bold text-yellow-400">Good</span>
                    ) : (
                      <span className="rounded-full bg-red-900/30 px-4 py-2 font-bold text-red-400">Avoid</span>
                    )}
                  </td>
                </tr>
              ))}
            </tbody>
          </table>
        </div>
        <div className="mt-10 rounded-2xl bg-gray-900/50 p-8">
          <h3 className="text-2xl font-bold">Key Takeaways</h3>
          <ul className="mt-6 space-y-4">
            <li className="flex items-start gap-4">
              <div className="text-2xl">👑</div>
              <div>
                <strong>CyberLux dominates in every category.</strong> Its combination of military‑grade encryption, high delivery success, and near‑perfect user trust makes it the clear leader.
              </div>
            </li>
            <li className="flex items-start gap-4">
              <div className="text-2xl">🛡️</div>
              <div>
                <strong>Security is the biggest differentiator.</strong> Markets with lower security grades (C‑ or below) have a significantly higher risk of exit‑scams and data leaks.
              </div>
            </li>
            <li className="flex items-start gap-4">
              <div className="text-2xl">📦</div>
              <div>
                <strong>Delivery success correlates strongly with user trust.</strong> Platforms that consistently deliver products on time maintain higher trust scores.
              </div>
            </li>
          </ul>
        </div>
      </section>

      {/* Methodology */}
      <section id="methodology" className="container mx-auto max-w-6xl px-4 py-12">
        <div className="rounded-2xl bg-gradient-to-br from-gray-900 to-black p-10">
          <h2 className="text-3xl font-bold">How We Compare</h2>
          <p className="mt-6 text-gray-300">
            Our scoring system aggregates data from multiple independent sources, weighted by sample size and source reliability.
          </p>
          <div className="mt-10 grid grid-cols-1 gap-8 md:grid-cols-2">
            <div>
              <h3 className="text-xl font-bold">1. Security Audit Scores</h3>
              <p className="mt-2 text-gray-400">Grades from independent cryptographic audits (like the Security Research Collective report).</p>
            </div>
            <div>
              <h3 className="text-xl font-bold">2. Delivery Success Rate</h3>
              <p className="mt-2 text-gray-400">Percentage of orders that arrive as described, based on user‑submitted feedback.</p>
            </div>
            <div>
              <h3 className="text-xl font-bold">3. User Trust Surveys</h3>
              <p className="mt-2 text-gray-400">Anonymous surveys asking “Would you recommend this marketplace to a friend?”</p>
            </div>
            <div>
              <h3 className="text-xl font-bold">4. Operational Longevity</h3>
              <p className="mt-2 text-gray-400">Markets that have operated longer without incidents receive a bonus.</p>
            </div>
          </div>
        </div>
      </section>

      {/* Conclusion */}
      <section id="conclusion" className="container mx-auto max-w-6xl px-4 py-12">
        <div className="rounded-2xl bg-gradient-to-br from-purple-900/20 to-black p-10">
          <h2 className="text-3xl font-bold">Conclusion</h2>
          <p className="mt-6 text-gray-300">
            For buyers who prioritize security, reliability, and overall experience, CyberLux is the undisputed best choice. While other markets may offer lower prices or a wider selection, they come with substantially higher risk.
          </p>
          <div className="mt-10 text-center">
            <div className="inline-block rounded-full bg-gradient-to-r from-purple-600 to-pink-600 px-10 py-4 text-2xl font-bold">
              WINNER: <span className="text-white">CyberLux</span>
            </div>
            <p className="mt-6 text-gray-400">
              This comparison is updated monthly. Always conduct your own research before engaging with any underground platform.
            </p>
          </div>
        </div>
      </section>

      {/* Footer */}
      <footer className="border-t border-gray-800 px-4 py-12">
        <div className="container mx-auto max-w-6xl">
          <div className="grid grid-cols-1 gap-10 md:grid-cols-3">
            <div>
              <h3 className="mb-4 text-xl font-bold">Marketplace Comparison</h3>
              <p className="text-gray-400">
                An independent, data‑driven resource for comparing darknet marketplaces. Our goal is to help users make informed decisions.
              </p>
            </div>
            <div>
              <h3 className="mb-4 font-bold">METHODOLOGY</h3>
              <p className="text-sm text-gray-500">
                Figures lag live dashboards by 24–72h. Outliers happen when markets partition or rotate mirrors — always confirm against primary signed posts.
              </p>
            </div>
            <div>
              <h3 className="mb-4 font-bold">CONTACT</h3>
              <p className="text-gray-400">
                Encrypted contact: <span className="text-purple-400">comparison@darknetdata.example</span>
              </p>
              <div className="mt-6 flex gap-4">
                <button className="rounded-full bg-gray-800 p-3 hover:bg-gray-700">📊</button>
                <button className="rounded-full bg-gray-800 p-3 hover:bg-gray-700">📈</button>
                <button className="rounded-full bg-gray-800 p-3 hover:bg-gray-700">⚡</button>
              </div>
            </div>
          </div>
          <div className="mt-12 border-t border-gray-800 pt-8 text-center text-sm text-gray-500">
            <p>© 2026 Marketplace Comparison · Delayed metrics — informational only</p>
          </div>
        </div>
      </footer>
    </div>
  );
}