@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Prompt:wght@300;400;500;600;700&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* Cozy Apple-style Design Variables (Default: 100% Coffee Shop Cocoa & Cream Theme) */
:root {
  --bg-primary: #FAF4E8;          /* Coffee Warm Cream / Ivory */
  --bg-secondary: #FFFFFF;        /* Pure White for inner inputs & panels */
  --bg-card: #F7EFE2;             /* Light Cocoa Cream for cards */
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-bg-hover: rgba(247, 239, 226, 0.95);
  --glass-border: rgba(147, 123, 114, 0.15);
  --text-primary: #4D3C36;        /* Deep Cocoa Brown text */
  --text-secondary: #8C7167;      /* Cocoa Mauve subtext */
  --text-muted: #B3A097;          /* Muted sand-cocoa subtext */
  
  --primary: #937B72;             /* Rich Cocoa Mauve / Brown */
  --primary-glow: rgba(147, 123, 114, 0.15);
  --secondary: #8C7167;           /* Cocoa Mauve Gray */
  --secondary-glow: rgba(140, 113, 103, 0.12);
  --accent: #D07A70;              /* Sweet Rose clay */
  --success: #7D9E75;             /* Natural Sage Green */
  --warning: #C98D7B;             /* Terracotta Cinnamon clay */
  
  --font-en: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-th: "Prompt", "Sarabun", sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 2px 8px rgba(147, 123, 114, 0.05);
  --shadow-md: 0 8px 24px rgba(147, 123, 114, 0.1);
  --shadow-lg: 0 16px 40px rgba(147, 123, 114, 0.14);
  --shadow-primary: 0 8px 20px rgba(147, 123, 114, 0.25);
}

/* Cozy Espresso Dark Theme Variables */
body.dark-theme {
  --bg-primary: #28231F;          /* Rich Chocolate Espresso */
  --bg-secondary: #1F1A17;        /* Deep Coffee Black */
  --bg-card: #352E2A;             /* Warm Cocoa Brown for cards */
  --glass-bg: rgba(31, 26, 23, 0.75);
  --glass-bg-hover: rgba(53, 46, 42, 0.9);
  --glass-border: rgba(255, 255, 255, 0.09);
  --text-primary: #FAF4E8;        /* Warm Cream White */
  --text-secondary: #B0A49B;      /* Light Sand Gray */
  --text-muted: #6B6056;          /* Muted Dark Cocoa */
  --primary-glow: rgba(147, 123, 114, 0.25);
  --secondary-glow: rgba(140, 113, 103, 0.2);
}

/* Colorblind Mode Override Variables */
body.colorblind-mode {
  --primary: #005ab5;             /* Safe Blue */
  --primary-glow: rgba(0, 90, 181, 0.15);
  --accent: #dc3220;              /* Safe Vermillion Red/Orange */
  --success: #004d40;             /* Safe Dark Green/Teal */
  --warning: #ffc20a;             /* Safe Bright Yellow */
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-th), var(--font-en);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease;
}

/* Hide background glows for Apple clean look */
.bg-glow-1, .bg-glow-2 {
  display: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation (frosted, clean look) */
.sidebar {
  width: 100%;
  height: 58px; /* ขนาดบาร์บน Apple */
  background: #ffffff; /* Solid white background matching mockup */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-right: none;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
}

.mobile-brand-title {
  display: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  align-items: center;
}

.nav-item {
  display: inline-flex;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: #333333;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.nav-link:hover {
  color: #000000;
}

.nav-link.active {
  background: transparent;
  color: #000000;
  border-bottom: 2px solid #000000;
}

.nav-link svg {
  width: 16px;
  height: 16px;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
  margin-top: 0;
}

.theme-toggle-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.nav-btn-text {
  display: none; /* ซ่อนข้อความเพื่อดีไซน์ที่หรูหรา */
}

/* Main Content */
.main-content {
  flex-grow: 1;
  margin-left: 0;
  padding: 6rem 2rem 3rem 2rem;
  min-height: 100vh;
  position: relative;
  transition: var(--transition);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Views Setup */
.view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* UI Elements: Apple Cards (flat, minimalist borders) */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.glass-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Page Headers */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* 1. Home View */
.hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #14A384; /* Beautiful emerald green matching mockup */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  color: white;
}

.hero-text {
  max-width: 55%;
  z-index: 2;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
  backdrop-filter: blur(5px);
}

.hero-text h2 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: white;
}

