*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --border: #e5e5e5;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.status-banner {
  text-align: center;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .3s;
}
.status-banner.online { background: #16a34a; color: #fff; }
.status-banner.offline { background: #dc2626; color: #fff; }

header {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  padding: 48px 0 40px;
  text-align: center;
}
header h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em; }
header p { font-size: 1.1rem; opacity: .9; margin-top: 8px; }

.nav-btns { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: rgba(255,255,255,.2);
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.btn:hover { background: rgba(255,255,255,.35); }
.fav-btn { cursor: pointer; font-family: inherit; }
.fav-btn.saved { background: rgba(255,255,255,.35); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }

.recipe-img {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: -40px auto 0;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  background: var(--surface);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px auto;
  max-width: 480px;
}
.info-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.info-card .icon { font-size: 1.5rem; }
.info-card .label { font-size: .75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.info-card .value { font-size: 1rem; font-weight: 700; }

section { margin: 36px 0; }
section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  scroll-margin-top: 24px;
  border-bottom: 2px solid var(--accent-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ingredients-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ingredients-list li {
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .95rem;
}
.ingredients-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.steps-list { list-style: none; counter-reset: step; }
.steps-list li {
  counter-increment: step;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  position: relative;
  font-size: .95rem;
}
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox-wrap input { display: none; }
.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .15s;
  font-size: .75rem;
  flex-shrink: 0;
}
.checkbox-wrap input:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.checkbox-wrap input:checked + .checkmark::after { content: "✓"; }
.checkbox-wrap input:checked ~ span { text-decoration: line-through; color: var(--text-light); }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 20px 0 0;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .4s ease;
  width: 0%;
}

.top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: opacity .3s, transform .3s;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  z-index: 100;
}
.top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.top-btn:hover { background: #b85e00; transform: translateY(-2px); }
.top-btn.visible:hover { transform: translateY(-2px); }

footer {
  text-align: center;
  padding: 32px 0;
  color: var(--text-light);
  font-size: .85rem;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

@media (max-width: 600px) {
  header h1 { font-size: 1.8rem; }
  .info-grid { grid-template-columns: 1fr; max-width: 260px; }
  .ingredients-list { grid-template-columns: 1fr; }
  .recipe-img { margin-top: -30px; }
}
