body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f8f8f8;
}

header {
  text-align: center;
  padding: 20px;
  background: #ff9800;
  color: white;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
  position: relative;
}

header h1 {
  flex: 1;
  margin: 0;
}

.filters {
  display: flex;
  gap: 10px;
}

/* Hamburger button hidden on large screens */
.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
}


header input, header select {
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  min-width: 180px;
}

.recipe-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  padding: 20px;
}

.recipe-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.2s;
  overflow: hidden;
}

.recipe-card:hover {
  transform: scale(1.05);
}

.recipe-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.recipe-card h3 {
  text-align: center;
  padding: 10px;
  font-size: 1.1rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center; 
  align-items: center;
  padding: 10px;
}

.modal-content {
  background: white;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

#closeModal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
}
#closeModal:hover {
  color: #333;
}


/* ✅ Mobile View */
@media (max-width: 700px) {
  .filters {
    display: none; /* hidden by default on small screens */
    flex-direction: column;
    background: white;
    padding: 15px;
    border-radius: 10px;
    position: absolute;
    top: 60px; /* below header */
    left: 10px;
    right: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 999;
  }

  .filters.active {
    display: flex; /* show when active */
  }

  .menu-btn {
    display: block; /* show hamburger */
  }

  header input, header select {
    width: 100%;
    font-size: 16px;
  }
}

#recipeTitle {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

/* 🔹 Ingredients */
#recipeIngredients {
  margin: 15px 0;
  padding-left: 20px;
}

#recipeIngredients li {
  font-size: 1rem;
  margin: 6px 0;
  color: #444;
  list-style-type: "🍴 ";
}

/* 🔹 Steps */
#recipeSteps {
  margin-top: 15px;
  padding-left: 20px;
}

#recipeSteps li {
  font-size: 1rem;
  margin: 6px 0;
  color: #555;
  list-style-type: decimal;
}
/* 🔹 Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}