* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: math;
}

body {
    color: #fff;
    background: #00002a;
}

header nav {
    backdrop-filter: blur(25vh);
    box-shadow: 0px 1px 10px 0px #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    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: #f44336;
    color: aliceblue;
    cursor: pointer;
}
form button[type="submit"]:hover{
    background-color: #fc938c;
    color: #000000;
}

.heading {
    text-align: left;
    text-transform: capitalize;
}

/* main-section */
.recipe-container {
    text-align: center;
    margin-top: 20px;
    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;
    color: black;
    box-shadow: 0px 0px 2px 1px #fff;
    cursor: pointer;
    border-radius: 6px;
    max-width: 350px;
    transition: transform 0.3s ease-in-out;
}

.recipe:hover {
    transform: scale(1.02);
}

.recipe img {
    height: 300px;
}

.recipe h3 {
    font-size: 24px;
    margin-block: 5px;
}

.recipe p {
    font-size: 20px;
    color: #4a4a4a;
    margin: 5px 0px;
}

.recipe span {
    font-weight: 600;
}

.recipe button {
    font-size: 20px;
    font-weight: 600;
    padding: 10px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    margin: 18px auto;
    background-color: #f44336;
    color: #fff;
}

.recipe-details {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate((-50%, -50%));
    background-color: rgb(147, 79, 0);
    border-radius: 12px;
    width: 40%;
    height: 60%;
    font-size: 20px;
    transition: all 0.5s ease-in-out;
    overflow-y: scroll;
}

.recipe-details-content {
    padding: 20px;
}

.recipename,
.ingredientlist,
.recipeinstruction {
    margin-bottom: 20px;
}

.recipename {
    text-align: center;
    text-transform: uppercase;
    text-decoration: underline;
}

.ingredientlist li {
    margin-top: 10px;
    margin-left: 10px;
}

.recipeinstruction p {
    line-height: 30px;
    white-space: pre-line;
}

.recipe-closebtn {
    border: none;
    font-size: 18px;
    padding: 8px;
    border-radius: 4px;
    background-color: #f44336;
    color: #fff;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Adding scrollbar */
.recipe-details::-webkit-scrollbar {
    width: 10px;
}

.recipe-details::-webkit-scrollbar-thumb {
    background-color: #00ab09;
    border-radius: 40px;
}

.recipe-details::-webkit-scrollbar-track {
    background-color: #ffa600;
}

body::-webkit-scrollbar {
    width: 12px;
    border-radius: 60px;
}

body::-webkit-scrollbar-thumb {
    background-color: #ff9d00;
    border-radius: 40px;
}

body::-webkit-scrollbar-track {
    background-color: #45ff34;
}

@media (max-width: 590px) {
    header nav {
        flex-direction: column;
    }

    header nav h1 {
        margin-bottom: 2vh;
        font-size: 2rem;
    }

    header nav form {
        width: 90%;
    }
    .recipe-details{
        width: 89%;
    }
}

@media (max-width: 375px) {
    header {
        width: 110vw;
    }
}
@media (max-width: 375px){
    .recipe-details{
        width: 100%;
    }
}

