/* ==========================================================================
   VIBECHEF DESIGN SYSTEM & CORE STYLES
   Warm Palette: Velvet Creams, Golden Ambers, Vivid Oranges & Roasted Spices
   ========================================================================== */

:root {
  /* Cream & Base Tones */
  --cream-50: #FFFDF9;
  --cream-100: #FAF5EB;
  --cream-200: #F3EBD8;
  --cream-300: #EADDC3;
  --cream-400: #DDC8A6;
  --cream-500: #CBB089;
  
  /* Rich Warm Oranges & Terracottas */
  --orange-50: #FFF4ED;
  --orange-100: #FFE6D5;
  --orange-200: #FFC9A8;
  --orange-300: #FFA470;
  --orange-400: #FF7B39;
  --orange-500: #FF5A1F;
  --orange-600: #E43E08;
  --orange-700: #B82C03;
  
  /* Amber & Golden Highlights */
  --amber-400: #FBBF24;
  --amber-500: #F59E0B;
  --amber-600: #D97706;

  /* Earthy Dark Neutrals for Text & Contrast */
  --charcoal-900: #1E1611;
  --charcoal-800: #2C211A;
  --charcoal-700: #42332A;
  --charcoal-600: #624F44;
  --charcoal-500: #887265;
  --charcoal-400: #AD9B8F;
  --charcoal-300: #D0C3BB;

  /* Glassmorphism & UI Accents */
  --surface-white: rgba(255, 255, 255, 0.88);
  --surface-glass: rgba(250, 245, 235, 0.85);
  --surface-glass-border: rgba(228, 62, 8, 0.12);
  --surface-glass-border-hover: rgba(255, 90, 31, 0.35);
  
  /* Dynamic Shadows */
  --shadow-sm: 0 2px 8px rgba(44, 33, 26, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(44, 33, 26, 0.07), 0 2px 6px -1px rgba(44, 33, 26, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(228, 62, 8, 0.14), 0 4px 16px -2px rgba(44, 33, 26, 0.05);
  --shadow-glow: 0 12px 32px rgba(255, 90, 31, 0.35);
  --shadow-glow-active: 0 4px 16px rgba(255, 90, 31, 0.45);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Border Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   CSS RESET & BASE
   ========================================================================== */

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--cream-100);
  background-image: 
    radial-gradient(at 15% 15%, rgba(255, 230, 213, 0.7) 0px, transparent 50%),
    radial-gradient(at 85% 85%, rgba(253, 235, 216, 0.6) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(255, 253, 249, 0.8) 0px, transparent 100%);
  background-attachment: fixed;
  color: var(--charcoal-800);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
  opacity: 0.45;
}

.glow-top-left {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--orange-300), var(--amber-400));
  top: -150px;
  left: -150px;
}

.glow-bottom-right {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--orange-400), var(--cream-400));
  bottom: -200px;
  right: -150px;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   SCROLL PROGRESS BAR & FLOATING CULINARY CANVAS
   ========================================================================== */

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: linear-gradient(90deg, var(--orange-500) 0%, var(--amber-400) 50%, var(--orange-600) 100%);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 10000;
  box-shadow: 0 1px 8px rgba(255, 90, 31, 0.45);
  transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Floating Culinary Canvas */
.floating-culinary-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}

.floating-food-item {
  position: absolute;
  filter: drop-shadow(0 16px 28px rgba(44, 33, 26, 0.12));
  opacity: 0.82;
  transition: opacity 0.4s ease;
  will-change: transform;
}

/* Individual Food Placements across screen margins */
.food-avocado {
  top: 14%;
  left: 3.5%;
  animation: floatGentle1 7.5s ease-in-out infinite alternate;
}

.food-tomato {
  top: 18%;
  right: 4%;
  animation: floatGentle2 6.5s ease-in-out infinite 0.8s alternate;
}

.food-garlic {
  top: 48%;
  left: 2%;
  animation: floatGentle3 8.5s ease-in-out infinite 0.4s alternate;
}

.food-basil {
  top: 52%;
  right: 2.8%;
  animation: floatGentle1 7s ease-in-out infinite 1.2s alternate;
}

.food-lemon {
  top: 78%;
  left: 4.5%;
  animation: floatGentle2 8s ease-in-out infinite 0.6s alternate;
}

.food-mushroom {
  top: 82%;
  right: 4%;
  animation: floatGentle3 7.2s ease-in-out infinite 1.5s alternate;
}

