import { Link } from "@tanstack/react-router";

export default function SrToolsPage() {
  return (
      <div className="min-h-screen bg-base-200 flex items-center justify-center p-6">
          <div className="max-w-4xl w-full bg-base-100 shadow-xl rounded-2xl p-8 space-y-8">
              <h1 className="text-4xl font-bold text-primary text-center">SR Tools</h1>

              {/* Section 1: About SR Tools */}
              <div className="bg-blue-50 border-l-4 border-blue-400 p-6 rounded-r-lg">
                  <h2 className="text-2xl font-bold text-blue-800 flex items-center gap-2 mb-4">
                      <span>ℹ️</span>
                      <span>About SR Tools</span>
                  </h2>
                  <div className="space-y-3 text-blue-700">
                      <div className="flex items-start gap-3">
                          <div className="text-blue-600 text-lg">🏠</div>
                          <p>
                            This site is a another version of {" "}
                            <span className="font-semibold text-success">SR Tools {" "}</span>
                            developed by {" "}
                            <span className="font-semibold text-warning">Me {"(Kain)"}</span>
                          </p>
                      </div>
                      <div className="grid md:grid-cols-2 gap-4">
                            <div className="bg-white border border-blue-200 rounded-lg p-4">
                                <div className="flex items-center gap-2 mb-2">
                                    <span className="text-blue-600 text-lg">🏆</span>
                                    <span className="font-semibold text-blue-800">Master Website</span>
                                </div>
                                <a
                                    href="https://srtools.kain.id.vn/"
                                    className="link link-warning font-mono text-sm break-all"
                                    target="_blank"
                                    rel="noopener noreferrer"
                                >
                                    https://srtools.kain.id.vn/
                                </a>
                            </div>
                            
                            <div className="bg-white border border-blue-200 rounded-lg p-4">
                                <div className="flex items-center gap-2 mb-2">
                                    <span className="text-blue-600 text-lg">🔄</span>
                                    <span className="font-semibold text-blue-800">Backup Website</span>
                                </div>
                                <a
                                    href="https://firefly-srtools.vercel.app/"
                                    className="link link-warning font-mono text-sm break-all"
                                    target="_blank"
                                    rel="noopener noreferrer"
                                >
                                    https://firefly-srtools.vercel.app/
                                </a>
                            </div>
                        </div>
                      <div className="flex items-start gap-3">
                          <div className="text-blue-600 text-lg">👨‍💻</div>
                          <p>The original tool was created by a third-party developer named <span className="font-semibold text-warning">Amazing</span>. This version is directly based on that work, without modification to core logic.</p>
                      </div>
                      <div className="flex items-start gap-3">
                          <div className="text-blue-600 text-lg">🔗</div>
                          <p>There is also a more modern version by the same author available at{" "}
                              <a
                                  href="https://srtools.neonteam.dev/"
                                  className="link link-warning"
                                  target="_blank"
                                  rel="noopener noreferrer"
                              >
                                  srtools.neonteam.dev
                              </a>
                              {" "}and the original version at{" "}
                              <a
                                  href="https://srtools.pages.dev/"
                                  className="link link-warning"
                                  target="_blank"
                                  rel="noopener noreferrer"
                              >
                                  srtools.pages.dev
                              </a>
                          </p>
                      </div>
                  </div>
              </div>

              {/* Section 2: Main Features */}
              <div className="bg-green-50 border-l-4 border-green-400 p-6 rounded-r-lg">
                  <h2 className="text-2xl font-bold text-green-800 flex items-center gap-2 mb-4">
                      <span>🔧</span>
                      <span>Main Features</span>
                  </h2>
                  <div className="space-y-3 text-green-700">
                      <div className="flex items-start gap-3">
                          <div className="text-green-600 text-lg">⚙️</div>
                          <p>Configure characters, light cones, relics, traces, and eidolons easily in your browser.</p>
                      </div>
                      <div className="flex items-start gap-3">
                          <div className="text-green-600 text-lg">🔌</div>
                          <p>Instantly apply setups to <span className="font-semibold text-warning">Firefly Private Server</span> using <span className="font-semibold">Connect PS</span> — no manual file uploads required.</p>
                      </div>
                      <div className="flex items-start gap-3">
                          <div className="text-green-600 text-lg">📂</div>
                          <p>Export and import full builds using <code className="bg-gray-200 px-2 py-1 rounded text-sm">freesr-data.json</code>.</p>
                      </div>
                      <div className="flex items-start gap-3">
                          <div className="text-green-600 text-lg">⚡</div>
                          <p>Fast testing workflow — no sync cooldowns, instant in-game updates.</p>
                      </div>
                  </div>
              </div>

              {/* Section 3: Getting Started */}
              <div className="bg-purple-50 border-l-4 border-purple-400 p-6 rounded-r-lg">
                  <h2 className="text-2xl font-bold text-purple-800 flex items-center gap-2 mb-4">
                      <span>🚀</span>
                      <span>Getting Started</span>
                  </h2>
                  <div className="space-y-3 text-purple-700">
                      <div className="flex items-start gap-3">
                          <div className="text-purple-600 text-lg">1️⃣</div>
                          <p>Access the tool through your browser at the self-hosted instance.</p>
                      </div>
                      <div className="flex items-start gap-3">
                          <div className="text-purple-600 text-lg">2️⃣</div>
                          <p>Configure your character builds with the intuitive web interface.</p>
                      </div>
                      <div className="flex items-start gap-3">
                          <div className="text-purple-600 text-lg">3️⃣</div>
                          <p>Use <span className="font-semibold">Connect PS</span> feature to instantly sync with your private server.</p>
                      </div>
                      <div className="flex items-start gap-3">
                          <div className="text-purple-600 text-lg">4️⃣</div>
                          <p>Test your builds in-game with real-time updates and modifications.</p>
                      </div>
                  </div>
              </div>

              <div className="text-center pt-4">
                  <Link to="/" className="btn btn-primary btn-wide">Back to Home</Link>
              </div>
          </div>
      </div>
  );
}