/* ==========================================================================
   SOS-FREE CULINARY STUDIO DESIGN SYSTEM (styles.css)
   ========================================================================== */

/* Variables & Base Custom Properties */
:root {
  --bg-dark: #090d16;
  --bg-panel: rgba(17, 24, 39, 0.7);
  --bg-card: rgba(30, 41, 59, 0.4);
  --bg-input: rgba(15, 23, 42, 0.8);
  
  --accent-gold: #f59e0b;     /* Aromatics (Saffron) */
  --accent-green: #10b981;    /* Sage / Acid */
  --accent-red: #ef4444;      /* Sweetness / Red Peppers */
  --accent-blue: #06b6d4;     /* Umami / Sea vegetable */
  --accent-purple: #8b5cf6;   /* Richness / Cashew butter */
  
  --accent-gold-rgb: 245, 158, 11;
  --accent-green-rgb: 16, 185, 129;
  --accent-red-rgb: 239, 68, 68;
  --accent-blue-rgb: 6, 182, 212;
  --accent-purple-rgb: 139, 92, 246;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-glow: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-title: 'Outfit', var(--font-sans);
  
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
  
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
}

/* Reset & Base Elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Blur Background Elements */
.blur-accent {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.accent-1 {
  background: radial-gradient(circle, var(--accent-green) 0%, transparent 70%);
  top: -10%;
  right: -5%;
}

.accent-2 {
  background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
  bottom: -10%;
  left: -5%;
}

/* Header & Navigation */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glow);
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: var(--transition-fast);
}

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

.logo-text .accent-text {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.desktop-nav .nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-green);
  transition: var(--transition-fast);
}

.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  width: 100%;
}

/* Mobile Nav Styles */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.mobile-nav-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-fast);
  transform-origin: left center;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glow);
  padding: 1.5rem 2rem;
  z-index: 99;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  display: block;
}

.mobile-nav-link.active {
  color: var(--accent-green);
}

/* Main Layout Views */
#app-mount {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
  position: relative;
}

.app-view {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.app-view.active {
  display: block;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== VIEW: DASHBOARD ==================== */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: var(--border-radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background-color: var(--accent-green);
  color: #090d16;
}

.btn-primary:hover {
  background-color: #0d9488;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background-color: rgba(30, 41, 59, 0.6);
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
}

.btn-secondary:hover {
  background-color: rgba(30, 41, 59, 0.9);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16/10;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-glow);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease;
}

.hero-visual:hover .hero-img {
  transform: scale(1.05);
}

/* Sections Common */
.section-container {
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 720px;
  margin-bottom: 3rem;
}

/* Pillars Cards Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.6;
}

.card-1::before { background: var(--accent-gold); }
.card-2::before { background: var(--accent-blue); }
.card-3::before { background: var(--accent-green); }
.card-4::before { background: var(--accent-red); }
.card-5::before { background: var(--accent-purple); }

.pillar-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.pillar-num {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  opacity: 0.15;
}

.pillar-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pillar-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.pillar-details {
  border-top: 1px solid var(--border-glow);
  padding-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pillar-details strong {
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.25rem;
}

/* ==================== VIEW: RECIPES EXPLORER ==================== */
.view-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.view-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Filter Controls Layout */
.filter-controls-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-box-wrapper input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 1rem 1.5rem 1rem 3.5rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-size: 1.05rem;
  transition: var(--transition-fast);
}

.search-box-wrapper input:focus {
  border-color: var(--accent-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-box-wrapper .search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.max-width-md {
  max-width: 600px;
}

.filters-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: flex-start;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-label {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.category-pills .pill {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-glow);
  padding: 0.5rem 1.15rem;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.category-pills .pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.category-pills .pill.active {
  background-color: var(--accent-green);
  color: #090d16;
  border-color: var(--accent-green);
  font-weight: 600;
}

.pillar-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pillar-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-glow);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pillar-check-label input {
  display: none;
}

.pillar-check-label span::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.5rem;
  background: var(--text-muted);
  transition: var(--transition-fast);
}

/* Color markers for checkboxes */
.checkbox-aromatics span::before { background: var(--accent-gold); }
.checkbox-umami span::before { background: var(--accent-blue); }
.checkbox-acid span::before { background: var(--accent-green); }
.checkbox-sweetness span::before { background: var(--accent-red); }
.checkbox-richness span::before { background: var(--accent-purple); }

.pillar-check-label:has(input:checked) {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.pillar-check-label:has(input:checked) span {
  color: var(--text-primary);
  font-weight: 600;
}

/* Recipes List Grid */
.recipes-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Recipe Card Styling */
.recipe-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.recipe-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 30px -10px rgba(0,0,0,0.5);
}

.recipe-card-img-wrapper {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-bottom: 1px solid var(--border-glow);
}

.recipe-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}

.recipe-card:hover .recipe-card-img {
  transform: scale(1.06);
}

