/* General Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f8f8f8;
  color: #333;
}

header {
  text-align: center;
  padding: 20px;
  background: #ffcb77;
}

h1 {
  margin: 0;
}

input {
  padding: 8px;
  width: 80%;
  max-width: 300px;
  margin: 10px auto;
  display: block;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.filters {
  margin-top: 10px;
}

.filter-btn {
  margin: 5px;
  padding: 8px 12px;
  border: none;
  background: #f77f00;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.filter-btn:hover {
  background: #e36414;
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.recipe-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.recipe-card:hover {
  transform: scale(1.03);
}

.recipe-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.recipe-card h3 {
  margin: 10px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  max-width: 500px;
  width: 90%;
  border-radius: 10px;
  position: relative;
}

.modal-content img {
  width: 100%;
  border-radius: 10px;
}

#closeModal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}





/* ✅ MODAL OVERLAY */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

/*  MODAL CONTENT */
.modal-content {
  background: white;
  border-radius: 10px;
  padding: 20px;
  max-width: 300px;
  width: 50%;
  max-height: 60vh; /*  THIS LIMITS HEIGHT */
  overflow-y: auto; /*  SCROLL WHEN CONTENT IS LONG */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  position: relative;
}

/*  CLOSE BUTTON */
.close {
  position: absolute;
  right: 50px;
  top: 10px;
  font-size: 30px;
  cursor: pointer;
}