.food-whisk {
  top: 92%;
  left: 12%;
  animation: floatGentle1 9s ease-in-out infinite alternate;
}

@keyframes floatGentle1 {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  50%  { transform: translateY(-14px) rotate(4deg) scale(1.02); }
  100% { transform: translateY(6px) rotate(-3deg) scale(0.98); }
}

@keyframes floatGentle2 {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  50%  { transform: translateY(-18px) rotate(-5deg) scale(1.03); }
  100% { transform: translateY(8px) rotate(3deg) scale(0.97); }
}

@keyframes floatGentle3 {
  0%   { transform: translateY(0) rotate(0deg) scale(0.99); }
  50%  { transform: translateY(-12px) rotate(3deg) scale(1.02); }
  100% { transform: translateY(10px) rotate(-4deg) scale(0.98); }
}

@media (max-width: 1200px) {
  .floating-food-item {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

@media (max-width: 768px) {
  .floating-culinary-canvas {
    display: none;
  }
}

/* ==========================================================================
   SCROLL-DRIVEN ENTRANCE & REVEAL SYSTEM
   ========================================================================== */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px) scale(0.985);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 253, 249, 0.82);
  border-bottom: 1px solid var(--surface-glass-border);
  padding: 14px 0;
  transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.35s ease,
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.site-header.scrolled {
  padding: 9px 0;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-bottom-color: rgba(228, 62, 8, 0.18);
  box-shadow: 0 8px 30px rgba(44, 33, 26, 0.06);
}

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

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 90, 31, 0.3);
  font-size: 24px;
  transform: rotate(-3deg);
  transition: transform var(--transition-bounce);
}

.brand-group:hover .brand-icon-wrapper {
  transform: rotate(0deg) scale(1.05);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--charcoal-900);
  letter-spacing: -0.03em;
}

.brand-title .highlight {
  color: var(--orange-500);
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--orange-100);
  color: var(--orange-700);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--orange-200);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vibe-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal-600);
  background: var(--cream-50);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--cream-300);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--cream-300);
  background: var(--cream-50);
  color: var(--charcoal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: var(--orange-50);
  color: var(--orange-600);
  border-color: var(--orange-300);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */

.hero-section {
  text-align: center;
  padding: 44px 0 32px;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal-600);
  background: rgba(44, 33, 26, 0.07);
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  margin-bottom: 20px;
}

.hero-badge i {
  color: var(--orange-500);
  font-size: 0.9rem;
}



.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--charcoal-900);
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 50%, var(--amber-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--charcoal-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   STUDIO MAIN GRID
   ========================================================================== */

.studio-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  margin-bottom: 60px;
  align-items: start;
}

@media (max-width: 1024px) {
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ==========================================================================
   PANELS & CARDS
   ========================================================================== */

.panel {
  background: var(--surface-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-md);
  padding: 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.panel:hover {
  border-color: var(--surface-glass-border-hover);
  box-shadow: var(--shadow-lg);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cream-200);
}

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

.step-number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--orange-100);
  color: var(--orange-600);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--orange-300);
}

.panel-header-icon {
  font-size: 1.5rem;
  color: var(--orange-500);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--charcoal-900);
  letter-spacing: -0.02em;
}

.item-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal-500);
  background: var(--cream-100);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--cream-300);
}

.panel-section {
  margin-top: 28px;
}

.panel-section .panel-title-wrap {
  margin-bottom: 16px;
}

/* ==========================================================================
   MULTI-INPUT TAG SYSTEM
   ========================================================================== */

.input-card {
  background: var(--cream-50);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.input-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--charcoal-700);
  margin-bottom: 10px;
}

.tags-input-wrapper {
  background: #ffffff;
  border: 2px solid var(--cream-300);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tags-input-wrapper:focus-within {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.15);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.tags-list:empty {
  display: none;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--orange-50), var(--orange-100));
  color: var(--orange-700);
  border: 1px solid var(--orange-300);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: popIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: var(--transition-fast);
}

.tag-badge:hover {
  background: var(--orange-100);
  border-color: var(--orange-400);
}

.tag-remove-btn {
  background: none;
  border: none;
  color: var(--orange-600);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.tag-remove-btn:hover {
  background: var(--orange-500);
  color: #ffffff;
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.input-icon {
  font-size: 1.25rem;
  color: var(--charcoal-400);
  flex-shrink: 0;
}

.tag-text-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--charcoal-900);
  background: transparent;
}

