
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --border: #e8e4de;
  --text: #1a1a1a;
  --muted: #6b6560;
  --accent: #c8622a;
  --accent-light: #fdf0e8;
  --radius: 12px;
  --shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  min-height: 100vh;
}

/* ── HEADER ── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 100;
}
.site-header a { text-decoration: none; }
.site-logo { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.site-logo span { color: var(--text); font-weight: 400; font-size: .9rem; margin-left:.5rem; }

.search-wrap {
  flex: 1; max-width: 480px;
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 999px; padding: .4rem 1rem;
  transition: border-color .2s;
}
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap input {
  border: none; background: transparent; width: 100%;
  font-size: .95rem; color: var(--text); outline: none;
}
.search-wrap svg { color: var(--muted); flex-shrink: 0; }

/* ── MAIN ── */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* ── CATEGORY NAV ── */
.cat-nav {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem;
}
.cat-btn {
  padding: .35rem .9rem; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted);
  font-size: .85rem; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.cat-btn:hover, .cat-btn.active {
  border-color: var(--accent); background: var(--accent-light);
  color: var(--accent);
}

/* ── RECIPE GRID ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.recipe-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: .5rem;
}
.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1), 0 12px 32px rgba(0,0,0,.08);
}
.recipe-card .card-title {
  font-size: 1rem; font-weight: 600; line-height: 1.3;
}
.recipe-card .card-desc {
  font-size: .85rem; color: var(--muted); line-height: 1.4;
  flex: 1;
}
.recipe-card .card-tags {
  display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem;
}
.tag {
  font-size: .75rem; padding: .15rem .55rem; border-radius: 999px;
  background: var(--accent-light); color: var(--accent);
}
.no-results {
  grid-column: 1/-1; text-align: center;
  color: var(--muted); padding: 3rem 0; font-size: 1.1rem;
}

/* ── CAT SECTION ── */
.cat-section { margin-bottom: 3rem; }
.cat-section h2 {
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent-light);
  display: flex; align-items: center; gap: .5rem;
}

/* ── RECIPE PAGE ── */
.recipe-page { max-width: 760px; margin: 0 auto; padding: 2rem; }
.back-link {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--muted); text-decoration: none; font-size: .9rem;
  margin-bottom: 1.5rem; transition: color .15s;
}
.back-link:hover { color: var(--accent); }
.recipe-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.recipe-content h2 {
  font-size: 1.2rem; font-weight: 700;
  margin: 2rem 0 .75rem; color: var(--accent);
  border-bottom: 1px solid var(--border); padding-bottom: .4rem;
}
.recipe-content h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.recipe-content p { margin-bottom: .9rem; }
.recipe-content ul, .recipe-content ol {
  margin: .5rem 0 1rem 1.5rem;
}
.recipe-content li { margin-bottom: .3rem; }
.recipe-content strong { font-weight: 600; }
.recipe-content em { font-style: italic; color: var(--muted); }
.recipe-content hr {
  border: none; border-top: 1px solid var(--border); margin: 2rem 0;
}
.recipe-content a { color: var(--accent); }
.recipe-content table {
  width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem;
}
.recipe-content th, .recipe-content td {
  border: 1px solid var(--border); padding: .5rem .75rem; text-align: left;
}
.recipe-content th { background: var(--bg); font-weight: 600; }
.recipe-content blockquote {
  border-left: 3px solid var(--accent); padding-left: 1rem;
  color: var(--muted); margin: 1rem 0;
}

/* ── LOGIN ── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: var(--bg);
}
.login-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.5rem;
  box-shadow: var(--shadow); max-width: 380px; width: 90%;
  text-align: center;
}
.login-box .icon { font-size: 3rem; margin-bottom: 1rem; }
.login-box h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .4rem; }
.login-box p { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.login-box input {
  width: 100%; padding: .75rem 1rem; border-radius: 8px;
  border: 1.5px solid var(--border); font-size: 1rem;
  margin-bottom: 1rem; outline: none; font-family: inherit;
  transition: border-color .2s;
}
.login-box input:focus { border-color: var(--accent); }
.login-box button {
  width: 100%; padding: .75rem; background: var(--accent);
  color: #fff; border: none; border-radius: 8px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: opacity .15s;
}
.login-box button:hover { opacity: .88; }
.login-box .error {
  color: #c0392b; font-size: .85rem; margin-top: .5rem; display: none;
}

/* ── FOOTER ── */
footer {
  text-align: center; padding: 2rem; color: var(--muted);
  font-size: .85rem; border-top: 1px solid var(--border);
  margin-top: 2rem;
}


/* ── TIME FILTER ── */
.time-filter {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem;
}
.time-btn {
  padding: .3rem .8rem; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted);
  font-size: .82rem; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.time-btn:hover, .time-btn.active {
  border-color: #2a7ab8; background: #eaf3fb; color: #2a7ab8;
}
.time-tag { background: #eaf3fb !important; color: #2a7ab8 !important; }
.recipe-card[data-mins].hidden-time { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .site-header { padding: 1rem; }
  .container { padding: 1rem; }
  .recipe-page { padding: 1rem; }
  .recipe-content h1 { font-size: 1.5rem; }
}
