/* Base Reset & iPad-Friendly Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f4f5f7;
  color: #1f2937;
  line-height: 1.6;
  padding: 20px;
}

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

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

header h1 {
  font-size: 2.2rem;
  color: #111827;
}

/* Collapsible Meal Categories */
details {
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

summary {
  font-size: 1.4rem;
  font-weight: 700;
  padding: 18px 24px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  transition: background-color 0.2s;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.6rem;
  font-weight: 400;
  color: #6b7280;
}

details[open] summary::after {
  content: "−";
}

details[open] summary {
  border-bottom: 1px solid #f3f4f6;
}

/* Recipe List inside Categories */
.recipe-list {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.recipe-card {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.recipe-card:hover, .recipe-card:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.recipe-card img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 16px;
  background-color: #e5e7eb;
}

.recipe-card-title {
  font-size: 1.15rem;
  font-weight: 600;
}

/* Individual Recipe Page */
.back-btn {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: #2563eb;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 8px 14px;
  background: #eff6ff;
  border-radius: 8px;
}

.recipe-detail {
  background: #ffffff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hero-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 24px;
  background-color: #e5e7eb;
}

.recipe-detail h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.recipe-detail h2 {
  font-size: 1.35rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: #111827;
  border-bottom: 2px solid #f3f4f6;
  padding-bottom: 6px;
}

.recipe-detail ul, .recipe-detail ol {
  margin-left: 24px;
  font-size: 1.1rem;
}

.recipe-detail li {
  margin-bottom: 10px;
}

/* Macros Box */
.macros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  text-align: center;
}

.macro-item {
  background: #f3f4f6;
  padding: 14px 10px;
  border-radius: 10px;
}

.macro-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
}

.macro-label {
  font-size: 0.9rem;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}