
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f5f5; 
    color: #333; 
}

main {
	display: flex;
  	justify-content: center;
  	align-items: center
}

.sidebar {
    position: fixed;
    top: 0;
    left: -500px; 
    width: 250px;
    height: 100%;
    background: #56585a;
    color: white;
    padding: 20px;
    transition: left 0.3s ease;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: block;
    color: white;
    text-decoration: none;
    margin: 15px 0;
}

.Div {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#ImpureCalc {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    margin-bottom: 30px;
}

.button {
    width: 120px;
    height: 120px;
    background-color: #fff; 
    border: 1px solid #ddd;
    border-radius: 10px;
    color: rgb(136, 202, 233);
    font-size: larger;
    font-weight: bolder;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 5px ;
  	
}

.button:hover {
    transform: scale(1.05); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
}

.button:active {
    transform: scale(1); 
}

.button:focus {
    outline: none; /
}

button.CopperImg {
    background-image: url(https://1710-wiki.terrafirmacraft.com/images/d/d7/Grid_Native_Copper_%28Rich%29.png);
}
button.SilverImg {
    background-image: url(https://1710-wiki.terrafirmacraft.com/images/1/18/Grid_Native_Silver_%28Rich%29.png);
}
button.BismuthImg {
    background-image: url(https://1710-wiki.terrafirmacraft.com/images/8/8b/Grid_Bismuthinite_%28Rich%29.png);
}
button.ZincImg {
    background-image: url(https://1710-wiki.terrafirmacraft.com/images/1/17/Grid_Sphalerite_%28Rich%29.png);
}
button.TinImg {
    background-image: url(https://1710-wiki.terrafirmacraft.com/images/f/f2/Grid_Cassiterite_%28Rich%29.png);
}
button.GoldImg {
    background-image: url(https://1710-wiki.terrafirmacraft.com/images/f/f5/Grid_Native_Gold_%28Rich%29.png);
}

button.CopperImg, 
button.SilverImg,
button.BismuthImg,
button.ZincImg,
button.TinImg,
button.GoldImg {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 10px;
}

p {
    margin: 0;
    font-size: 16px;
}

#menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 20;
    transition: left 0.3s ease;
}

#menu.active {
    left: 270px; 
}

#materialForm {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

label {
    display: block;
    margin: 10px 0;
    font-size: 16px;
    cursor: pointer;
}

input[type="radio"] {
    margin-right: 10px;
}

#materialForm button[type="button"] {
    background-color: #4CAF50; 
    color: white;
    font-size: 18px;
    font-weight: bolder;
    width: 100%; 
    padding: 10px;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#materialForm button[type="button"]:hover {
    background-color: #45a049; 
}


#result {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    word-wrap: break-word; 
}


@media (min-width: 769px) {
    #ImpureCalc {
        flex-wrap: wrap;
        justify-content: space-evenly; 
      	width: 1250px;
    }

    .button {
        width: 120px;
        height: 120px;
    }
}


@media (max-width: 768px) {
    #ImpureCalc {
        flex-wrap: wrap;
        justify-content: center; 
    }

    .button {
        width: 80px;
        height: 80px;
        margin: 10px; 
    }
}


@media (max-width: 480px) {
    #ImpureCalc {
        flex-wrap: wrap;
        justify-content: center; 
    }

    .button {
        width: 48px; 
        height: 48px;
        margin: 8px; 
    }
}

@media screen and (max-width: 900px) {
    #menu {
        position: fixed;
        top: 100px;
        left: 10px;
        z-index: 20;
        transition: left 0.3s ease;
        height: 20px;
        width: 20px;
    }

    #menu.active {
        left: 60px; 
    }

    body {
        font-size: x-small;
    }

    svg {
        height: 20px;
        width: 20px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -250px; 
        width: 32px;
        height: 100%;
        background: #56585a;
        color: white;
        padding: 20px;
        transition: left 0.3s ease;
        font-size: xx-small;
    }
}