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

header {
  text-align: center;
  padding: 20px;
  background: #005f99;
  color: white;
  position: relative;
}

#darkModeToggle {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}

.controls {
  text-align: center;
  margin: 20px;
  color: blue;
}

#mealCount {
  width: 50px;       
  padding: 6px;       
  font-size: 14px;    
  border-radius: 8px;
  border: 1px solid #ccc;
}
.controls button{
  margin-top: 10px;
  padding: 8px 15px;
  background: #005f99;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
#fetchMeals:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
#mealsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
}

.meal-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.meal-card:hover {
  transform: scale(1.05);
}
.meal-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* popup styles */
.modal {
  display: none;  
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.modal img {
  width: 100%;      
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;

}
.modal-buttons.prev, .modal-buttons.next {
  padding: 8px 15px;
  background: blue;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.modal-buttons.prev, .modal-buttons.next:hover {
  background: #003f66;

}
.feedback {
  margin: 20px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  padding: 15px;
  border: 0.5px solid #ccc;
  border-radius: 10px;
  background: #f9f9f9;


}
.feedback textarea {
  width: 300px;     
  height: 50px;     
  padding: 8px;
  font-size: 14px;
  border-radius: 6px;
  border: 1.5px solid #ccc;
  resize: vertical; 
  position: center;

}
.feedback input {
  width: 100px;     
  height: 20px;     
  padding: 8px;
  font-size: 14px;
  border-radius: 6px;
  border: 1.5px solid #ccc;
  resize: vertical; 
  position: center;

}
.feedback button {
  margin-top: 10px;
  padding: 8px 15px;
  background: #005f99;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.feedback-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4caf50;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.feedback-popup.show {
  opacity: 1;
  transform: translateY(0);
}
.hidden {
  display: none;
}

/* Dark mode */
.dark-mode {
  background: #121212;
  color: #eee;
}
.dark-mode header {
  background: #222;
}
.dark-mode .meal-card {
  background: #1e1e1e;
  color: white;
  }
.dark-mode .modal-content {
  background: #1e1e1e;
  color: white;
} 
