/* =========================
   Recipe Search — Portfolio-Aligned
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f1216;
  --surface: #151a20;
  --surface2: #1b222b;
  --text: #f3f5f7;
  --muted: rgba(243, 245, 247, 0.72);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #6eced1;
  --accentDeep: #3fa6a3;

  --radius: 16px;
  --radiusLg: 22px;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

/* Page */
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(
      900px 520px at 18% 18%,
      rgba(110, 206, 209, 0.16),
      transparent 60%
    ),
    radial-gradient(
      900px 520px at 85% 22%,
      rgba(63, 166, 163, 0.12),
      transparent 62%
    ),
    linear-gradient(180deg, var(--bg), #0b0d10);
  color: var(--text);
  line-height: 1.6;
}

/* Shared header */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.projectHeader {
  padding: 56px 0 32px;
}

.btnNav {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 14px;
}

.display {
  font-family: Fraunces, serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin: 0 0 10px;
}

.lead {
  color: var(--muted);
  max-width: 70ch;
}

/* Demo */
.demo {
  padding: 32px 0 80px;
}

.demoHeader {
  text-align: center;
  margin-bottom: 28px;
}

.demoTitle {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.demoSub {
  color: var(--muted);
  margin-bottom: 6px;
}

.apiLink {
  font-size: 0.85rem;
  color: var(--muted);
}

.apiLink a {
  color: var(--accent);
  text-decoration: none;
}

/* Search */
.searchSection {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 24px;
}

.searchSection input {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.searchSection input:focus {
  outline: none;
  border-color: rgba(110, 206, 209, 0.45);
}

.searchSection button {
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(110, 206, 209, 0.3);
  background: linear-gradient(135deg, var(--accentDeep), var(--accent));
  color: #0b0d10;
  font-weight: 800;
  cursor: pointer;
}

/* States */
.stateMessage {
  text-align: center;
  margin-bottom: 20px;
  color: var(--muted);
}
.hidden {
  display: none;
}
.resultHeading {
  text-align: center;
  margin-bottom: 20px;
}

/* Results */
.mealsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.meal {
  background: linear-gradient(
    180deg,
    rgba(21, 26, 32, 0.96),
    rgba(27, 34, 43, 0.94)
  );
  border-radius: var(--radiusLg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.meal img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.meal-info {
  padding: 14px;
}

.meal-title {
  margin: 0 0 6px;
  font-size: 1rem;
}

/* Details */
.mealDetails {
  margin-top: 28px;
  padding: 24px;
  background: linear-gradient(
    180deg,
    rgba(21, 26, 32, 0.96),
    rgba(27, 34, 43, 0.94)
  );
  border-radius: var(--radiusLg);
  border: 1px solid var(--border);
}

.linkBtn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 14px;
}
