/* Basic reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

main, header, footer, section {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}


/* Body and layout */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5fbf6;
  color: #1f2a24;
  line-height: 1.6;
  padding: 0 1rem;
}

header {
  background: linear-gradient(135deg, #2f9b4c, #46c172);
  color: #ffffff;
  padding: 1.5rem 1rem 1.25rem;
  margin: 1rem auto 1.5rem;
  border-radius: 12px;
  max-width: 900px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

header p {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

nav a {
  color: #eaffea;
  text-decoration: none;
  font-weight: 500;
  margin: 0 0.3rem;
}

nav a:hover {
  text-decoration: underline;
}

/* Main content layout */
main {
  max-width: 900px;
  margin: 0 auto 2.5rem;
}

section {
  margin-bottom: 2rem;
}

#intro,
#note {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#intro h2,
#note h2,
#recipe h2,
#recipe h3 {
  margin-bottom: 0.5rem;
}

/* Recipe card */
#recipe {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

#recipe-title {
  margin-top: 1rem;
  font-size: 1.5rem;
  color: #23693d;
}

#recipe-category {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.95rem;
  color: #4a6653;
}

#recipe img {
  border-radius: 10px;
  margin-top: 0.75rem;
}

/* Buttons */
button,
input[type="image"] {
  cursor: pointer;
}

#refresh-recipe-btn {
  background-color: #2f9b4c;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#refresh-recipe-btn:hover {
  background-color: #267b3d;
  transform: translateY(-1px);
}

#refresh-recipe-btn:active {
  transform: translateY(0);
}

/* Ingredients and instructions */
#ingredients-list {
  list-style-type: disc;
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

#recipe-instructions {
  margin-top: 0.5rem;
}

/* Footer */
footer {
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #425244;
}

footer form {
  margin: 0.75rem 0;
}

footer p {
  margin-top: 0.35rem;
}

footer a {
  color: #2f9b4c;
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive tweaks */
@media (min-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  #recipe-title {
    font-size: 1.7rem;
  }
}
