import { createTheme } from '@mui/material/styles';

const theme = createTheme({
  palette: {
    primary: {
      main: '#367723', // Minecraft Green
      contrastText: '#FFFFFF',
    },
    secondary: {
      main: '#262423', // Dirt Brown
    },
    background: {
      default: '#171615', // Dark Stone
      paper: '#3C3C3C',
    },
    text: {
      primary: '#FFFFFF',
      secondary: '#C0C0C0',
    },
  },
  typography: {
    fontFamily: '"Minecraft", sans-serif', // Retro Pixel Font
    allVariants: {
      color: '#ffffff', // Alle Textvarianten standardmäßig weiß
    },
    h1: {
      fontFamily:'"MinecraftBold", sans-serif', // Minecraft Bold Font
      fontSize: '40px',
      fontWeight: 700,
    },
    body1: {
      fontSize: '1rem',
    },
    big:{
      fontSize: '80px',
    }
  },
  components: {
    MuiButton: {
      styleOverrides: {
        root: {
          backgroundColor: "#367723",
          color: "#FFFFFF",
          borderRadius: '0px',
          borderTop: '6px solid #6CC349',
          borderBottom: '6px solid #2A641C',
          fontSize: '18px',
          lineHeight: '1',
          padding: '8px',
          '&:hover': {
            backgroundColor: '#3C8527',
          },
          "&.Mui-disabled": {
            backgroundColor: "#505050",
            color: "#ccc",
            borderTop: '6px solid #636160',
            borderBottom: '6px solid #292726',
            cursor: "not-allowed",
          },
        },
        nav: {
          backgroundColor: 'transparent',
          textTransform: 'none',
          borderBottom: 'none ',
          borderTop: 'none',
          borderColor: '#367723',
          '&:hover': {
            borderBottom: '2px solid #3C8527',
          },
        },
        broadcast: {
          minWidth: 32,
          height: 32,
          padding: 10,
          border: '1px solid #111',
          fontFamily: '"Minecraft", sans-serif',
          '&:hover': {
            backgroundColor: '#505050',
          },
        },
      },
    },
    MuiIconButton: {
      styleOverrides: {
        root: {
          backgroundColor: "#367723",
          color: "#FFFFFF",
          borderRadius: '0px',
          borderTop: '6px solid #6CC349',
          borderBottom: '6px solid #2A641C',
          padding: '8px',
          '&:hover': {
            backgroundColor: '#3C8527',
          },
          "&.Mui-disabled": {
            backgroundColor: "#505050",
            color: "#ccc",
            borderTop: '6px solid #636160',
            borderBottom: '6px solid #292726',
            cursor: "not-allowed",
          },
        },
      },
    },
    MuiToggleButton: {
      variants: [
        {
          props: { variant: 'broadcast' },
          style: {
            borderTop: '5px solid #636160',
            borderRight: '5px solid #5c5a59',
            borderBottom: '5px solid #292726',
            borderLeft: '5px solid #292726',
            padding: '6px',
            color: '#FFFFFF',
            backgroundColor: '#3C3C3C',
            fontFamily: '"Minecraft", sans-serif',
            '&:hover': {
              backgroundColor: '#505050',
            },
          }
        }
      ]
    },
    MuiCard: {
      styleOverrides: {
        root: {
          backgroundColor: '#3d3a39',
          borderTop: '5px solid #636160',
          borderRight: '5px solid #5c5a59',
          borderBottom: '5px solid #292726',
          borderLeft: '5px solid #292726',
        },
      },
    },
    MuiLink: {
      styleOverrides: {
        root: {
          color: 'green', // change the default color
          fontSize: '18px', // change the default font size
          textDecoration: 'none', // remove underline
          '&:hover': {
            color: 'blue', // change hover color
          },
          '&:visited': {
            color: '#fff', // change visited color
          },
        },
      },
    },
    MuiTableContainer: {
      styleOverrides: {
        root: {
          backgroundColor: '#3d3a39',
          borderTop: '5px solid #636160',
          borderRight: '5px solid #5c5a59',
          borderBottom: '5px solid #292726',
          borderLeft: '5px solid #292726',
        },
      },
    },
    MuiCssBaseline: {
      styleOverrides: {
        strong: {
          fontFamily:'"MinecraftBold", sans-serif',
          fontWeight: 400,
        },
      },
    },
  },
});

export default theme;