.hero-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.hero-btn {
  background: #BC513C; /* Rust red button from mockup */
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px; /* Rounded pill style */
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
  width: fit-content;
}

.hero-btn:hover {
  background: #a3412e;
  transform: translateY(-2px);
}

.hero-image-container {
  width: 35%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  width: 100%;
  max-width: 250px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

/* Search Bar */
.search-wrapper {
  margin-bottom: 3rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
}

.search-box svg {
  color: var(--text-muted);
  margin-left: 10px;
  width: 20px;
  height: 20px;
}

.search-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 10px 12px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Category Slider */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.categories-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 1.2rem;
  margin-bottom: 2.5rem;
  scroll-behavior: smooth;
}

.category-chip {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #666666;
  padding: 6px 12px;
  border-radius: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  margin-right: 8px;
}

.category-chip:hover {
  color: #111111;
}

.category-chip.active {
  background: transparent;
  color: #111111;
  border-bottom: 2px solid #111111;
  font-weight: 700;
}

/* Grid of Recipes */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.recipe-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #2c2c2e;
}

.recipe-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.recipe-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  color: white;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.recipe-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.recipe-category {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.recipe-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.35;
  color: var(--text-primary);
  height: 2.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.recipe-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
}

.recipe-time {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.recipe-time svg {
  width: 14px;
  height: 14px;
}

.analyze-match-badge {
  background: rgba(48, 209, 88, 0.1);
  color: var(--success);
  border: 1px solid rgba(48, 209, 88, 0.2);
  padding: 3px 8px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* 2. Smart Kitchen View */
.kitchen-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

.roulette-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .kitchen-split,
  .roulette-split {
    grid-template-columns: 1fr !important;
  }
}

.ingredients-panel {
  display: flex;
  flex-direction: column;
  }

/* Image Upload & Laser Scanner Styles */
.image-upload-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem; /* เพิ่มพื้นที่แนวตั้งขยายกล่องข้อความ */
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.01);
  transition: var(--transition);
  margin-bottom: 1rem;
  min-height: 220px; /* ยืดความสูงกล่องสแกนเนอร์ */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-upload-zone:hover {
  border-color: var(--primary);
  background: var(--glass-bg-hover);
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  margin-bottom: 8px;
}

.upload-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.uploaded-image-preview {
  width: 100%;
  max-height: 380px; /* ขยายพรีวิวรูปภาพให้สูงขึ้นจาก 180px เป็น 380px */
  object-fit: contain; /* โชว์รูปภาพเต็มสัดส่วนไม่ให้โดนตัด */
  border-radius: var(--radius-sm);
  display: block;
}

