*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}
body{
    background-color: #90D26D;
}
header nav{
    background-color: #D9EDBF;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}
header nav h1{
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
header nav form{
    display: flex;
    justify-content: center;
}
form input[type="text"]{
    flex-grow: 1;
    margin-right: 10px;
}
form input[type="text"], button[type="submit"]{
    border: none;
    font-size: 18px;
    padding: 10px;
    border-radius: 4px;
}
form button[type="submit"]{
    background-color: #2C7865;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
}
form button[type="submit"]:hover{
    background-color: #55a08e;
}

/* Main Section */
.recipe-container{
    text-align: center;
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    grid-gap: 40px;
    width: 80%;
    margin: 10px auto;
    padding: 20px;
    place-items: center;
}
.recipe{
    background-color: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    box-shadow: 0 5px 10px rgba(78,73,73,0.1), -5px -5px 10px rgba(34,34,34,0.5);
    cursor: pointer;
    max-width: 350px;
    transition: all 0.2s ease-in-out ;
}
.recipe:hover{
    transform: scale(1.02);
}
/* After clicking the button the recipe details will show up */
.recipe-details{
    display: none;
    position: fixed;
    top:50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%,-50%);
    background-color: #b3e599;
    border-radius: 12px;
    width: 40%;
    height: 50%;
    font-size: 20px;
    transition: all 0.5s ease-in-out;
    overflow-y: scroll;
}
.recipe-details-content{
    padding: 30px;
}
.recipeName{
    text-align: center;
    text-transform: uppercase;
    text-decoration: underline;
}
.ingredientList li{
    margin-top: 10px;
    margin-left: 20px;
}
.recipeInstructions p{
    line-height: 30px;
    white-space: pre-line;
}
.recipeName, .ingredientList, .recipeInstructions{
    margin-bottom: 20px;
}
.recipe-close-Btn{
    border: none;
    font-size: 18px;
    padding: 10px;
    border-radius: 4px;
    background-color: #55a08e;
    color: #fff;
    position: absolute;
    top:20px;
    right: 20px;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.recipe img{
    height: 300px;
}
.recipe h3{
    font-size: 24px;
    margin-block: 5px;
}
.recipe p{
    font-size: 23px;
    color: rgb(43, 42, 42);
    margin: 5px 0;
}
.recipe span{
    font-weight: 600;
}
.recipe button{
    font-size: 20px;
    font-weight: 400;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin: 18px auto;
    background-color: #2C7865;
    border: none;
    color: #fff;
}
.recipe button:hover, .recipe-close-Btn:hover{
    background-color: #55a08e;
}


/* Adding scrollbar for recipe details */
.recipe-details::-webkit-scrollbar{
    width:10px;
}
.recipe-details::-webkit-scrollbar-thumb{
    background: #858587;
    border-radius: 16px;
    --webkit-border-radius:16px;
}


/* Adding scrollbar for body of website */
body::-webkit-scrollbar{
    width:16px;
}
body::-webkit-scrollbar-thumb{
    background: #858587;
}
body::-webkit-scrollbar-track{
    background: #d9d5d5;
}



/* Adding Responsiveness on smaller screens */
@media screen and (max-width:600px) {
    header nav{
        flex-direction: column;
    }
    header nav form{
        width: 80%;
        margin-top: 25px;
    }
}