.tag-text-input::placeholder {
  color: var(--charcoal-400);
}

.btn-add-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--charcoal-800);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-tag:hover {
  background: var(--orange-500);
  transform: translateY(-1px);
}

.btn-add-tag:active {
  transform: translateY(0);
}

.input-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--charcoal-500);
  margin-top: 10px;
}

.btn-clear-all {
  background: none;
  border: none;
  color: var(--orange-600);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.btn-clear-all:hover {
  color: var(--orange-700);
  background: var(--orange-100);
}

/* Suggestions Container */
.suggestions-container {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--cream-300);
}

.suggestions-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--charcoal-500);
  margin-bottom: 8px;
}

.suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.suggestion-chip {
  background: #ffffff;
  border: 1px solid var(--cream-300);
  color: var(--charcoal-700);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.suggestion-chip:hover {
  background: var(--orange-50);
  border-color: var(--orange-400);
  color: var(--orange-600);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 90, 31, 0.15);
}

.suggestion-chip:active {
  transform: translateY(0) scale(0.96);
}

.suggestion-chip.added {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  background: var(--cream-200);
  border-color: var(--cream-300);
  transform: scale(0.97);
}

/* ==========================================================================
   DIETARY RESTRICTIONS CHECKBOXES — ELASTIC SPRING CARDS
   ========================================================================== */

.dietary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.custom-checkbox-card {
  position: relative;
  cursor: pointer;
  user-select: none;
  display: block;
  perspective: 600px;
}

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

.checkbox-content {
  background: var(--cream-50);
  border: 2px solid var(--cream-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.24s ease,
              border-color 0.24s ease,
              box-shadow 0.24s ease;
  box-shadow: var(--shadow-sm);
}

.custom-checkbox-card:hover .checkbox-content {
  border-color: var(--orange-300);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 16px rgba(44, 33, 26, 0.08);
}

.custom-checkbox-card:active .checkbox-content {
  transform: translateY(1px) scale(0.98);
}

.checkbox-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--cream-200);
  color: var(--charcoal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease,
              color 0.25s ease;
}

.checkbox-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.checkbox-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--charcoal-900);
  line-height: 1.2;
}

.checkbox-sub {
  font-size: 0.76rem;
  color: var(--charcoal-500);
  margin-top: 2px;
}

.checkbox-indicator {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--cream-300);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease,
              border-color 0.25s ease;
}

.checkbox-indicator i {
  transform: scale(0) rotate(-45deg);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Checked State */
.filter-checkbox:checked + .checkbox-content {
  background: var(--orange-50);
  border-color: var(--orange-500);
  box-shadow: 0 8px 20px rgba(255, 90, 31, 0.18);
  transform: translateY(-2px) scale(1.02);
}

.filter-checkbox:checked + .checkbox-content .checkbox-icon {
  background: var(--orange-500);
  color: #ffffff;
  transform: scale(1.1) rotate(4deg);
}

.filter-checkbox:checked + .checkbox-content .checkbox-indicator {
  background: var(--orange-500);
  border-color: var(--orange-500);
  transform: scale(1.08);
}

.filter-checkbox:checked + .checkbox-content .checkbox-indicator i {
  transform: scale(1) rotate(0deg);
}

/* ==========================================================================
   VIBE & MOOD PILLS
   ========================================================================== */

.vibe-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vibe-pill {
  flex: 1;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--cream-50);
  border: 1.5px solid var(--cream-300);
  border-radius: var(--radius-md);
  color: var(--charcoal-700);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              color 0.2s ease,
              box-shadow 0.2s ease;
}

.vibe-pill:hover {
  background: var(--orange-50);
  border-color: var(--orange-300);
  color: var(--orange-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 90, 31, 0.12);
}

.vibe-pill:active {
  transform: translateY(0) scale(0.97);
}

.vibe-pill.active {
  background: var(--charcoal-900);
  border-color: var(--charcoal-900);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(44, 33, 26, 0.2);
  transform: scale(1.02);
}

.vibe-pill.active i {
  color: var(--orange-400);
}

/* ==========================================================================
   PROMINENT GENERATE BUTTON — 3D INTERACTIVE GLOW
   ========================================================================== */

.action-wrap {
  margin-top: 32px;
  text-align: center;
}

.btn-generate-recipe {
  position: relative;
  width: 100%;
  padding: 19px 30px;
  background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
}

