'use client';
import jing from "./icons/jing.png";
export default function NotFound() {
    const styles = {
    page: {
      width:'100%',
      minHeight: 'calc(100vh)',
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'center',
      padding: '32px',
      background: 'linear-gradient(180deg, #f7fbff 0%, #ffffff 100%)',
    } as React.CSSProperties,
    card: {
      background: '#fff',
      padding: '28px',
      borderRadius: 12,
      boxShadow: '0 8px 30px rgba(20,30,60,0.06)',
      maxWidth: 720,
      width: '100%',
      textAlign: 'center' as const,
    },
    avatar: {
      width: 96,
      height: 96,
      borderRadius: '50%',
      objectFit: 'cover' as const,
      margin: '0 auto 12px',
      boxShadow: '0 6px 18px rgba(37,70,150,0.08)'
    },
    title: {
      margin: '8px 0 6px',
      fontSize: 20,
      fontWeight: 700,
      color: '#0f1724'
    },
    desc: {
      margin: 0,
      color: '#475569',
      lineHeight: 1.6
    },
    actions: {
      marginTop: 18,
      display: 'flex',
      justifyContent: 'center',
      gap: 12
    } as React.CSSProperties,
    primaryBtn: {
      background: '#2563eb',
      color: '#fff',
      border: 'none',
      padding: '10px 16px',
      borderRadius: 8,
      cursor: 'pointer'
    },
    ghostBtn: {
      background: 'transparent',
      color: '#2563eb',
      border: '1px solid rgba(37,99,235,0.15)',
      padding: '10px 16px',
      borderRadius: 8,
      cursor: 'pointer'
    }
  };
  const url = typeof window !== 'undefined' ? window.location.href : '';
  return (
    <div style={styles.page}>
      <div style={styles.card}>
        <img src={jing.src} alt="avatar" style={styles.avatar} />
        <p>
          无效的链接地址：{url}<br/>
          请前往 <span className='text-primary' style={{color:'#1890ff'}} onClick={()=>{
            if(typeof window !== 'undefined'){
              window.location.replace('http://10.1.14.17:3200/appCenter')
            }
          }}>【应用广场】</span>选择可用应用，或联系管理员处理。
        </p>
      </div>
    </div>
  );
}