/* Scanning Laser Animation overlay */
.scanning-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.scanner-text {
  color: #30d158; /* Apple Safe Green */
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 15px;
  text-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
  animation: pulse 1s infinite alternate;
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, transparent, #30d158, transparent);
  box-shadow: 0 0 12px #30d158;
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

@keyframes pulse {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.input-group {
  display: flex;
  gap: 8px;
}

.custom-input {
  flex-grow: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.custom-input:focus {
  border-color: var(--primary);
}

.btn-icon {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: #0056b3;
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Predefined Selectors */
.ingredients-selectors {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}

.ingredient-category-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--glass-border);
}

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

.ingredient-select-chip {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ingredient-select-chip:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.ingredient-select-chip.selected {
  background: var(--primary);
  border-color: transparent;
  color: white;
}

.ingredient-select-chip.custom-added {
  border-style: dashed;
}

.ingredient-select-chip .remove-custom-btn {
  color: var(--accent);
  margin-left: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
}

/* Stats */
.kitchen-stats-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.btn-analyze {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-analyze:hover {
  background: #0056b3;
}

/* Results panel */
.analysis-results-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 700px;
  overflow-y: auto;
  padding-right: 8px;
}

.result-item {
  display: flex;
  gap: 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: var(--transition);
}

.result-img-wrapper {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: #2c2c2e;
}

.result-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.score-badge {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.score-badge span {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.missing-list {
  margin: 0.5rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.missing-tag {
  display: inline-block;
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.2);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 50px;
  margin-right: 4px;
  margin-top: 4px;
}

.matching-tag {
  display: inline-block;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.2);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 50px;
  margin-right: 4px;
  margin-top: 4px;
}

.result-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-action-sm {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
}

.btn-action-primary {
  background: var(--primary);
  color: white;
}

.btn-action-primary:hover {
  background: #0056b3;
}

.btn-action-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-action-secondary:hover {
  background: var(--glass-bg-hover);
}

/* 3. Recipe Detail View */
.recipe-detail-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.recipe-hero {
  position: relative;
  height: 350px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
}

.recipe-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
  z-index: 1;
}

.recipe-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.recipe-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.recipe-detail-cat {
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.recipe-detail-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: white;
}

.recipe-detail-info-row {
  display: flex;
  gap: 12px;
}

.recipe-detail-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.recipe-detail-info-item svg {
  width: 14px;
  height: 14px;
}

.recipe-detail-body {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2.5rem;
}

@media (max-width: 900px) {
  .recipe-detail-body {
    grid-template-columns: 1fr;
  }
}

.detail-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ingredients-list-detail {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ingredient-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.ingredient-detail-name {
  font-weight: 500;
  font-size: 0.9rem;
}

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

.steps-list-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-detail-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

/* 4. Shopping List View */
.shopping-container {
  max-width: 700px;
  margin: 0 auto;
}

.shopping-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 1.2rem;
}

.btn-shopping-header {
  flex-grow: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  border: none;
}

.btn-shopping-add {
  background: var(--primary);
  color: white;
}

.btn-shopping-clear {
  background: rgba(255, 69, 58, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 69, 58, 0.2);
}

.btn-shopping-clear:hover {
  background: rgba(255, 69, 58, 0.15);
}

.btn-shopping-pdf {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-shopping-pdf:hover {
  background: var(--glass-bg-hover);
}

.shopping-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1.2rem;
}

.shopping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.shopping-item:hover {
  background: var(--glass-bg-hover);
}

.shopping-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.shopping-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--glass-border);
  appearance: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  background: var(--bg-secondary);
}

.shopping-checkbox:checked {
  background: var(--primary);
  border-color: transparent;
}

.shopping-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.shopping-item-name {
  font-size: 0.95rem;
  font-weight: 500;
}

.shopping-checkbox:checked + .shopping-item-name {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.shopping-item-delete {
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.shopping-item-delete:hover {
  color: var(--accent);
}

.shopping-item-delete svg {
  width: 18px;
  height: 18px;
}

.empty-shopping-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-shopping-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* Quick Add Chip design for Apple clean look */
.quick-add-chip {
  outline: none;
  font-weight: 500 !important;
}

.quick-add-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* 5. Food Roulette View */
.roulette-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
  gap: 2.5rem;
}

.wheel-container {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  border: 4px solid #000000; /* กรอบสีดำในโหมดสีขาว (Light Mode) */
}

body.dark-theme .wheel-container {
  border: 4px solid var(--glass-border); /* คืนค่ากรอบเดิมในโหมดมืด (Dark Mode) */
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid var(--accent);
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

#wheel-canvas {
  width: 360px;
  height: 360px;
  border-radius: 50%;
}

.spin-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.spin-btn:hover {
  background: #0056b3;
}

.spin-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.25s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .sidebar {
    height: 58px !important;
    padding: 0 0.5rem !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    transform: none !important;
    width: 100% !important;
  }
  
  .mobile-brand-title {
    display: none !important;
  }
  
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
  
  /* ซ่อน scrollbar เพื่อความคลีน */
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  
  .nav-item {
    width: auto !important;
  }
  
  .nav-link {
    width: auto !important;
    font-size: 0.82rem !important; /* ย่อขนาดตัวอักษรเล็กน้อยเพื่อรองรับหน้าจอมือถือแคบ */
    padding: 6px 4px !important;
    border-bottom: 2px solid transparent !important;
  }
  
  .nav-link.active {
    border-bottom: 2px solid var(--text-primary) !important;
  }
  
  .top-nav-actions {
  }
  
  .sidebar.active .top-nav-actions {
    display: flex;
  }
  
  .sidebar.active .nav-btn-text {
    display: inline;
    color: var(--text-primary);
  }
  
  .sidebar.active .theme-toggle-btn {
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    padding: 10px 16px;
    background: var(--glass-bg);
  }
  
  .main-content {
    margin-left: 0;
    padding: 1.5rem;
    padding-top: 5.5rem;
  }
  
  .mobile-nav-toggle {
    display: none !important;
  }
  
  .hero-banner {
    flex-direction: column;
    padding: 2rem;
    text-align: center;
  }
  
  .hero-text {
    max-width: 100%;
    margin-bottom: 2rem;
  }
  
  .hero-text h2 {
    font-size: 2rem;
  }
  
  .hero-image-container {
    width: 60%;
  }
  
  .wheel-container {
    width: 320px;
    height: 320px;
  }
  
  #wheel-canvas {
    width: 300px;
    height: 300px;
  }

  /* ปรับปรุงเลย์เอาต์การ์ดและกริดบนมือถือไม่ให้ใหญ่เต็มจอเกินไป */
  .main-content {
    padding: 1rem !important;
    padding-top: 5rem !important;
  }

  .hero-banner {
    padding: 1.5rem !important;
  }

  .hero-text h2 {
    font-size: 1.5rem !important;
  }

  .hero-text p {
    font-size: 0.82rem !important;
    margin-bottom: 1rem !important;
  }

  .recipe-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* จัด 2 คอลัมน์บนมือถือ */
    gap: 0.8rem !important; /* ลดช่องว่างระหว่างการ์ด */
    margin-bottom: 2rem !important;
  }
  
  .recipe-card-pastel {
    min-height: 170px !important; /* ย่อความสูงของการ์ด */
    border-radius: var(--radius-md) !important;
  }
  
  .recipe-card-pastel-top {
    padding: 1rem 0.8rem 0.8rem 0.8rem !important; /* ย่อระยะขอบการ์ดส่วนบน */
  }
  
  .recipe-card-pastel-title {
    font-size: 0.95rem !important; /* ย่อขนาดตัวอักษรของชื่อเมนู */
    margin-bottom: 0.25rem !important;
    line-height: 1.35 !important;
  }
  
  .recipe-card-pastel-time {
    font-size: 0.72rem !important;
  }
  
  .recipe-card-pastel-ing {
    font-size: 0.68rem !important;
  }
  
  .recipe-card-pastel-action {
    font-size: 0.68rem !important;
    padding: 1px 5px !important;
  }
  
  .recipe-card-pastel-meta {
    margin-top: 0.4rem !important;
  }
  
  .recipe-card-pastel-footer {
    height: 14px !important; /* ลดความหนาของขอบล่างสีขาว */
  }

  /* ปรับการ์ดและรายละเอียดอื่นๆ บนมือถือ */
  .category-chips {
    gap: 0.75rem !important;
    padding-bottom: 0.4rem !important;
  }

  .category-chip {
    font-size: 0.82rem !important;
    padding: 5px 3px !important;
  }
}