.btn-generate-recipe:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 20px 42px rgba(255, 90, 31, 0.5);
}

.btn-generate-recipe:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: var(--shadow-glow-active);
}

.btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
}

.btn-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

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

.btn-arrow {
  font-size: 1.2rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-generate-recipe:hover .btn-arrow {
  transform: translateX(6px) scale(1.1);
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: shimmer 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% { left: -100%; }
  35% { left: 200%; }
  100% { left: 200%; }
}

.generate-subtext {
  font-size: 0.82rem;
  color: var(--charcoal-500);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.generate-subtext i {
  color: var(--orange-500);
}

/* ==========================================================================
   RECIPE CARD OUTPUT CONTAINER & EMPTY STATE
   ========================================================================== */

.output-panel {
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.output-status-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--cream-100);
  color: var(--charcoal-600);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--cream-300);
}

.recipe-card-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Empty State Styling */
.empty-recipe-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed var(--cream-300);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.6);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.empty-recipe-state:hover {
  border-color: var(--orange-300);
  background: rgba(255, 253, 249, 0.95);
}

.empty-state-visual {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-100), var(--orange-200));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-600);
  box-shadow: 0 10px 24px rgba(255, 90, 31, 0.15);
}

.empty-icon {
  font-size: 48px;
}

.pulse-ring {
  position: relative;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--orange-400);
  opacity: 0.4;
  animation: pulseBorder 3s infinite ease-out;
}

@keyframes pulseBorder {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.floating-badge {
  position: absolute;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--charcoal-700);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--cream-200);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.floating-badge i {
  color: var(--orange-500);
}

.badge-1 {
  top: 0;
  left: -40px;
  animation: floatSlow 5s ease-in-out infinite alternate;
}

.badge-2 {
  bottom: 10px;
  left: -30px;
  animation: floatSlow 4s ease-in-out infinite 1s alternate;
}

.badge-3 {
  top: 30px;
  right: -50px;
  animation: floatSlow 4.5s ease-in-out infinite 0.5s alternate;
}

@keyframes floatSlow {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(2deg); }
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--charcoal-900);
  margin-bottom: 12px;
}

.empty-state-description {
  font-size: 0.95rem;
  color: var(--charcoal-600);
  max-width: 380px;
  line-height: 1.55;
  margin-bottom: 24px;
}

.quick-starter-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream-100);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--cream-300);
}

.starter-label {
  font-size: 0.84rem;
  color: var(--charcoal-600);
  font-weight: 500;
}

.btn-demo-load {
  background: var(--orange-500);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(255, 90, 31, 0.3);
}

.btn-demo-load:hover {
  background: var(--orange-600);
  transform: scale(1.04);
}

/* ==========================================================================
   ACTIVE RECIPE CARD
   ========================================================================== */

.recipe-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--cream-300);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

.recipe-hero {
  background: linear-gradient(135deg, var(--charcoal-900) 0%, var(--charcoal-800) 100%);
  color: #ffffff;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.recipe-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange-500), transparent 70%);
  opacity: 0.35;
}

.recipe-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.recipe-vibe-tag {
  background: rgba(255, 90, 31, 0.25);
  color: var(--orange-300);
  border: 1px solid rgba(255, 90, 31, 0.4);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.recipe-actions {
  display: flex;
  gap: 8px;
}

.recipe-action-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.recipe-action-btn:hover {
  background: var(--orange-500);
  border-color: var(--orange-500);
}

.recipe-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.recipe-description {
  font-size: 0.92rem;
  color: var(--charcoal-300);
  line-height: 1.5;
}

/* Quick Stats Bar */
.recipe-stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--cream-50);
  border-bottom: 1px solid var(--cream-200);
  padding: 14px 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid var(--cream-200);
}

.stat-item:last-child {
  border-right: none;
}

.stat-icon {
  font-size: 1.1rem;
  color: var(--orange-500);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--charcoal-500);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal-900);
}

/* Recipe Content Layout */
.recipe-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.recipe-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recipe-section-title i {
  color: var(--orange-500);
}

/* Ingredients Checklist */
.recipe-ingredients-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

@media (max-width: 580px) {
  .recipe-ingredients-list {
    grid-template-columns: 1fr;
  }
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--charcoal-700);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--cream-50);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ingredient-item:hover {
  background: var(--orange-50);
}

.ingredient-item.checked {
  text-decoration: line-through;
  color: var(--charcoal-400);
  background: var(--cream-100);
}

