body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  /* Gradient background */
  background: linear-gradient(135deg, #e5ebf5 0%, #cfc5ec 45%, #b7e1b0 100%);
  background-attachment: fixed;
  background-size: cover;
  margin: 0;
  padding: 20px;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.recipe-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Accordion header styles */
.recipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 12px;
}
.recipe-header h2 {
  font-size: 1.1rem;
  margin: 0;
  color: #2c3e50;
}
.recipe-header .arrow {
  display: inline-block;
  transition: transform 240ms ease;
  font-size: 1.2rem;
  color: #7f8c8d;
}
.recipe-header.open .arrow {
  transform: rotate(90deg);
}
/* Header right-side layout */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.servings {
  font-size: 0.85rem;
  color: #6c757d;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px 8px;
  border-radius: 12px;
}

.recipe-card .notes {
  font-style: italic;
  color: #7f8c8d;
  margin-top: -10px;
  margin-bottom: 10px;
}

/* Collapsible body */
.recipe-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 320ms ease, padding 240ms ease;
  padding-top: 0;
  padding-bottom: 0;
}
.recipe-body.open {
  max-height: 2000px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.recipe-content {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.ingredients,
.directions {
  flex: 1;
}

h3 {
  font-size: 1.2em;
  color: #34495e;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 5px;
  margin-top: 0;
}

ul,
ol {
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Recipe image styling */
.image-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 12px 0;
  padding: 8px 0;
}
.recipe-image {
  width: 100%;
  max-width: 320px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
  .recipe-image {
    max-width: 100%;
    height: 160px;
  }
  .recipe-content {
    flex-direction: column;
  }
}