/* Toast Messages */
.toast-msg {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

/* AI Loading Spinner Styles */
.ai-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.ai-spinner {
  width: 45px;
  height: 45px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ai-spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
  margin-bottom: 1.5rem;
}

.ai-loader h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.ai-loader p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 320px;
}

@keyframes ai-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pulse-element {
  animation: ai-pulse 1.5s infinite ease-in-out;
}

@keyframes ai-pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ==========================================
   6. Google Search Results View CSS
   ========================================== */
.google-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.google-logo-wrapper {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -1px;
}

.google-logo-wrapper .g-blue { color: #4285F4; }
.google-logo-wrapper .g-red { color: #EA4335; }
.google-logo-wrapper .g-yellow { color: #FBBC05; }
.google-logo-wrapper .g-green { color: #34A853; }
.google-logo-wrapper .g-food { font-weight: 500; font-size: 1.3rem; color: var(--text-secondary); margin-left: 6px; }

.google-search-bar-container {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 6px 16px;
  transition: all 0.2s ease;
}

.google-search-bar-container:hover, .google-search-bar-container:focus-within {
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.15);
}

.google-search-input {
  flex-grow: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
}

.google-search-icon {
  color: #4285F4;
  width: 18px;
  height: 18px;
}

.google-tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0px;
  padding-left: 0.5rem;
}

.google-tab {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 3px solid transparent;
}

.google-tab.active {
  color: #1a0dab;
  border-bottom-color: #1a0dab;
  font-weight: 600;
}

body.dark-theme .google-tab.active {
  color: #8ab4f8;
  border-bottom-color: #8ab4f8;
}

/* Layout Grid */
.google-layout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .google-layout-grid {
    grid-template-columns: 1fr;
  }
}

.google-results-column {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  padding-right: 10px;
}

/* Google-style Result Items */
.g-result-item {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.g-result-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.g-result-title {
  font-size: 1.25rem;
  color: #1a0dab;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.3;
  width: fit-content;
}

.g-result-title:hover {
  text-decoration: underline;
}

body.dark-theme .g-result-title {
  color: #8ab4f8;
}

.g-result-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 2px;
}

.g-result-snippet strong {
  color: var(--text-primary);
}

.g-result-meta {
  display: flex;
  gap: 15px;
  font-size: 0.78rem;
  color: #008000;
  margin-top: 4px;
}

body.dark-theme .g-result-meta {
  color: var(--success);
}

.g-result-sub-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.g-result-link-btn {
  background: none;
  border: none;
  color: #1a0dab;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.g-result-link-btn:hover {
  text-decoration: underline;
}

body.dark-theme .g-result-link-btn {
  color: #8ab4f8;
}

/* Knowledge Panel */
.google-knowledge-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.g-kp-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.g-kp-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.6rem;
}