.ingredient-item input[type="checkbox"] {
  accent-color: var(--orange-500);
  width: 16px;
  height: 16px;
}

/* Steps List */
.recipe-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-card {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: var(--cream-50);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.step-card:hover {
  border-color: var(--orange-300);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange-500);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.92rem;
  color: var(--charcoal-800);
  line-height: 1.55;
}

/* Chef Tip Callout */
.chef-tip-box {
  background: linear-gradient(135deg, var(--orange-50), var(--cream-100));
  border-left: 4px solid var(--orange-500);
  padding: 14px 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chef-tip-icon {
  font-size: 1.35rem;
  color: var(--orange-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.chef-tip-text {
  font-size: 0.86rem;
  color: var(--charcoal-700);
  line-height: 1.5;
}

.chef-tip-text strong {
  color: var(--charcoal-900);
  display: block;
  margin-bottom: 2px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--charcoal-900);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--orange-500);
  /* Start hidden; JS adds .visible on next frame */
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.visible {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  border-left-color: #10B981;
}

.toast.warning {
  border-left-color: #F59E0B;
}

.toast.error {
  border-left-color: #EF4444;
}

.toast.info {
  border-left-color: #3B82F6;
}

.toast.fade-out {
  animation: toastOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 1; }
}

/* ==========================================================================
   VALIDATION ALERT & ERROR FEEDBACK SYSTEM
   ========================================================================== */

.validation-alert {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFFBEB 100%);
  border: 1.5px solid #FCA5A5;
  border-left: 5px solid #EF4444;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.12);
  animation: alertPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.validation-alert.alert-shake {
  animation: alertShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes alertPop {
  0% { opacity: 0; transform: translateY(-8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes alertShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.validation-alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.validation-alert-content {
  flex: 1;
}

.alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.alert-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: #991B1B;
}

.btn-alert-dismiss {
  background: none;
  border: none;
  color: #991B1B;
  opacity: 0.65;
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-alert-dismiss:hover {
  opacity: 1;
  background: #FEE2E2;
}

.alert-desc {
  font-size: 0.88rem;
  color: #7F1D1D;
  line-height: 1.45;
  margin-bottom: 12px;
}

.alert-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-alert-action {
  background: #EF4444;
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
  transition: var(--transition-fast);
}

.btn-alert-action:hover {
  background: #DC2626;
  transform: translateY(-1px);
}

/* Error Ring on Tag Wrapper */
.tags-input-wrapper.has-error {
  border-color: #EF4444 !important;
  background: #FFFBFB;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18) !important;
  animation: alertShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Match Score Badges */
.match-score-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.45);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.recipe-diet-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Recipe Alternative Switcher Bar */
.recipe-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream-100);
  border-bottom: 1px solid var(--cream-200);
  padding: 10px 20px;
  font-size: 0.85rem;
}

.switcher-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--charcoal-700);
}

.switcher-info i {
  color: var(--orange-500);
}

.switcher-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.switcher-btn {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  color: var(--charcoal-700);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.switcher-btn:hover:not(:disabled) {
  background: var(--orange-500);
  color: #ffffff;
  border-color: var(--orange-500);
}

.switcher-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Dietary Conflict Advisory Box */
.dietary-advisory-box {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.9), rgba(254, 249, 195, 0.9));
  border: 1px solid #FCD34D;
  border-left: 4px solid var(--amber-500);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  color: #92400E;
}

.dietary-advisory-box i {
  font-size: 1.15rem;
  color: var(--amber-600);
  flex-shrink: 0;
  margin-top: 2px;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--cream-300);
  padding: 24px 0;
  text-align: center;
  background: var(--cream-50);
  font-size: 0.85rem;
  color: var(--charcoal-500);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  gap: 8px;
  font-weight: 600;
  color: var(--charcoal-600);
}

.clear-saved-key {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--charcoal-500);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.clear-saved-key:hover {
  color: var(--orange-700);
  background: var(--orange-50);
}

.clear-saved-key:active {
  transform: scale(0.96);
}

/* ==========================================================================
   SHAKE ANIMATION — Invalid input UX feedback
   ========================================================================== */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-6px); }
  30%       { transform: translateX(5px); }
  45%       { transform: translateX(-4px); }
  60%       { transform: translateX(3px); }
  75%       { transform: translateX(-2px); }
  90%       { transform: translateX(1px); }
}

