* {
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
    color: white;
}

header nav {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

header nav h1 {
    font-size: 34px;
}

header nav form {
    display: flex;
    justify-content: center;
}

form input[type="text"] {
    margin-right: 35px;
}

form input[type="text"],
button[type="submit"] {
    border: none;
    padding: 5px;
    border-radius: 8px;
    font-size: 20px;
}

form button[type="submit"] {
    background-color: rgb(181, 132, 41);
    cursor: pointer;
}

form button[type="submit"]:hover {
    background-color: rgb(28, 15, 102);
    color: white;
}

.recipes-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;
    place-items: center;
}

.recipe {
    background-color: white;
    color: black;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    cursor: pointer;
    max-width: 350px;
}

.recipe img {
    height: 300px;
}

.recipe h3 {
    font-size: 24px;
}

.recipe p {
    font-size: 20px;
    color: #4a4a4a;
    margin: 5px 0;
}

.recipe button {
    font-size: 20px;
    font-weight: 600;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 18px auto;
    background-color: #f44336;
    color: #fff;
}

.recipe-details {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
    width: 75%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recipe-details-content img {
    max-width: 100%;
    margin-left:35%;
    height: 200px;
}

.close {
    background: none;
    border: none;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    cursor: pointer;
}

.ingredients {
    display: flex;
    flex-direction: column;
    margin: 20px 0;
}

.ingredient-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.ingredient {
    flex: 1;
    text-align: center;
    padding: 10px;
    background-color: #f0f0f0;
    color: #000;
    border-radius: 4px;
    margin: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}