@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:wght@500;700;800&family=Baloo+2:wght@600;700&display=swap');

:root {
  --yellow: #FFD54C;
  --blue: #0C9ED9;
  --green: #00AB65;
  --rose: #DD4353;
  --lime: #B2D236;
  --purple: #85439A;
  --teal: #07B1B2;
  --orange: #F89621;
  --ink: #2A2929;
  --brown: #593A39;
  --cream: #F9F6DB;
  --peach: #FED7B8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: 'Alegreya Sans', Verdana, sans-serif;
  font-weight: 500;
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: 'Baloo 2', 'Alegreya Sans', Verdana, sans-serif;
  font-weight: 700;
  color: var(--rose);
  margin: 0 0 12px;
}

a { color: var(--teal); }
a:hover { color: var(--rose); }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: #fff;
  border-bottom: 4px solid var(--yellow);
}
.site-header img { width: 44px; height: 44px; }
.site-header a.brand {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--rose);
  text-decoration: none;
}
.site-header nav { margin-left: auto; }
.site-header nav a {
  margin-left: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--brown);
}

.hero {
  text-align: center;
  padding: 56px 24px;
}
.hero img { width: 120px; margin-bottom: 16px; }
.hero p { font-size: 1.2rem; opacity: 0.85; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Alegreya Sans', sans-serif;
}
.btn:hover { background: var(--orange); color: #fff; }
.btn.secondary { background: var(--teal); }
.btn.danger { background: var(--ink); }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.recipe-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(89,58,57,0.12);
  text-decoration: none;
  color: var(--brown);
  display: block;
  transition: transform 0.15s ease;
}
.recipe-card:hover { transform: translateY(-4px); }
.recipe-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--peach);
}
.recipe-card .card-body { padding: 14px 16px; }
.recipe-card h3 { font-size: 1.1rem; margin: 0 0 6px; }
.recipe-card .meta { font-size: 0.85rem; opacity: 0.7; }
.tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin: 4px 4px 0 0;
}

.recipe-detail img.hero-photo {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--peach);
}
.recipe-meta-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
}
.recipe-meta-bar div { text-align: center; }
.recipe-meta-bar .label { font-size: 0.75rem; text-transform: uppercase; opacity: 0.6; }
.recipe-meta-bar .value { font-weight: 700; color: var(--rose); font-size: 1.1rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  margin-top: 24px;
}
@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}
.ingredients-box {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
}
.ingredients-box ul { padding-left: 20px; }
.steps ol { padding-left: 22px; }
.steps li { margin-bottom: 14px; }

.empty-state {
  text-align: center;
  padding: 60px 24px;
  opacity: 0.7;
}

/* Admin */
.admin-shell { max-width: 640px; margin: 0 auto; padding: 32px 24px; }
.admin-shell label { display: block; font-weight: 700; margin: 16px 0 6px; }
.admin-shell input[type=text],
.admin-shell input[type=number],
.admin-shell input[type=password],
.admin-shell textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--peach);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
.admin-shell textarea { min-height: 100px; }
.admin-row { display: flex; gap: 16px; }
.admin-row > div { flex: 1; }
.admin-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.admin-list-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.admin-list-item .title { flex: 1; font-weight: 700; }
.msg { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.msg.success { background: #d9f2e4; color: var(--green); }
.msg.error { background: #fbdada; color: var(--rose); }