.g-kp-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
  border: 1px solid var(--glass-border);
}

.g-kp-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  margin-top: 1rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 4px;
}

.g-kp-list {
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.g-kp-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
}

.g-kp-step-item {
  display: flex;
  gap: 8px;
}

.g-kp-step-num {
  font-weight: bold;
  color: var(--primary);
  min-width: 18px;
}

/* ==========================================
   ✨ Toast Notification System (UX Improvement)
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: var(--transition);
}

.toast.toast-exit {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  background: rgba(48, 209, 88, 0.15);
  color: var(--success);
}

.toast-info .toast-icon {
  background: rgba(0, 113, 227, 0.15);
  color: var(--primary);
}

.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.toast-error .toast-icon {
  background: rgba(255, 69, 58, 0.15);
  color: var(--accent);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
}

/* ==========================================
   🛍️ Sticky Quick Action Bar (UX Improvement)
   ========================================== */
.sticky-kitchen-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  visibility: hidden;
  z-index: 900;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
  width: calc(100% - 32px);
  max-width: 540px;
}

.sticky-kitchen-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.sticky-kitchen-content {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-full);
  padding: 10px 14px 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-kitchen-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.sticky-kitchen-info i, .sticky-kitchen-info svg {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

.sticky-kitchen-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sticky-clear {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sticky-clear:hover {
  background: rgba(255, 69, 58, 0.12);
  color: var(--accent);
}

.btn-sticky-analyze {
  background: linear-gradient(135deg, #0071e3, #30d158);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
}

.btn-sticky-analyze:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 113, 227, 0.35);
}

/* ==========================================
   🔍 Search Bar UX Enhancements
   ========================================== */
.clear-search-btn {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 12px;
  transition: var(--transition);
}

.clear-search-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

body.dark-theme .clear-search-btn {
  background: rgba(255, 255, 255, 0.12);
}

body.dark-theme .clear-search-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Card Hover Micro-animations */
.recipe-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.recipe-card img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Pastel Card Styles - 100% Matching Swatch Design Mockup */
.recipe-card-pastel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
  min-height: 260px;
  background-color: #ffffff; /* White background for the card */
}

