* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

a {
    text-decoration: none;
    color: #333;
}

header {
    background-color: #fff;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 3px solid #ff6347;
}

.logo {
    position: absolute;
    left: 2rem;
}

.logo a img {
    max-width: 150px;
    width: 100%;
    height: auto;
}

.page-title {
    font-family: 'Chewy', cursive;
    font-size: 3rem;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    text-align: center;
}

.intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.search {
    margin: 2rem 0;
}

#ingredients {
    width: 100%;
    max-width: 500px;
    padding: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
}

#submit-ingredients {
    background-color: #ff6347;
    color: #fff;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#recipe-results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.recipe-card {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.recipe-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recipe-card h3 {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.recipe-card .recipe-details {
    padding: 1rem;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.recipe-card.expanded {
    height: auto;
    flex-grow: 1;
    background-color: #f4f4f4;
    padding-bottom: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1; 
    position: relative; 
}


.recipe-details.expanded {
    max-height: 1000px;
    padding: 1rem 0;
}
.instructions {
    margin-bottom: 1rem;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2;
  }
  
  .overlay-content {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
    width: 80%;
    max-width: 800px;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }  
  .recipe-card.expanded .recipe-details {
    display: none;
  }
#overlay {
    display: none;
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    overflow-y: auto;
    padding: 2rem;
  }
  
  .overlay-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 5px;
    max-width: 900px;
    margin: 0 auto;
  }
  
  .overlay-content h3 {
    margin-bottom: 1rem;
  }
  