.tags-input-wrapper.shake {
  animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* ==========================================================================
   GEMINI API KEY BANNER
   ========================================================================== */

.api-key-banner {
  background: var(--cream-50);
  border: 1.5px solid var(--cream-300);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.api-key-banner.key-set {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(240, 253, 248, 0.8);
}

.api-key-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  flex-wrap: wrap;
}

.api-key-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--orange-100);
  color: var(--orange-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.api-key-body {
  flex: 1;
  min-width: 240px;
}

.api-key-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--charcoal-900);
}

.api-key-sublabel {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--charcoal-500);
}

.api-key-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-key-field {
  flex: 1;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--charcoal-900);
  background: #ffffff;
  border: 1.5px solid var(--cream-300);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.api-key-field:focus {
  border-color: var(--orange-400);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.12);
}

.btn-api-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--charcoal-900);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-api-save:hover {
  background: var(--orange-600);
  transform: translateY(-1px);
}

.btn-api-clear {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-100);
  border: 1.5px solid var(--cream-300);
  border-radius: var(--radius-sm);
  color: var(--charcoal-600);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.btn-api-clear:hover {
  background: #FEE2E2;
  border-color: #EF4444;
  color: #DC2626;
}

.api-key-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal-500);
  white-space: nowrap;
  flex-shrink: 0;
}

.api-key-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--charcoal-400);
  transition: background var(--transition-fast);
}

.api-key-banner.key-set .api-key-status-dot {
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulseGreen 2s infinite;
}

.api-key-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange-600);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--orange-200);
  background: var(--orange-50);
  transition: var(--transition-fast);
}

.api-key-help:hover {
  background: var(--orange-100);
  border-color: var(--orange-400);
  transform: translateY(-1px);
}