.recipe-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recipe-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.recipe-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.recipe-card-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.recipe-card-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Small dot display of recipe's active pillars */
.recipe-card-pillars {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--border-glow);
  padding-top: 1.25rem;
  align-items: center;
}

.recipe-card-pillars-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-right: 0.5rem;
}

.pillar-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.pillar-indicator-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #090d16;
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  font-weight: 500;
}

.pillar-indicator-dot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dot-aromatics { background-color: var(--accent-gold); }
.dot-umami { background-color: var(--accent-blue); }
.dot-acid { background-color: var(--accent-green); }
.dot-sweetness { background-color: var(--accent-red); }
.dot-richness { background-color: var(--accent-purple); }

.no-recipes-found {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  color: var(--text-secondary);
}

.no-recipes-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* ==================== VIEW: FLAVOR BALANCER ==================== */
.balancer-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: flex-start;
}

.balancer-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.form-select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 0.9rem 1.25rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-fast);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 1.25rem;
}

.form-select:focus {
  border-color: var(--accent-green);
  outline: none;
}

.balancer-checkboxes-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.balancer-check-card {
  position: relative;
}

.balancer-checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.balancer-checkbox-card-label {
  display: block;
  background: var(--bg-input);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  padding-left: 4.5rem;
  position: relative;
}

.balancer-checkbox-card-label::before {
  content: '';
  position: absolute;
  left: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  transition: var(--transition-fast);
}

.balancer-check-num {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  opacity: 0.1;
  transition: var(--transition-fast);
}

.balancer-checkbox-input:checked + .balancer-checkbox-card-label {
  border-color: var(--accent-green);
  background: rgba(16, 185, 129, 0.05);
}

.balancer-checkbox-input:checked + .balancer-checkbox-card-label::before {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23090d16'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.balancer-checkbox-input:checked + .balancer-checkbox-card-label .balancer-check-num {
  opacity: 0.35;
  color: var(--accent-green);
}

.balancer-check-title {
  display: block;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.balancer-check-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Balancer Results Display */
.balancer-results-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 3rem;
  position: sticky;
  top: 120px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.results-placeholder {
  text-align: center;
  max-width: 320px;
  color: var(--text-secondary);
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  opacity: 0.3;
}

.placeholder-icon.analyzing {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.results-placeholder h3 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.results-placeholder p {
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Realized Balancer Results styling */
.active-results {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: fadeIn 0.4s ease forwards;
}

.results-header-box {
  border-bottom: 1px solid var(--border-glow);
  width: 100%;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.results-dish-badge {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: block;
}

.results-title {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
}

/* Score bar */
.score-section {
  width: 100%;
  margin-bottom: 2rem;
}

.score-meta {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.score-bar-outer {
  width: 100%;
  height: 12px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
}

.score-bar-inner {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  transition: width 1s ease-out;
}

.balancer-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
}

.balancer-pill-status {
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
}

.balancer-pill-status.covered {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.2);
}

.balancer-pill-status.missing {
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.15);
}

/* Balancer tips list */
.balancer-tips-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tips-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem 1.5rem;
  width: 100%;
  display: flex;
  gap: 1.15rem;
}

.tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.tip-content {
  flex: 1;
}

.tip-card-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.tip-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Specific styling based on active state tips */
.tip-aromatic .tip-card-title { color: var(--accent-gold); }
.tip-umami .tip-card-title { color: var(--accent-blue); }
.tip-acid .tip-card-title { color: var(--accent-green); }
.tip-sweetness .tip-card-title { color: var(--accent-red); }
.tip-richness .tip-card-title { color: var(--accent-purple); }

/* ==================== VIEW: RECIPE FINDER ==================== */
.finder-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: flex-start;
}

.finder-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.finder-inputs-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.finder-results-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 3rem;
  position: sticky;
  top: 120px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

/* Web Search Link Card styling */
.web-search-card {
  margin-top: 2rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(6, 182, 212, 0.05));
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.web-search-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.05);
}

.web-search-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.web-search-icon {
  font-size: 1.5rem;
}

.web-search-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.web-search-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.web-search-sites-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.web-search-site-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glow);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

/* Adjustments for grid inside results */
.finder-results-panel .recipe-card {
  width: 100%;
  cursor: pointer;
  margin-bottom: 0;
}

/* ==================== VIEW: PANTRY SWAPS ==================== */
.pantry-header-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4rem;
}

.pantry-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.pantry-pillar-section {
  border-top: 1px solid var(--border-glow);
  padding-top: 3rem;
}

.pantry-pillar-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pantry-pillar-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.pantry-pillar-name {
  font-family: var(--font-title);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pantry-swaps-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pantry-swap-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
}

