/* ============================
   RESEPIN — Global Styles
   Zero Food Waste Recipe App
   ============================ */

/* ---- CSS Variables / Design System ---- */
:root {
  color-scheme: light;
  --primary: #B65C3A;
  --primary-light: #D38159;
  --primary-dark: #8E452F;
  --secondary: #788466;
  --accent: #D3A64F;
  --bg: #FAF7F0;
  --bg-card: #FFFEFA;
  --bg-surface: #F1EADF;
  --bg-glass: rgba(75,61,43,0.045);
  --border: rgba(75,61,43,0.13);
  --border-hover: rgba(182,92,58,0.38);
  --text-primary: #342F29;
  --text-secondary: #6F685F;
  --text-muted: #91877C;
  --navbar-bg: rgba(250,247,240,0.94);
  --hero-art-bg: linear-gradient(135deg,#6f3e2e 0%,#594539 55%,#3d5144 100%);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-glow: 0 0 34px rgba(182,92,58,0.11);
  --shadow-card: 0 5px 24px rgba(63,49,35,0.09);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --transition-bounce: 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --primary: #D1815D;
  --primary-light: #E5A07B;
  --primary-dark: #AC5B3B;
  --secondary: #A0AD87;
  --accent: #D6B16B;
  --bg: #20231E;
  --bg-card: #292C25;
  --bg-surface: #32352D;
  --bg-glass: rgba(255,255,255,0.045);
  --border: rgba(245,237,219,0.11);
  --border-hover: rgba(209,129,93,0.42);
  --text-primary: #F3EEE4;
  --text-secondary: #C0B9AC;
  --text-muted: #948D81;
  --navbar-bg: rgba(32,35,30,0.95);
  --hero-art-bg: linear-gradient(135deg,#40291f 0%,#302923 55%,#263329 100%);
  --shadow-glow: 0 0 34px rgba(209,129,93,0.15);
  --shadow-card: 0 5px 24px rgba(0,0,0,0.27);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(182,92,58,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- Typography ---- */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; }
p { line-height: 1.7; color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- Section ---- */
.section { padding: 80px 0; }

/* ---- Gradient Text ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================
   NAVBAR
   ============================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled {
  background: var(--navbar-bg);
  box-shadow: 0 4px 30px rgba(63,49,35,0.12);
}
.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-primary);
}
.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-icon svg { width: 100%; height: 100%; }
.nav-logo span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-glass); }
.nav-link.active { color: var(--primary); background: rgba(182,92,58,0.1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-scan-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
}
.btn-scan-nav:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(182,92,58,0.4); }
.btn-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-avatar:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font: 600 0.78rem var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--border-hover); }
.btn-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.btn-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================
   PAGES
   ============================ */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ============================
   HOME — HERO
   ============================ */
.hero {
  min-height: 0;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 112px 24px 72px;
}
.hero-bg-glow {
  position: absolute;
  top: -200px; left: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(182,92,58,0.12) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.18;
}
.hero-bg-glow::after {
  content: '';
  position: absolute;
  bottom: -300px; right: -300px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(120,132,102,0.08) 0%, transparent 70%);
}
@keyframes pulseGlow {
  0%,100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  display: none;
}
.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(120,132,102,0.1);
  border: 1px solid rgba(120,132,102,0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 24px;
}
.badge-dot {
  width: 8px; height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}
.title-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title-accent {
  color: var(--secondary);
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 480px;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: var(--transition-bounce);
  box-shadow: 0 4px 20px rgba(182,92,58,0.3);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(182,92,58,0.5);
}
.btn-primary.full-width { width: 100%; justify-content: center; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: rgba(182,92,58,0.05); }
.btn-secondary.full-width { width: 100%; justify-content: center; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  width: fit-content;
}
.stat-item { text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Simple food feature in the home hero */
.hero-note { color: var(--text-muted); font-size: .92rem; margin-top: -24px; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-food-card {
  width: min(100%, 390px);
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.hero-food-kicker { color: var(--primary); font-size: .82rem; font-weight: 700; margin: 0 0 16px; }
.hero-food-bowl { display: grid; place-items: center; min-height: 210px; background: #efe2cf; border-radius: 14px; font-size: 6rem; }
body[data-theme="dark"] .hero-food-bowl { background: #3a332b; }
.hero-food-card h2 { margin: 18px 0 4px; font: 700 1.35rem var(--font-display); }
.hero-food-card > p:last-of-type { color: var(--text-secondary); margin: 0; }
.hero-food-ingredients { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hero-food-ingredients span { padding: 6px 10px; background: var(--bg-secondary); border-radius: 999px; color: var(--text-secondary); font-size: .8rem; }
/* Legacy scan illustration styles, retained for the scan page. */
.phone-mockup {
  width: 280px;
  height: 500px;
  background: var(--bg-card);
  border: 1px solid rgba(182,92,58,0.3);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 60px rgba(182,92,58,0.15), var(--shadow-card);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.phone-screen { width: 100%; height: 100%; position: relative; overflow: hidden; }
.scan-demo {
  width: 100%; height: 100%;
  background: var(--hero-art-bg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.veggie-bg {
  font-size: 3rem;
  opacity: 0.15;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 10px;
  filter: blur(1px);
}
.scan-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: scanDown 2.5s ease-in-out infinite;
  z-index: 5;
  box-shadow: 0 0 10px var(--primary);
}
@keyframes scanDown {
  0% { top: 0; }
  100% { top: 100%; }
}
.scan-corner { position: absolute; width: 20px; height: 20px; z-index: 6; }
.scan-corner.tl { top: 10px; left: 10px; border-top: 2px solid var(--primary); border-left: 2px solid var(--primary); }
.scan-corner.tr { top: 10px; right: 10px; border-top: 2px solid var(--primary); border-right: 2px solid var(--primary); }
.scan-corner.bl { bottom: 10px; left: 10px; border-bottom: 2px solid var(--primary); border-left: 2px solid var(--primary); }
.scan-corner.br { bottom: 10px; right: 10px; border-bottom: 2px solid var(--primary); border-right: 2px solid var(--primary); }
.detected-box {
  position: absolute;
  border: 1.5px solid var(--primary);
  border-radius: 4px;
  z-index: 4;
  background: rgba(182,92,58,0.05);
  animation: detectedPulse 2s ease-in-out infinite;
}
.detected-box::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  background: var(--primary);
  color: white;
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
}
@keyframes detectedPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(182,92,58,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(182,92,58,0); }
}
.phone-chip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
.chip-dot {
  width: 8px; height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

/* Floating Cards */
.floating-card {
  position: absolute;
  background: rgba(20,20,20,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(182,92,58,0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
  animation: floatCard 3s ease-in-out infinite;
}
.card-1 { top: 60px; left: -60px; animation-delay: 0.5s; }
.card-2 { bottom: 140px; left: -70px; animation-delay: 1s; }
.card-3 { top: 140px; right: -50px; flex-direction: column; align-items: flex-start; gap: 4px; animation-delay: 1.5s; }
@keyframes floatCard {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}
.fc-icon { font-size: 1.4rem; }
.fc-info { flex: 1; min-width: 80px; }
.fc-name { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; }
.fc-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.fc-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; }
.fc-pct { font-size: 0.85rem; font-weight: 700; color: var(--primary); }
.fc-recipe-label { font-size: 0.85rem; font-weight: 600; }
.fc-recipe-time { font-size: 0.75rem; color: var(--text-muted); }

.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.scroll-dot {
  width: 6px; height: 20px;
  border: 1.5px solid var(--text-muted);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.scroll-dot::after {
  content: '';
  position: absolute;
  top: 2px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 4px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scrollBounce 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0% { top: 2px; opacity: 1; }
  100% { top: 12px; opacity: 0; }
}

/* ============================
   HOW IT WORKS
   ============================ */
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(182,92,58,0.1);
  border: 1px solid rgba(182,92,58,0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 8px; }
.see-all {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}
.see-all:hover { text-decoration: underline; }

.steps-grid {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
}
.step-card {
  flex: 1;
  max-width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: var(--transition);
  cursor: default;
}
.step-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-8px);
}
.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(182,92,58,0.1);
  position: absolute;
  top: 16px; right: 20px;
  line-height: 1;
}
.step-icon-wrap {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-icon { font-size: 2.5rem; position: relative; z-index: 1; }
.step-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(182,92,58,0.2);
  animation: stepRing 2s ease-in-out infinite;
}
.step-card:hover .step-ring { border-color: rgba(182,92,58,0.5); }
@keyframes stepRing {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.5; }
}
.step-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.step-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.step-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(120,132,102,0.1);
  border: 1px solid rgba(120,132,102,0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
}
.step-connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(182,92,58,0.3), rgba(182,92,58,0.6), rgba(182,92,58,0.3));
  flex-shrink: 0;
  position: relative;
}
.step-connector::after {
  content: '▶️';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--primary);
}

/* ============================
   RECIPE CARDS
   ============================ */
.recipes-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 24px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(182,92,58,0.3) transparent;
  margin: 0 -24px;
}
.recipe-card {
  flex-shrink: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.recipe-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}
.recipe-img {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.recipe-img-emoji { font-size: 3.5rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
.recipe-img-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
span.recipe-img-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.recipe-badge-diff {
  position: absolute;
  top: 12px; left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.recipe-badge-diff.easy { background: rgba(120,132,102,0.2); color: var(--secondary); border: 1px solid rgba(120,132,102,0.3); }
.recipe-badge-diff.medium { background: rgba(211,166,79,0.2); color: var(--accent); border: 1px solid rgba(211,166,79,0.3); }
.recipe-info { padding: 16px; }
.recipe-info h3 { font-size: 1rem; margin-bottom: 8px; }
.recipe-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.recipe-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.recipe-tags span {
  padding: 2px 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.recipe-ingredients-preview { display: flex; gap: 4px; align-items: center; font-size: 1.2rem; }
.recipe-ingredients-preview .more {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 999px;
}

/* Recipes Grid (full page) */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}
.recipes-grid .recipe-card {
  width: 100%;
  flex-shrink: unset;
}
.recipes-grid.mini {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ============================
   ZERO WASTE STATS SECTION
   ============================ */
.waste-stats { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.stats-content h2 { margin-bottom: 8px; }
.stats-numbers { display: flex; gap: 48px; }
.waste-stat { text-align: center; }
.ws-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ws-label { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 4px; }

/* ============================
   AI CTA SECTION
   ============================ */
.ai-cta-card {
  background: var(--bg-card);
  border: 1px solid rgba(182,92,58,0.2);
  border-radius: var(--radius-xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.ai-cta-glow {
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(182,92,58,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.ai-cta-content { display: flex; gap: 24px; align-items: flex-start; }
.ai-avatar-big { font-size: 3rem; flex-shrink: 0; }
.ai-cta-content h2 { margin-bottom: 12px; }
.ai-cta-content p { margin-bottom: 24px; }

/* Chat Preview */
.ai-chat-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.acp-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.acp-bubble.bot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  color: var(--text-primary);
  align-self: flex-start;
}
.acp-bubble.user {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 16px 16px 4px 16px;
  align-self: flex-end;
}
.acp-bubble.typing {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 14px 18px;
}
.typing-dots { display: flex; gap: 4px; align-items: center; }
.typing-dots span {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ============================
   FOOTER
   ============================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.social-link {
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.social-link:hover { border-color: var(--primary); color: var(--primary); }
.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  padding: 5px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ============================
   SCAN PAGE
   ============================ */
.scan-page { padding-top: 90px; min-height: 100vh; }
.scan-header { text-align: center; padding: 40px 24px 20px; }
.scan-header h1 { margin-bottom: 8px; }
.scan-header p { color: var(--text-secondary); }
.scan-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  align-items: start;
}
.camera-section { display: flex; flex-direction: column; gap: 16px; }
.camera-viewport {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
#cameraFeed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
#cameraCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
}
.scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}
.scan-corner-tl, .scan-corner-tr, .scan-corner-bl, .scan-corner-br {
  position: absolute;
  width: 30px; height: 30px;
}
.scan-corner-tl { top: 20px; left: 20px; border-top: 3px solid var(--primary); border-left: 3px solid var(--primary); border-radius: 4px 0 0 0; }
.scan-corner-tr { top: 20px; right: 20px; border-top: 3px solid var(--primary); border-right: 3px solid var(--primary); border-radius: 0 4px 0 0; }
.scan-corner-bl { bottom: 20px; left: 20px; border-bottom: 3px solid var(--primary); border-left: 3px solid var(--primary); border-radius: 0 0 0 4px; }
.scan-corner-br { bottom: 20px; right: 20px; border-bottom: 3px solid var(--primary); border-right: 3px solid var(--primary); border-radius: 0 0 4px 0; }
.scan-laser {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 30%, var(--accent) 70%, transparent 100%);
  box-shadow: 0 0 12px var(--primary), 0 0 24px rgba(182,92,58,0.4);
  animation: laserScan 2s ease-in-out infinite;
}
@keyframes laserScan {
  0% { top: 5%; }
  50% { top: 90%; }
  100% { top: 5%; }
}
.detection-boxes { position: absolute; inset: 0; pointer-events: none; }
.det-box {
  position: absolute;
  border: 2px solid var(--primary);
  border-radius: 6px;
  background: rgba(182,92,58,0.05);
  transition: all 0.3s ease;
}
.det-box-label {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.camera-placeholder {
  text-align: center;
  padding: 40px;
}
.cp-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.3; }
.camera-placeholder p { color: var(--text-muted); }
.cp-sub { font-size: 0.85rem; margin-top: 8px; }
.camera-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.cam-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-bounce);
  font-family: var(--font-body);
}
.cam-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  flex: 1;
}
.cam-btn.primary:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(182,92,58,0.4); }
.cam-btn.demo {
  background: rgba(120,132,102,0.1);
  border: 1px solid rgba(120,132,102,0.3);
  color: var(--secondary);
}
.cam-btn.demo:hover { background: rgba(120,132,102,0.2); }
.cam-btn.capture {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.cam-btn.capture:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.cam-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.detection-status {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.status-idle { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.idle { background: var(--text-muted); }
.status-dot.active { background: var(--secondary); animation: blink 1s ease-in-out infinite; }
.status-dot.detected { background: var(--primary); animation: blink 0.5s ease-in-out infinite; }

/* Ingredients Panel */
.ingredients-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 130px);
  position: sticky;
  top: 88px;
}
.ip-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
}
.ip-header h3 { font-size: 1rem; }
.ip-count {
  padding: 3px 10px;
  background: rgba(182,92,58,0.1);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.ip-list { padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ip-empty { text-align: center; padding: 30px 20px; color: var(--text-muted); }
.ip-empty-icon { font-size: 2rem; margin-bottom: 12px; opacity: 0.5; }
.ip-empty p { font-size: 0.875rem; line-height: 1.6; }
.ingredient-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: slideIn 0.3s var(--transition-bounce);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.ing-icon { font-size: 1.4rem; }
.ing-info { flex: 1; }
.ing-name { display: block; font-size: 0.9rem; font-weight: 600; }
.ing-conf { display: block; font-size: 0.75rem; color: var(--text-muted); }
.ing-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.ing-remove:hover { color: #E74C3C; background: rgba(231,76,60,0.1); }
.ip-manual { padding: 16px; border-top: 1px solid var(--border); }
.ip-manual h4 { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
.ip-manual-input { display: flex; gap: 8px; margin-bottom: 12px; }
.ip-manual-input input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}
.ip-manual-input input:focus { border-color: var(--primary); }
.ip-manual-input button {
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}
.ip-manual-input button:hover { background: var(--primary-dark); }
.quick-add-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(182,92,58,0.05); }
.ip-actions { padding: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.ip-confidence {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.conf-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
}
.conf-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ============================
   RESEP PAGE
   ============================ */
.resep-page { padding-top: 90px; min-height: 100vh; padding-bottom: 60px; }
.resep-header { text-align: center; padding: 40px 24px 20px; }
.resep-header h1 { margin-bottom: 8px; }
.resep-filters {
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.search-box:focus-within { border-color: var(--primary); }
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
}
.search-box input::placeholder { color: var(--text-muted); }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}
.filter-chip:hover, .filter-chip.active {
  background: rgba(182,92,58,0.1);
  border-color: rgba(182,92,58,0.4);
  color: var(--primary);
}

/* ============================
   CHEF AI PAGE
   ============================ */
.chef-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-top: 68px;
}
.chef-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.chef-title-area { display: flex; align-items: center; gap: 14px; }
.chef-avatar {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, rgba(182,92,58,0.2), rgba(120,132,102,0.2));
  border: 1px solid rgba(182,92,58,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.chef-title-area h1 { font-size: 1.2rem; margin-bottom: 4px; }
.chef-status { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-muted); }
.status-online {
  width: 8px; height: 8px;
  background: #2ECC71;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}
.chef-bahan-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(120,132,102,0.1);
  border: 1px solid rgba(120,132,102,0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--secondary);
}
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-bubble {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  max-width: 80%;
}
.bot-bubble { align-self: flex-start; }
.user-bubble { align-self: flex-end; flex-direction: row-reverse; }
.bubble-avatar {
  width: 36px; height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.bubble-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px 20px 20px 4px;
  padding: 14px 18px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}
.user-bubble .bubble-content {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  border-radius: 20px 20px 4px 20px;
  color: white;
}
.user-bubble .bubble-content p { color: rgba(255,255,255,0.9); }
.bubble-content p { color: inherit; margin-bottom: 4px; }
.bubble-content p:last-child { margin-bottom: 0; }
.bubble-content em { color: var(--secondary); font-style: normal; }
.bubble-time { font-size: 0.7rem; color: var(--text-muted); align-self: flex-end; }

/* Recipe card in chat */
.chat-recipe-card {
  margin-top: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: var(--transition);
}
.chat-recipe-card:hover { border-color: var(--primary); }
.crc-title { font-weight: 700; margin-bottom: 6px; }
.crc-meta { font-size: 0.8rem; color: var(--text-muted); }
.chat-recipe-card h4 { margin: 16px 0 6px; font-size: 0.88rem; color: var(--text-primary); }
.chat-recipe-ingredients, .chat-recipe-steps { margin: 0; padding-left: 22px; color: var(--text-secondary); font-size: 0.84rem; }
.chat-recipe-ingredients li, .chat-recipe-steps li { padding: 3px 0; }
.crc-link { color: var(--primary); font-size: 0.85rem; font-weight: 600; display: inline-flex; margin-top: 12px; padding: 8px 0; background: transparent; border: 0; cursor: pointer; }
.chat-recipe-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.chat-recipe-actions button { border: 1px solid var(--border); border-radius: 999px; padding: 7px 10px; background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: 0.76rem; cursor: pointer; transition: var(--transition); }
.chat-recipe-actions button:hover { border-color: var(--primary); color: var(--primary); }

.quick-prompts {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.qp-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  cursor: grab;
  user-select: none;
  touch-action: pan-x;
}
.qp-scroll.dragging { cursor: grabbing; scroll-behavior: auto; }
.qp-scroll::-webkit-scrollbar { height: 5px; }
.qp-scroll::-webkit-scrollbar-track { background: transparent; }
.qp-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.qp-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.825rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font-body);
}
.qp-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(182,92,58,0.05); }

.chat-input-area {
  padding: 16px 0 20px;
  border-top: 1px solid var(--border);
}
.chat-input-box {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: var(--transition);
}
.chat-input-box:focus-within { border-color: var(--primary); }
.chat-input-box textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  resize: none;
  max-height: 120px;
  line-height: 1.5;
}
.chat-input-box textarea::placeholder { color: var(--text-muted); }
.chat-send-btn {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-bounce);
}
.chat-send-btn:hover { transform: scale(1.1); box-shadow: 0 4px 16px rgba(182,92,58,0.4); }

/* ============================
   JELAJAHI PAGE
   ============================ */
.jelajahi-page { padding-top: 90px; min-height: 100vh; padding-bottom: 60px; }
.jelajahi-header { text-align: center; padding: 40px 24px 20px; }
.jelajahi-header h1 { margin-bottom: 8px; }
.jelajahi-section { margin-bottom: 48px; }
.jelajahi-section h2 { font-size: 1.4rem; margin-bottom: 20px; }
.explore-results { scroll-margin-top: 96px; }
.explore-results-count { margin: -12px 0 18px; font-size: 0.88rem; }
.explore-empty { grid-column: 1 / -1; padding: 24px 0; color: var(--text-muted); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.cat-card {
  display: grid;
  grid-template-columns: 5px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 12px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.cat-card:hover, .cat-card.active { border-color: var(--cat-color, var(--primary)); background: var(--bg-surface); }
.cat-card:focus-visible, .qr-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cat-swatch { grid-row: 1 / 3; width: 4px; height: 30px; border-radius: 4px; background: var(--cat-color, var(--primary)); }
.cat-name { font-weight: 600; font-size: 0.9rem; }
.cat-count { color: var(--text-muted); font-size: 0.76rem; }

/* Quick Recipes List */
.quick-recipes-list { display: flex; flex-direction: column; gap: 10px; }
.qr-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text-primary);
}
.qr-item:hover { border-color: var(--primary); background: var(--bg-surface); }
.qr-emoji { font-size: 2rem; }
.qr-photo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
span.qr-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.qr-info { flex: 1; }
.qr-name { display: block; font-weight: 600; margin-bottom: 4px; }
.qr-meta { font-size: 0.8rem; color: var(--text-muted); }
.qr-time {
  padding: 4px 10px;
  background: rgba(120,132,102,0.1);
  border: 1px solid rgba(120,132,102,0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
}

/* Back btn */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: var(--transition);
  margin-bottom: 16px;
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ============================
   MODAL
   ============================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.3s var(--transition-bounce);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--text-primary);
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(231,76,60,0.2); color: #E74C3C; }
.modal-hero {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(182,92,58,0.15), rgba(120,132,102,0.1));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-hero-emoji { font-size: 5rem; }
.modal-hero-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-body { padding: 24px; }
.modal-header-info { margin-bottom: 24px; }
.modal-header-info h2 { font-size: 1.5rem; margin-bottom: 10px; }
.modal-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.modal-meta span { font-size: 0.9rem; color: var(--text-secondary); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.modal-ingredients h3, .modal-steps h3 { font-size: 1rem; margin-bottom: 16px; color: var(--text-primary); }
.modal-ingredients ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.modal-ingredients li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.modal-steps ol { list-style: none; counter-reset: steps; display: flex; flex-direction: column; gap: 12px; }
.modal-steps li {
  counter-increment: steps;
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.modal-steps li::before {
  content: counter(steps);
  width: 24px; height: 24px;
  background: rgba(182,92,58,0.15);
  border: 1px solid rgba(182,92,58,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.modal-ai-tip {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: rgba(120,132,102,0.05);
  border: 1px solid rgba(120,132,102,0.2);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.tip-icon { font-size: 1.5rem; flex-shrink: 0; }
.modal-ai-tip strong { display: block; margin-bottom: 4px; }
.modal-ai-tip p { font-size: 0.875rem; color: var(--text-secondary); }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================
   TOAST
   ============================ */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.3s var(--transition-bounce);
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(120,132,102,0.4); color: var(--secondary); }
.toast.error { border-color: rgba(231,76,60,0.4); color: #E74C3C; }

/* ============================
   RESPONSIVE
   ============================ */



/* ============================
   SIMPLE HOME COOKING THEME
   Consistent, calm surfaces across every page
   ============================ */
:root {
  --bg: #F7F4EC;
  --bg-card: #FFFDF8;
  --bg-surface: #EEE9DE;
  --bg-glass: #F1EDE4;
  --border: #E3DDD1;
  --border-hover: #C68A70;
  --text-primary: #342F29;
  --text-secondary: #70685E;
  --text-muted: #8D857A;
  --navbar-bg: #F7F4EC;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-glow: none;
  --shadow-card: 0 2px 8px rgba(63,49,35,.05);
  --transition: 0.16s ease;
  --transition-bounce: 0.16s ease;
}
[data-theme="dark"] {
  --bg: #24251F;
  --bg-card: #2D2E27;
  --bg-surface: #37382F;
  --bg-glass: #32332C;
  --border: #45463C;
  --border-hover: #B97658;
  --text-primary: #F2EEE5;
  --text-secondary: #C5BFB2;
  --text-muted: #A29A8D;
  --navbar-bg: #24251F;
  --shadow-card: 0 2px 8px rgba(0,0,0,.12);
}
html { scroll-behavior: auto; }
.navbar, .navbar.scrolled { backdrop-filter: none; box-shadow: none; border-bottom: 1px solid var(--border); }
.nav-links.open { backdrop-filter: none; }
.btn-scan-nav span { display: inline !important; }
.btn-scan-nav { padding: 10px 14px; font-weight: 600; }
.nav-link, .nav-link.active { background: transparent; border-radius: 6px; }
.nav-link.active { color: var(--primary); font-weight: 700; }
.logo-icon { background: var(--bg-surface); border-radius: 50%; }
.btn-scan-nav, .btn-primary, .cam-btn.primary, .chat-send-btn {
  background: var(--primary); box-shadow: none; border-radius: 8px; transition: background-color .16s ease;
}
.btn-primary:hover, .btn-scan-nav:hover, .cam-btn.primary:hover, .chat-send-btn:hover {
  background: var(--primary-dark); box-shadow: none; transform: none;
}
.btn-secondary, .cam-btn, .theme-toggle, .btn-avatar { border-radius: 8px; }
.btn-secondary:hover, .btn-avatar:hover { transform: none; box-shadow: none; }
.hero-bg-glow, .hero-particles, .hero-scroll-hint { display: none; }
.waste-stats, .ai-chat-preview, .ai-cta-glow, .ip-confidence { display: none !important; }
.ai-cta-card { background: var(--bg-surface); box-shadow: none; grid-template-columns: 1fr; }
.ai-cta-content { padding: 24px; }
.ai-avatar-big { background: transparent; box-shadow: none; }
.title-gradient, .gradient-text { background: none; -webkit-text-fill-color: currentColor; color: var(--primary); }
.hero-title { font-weight: 700; }
.hero-food-card, .step-card, .recipe-card, .camera-viewport, .ingredients-panel,
.detection-status, .chat-recipe-card, .modal-content, .cat-card, .qr-item,
.ai-cta-card, .stat-card, .profile-card {
  border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.step-card:hover, .recipe-card:hover, .qr-item:hover { transform: none; box-shadow: var(--shadow-card); }
.step-ring, .scan-line, .scan-laser, .chip-dot, .status-dot.active, .status-dot.detected { display: none; animation: none; }
.chef-avatar { background: var(--bg-surface); border-color: var(--border); }
.status-online, .badge-dot { animation: none; }
.modal-hero { background: var(--bg-surface); }
.modal-steps li::before { background: var(--bg-surface); border: 0; }
.modal-ai-tip { background: var(--bg-surface); border-color: var(--border); }
.modal-content { animation: none; }
.typing-dots span { animation: none; }
.scan-corner-tl, .scan-corner-tr, .scan-corner-bl, .scan-corner-br { display: none; }
.det-box { border-width: 1px; border-radius: 3px; box-shadow: none; }
.camera-viewport { background: var(--bg-surface); }
.recipe-img { background: var(--bg-surface) !important; }
.recipe-img-emoji { filter: none; }
.recipe-img-photo { filter: none; }
.recipe-badge-diff { text-transform: none; letter-spacing: 0; border: 0 !important; }
.recipe-tags span, .step-tag, .qr-time, .qp-btn, .chat-recipe-actions button { border-radius: 6px; }
.user-bubble .bubble-content { background: var(--primary); border-color: var(--primary); }
.chat-bubble .bubble-content, .chat-recipe-card { box-shadow: none; }
.chat-recipe-card:hover { border-color: var(--border); }
.modal-overlay { backdrop-filter: none; }
.modal-content { box-shadow: 0 8px 32px rgba(0,0,0,.16); }
.section { padding-top: 64px; padding-bottom: 64px; }
.section-header { margin-bottom: 36px; }
.section-tag { border-radius: 6px; letter-spacing: .04em; }
.step-connector { background: var(--border); }
.step-connector::after { content: ''; width: 7px; height: 7px; border: solid var(--primary); border-width: 1px 1px 0 0; transform: rotate(45deg); }
.stats-banner { background: var(--bg-surface); border-radius: var(--radius); box-shadow: none; }
.footer { background: var(--bg-surface); }
