export default function LoadingScreen({ text = 'Загрузка...', subText = '' }) {
  return (
    <div
      style={{
        position: 'fixed',
        inset: 0,
        display: 'flex',
        flexDirection: 'column',
        alignItems: 'center',
        justifyContent: 'center',
        background: '#0e1117',
        color: '#d8def0',
        fontFamily: '-apple-system, system-ui, sans-serif',
        gap: 16,
      }}
    >
      <div
        style={{
          width: 64,
          height: 64,
          border: '4px solid #2c3344',
          borderTopColor: '#3357ff',
          borderRadius: '50%',
          animation: 'rs-spin 1s linear infinite',
        }}
      />
      <div style={{ fontSize: 18, fontWeight: 600 }}>{text}</div>
      {subText && (
        <div style={{ fontSize: 13, color: '#8a93a4', maxWidth: 480, textAlign: 'center' }}>
          {subText}
        </div>
      )}
      <style>{`@keyframes rs-spin { to { transform: rotate(360deg); } }`}</style>
    </div>
  );
}
