/* ---------------------------------------------------------
   GLOBAL THEME
--------------------------------------------------------- */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --primary: #4caf50;
  --accent: #ff7f50;
  --muted: #6b7280;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  --text: #0f172a;
  --chip-bg: #ffedd5;
  --chip-color: #b45309;
  --blue: #2563eb;
  --orange: #f97316;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial;
  background: linear-gradient(180deg, #fffaf6, #f3f7ff);
  color: var(--text);
}

/* ---------------------------------------------------------
   HEADER
--------------------------------------------------------- */
.site-header {
  background: #ffffffcc;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #f97316, #ef4444);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.2);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-weight: 800;
  font-size: 17px;
}

.logo-sub {
  font-size: 12px;
  color: var(--muted);
}

.header-nav {
  display: flex;
  gap: 20px;
}

.header-nav a {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.header-nav a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   HERO CARD
--------------------------------------------------------- */
.hero-card {
  max-width: 1200px;
  margin: 30px auto;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 30px;
  align-items: center;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
}

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-bubbles span {
  padding: 8px 14px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.hero-bubbles span:hover {
  transform: scale(1.08);
  background: #bae6fd;
}

.hero-preview-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
}

.preview-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.preview-tags span {
  padding: 4px 8px;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.preview-foot {
  font-size: 12px;
  color: var(--muted);
}

/* ---------------------------------------------------------
   MAIN LAYOUT
--------------------------------------------------------- */
.main-container {
  max-width: 1200px;
  margin: 20px auto 80px;
  padding: 0 20px;
  display: grid;
  gap: 30px;
}

/* ---------------------------------------------------------
   INPUT CARDS
--------------------------------------------------------- */
.input-card {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.card-hint {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

/* Tag input box */
.tag-box {
  min-height: 48px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #fff;
  cursor: text;
}

.tag-box.empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
  font-size: 14px;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  background: var(--chip-bg);
  color: var(--chip-color);
  padding: 6px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.tag-chip button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--chip-color);
  font-weight: 800;
}

.tag-input {
  border: none;
  outline: none;
  min-width: 80px;
  flex: 1;
  font-size: 14px;
}

/* Popular tags */
.popular-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.popular-tags .tag {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform .15s, background .15s;
}

.popular-tags .tag:hover {
  background: #ffedd5;
  transform: scale(1.06);
}

/* Generate button */
.generate-btn {
  margin-top: 18px;
  padding: 14px 20px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(90deg, var(--accent), #ff6a33);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  box-shadow: 0 10px 30px rgba(255, 127, 80, 0.12);
}

/* ---------------------------------------------------------
   RESULTS CARD
--------------------------------------------------------- */
.results-card {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-title {
  font-size: 20px;
  font-weight: 800;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.recipe-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #eee;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
  transition: transform .15s;
}

.recipe-card:hover {
  transform: translateY(-4px);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.action-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
}

.btn-cook { background: #22c55e; }
.btn-nutrition { background: var(--blue); }
.btn-videos { background: var(--orange); }
.btn-order { background: #6b7280; }

.empty {
  padding: 28px;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  color: var(--muted);
}

/* ---------------------------------------------------------
   MODALS
--------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal .modal-content {
  background: #fff;
  width: 92%;
  max-width: 900px;
  border-radius: 12px;
  padding: 20px;
  max-height: 90vh;
  overflow: auto;
}

.close-btn {
  float: right;
  cursor: pointer;
  font-size: 22px;
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
}
/* --- GRID LAYOUT FOR RECIPE CARDS --- */
.recipe-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
  padding: 10px;
}

/* --- RECIPE CARD STYLING --- */
.recipe-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid #ececec;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* Title */
.recipe-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: #222;
  margin: 0;
}

/* Meta (style/origin) */
.recipe-card .meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 6px;
}

/* Description */
.recipe-card p {
  font-size: 15px;
  color: #444;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

/* Buttons container */
.recipe-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

/* Buttons */
.action-btn {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-cook {
  background: #16a34a;
  color: white;
}
.btn-cook:hover {
  background: #12863d;
}

.btn-nutrition {
  background: #2563eb;
  color: white;
}
.btn-nutrition:hover {
  background: #1e4fc7;
}

.btn-videos {
  background: #f97316;
  color: white;
}
.btn-videos:hover {
  background: #dd650f;
}

.btn-order {
  background: #6b7280;
  color: white;
}
.btn-order:hover {
  background: #565d67;
}

/* Empty state */
.results-empty {
  text-align: center;
  padding: 40px 20px;
  color: #777;
  font-size: 15px;
}

.results-empty .empty-sub {
  font-size: 13px;
  opacity: 0.8;
}
/* Light warm background similar to index page */
.recipes-body {
  background: linear-gradient(
      to bottom right,
      rgba(255, 247, 236, 0.9),
      rgba(255, 253, 248, 0.9)
    ),
    url('/static/images/hero-food.jpg'); /* same image as index */
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
}

/* Add a soft blur overlay to keep content readable */
.main-container {
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  padding: 30px;
  margin-top: 20px;
}

/* Make input and results panels float nicely */
.input-panel,
.results-panel {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  backdrop-filter: blur(4px);
}
/* MAIN SECTION BEAUTIFUL BACKGROUND */
.main-container {
  background: linear-gradient(
      135deg,
      rgba(255, 248, 240, 0.85),
      rgba(255, 253, 248, 0.85)
    ),
    url('/static/images/hero-food.jpg'); /* same warm image as index */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  backdrop-filter: blur(6px);
}

/* Make left and right panels float nicely on top */
.input-panel,
.results-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

/* Slight separation between panels */
.recipes-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
}
/* Soft kitchen-inspired background */
.recipes-body {
  background: linear-gradient(
      135deg,
      rgba(255, 245, 230, 0.92),
      rgba(255, 250, 240, 0.92)
    ),
    url('/static/images/kitchen-light-texture.jpg'); /* optional texture */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Soft frosted container */
.main-container {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* Floating glass cards */
.input-panel,
.results-panel {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  padding: 26px;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.nutrition-box {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  line-height: 1.6;
  font-size: 15px;
}
.nutrition-result {
  padding: 10px 0;
}

.nutrition-pre {
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  line-height: 1.5;
  font-size: 14px;
  color: #333;
  white-space: pre-wrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* IMPORTANT */
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  z-index: 10000; /* IMPORTANT */
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  font-size: 20px;
  z-index: 10001; /* IMPORTANT */
}

  .recipe-top-tags {
    margin: 4px 0 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .tag-chip {
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #374151;
    border: 1px solid #e5e7eb;
  }

/* GLOBAL HEADER — identical across all pages */
header{
  padding:22px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:fixed;
  width:100%;
  top:0;
  left:0;
  z-index:20;
  backdrop-filter:blur(12px);
  background:rgba(255,255,255,0.55);
  border-bottom:1px solid rgba(0,0,0,0.05);
  box-sizing:border-box;
}

.header-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo-mini{
  width:40px;
  height:40px;
  border-radius:12px;
  background:linear-gradient(135deg,#ff6b35,#ff9a57);
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:800;
  font-size:18px;
  text-decoration:none;
}

.brand-title{
  font-size:20px;
  font-weight:800;
}

.brand-sub{
  font-size:12px;
  color:#6b7280;
  margin-top:2px;
  line-height:1.2;
}

.header-nav{
  display:flex;
  gap:22px;
  white-space:nowrap;
}

.header-nav a{
  color:#0f172a;
  font-weight:700;
  text-decoration:none;
  font-size:15px;
  transition:opacity 0.2s ease;
}

.header-nav a:hover{
  opacity:0.6;
}

/* Push content down because header is fixed */
body {
  padding-top:120px;
}
