/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f5f6fa;
  color: #333;
}

header {
  text-align: center;
  padding: 2rem;
  background: #ff7f50;
  color: white;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

header h1 {
  margin-bottom: 1rem;
  font-size: 2rem;
}

form {
  display: flex;
  justify-content: center;
  gap: 10px;
}

form input {
  padding: 10px;
  width: 250px;
  border-radius: 10px;
  border: none;
  outline: none;
}

form button {
  padding: 10px 20px;
  background: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}

form button:hover {
  background: #333;
  color: #fff;
}

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

.recipe-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  cursor: pointer;
}

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

.recipe-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.recipe-card h3 {
  padding: 1rem;
  font-size: 1.2rem;
  color: #444;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content img {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 1rem;
}

.modal-content h2 {
  margin-bottom: 1rem;
}

.modal-content ul {
  margin: 1rem 0;
  list-style: square inside;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
