import Link from 'next/link'

const footerLinkClass =
  'text-gray-600 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 transition-colors'

export default function Footer() {
  const year = new Date().getFullYear()

  return (
    <footer className="mt-auto border-t border-gray-200 dark:border-gray-700 bg-white/90 dark:bg-gray-900/90 backdrop-blur">
      <div className="container mx-auto px-4 py-8">
        <div className="grid gap-6 md:grid-cols-[1.5fr_1fr_1fr]">
          <div className="space-y-3">
            <div className="text-lg font-semibold text-gray-900 dark:text-white">
              SolaceScanScout
            </div>
            <p className="max-w-xl text-sm leading-6 text-gray-600 dark:text-gray-400">
              Built from Blockscout foundations and Solace Bank Group PLC frontend
              work. Explorer data is powered by Blockscout, Chain 138 RPC, and the
              companion MetaMask Snap.
            </p>
            <p className="text-xs text-gray-500 dark:text-gray-500">
              © {year} Solace Bank Group PLC. All rights reserved.
            </p>
          </div>

          <div>
            <div className="mb-3 text-sm font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
              Resources
            </div>
            <ul className="space-y-2 text-sm">
              <li><a className={footerLinkClass} href="/docs.html">Documentation</a></li>
              <li><Link className={footerLinkClass} href="/liquidity">Liquidity Access</Link></li>
              <li><Link className={footerLinkClass} href="/addresses">Addresses</Link></li>
              <li><Link className={footerLinkClass} href="/watchlist">Watchlist</Link></li>
              <li><a className={footerLinkClass} href="/privacy.html">Privacy Policy</a></li>
              <li><a className={footerLinkClass} href="/terms.html">Terms of Service</a></li>
              <li><a className={footerLinkClass} href="/acknowledgments.html">Acknowledgments</a></li>
            </ul>
          </div>

          <div>
            <div className="mb-3 text-sm font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
              Contact
            </div>
            <div className="space-y-2 text-sm text-gray-600 dark:text-gray-400">
              <p>
                Support:{' '}
                <a className={footerLinkClass} href="mailto:support@d-bis.org">
                  support@d-bis.org
                </a>
              </p>
              <p>
                Snap site:{' '}
                <a className={footerLinkClass} href="https://explorer.d-bis.org/snap/" target="_blank" rel="noopener noreferrer">
                  explorer.d-bis.org/snap/
                </a>
              </p>
              <p className="text-xs leading-5 text-gray-500 dark:text-gray-500">
                Questions about the explorer, chain metadata, route discovery, or liquidity access
                can be sent to the support mailbox above.
              </p>
            </div>
          </div>
        </div>
      </div>
    </footer>
  )
}
