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

body {
  background: linear-gradient(135deg, #f5f7fa, #e4ecf5);
  padding: 25px;
  color: #333;
}

h2 {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 10px;
  font-size: 18px;
  color: #444;
  font-weight: 600;
}

#filter {
  width: 220px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#filter:hover {
  border-color: #ff6b6b;
  box-shadow: 0 6px 18px rgba(255, 107, 107, 0.15);
}

#filter:focus {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

body > h2,
body > select {
  display: inline-block;
  margin-right: 10px;
}

#show {
  margin-top: 20px;
}

#show {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

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

.card h1 {
  font-size: 20px;
  text-align: center;  
  font-family: "Times New Roman", Times, serif;
  padding: 10px 12px 5px;
  color: #222;
}

.card p {
  font-size: 13px;
  padding: 2px 12px;
  color: #666;
}

#recipeItem {
  max-width: 1000px;
  margin: auto;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 20px;
}

.recipe-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 20px;
  color: #222;
  font-family: "Times New Roman", Times, serif;
  text-decoration: underline;
  position: relative;
}

.close-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #ff4d4d;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
  will-change: transform;
}

.close-btn:hover {
  background: #e60000;
  transform: translateY(-50%) scale(1.1);
}

.recipe-container {
  display: flex;
  gap: 25px;
  align-items: center;
}

.recipe-container img {
  width: 45%;
  height: 400px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.recipe-content {
  width: 55%;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.info-row span {
  flex: 1;
  font-size: 15px;
  color: #555;
}

.recipe-content p {
  margin: 6px 0;
  font-size: 15px;
  color: #555;
}

.recipe-content h3 {
  margin-top: 15px;
  margin-bottom: 8px;
  color: #444;
  border-left: 4px solid #ff6b6b;
  padding-left: 8px;
}

.recipe-content ul,
.recipe-content ol {
  margin-left: 20px;
}

.recipe-content li {
  margin-bottom: 6px;
  color: #555;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .recipe-container {
    flex-direction: column;
  }

  .recipe-container img,
  .recipe-content {
    width: 100%;
  }

  .recipe-container img {
    height: 250px;
  }
}
