:root {
  --bg: #fff7ed;
  --card: #ffffff;
  --text: #221713;
  --muted: #7c6258;
  --accent: #f97316;
  --accent-dark: #c2410c;
  --line: #fed7aa;
  --soft: #ffedd5;
  --shadow: 0 20px 50px rgba(154, 52, 18, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.20), transparent 28rem),
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.12), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 5vw;
  background: rgba(255, 247, 237, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(254, 215, 170, 0.8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
  font-size: 1.25rem;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.5rem;
}

nav {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-weight: 650;
}

nav a {
  text-decoration: none;
}

main {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.hero {
  padding: 5rem 0 2rem;
}

.eyebrow {
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-subtitle {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.7;
}

.filters-card,
.detail-card,
.source-card,
.recipe-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.filters-card {
  padding: 1rem;
  margin-bottom: 2.5rem;
}

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(130px, 1fr)) auto;
  gap: 0.75rem;
}

input,
select,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font: inherit;
  background: white;
  color: var(--text);
}

button,
.primary-btn {
  background: var(--accent);
  color: white;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

button:hover,
.primary-btn:hover {
  background: var(--accent-dark);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 2rem 0 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 2rem;
}

.section-header p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding-bottom: 5rem;
}

.recipe-card {
  overflow: hidden;
}

.tiktok-preview {
  padding: 1rem 1rem 0;
}

.phone-frame {
  height: 220px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(124, 45, 18, 0.88)),
    #111827;
  position: relative;
  display: grid;
  place-items: center;
  color: white;
  overflow: hidden;
}

.phone-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  background: rgba(249, 115, 22, 0.45);
  filter: blur(36px);
  border-radius: 999px;
}

.play {
  z-index: 1;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.5rem;
}

.phone-frame span {
  position: absolute;
  bottom: 1rem;
  font-weight: 800;
  opacity: 0.8;
}

.recipe-card-body {
  padding: 1.15rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.badges span {
  background: var(--soft);
  color: var(--accent-dark);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.badges .quality {
  background: #dcfce7;
  color: #166534;
}

.recipe-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.preview {
  margin: 0.85rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-height: 4.8rem;
  overflow: hidden;
}

.meta,
.confidence,
.detail-meta {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.primary-btn,
.secondary-btn {
  display: inline-block;
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  font-weight: 850;
  text-decoration: none;
}

.secondary-btn {
  background: var(--soft);
  color: var(--accent-dark);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  padding: 3rem 0 5rem;
}

.detail-card,
.source-card {
  padding: 1.4rem;
}

.detail-card h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.back-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 850;
}

.recipe-text-content {
  white-space: pre-wrap;
  background: #fff7ed;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  line-height: 1.65;
  color: var(--text);
}

.ingredients,
.steps,
.missing {
  line-height: 1.8;
}

.full {
  width: 100%;
  margin-top: 1rem;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  background: white;
  border-radius: 28px;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

@media (max-width: 980px) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .recipe-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .filters,
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    gap: 0.8rem;
    flex-direction: column;
  }
}
