'use client';
export default function GlobalError({
  error,
  reset,
}: {
  error: Error & { digest?: string };
  reset: () => void;
}) {
  return (
    <html lang="en">
      <body style={{
        margin: 0, minHeight: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center',
        backgroundColor: '#09090B', color: '#F4F4F5', fontFamily: 'system-ui, sans-serif',
      }}>
        <div style={{ textAlign: 'center', padding: '2rem' }}>
          <h1 style={{ fontSize: '1.5rem', fontWeight: 700, marginBottom: '0.5rem' }}>Something went wrong</h1>
          <p style={{ color: '#71717A', marginBottom: '2rem' }}>{error?.message || 'An error occurred.'}</p>
          <button onClick={reset} style={{
            padding: '0.75rem 1.5rem', backgroundColor: '#F97316', color: '#fff',
            borderRadius: '0.75rem', fontWeight: 700, border: 'none', cursor: 'pointer',
          }}>Try Again</button>
        </div>
      </body>
    </html>
  );
}
