import type { Metadata, Viewport } from "next";
import "./globals.css";
import { Providers } from "@/components/Providers";
import ResourcePreload from "@/components/ResourcePreload";

// 使用系统字体，避免 Google Fonts 连接问题
const inter = {
  variable: "--font-inter",
  className: "",
};

const jetbrainsMono = {
  variable: "--font-inter",
  className: "",
};

export const viewport: Viewport = {
  width: "device-width",
  initialScale: 1,
  maximumScale: 1,
};

export const metadata: Metadata = {
  title: "AssetX Dashboard",
  description: "DeFi Asset Management Platform",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body className={`${inter.variable} ${jetbrainsMono.variable} ${inter.className} overflow-x-hidden`}>
        <ResourcePreload />
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}