/* ===========================================================================
   GEMINI API KEY — LIQUID GLASS MODAL
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.api-key-modal-open {
  overflow: hidden;
}

.api-key-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
}

.api-key-modal.is-open,
.api-key-modal.is-closing {
  visibility: visible;
}

.api-key-modal.is-open {
  pointer-events: auto;
}

.api-key-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 19, 10, 0.28);
  backdrop-filter: blur(2px) saturate(120%);
  -webkit-backdrop-filter: blur(2px) saturate(120%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.api-key-modal.is-open .api-key-modal__backdrop {
  opacity: 1;
}

.api-key-dialog {
  position: relative;
  isolation: isolate;
  width: min(100%, 470px);
  padding: 38px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.94), rgba(255, 239, 222, 0.8)) padding-box,
    linear-gradient(125deg, #ffbb83, #fff7eb 28%, #ff6d2d 49%, #f8c36a 68%, #ff9a61) border-box;
  background-size: auto, 260% 260%;
  box-shadow: 0 28px 70px rgba(66, 35, 15, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  opacity: 0;
  transform: translateY(18px) scale(0.72);
}

.api-key-dialog::before {
  content: '';
  position: absolute;
  z-index: 0;
  width: 220px;
  height: 220px;
  top: -145px;
  right: -80px;
  border-radius: 50%;
  background: rgba(255, 177, 109, 0.5);
  filter: blur(28px);
}

.api-key-dialog::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: 27px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.55), transparent 34%);
  pointer-events: none;
}

.api-key-dialog > * {
  position: relative;
  z-index: 1;
}

.api-key-dialog > .api-key-modal__close {
  position: absolute;
}

.api-key-modal.is-open .api-key-dialog {
  animation: apiKeyModalEnter 0.72s cubic-bezier(0.22, 1.4, 0.34, 1) forwards, liquidBorderShift 7s ease infinite;
}

.api-key-modal.is-closing .api-key-modal__backdrop {
  opacity: 0;
}

.api-key-modal.is-closing .api-key-dialog {
  animation: apiKeyModalExit 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes apiKeyModalEnter {
  0% { opacity: 0; transform: translateY(24px) scale(0.68); }
  56% { opacity: 1; transform: translateY(-4px) scale(1.055); }
  76% { transform: translateY(2px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes apiKeyModalExit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(0.94); }
}

@keyframes liquidBorderShift {
  0%, 100% { background-position: 0 0, 0% 50%; }
  50% { background-position: 0 0, 100% 50%; }
}

.api-key-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(98, 79, 68, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  color: var(--charcoal-600);
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.api-key-modal__close:hover {
  color: var(--orange-700);
  background: rgba(255, 255, 255, 0.86);
  transform: rotate(90deg);
}

.api-key-modal__icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  background: linear-gradient(145deg, #ff8a4f, #e84a13);
  color: #fff;
  font-size: 1.55rem;
  box-shadow: 0 10px 24px rgba(228, 62, 8, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.api-key-modal__eyebrow {
  margin-bottom: 6px;
  color: var(--orange-700);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.api-key-dialog h2 {
  margin-bottom: 8px;
  color: var(--charcoal-900);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.api-key-modal__description {
  color: var(--charcoal-600);
  font-size: 0.94rem;
  line-height: 1.65;
}

.api-key-modal__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 22px;
  color: var(--orange-700);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.api-key-modal__link:hover {
  color: var(--charcoal-900);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.api-key-modal__link i {
  transition: transform var(--transition-fast);
}

.api-key-modal__link:hover i {
  transform: translate(2px, -2px);
}

.api-key-modal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.api-key-modal__input {
  width: 100%;
  min-height: 56px;
  padding: 0 52px 0 16px;
  border: 1px solid rgba(126, 87, 59, 0.2);
  border-radius: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.68);
  color: var(--charcoal-900);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 2px rgba(44, 33, 26, 0.04);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.api-key-modal__input::placeholder {
  color: var(--charcoal-400);
  font-weight: 500;
}

.api-key-modal__input:focus {
  border-color: var(--orange-400);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.13), inset 0 1px 2px rgba(44, 33, 26, 0.02);
}

.api-key-modal__toggle {
  position: absolute;
  right: 7px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--charcoal-600);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.api-key-modal__toggle:hover {
  color: var(--orange-700);
  background: var(--orange-50);
  transform: scale(1.05);
}

.eye-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.api-key-modal__privacy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 13px 0 22px;
  color: var(--charcoal-500);
  font-size: 0.72rem;
  line-height: 1.45;
}

.api-key-modal__privacy i {
  margin-top: 2px;
  color: var(--orange-600);
  font-size: 0.85rem;
}

.api-key-modal__save {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--orange-600), var(--orange-500));
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.93rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(228, 62, 8, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.api-key-modal__save:hover {
  filter: saturate(1.15) brightness(1.03);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(228, 62, 8, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.api-key-modal__save:active {
  transform: translateY(1px) scale(0.985);
}

.api-key-modal__close:focus-visible,
.api-key-modal__toggle:focus-visible,
.api-key-modal__save:focus-visible,
.api-key-modal__link:focus-visible,
.clear-saved-key:focus-visible {
  outline: 3px solid rgba(255, 90, 31, 0.4);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .api-key-modal {
    padding: 16px;
  }

  .api-key-dialog {
    padding: 32px 24px 26px;
    border-radius: 23px;
  }

  .api-key-dialog::after {
    border-radius: 22px;
  }

  .api-key-modal__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border-radius: 15px;
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .api-key-modal *,
  .api-key-modal,
  .clear-saved-key {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================== 
   OUTPUT PANEL — APPLE-STYLE KINETIC LOADING ANIMATION
   ========================================================================== */

.output-loading-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 24px;
  gap: 24px;
  border: 2px dashed var(--cream-300);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 249, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: kineticFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

@keyframes kineticFadeIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Kinetic Dual-Orbital Rings & Energy Core */
.kinetic-orbit-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kinetic-core-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.6rem;
  box-shadow: 0 0 32px rgba(255, 90, 31, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.4);
  animation: corePulse 2s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes corePulse {
  0%   { transform: scale(0.92); box-shadow: 0 0 20px rgba(255, 90, 31, 0.35); }
  100% { transform: scale(1.08); box-shadow: 0 0 42px rgba(255, 90, 31, 0.65); }
}

.kinetic-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(255, 90, 31, 0.35);
  border-top-color: var(--orange-500);
  border-right-color: var(--amber-400);
  animation: spinClockwise 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.kinetic-ring-inner {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--orange-400);
  border-left-color: var(--amber-500);
  animation: spinCounterClockwise 2.2s linear infinite;
}

@keyframes spinClockwise {
  to { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
  to { transform: rotate(-360deg); }
}

/* Kinetic Stage Pills Timeline */
.loading-stages-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.stage-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--cream-100);
  border: 1px solid var(--cream-200);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--charcoal-500);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.5;
}

.stage-pill.active {
  background: var(--orange-50);
  border-color: var(--orange-400);
  color: var(--orange-700);
  opacity: 1;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(255, 90, 31, 0.12);
}

