/* ==============================
   Recipe Finder CSS - Fixed
   ============================== */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: url('https://images.unsplash.com/photo-1600891964599-f61ba0e24092?auto=format&fit=crop&w=1350&q=80') no-repeat center center fixed;
  background-size: cover;
}

/* ================= NAVBAR ================= */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ff6b6b;
  padding: 15px 30px;
  color: white;
}

.logo {
  font-size: 22px;
  font-weight: bold;
}

.search-area input {
  padding: 10px;
  border-radius: 6px;
  border: none;
  width: 220px;
}

.search-area button {
  padding: 10px 14px;
  margin-left: 5px;
  border: none;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: 0.3s;
}

.search-area button:hover {
  background: #ffe0e0;
}

/* ================= MAIN CONTAINER ================= */

.container {
  padding: 40px;
}

/* ================= GRID LAYOUT ================= */

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

/* ================= RECIPE CARD ================= */

.recipe-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-5px);
}

.recipe-card img {
  width: 100%;
  border-radius: 12px;
}

.recipe-card h3 {
  margin: 10px 0;
  font-size: 18px;
}

.recipe-card p {
  font-size: 14px;
  color: #333;
}

@media screen and (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 10px;
  }

  .search-area input {
    width: 100%;
  }

  .container {
    padding: 20px;
  }
}

.search-area select {
  padding: 10px;
  border-radius: 6px;
  border: none;
  margin-left: 5px;
}


/* ================= ERROR UI ================= */

.error-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}
.error-overlay {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.error-card button:hover {
  transform: translateY(-2px);
}
.error-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 350px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.error-card h3 {
  color: #ff6b6b;
  margin-bottom: 10px;
}

.error-card p {
  color: #555;
  margin-bottom: 8px;
}

.error-card button {
  margin-top: 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #ff6b6b;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

.error-card button:hover {
  background: #ff4c4c;
}
/* Time filter styling */
#timeFilter {
  padding: 10px;
  border-radius: 6px;
  border: none;
  margin-left: 5px;
  background: white;
  cursor: pointer;
}

#timeFilter:hover {
  background: #ffe0e0;
}
.time-badge {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin: 8px 0;
}