body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
}

header {
  background-color: #343a40;
  color: #fff;
  text-align: center;
  padding: 1.5rem 0;
}

header h1 {
  margin: 0;
  font-size: 2rem;
}

header #homeLink {
  text-decoration: none;
  color: #fff;
  transition: color 0.3s ease-in-out;
}

header #homeLink:hover {
  color: #ff6347;
}

#searchInput {
  width: 60%;
  padding: 0.5rem;
  margin-top: 1rem;
  display: block;
  margin: 0 auto;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 1.5rem;
}

.filter-container {
  margin-top: 1rem;
}

#categoryFilter {
  padding: 0.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.recipe-card {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 1.5rem;
  overflow: hidden;
  width: 100%;
  max-width: 300px;
  transition: transform 0.3s ease-in-out;
}

.favorite-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: #ccc;
  transition: all 0.3s ease;
  z-index: 1;
}

.favorite-btn.active {
  color: #ff4757;
  transform: scale(1.1);
}

.favorite-btn:hover {
  transform: scale(1.1);
  background-color: #fff;
}

.recipe-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid #343a40;
}

.recipe-details {
  padding: 1.5rem;
}

.recipe-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.recipe-instructions {
  font-size: 1rem;
  color: #666;
}

.recipe-info {
  margin-bottom: 2rem;
}

.ingredients-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.ingredients-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.recipe-meta {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.youtube-link {
  display: inline-block;
  background-color: #ff4757;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 1rem;
  transition: background-color 0.3s ease;
}

.youtube-link:hover {
  background-color: #ff2e45;
}

#selectedRecipe {
  margin: 1.5rem;
}

#selectedRecipe .recipe-img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-bottom: 2px solid #343a40;
}

#selectedRecipe .recipe-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

#selectedRecipe .recipe-details {
  padding: 1.5rem;
}

#selectedRecipe .recipe-instructions {
  font-size: 1.2rem;
  color: #666;
}

.hidden {
  display: none;
}

.back-button {
  display: block;
  margin: 1.5rem auto 0; /* Center the button with top margin */
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  background-color: #343a40;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.back-button:hover {
  background-color: #ff6347;
}

.recipe-instructions {
  padding-left: 1.2rem; /* Space before bullet points */
  list-style-type: disc; /* Set bullet points */
  line-height: 1.6; /* Line spacing for readability */
  color: #444; /* Softer color for readability */
}

.recipe-instructions li {
  margin-bottom: 0.5rem; /* Space between items */
}
