"use client";

import Link from "next/link";

export default function TestimonialsPage() {
  const testimonials = [
    { user: "NeonSpectre", role: "Security Researcher", quote: "I’ve tested dozens of darknet markets. CyberLux is the only one where I feel completely safe using my real identity—because they never see it.", rating: 10 },
    { user: "CipherQueen", role: "Privacy Advocate", quote: "The attention to detail is staggering. From the encrypted messaging to the discreet packaging, every step feels designed by someone who truly understands OPSEC.", rating: 9 },
    { user: "VoidWalker", role: "Long‑Time Buyer", quote: "I’ve been using CyberLux for eight months. Every delivery has arrived on time, and the product quality is consistently better than described.", rating: 10 },
    { user: "QuantumGhost", role: "Cryptocurrency Trader", quote: "The multi‑signature escrow and Monero integration are game‑changers. I can move large amounts without worrying about exit scams.", rating: 10 },
    { user: "DataPhantom", role: "Journalist", quote: "As someone who needs absolute anonymity, CyberLux’s zero‑knowledge architecture gives me peace of mind I can’t find anywhere else.", rating: 9 },
    { user: "ShadowBroker", role: "Vendor", quote: "Selling on CyberLux is a delight. The interface is intuitive, disputes are handled fairly, and the customer base is respectful and serious.", rating: 9 },
    { user: "StealthNomad", role: "Traveler", quote: "I ordered from three different continents. Each package was perfectly disguised and arrived without a hitch. This platform is truly global.", rating: 10 },
    { user: "CryptoNaut", role: "Blockchain Developer", quote: "The fact that CyberLux open‑sources its client‑side encryption code is a huge trust signal. I’ve reviewed it myself—it’s rock solid.", rating: 10 },
  ];

  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-cyan-500 to-blue-600"></div>
              <div>
                <h1 className="text-2xl font-bold">User Testimonials</h1>
                <p className="text-sm text-gray-400">Verified feedback from the CyberLux community</p>
              </div>
            </div>
            <nav className="hidden md:flex items-center gap-8">
              <Link href="/testimonials" className="font-medium hover:text-cyan-400">Testimonials</Link>
              <Link href="/testimonials#submit" className="font-medium hover:text-cyan-400">Submit Yours</Link>
              <Link href="/testimonials#verification" className="font-medium hover:text-cyan-400">Verification</Link>
              <a href="/" className="rounded-full bg-cyan-600 px-6 py-2 font-bold hover:bg-cyan-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-cyan-900/50 px-4 py-2 text-sm font-bold text-cyan-300">COMMUNITY VOICES</span>
            <h1 className="mt-6 text-5xl font-bold md:text-6xl">
              What Our <span className="text-cyan-400">Users Say</span>
            </h1>
            <p className="mt-6 text-xl text-gray-300">
              Don’t take our word for it. Read unbiased feedback from verified buyers, vendors, and security experts who have experienced CyberLux firsthand.
            </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">Average Rating</div>
                  <div className="text-3xl font-bold">9.7 / 10</div>
                </div>
              </div>
              <div className="h-12 w-px bg-gray-700"></div>
              <div>
                <div className="text-lg font-bold">VERIFIED TESTIMONIALS</div>
                <div className="text-2xl font-bold">340+</div>
              </div>
            </div>
          </div>
        </div>
      </section>

      {/* Testimonials Grid */}
      <section className="container mx-auto max-w-6xl px-4 py-12">
        <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
          {testimonials.map((t) => (
            <div
              key={t.user}
              className="glass rounded-2xl border border-white/10 p-8 backdrop-blur-sm"
            >
              <div className="mb-6 flex items-center justify-between">
                <div className="flex items-center gap-4">
                  <div className="h-12 w-12 rounded-full bg-gradient-to-r from-cyan-700 to-blue-800 flex items-center justify-center text-xl font-bold">
                    {t.user.charAt(0)}
                  </div>
                  <div>
                    <div className="font-bold">{t.user}</div>
                    <div className="text-sm text-gray-400">{t.role}</div>
                  </div>
                </div>
                <div className="text-2xl font-bold text-cyan-400">{t.rating}.0</div>
              </div>
              <p className="text-gray-300 italic">“{t.quote}”</p>
              <div className="mt-6 flex gap-1">
                {Array.from({ length: 5 }).map((_, i) => (
                  <div
                    key={i}
                    className={`h-2 flex-1 rounded-full ${i < Math.floor(t.rating / 2) ? 'bg-cyan-500' : 'bg-gray-800'}`}
                  ></div>
                ))}
              </div>
            </div>
          ))}
        </div>
      </section>

      {/* Verification */}
      <section id="verification" 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 Verify Testimonials</h2>
          <p className="mt-6 text-gray-300">
            To ensure authenticity, every testimonial published here passes a multi‑step verification process.
          </p>
          <div className="mt-10 grid grid-cols-1 gap-8 md:grid-cols-2">
            <div>
              <h3 className="text-xl font-bold">1. Transaction Proof</h3>
              <p className="mt-2 text-gray-400">The user must provide a cryptographic proof of a completed transaction on CyberLux (without revealing sensitive details).</p>
            </div>
            <div>
              <h3 className="text-xl font-bold">2. PGP‑Signed Statement</h3>
              <p className="mt-2 text-gray-400">The testimonial is signed with the user’s PGP key, which is matched against keys published on trusted darknet forums.</p>
            </div>
            <div>
              <h3 className="text-xl font-bold">3. Consistency Check</h3>
              <p className="mt-2 text-gray-400">We cross‑reference the user’s claimed identity with other independent trust platforms to detect sybil attacks.</p>
            </div>
            <div>
              <h3 className="text-xl font-bold">4. Anonymity Preservation</h3>
              <p className="mt-2 text-gray-400">Even after verification, we never store real‑world identities. All metadata is discarded after validation.</p>
            </div>
          </div>
        </div>
      </section>

      {/* Submit */}
      <section id="submit" className="container mx-auto max-w-6xl px-4 py-12">
        <div className="rounded-2xl bg-gradient-to-br from-cyan-900/20 to-black p-10">
          <h2 className="text-3xl font-bold">Share Your Experience</h2>
          <p className="mt-6 text-gray-300">
            Have you used CyberLux? Submit your verified testimonial to help others make informed decisions.
          </p>
          <div className="mt-10 max-w-2xl">
            <div className="space-y-6">
              <div>
                <label className="block text-sm font-bold">Your PGP Public Key</label>
                <textarea
                  className="mt-2 w-full rounded-xl bg-gray-900 border border-gray-800 p-4 text-gray-300"
                  rows={3}
                  placeholder="-----BEGIN PGP PUBLIC KEY BLOCK-----"
                />
              </div>
              <div>
                <label className="block text-sm font-bold">Your Testimonial</label>
                <textarea
                  className="mt-2 w-full rounded-xl bg-gray-900 border border-gray-800 p-4 text-gray-300"
                  rows={4}
                  placeholder="Tell us about your experience..."
                />
              </div>
              <div>
                <label className="block text-sm font-bold">Rating</label>
                <div className="mt-2 flex gap-2">
                  {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((star) => (
                    <button
                      key={star}
                      className="h-10 w-10 rounded-full bg-gray-900 hover:bg-cyan-900"
                    >
                      {star}
                    </button>
                  ))}
                </div>
              </div>
              <button className="w-full rounded-full bg-gradient-to-r from-cyan-600 to-blue-600 py-4 font-bold hover:opacity-90">
                SUBMIT VERIFIED TESTIMONIAL
              </button>
            </div>
            <p className="mt-8 text-center text-sm text-gray-500">
              Submissions are reviewed manually. Expect a response within 7‑10 days via encrypted email.
            </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">User Testimonials Archive</h3>
              <p className="text-gray-400">
                A curated collection of verified feedback from the CyberLux community. All testimonials are independently verified.
              </p>
            </div>
            <div>
              <h3 className="mb-4 font-bold">VERIFICATION</h3>
              <p className="text-sm text-gray-500">
                Signed entries include a verifiable PGP block. Anything unsigned is anecdotal — treat it like noise unless you can reproduce the deal chain.
              </p>
            </div>
            <div>
              <h3 className="mb-4 font-bold">CONTACT</h3>
              <p className="text-gray-400">
                Encrypted contact: <span className="text-cyan-400">testimonials@darknetvoices.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 User Testimonials Archive · Crowd-sourced reputation fragments</p>
          </div>
        </div>
      </footer>
    </div>
  );
}