.stage-pill.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #047857;
  opacity: 0.85;
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream-400);
  transition: all 0.3s ease;
}

.stage-pill.active .stage-dot {
  background: var(--orange-500);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.2);
}

.stage-pill.completed .stage-dot {
  background: #10B981;
}

/* Skeleton shimmer lines */
.loading-skeleton-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px;
}

.skeleton-line {
  height: 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    90deg,
    var(--cream-200) 0%,
    var(--cream-100) 40%,
    var(--cream-200) 80%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}

.skeleton-line.short { width: 55%; }
.skeleton-line.medium { width: 78%; }
.skeleton-line.long { width: 100%; }
.skeleton-line.title {
  height: 22px;
  width: 72%;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   STAGED RECIPE CARD BREAK-APART & EXPANSION REVEAL
   ========================================================================== */

.recipe-card.staged-reveal {
  animation: cardShellReveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardShellReveal {
  0%   { opacity: 0; transform: translateY(28px) scale(0.96); box-shadow: 0 4px 12px rgba(44,33,26,0.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); box-shadow: var(--shadow-lg); }
}

.recipe-card.staged-reveal .recipe-hero {
  animation: heroPartDrop 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes heroPartDrop {
  0%   { opacity: 0; transform: translateY(-16px); }
  100% { opacity: 1; transform: translateY(0); }
}

.recipe-card.staged-reveal .stat-item {
  animation: statItemPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.recipe-card.staged-reveal .stat-item:nth-child(1) { animation-delay: 0.22s; }
.recipe-card.staged-reveal .stat-item:nth-child(2) { animation-delay: 0.28s; }
.recipe-card.staged-reveal .stat-item:nth-child(3) { animation-delay: 0.34s; }
.recipe-card.staged-reveal .stat-item:nth-child(4) { animation-delay: 0.40s; }
.recipe-card.staged-reveal .stat-item:nth-child(5) { animation-delay: 0.46s; }

@keyframes statItemPop {
  0%   { opacity: 0; transform: scale(0.7) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.recipe-card.staged-reveal .ingredient-item {
  animation: ingredientCascade 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.recipe-card.staged-reveal .ingredient-item:nth-child(odd)  { animation-delay: 0.35s; }
.recipe-card.staged-reveal .ingredient-item:nth-child(even) { animation-delay: 0.42s; }

@keyframes ingredientCascade {
  0%   { opacity: 0; transform: translateX(-12px); }
  100% { opacity: 1; transform: translateX(0); }
}

.recipe-card.staged-reveal .step-card {
  animation: stepWaterfall 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.recipe-card.staged-reveal .step-card:nth-child(1) { animation-delay: 0.44s; }
.recipe-card.staged-reveal .step-card:nth-child(2) { animation-delay: 0.52s; }
.recipe-card.staged-reveal .step-card:nth-child(3) { animation-delay: 0.60s; }
.recipe-card.staged-reveal .step-card:nth-child(4) { animation-delay: 0.68s; }
.recipe-card.staged-reveal .step-card:nth-child(5) { animation-delay: 0.76s; }

@keyframes stepWaterfall {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

.recipe-card.staged-reveal .chef-tip-box {
  animation: chefTipAura 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.65s both;
}

@keyframes chefTipAura {
  0%   { opacity: 0; transform: scale(0.95); box-shadow: 0 0 0 rgba(255, 90, 31, 0); }
  50%  { box-shadow: 0 4px 20px rgba(255, 90, 31, 0.22); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 2px 10px rgba(255, 90, 31, 0.08); }
}

/* ==========================================================================
   OUTPUT PANEL — ERROR STATE CARD
   ========================================================================== */

.output-error-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed #FCA5A5;
  border-radius: var(--radius-lg);
  background: rgba(254, 242, 242, 0.7);
  gap: 14px;
  animation: fadeInUp 0.3s ease forwards;
}

.error-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #FEE2E2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #DC2626;
  border: 3px solid #FECACA;
}

.error-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #991B1B;
}

.error-description {
  font-size: 0.9rem;
  color: #7F1D1D;
  max-width: 360px;
  line-height: 1.55;
}

.error-detail-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  background: #FEE2E2;
  color: #991B1B;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #FECACA;
  max-width: 100%;
  overflow-x: auto;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #DC2626;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-retry:hover {
  background: #B91C1C;
  transform: translateY(-1px);
}
