* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #f9fafb;
  color: #111827;
  min-height: 100vh;
  padding: 40px 20px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  font-size: 40px;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 18px;
  margin-bottom: 30px;
}

#searchInput {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 30px;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
}

#searchInput:focus {
  border-color: #2563eb;
}

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

.recipe-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

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

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

.recipe-content {
  padding: 18px;
}

.recipe-content h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.recipe-content p {
  color: #4b5563;
  line-height: 1.5;
  font-size: 15px;
  margin-bottom: 14px;
}

.view-btn {
  border: none;
  background: #2563eb;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.view-btn:hover {
  background: #1d4ed8;
}

.hide {
  display: none;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 600px;
  border-radius: 16px;
  padding: 25px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-box h2 {
  margin-bottom: 20px;
}

.modal-box h3 {
  margin: 18px 0 10px;
}

.modal-box ul,
.modal-box ol {
  padding-left: 20px;
  color: #374151;
  line-height: 1.7;
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 32px;
  cursor: pointer;
  color: #111827;
}

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 16px;
  }
}