.recipe-card-pastel:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.recipe-card-pastel-top {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.8rem 1.8rem 1.4rem 1.8rem;
  width: 100%;
}

.recipe-card-pastel-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.45;
  margin-bottom: 0.6rem;
  margin-top: 0.2rem;
  font-family: 'Prompt', sans-serif;
  letter-spacing: -0.2px;
}

.recipe-card-pastel-time {
  font-size: 0.9rem;
  color: #4361ee; /* Beautiful blue shade */
  font-weight: 500;
  margin-bottom: 2rem;
}

.recipe-card-pastel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 0.82rem;
  color: #555555;
  font-weight: 500;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  padding-top: 0.8rem;
}

.recipe-card-pastel-action {
  font-weight: 700;
  color: #111111;
}

.recipe-card-pastel-footer {
  background-color: #ffffff;
  height: 55px; /* Matching mockup bottom white height */
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  width: 100%;
}

.recipe-card-pastel-hex-badge {
  display: none; /* Removed as requested */
}
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Detail View Hero with Pastel Background */
.recipe-hero.pastel-hero {
  background-image: none !important;
}

.recipe-hero.pastel-hero::after {
  display: none; /* Remove dark overlay */
}

.recipe-hero.pastel-hero .recipe-detail-title {
  color: #111111 !important;
  font-family: 'Prompt', sans-serif;
}

.recipe-hero.pastel-hero .recipe-detail-info-item {
  color: #333333 !important;
  background: rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(0, 0, 0, 0.04);
  font-weight: 500;
}

.recipe-hero.pastel-hero .recipe-detail-info-item svg {
  color: #333333 !important;
}

.recipe-hero.pastel-hero .recipe-detail-cat {
  background: #111111 !important;
  color: #ffffff !important;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Single Ingredient Add Button Styles */
.add-single-ing-btn {
  background: rgba(67, 97, 238, 0.1);
  color: #4361ee;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  padding: 0;
  outline: none;
}

.add-single-ing-btn:hover {
  background: #4361ee;
  color: white;
  transform: scale(1.1);
}

.add-single-ing-btn svg {
  width: 14px;
  height: 14px;
}

/* Preset Roulette Chips Styles */
.preset-roulette-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  padding: 8px;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 1rem;
}

.preset-chip {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.preset-chip:hover {
  background: var(--primary);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
}

.preset-chip.active-on-wheel {
  background: rgba(48, 209, 88, 0.12) !important;
  color: var(--success) !important;
  border-color: rgba(48, 209, 88, 0.3) !important;
  font-weight: 600;
}

/* Floating App Settings Panel */
.floating-settings-panel {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
}

.floating-settings-trigger {
  width: 50px;
  height: 50px;
  background: #BC513C; /* Matches the mockup orange button styling */
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.floating-settings-trigger:hover {
  transform: scale(1.08) rotate(30deg);
}

.floating-settings-trigger svg {
  width: 22px;
  height: 22px;
}

.floating-settings-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: var(--transition);
  transform-origin: bottom right;
}

.floating-settings-menu.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.floating-settings-menu .theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
}

.floating-settings-menu .theme-toggle-btn:hover {
  background: var(--glass-bg-hover);
  color: #BC513C;
}

.floating-settings-menu .theme-toggle-btn svg {
  width: 16px;
  height: 16px;
}