.pantry-swap-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.swap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.swap-label-bad {
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.swap-arrow {
  color: var(--text-muted);
  font-weight: bold;
}

.swap-label-good {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.swap-item-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.swap-item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.swap-item-tip {
  border-top: 1px solid var(--border-glow);
  padding-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.swap-item-tip strong {
  color: var(--text-secondary);
  font-style: normal;
}

/* ==================== DIALOG: RECIPE DETAIL MODAL ==================== */
.recipe-detail-dialog {
  width: 90%;
  max-width: 840px;
  background: #090d16;
  border: 1px solid var(--border-hover);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  margin: auto;
  padding: 0;
  color: var(--text-primary);
  overflow: hidden;
  max-height: 90vh;
}

/* Dialog Animation Native CSS starting-style */
.recipe-detail-dialog {
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, overlay 0.3s ease allow-discrete, display 0.3s ease allow-discrete;
}

.recipe-detail-dialog[open] {
  transform: scale(1);
  opacity: 1;
}

@starting-style {
  .recipe-detail-dialog[open] {
    transform: scale(0.95);
    opacity: 0;
  }
}

.recipe-detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease, overlay 0.3s ease allow-discrete, display 0.3s ease allow-discrete;
}

.recipe-detail-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .recipe-detail-dialog[open]::backdrop {
    opacity: 0;
  }
}

.dialog-header {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
}

.btn-close-dialog {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-close-dialog:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.dialog-content {
  overflow-y: auto;
  max-height: 90vh;
}

/* Detail view inner layout */
.recipe-detail-hero {
  position: relative;
  aspect-ratio: 21/9;
  width: 100%;
}

.recipe-detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-detail-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, #090d16 0%, rgba(9,13,22,0.4) 60%, transparent 100%);
  padding: 2.5rem 3rem 1.5rem 3rem;
}

.recipe-detail-title {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.recipe-detail-body {
  padding: 2rem 3rem 3rem 3rem;
}

.recipe-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
}

.recipe-detail-meta-strip {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-md);
  margin-bottom: 2rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.meta-item strong {
  color: var(--text-primary);
  display: block;
  font-family: var(--font-title);
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.recipe-detail-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* Dynamic ingredients list with scale slider */
.detail-section-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-glow);
  padding-bottom: 0.5rem;
}

.scaler-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius-md);
  margin-bottom: 1.5rem;
}

.scaler-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.scaler-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-scale {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: bold;
  transition: var(--transition-fast);
}

.btn-scale:hover {
  background: var(--border-glow);
  border-color: var(--border-hover);
}

.scale-value {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: center;
}

.ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.88rem;
  margin-bottom: 2.5rem;
}

.ingredient-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ingredient-item input[type="checkbox"] {
  margin-top: 0.35rem;
  accent-color: var(--accent-green);
  cursor: pointer;
}

.ingredient-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.ingredient-item input[type="checkbox"]:checked + .ingredient-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Instructions List */
.instructions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.instruction-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-number {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-details {
  display: flex;
  flex-direction: column;
}

.step-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Right Detail Column: Pillars Breakdown card */
.detail-pillars-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  position: sticky;
  top: 0;
  height: fit-content;
}

.detail-pillars-card-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-pillars-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.detail-pillar-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-pillar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}

.detail-pillar-name {
  color: var(--text-secondary);
}

.detail-pillar-score {
  color: var(--text-primary);
}

.detail-pillar-progress-outer {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
}

.detail-pillar-progress-inner {
  height: 100%;
  border-radius: 99px;
}

.progress-aromatic { background-color: var(--accent-gold); }
.progress-umami { background-color: var(--accent-blue); }
.progress-acid { background-color: var(--accent-green); }
.progress-sweetness { background-color: var(--accent-red); }
.progress-richness { background-color: var(--accent-purple); }

.detail-pillars-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-glow);
  padding-top: 1.25rem;
}

/* ==================== FOOTER ==================== */
.app-footer {
  border-top: 1px solid var(--border-glow);
  background: rgba(9, 13, 22, 0.95);
  margin-top: auto;
  padding: 2.5rem 2rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-badges span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glow);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
}

/* ==================== RESPONSIVE MEDIA QUERIES ==================== */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-visual {
    aspect-ratio: 16/9;
  }
  
  .balancer-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .balancer-results-panel {
    position: static;
    min-height: auto;
  }
  
  .recipe-detail-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav-toggle {
    display: flex;
  }
  
  .mobile-nav-toggle.open .bar-1 {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-nav-toggle.open .bar-2 {
    opacity: 0;
  }
  
  .mobile-nav-toggle.open .bar-3 {
    transform: rotate(-45deg) translate(6px, -7px);
  }
  
  .mobile-menu.open {
    display: block;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .filters-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .recipe-detail-hero {
    aspect-ratio: 16/9;
  }
  
  .recipe-detail-hero-overlay {
    padding: 1.5rem 2rem 1rem 2rem;
  }
  
  .recipe-detail-title {
    font-size: 1.75rem;
  }
  
  .recipe-detail-body {
    padding: 1.5rem 2rem 2rem 2rem;
  }
  
  .recipe-detail-meta-strip {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}
