/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
  }
  
  body {
    background-color: #111a1f;
    color: #333;
    min-height: 100vh;
  }
  
  /* Header */
  header {
    position: relative; /* enables z-index */
    z-index: 30; 
    background: #333333;
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 20px 22px rgba(0,0,0,0.38);

  }
  
  .filters {
    position: relative; /* enable z-index */
    z-index: 10; /* below header shadow */
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    background-color: #111a1f;
    position: sticky;
    top: 0;
  }
  
  .filters select {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    cursor: pointer;
  }
  #searchInput {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    flex: 1 1 200px; /* responsive width */
    min-width: 150px;
    max-width: 300px;
  }
  /* Grid */
  main {
    padding: 2rem;
    
  }
  
  .recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;

    
  }
  .container {
    max-width: 1200px;
    margin: auto;
  }
  /* Cards */
  .recipe-card {
    background: #232A32;
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.301);
    max-width: 300px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }
  
  .recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.16);
    border-color: rgba(255,255,255,0.12);
   
  }
  
  .recipe-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #D6D6D6;
  }

  .card-image {
    margin-top: 10px;
    max-width: 100%;
    border-radius: 10px;

    
  }

  .card-image {
    width: 100%;
    height: 280px;        /* pick the height you like */
    object-fit: cover;    /* fills box without distortion */
    border-radius: 10px;
    margin-top: 10px;
    display: block;
  }
  
  .meta {
    font-size: 0.85rem;
    color: #D6D6D6;
    margin-bottom: 0.75rem;
  }
  
  .category-badge {
    display: inline-block;
    background: #3498db;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 0.5rem;
  }

  /* Modal overlay */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.726);
}

/* Modal content */
.modal-content {
  background-color: #585858;
  margin: 5% auto;
  padding: 3rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  color: #D6D6D6;
  border: solid 1px white;
}

/* Close button */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}
/* Modal body two-column layout */
.modal-body {
  display: flex;
  flex-wrap: wrap; /* allows stacking on small screens */
  gap: 1.5rem;
}

.modal-text {
  flex: 1 1 250px;
}

.modal-image {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: cover;
  
}
#modalInstructions {
  margin-top: 1rem;
  color: #D6D6D6;
 
}

#modalAuthor {
  color: #D6D6D6;
  text-align: center; margin-bottom: 15px;
}

#modalTitle {
  text-align: center;
  
}

#modalInstructions li{
  margin-top: 6px;
}

#modalIngredients li{
  margin-top: 6px;
}

#modalIngredients {
  margin-bottom: 30px;
}


.submit-btn {
  
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: #3498db;
  color: white;
  cursor: pointer;
  width: 130px;
  
}

.submit-btn:hover {
  opacity: 0.9;
}

#recipeForm {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#recipeForm input,
#recipeForm textarea,
#recipeForm select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#recipeForm button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: #3498db;
  color: white;
  cursor: pointer;
  width: 150px;
  margin: auto;
}

#recipeForm button:hover {
opacity: 0.9;
}


.admin-instructions {
  color: white;
}

.admin-ingredients {
  color: white;
}