import type { Metadata } from "next";
import { Inter, Geist_Mono } from "next/font/google";
import { Providers } from "@/components/providers";
import { OrganizationJsonLd, WebSiteJsonLd } from "@/components/seo";
import "./globals.css";

const inter = Inter({
  subsets: ["latin"],
  variable: "--font-inter",
  display: "swap",
});

const geistMono = Geist_Mono({
  subsets: ["latin"],
  variable: "--font-geist-mono",
  display: "swap",
});

const BASE_URL = "https://llmhosts.com";

export const metadata: Metadata = {
  metadataBase: new URL(BASE_URL),
  title: {
    default: "LLMHosts — Your GPU, Real AI Infrastructure, From Anywhere",
    template: "%s | LLMHosts",
  },
  description:
    "Turn your home GPU into production AI infrastructure. OpenAI + Anthropic compatible proxy with intelligent routing, verified cache, and remote access.",
  icons: {
    icon: "/favicon.svg",
  },
  openGraph: {
    title: "LLMHosts — Your GPU, Real AI Infrastructure, From Anywhere",
    description:
      "One command. Zero config. Turn your home GPU into production AI infrastructure accessible from anywhere. Save 30-50% on AI costs.",
    url: BASE_URL,
    siteName: "LLMHosts",
    type: "website",
    images: [
      {
        url: `${BASE_URL}/og?page=home`,
        width: 1200,
        height: 630,
        alt: "LLMHosts — Turn your GPU into production AI infrastructure",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "LLMHosts — Your GPU, Real AI Infrastructure",
    description:
      "Turn your home GPU into production AI infrastructure. OpenAI + Anthropic compatible. Save 30-50% on AI costs.",
    images: [`${BASE_URL}/og?page=home`],
  },
  other: {
    "theme-color": "#7c3aed",
  },
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" className={`dark ${inter.variable} ${geistMono.variable}`} style={{ colorScheme: "dark" }}>
      <body className="bg-gray-950 text-gray-100 min-h-screen">
        <OrganizationJsonLd />
        <WebSiteJsonLd />
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}
