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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

:root {
  --surface-main: #ffffff;
  --surface-muted: #f4f6fb;
  --surface-elevated: linear-gradient(135deg, #f6f8ff 0%, #fef6ff 100%);
  --surface-dark: #1d2333;
  --border-soft: #d6d9e5;
  --border-strong: #a5add0;
  --text-primary: #1f2937;
  --text-secondary: #3d4555;
  --text-tertiary: #6b728c;
  --text-muted: #6b728c;
  --accent-primary: #4c6ef5;
  --accent-primary-dark: #364fc7;
  --accent-secondary: #f97316;
  --accent-success: #12b886;
  --accent-danger: #f76707;
  --chip-gradient: linear-gradient(135deg, #4c6ef5 0%, #5f3dc4 100%);
  --chip-gradient-focus: linear-gradient(135deg, #4953d6 0%, #452c9a 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
  position: relative;
}

.header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
  margin-right: 1rem;
  color: #ffeb3b;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

/* Language Selector */
.language-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.lang-btn,
.favorite-btn,
.history-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
}

.lang-btn:hover,
.favorite-btn:hover,
.history-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.lang-btn.active,
.favorite-btn.active,
.history-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #4a5568;
  border-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

#favoritesCount,
#historyCount {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f56565;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Section Styling */
.section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.section h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section h2 i {
  color: var(--accent-primary);
}

/* Goal Selection */
.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.goal-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.goal-card[data-goal="recovery"] {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.goal-card[data-goal="weightloss"] {
  background: linear-gradient(135deg, #12b886 0%, #0f9d6e 100%);
}

.goal-card[data-goal="muscle"] {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.goal-card[data-goal="indulgent"] {
  background: linear-gradient(135deg, #ffd43b 0%, #f9ca24 100%);
  color: #333;
}

.goal-card[data-goal="indulgent"] p {
  color: rgba(51, 51, 51, 0.8);
}

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

.goal-card.selected {
  border-color: #ffeb3b;
  transform: scale(1.05);
}

.goal-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.goal-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.goal-card p {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Ingredient Categories */
.ingredient-categories {
  display: grid;
  gap: 2rem;
}

.ingredient-category h3 {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid var(--border-soft);
}

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
}


.ingredient-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--surface-muted);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  color: var(--text-secondary);
}

.ingredient-item:hover {
  background: #e7ecfb;
  border-color: var(--border-soft);
  box-shadow: 0 8px 16px rgba(76, 110, 245, 0.08);
}


.ingredient-item input[type="checkbox"] {
  margin-right: 0.35rem;
  transform: scale(1.15);
  accent-color: var(--accent-primary);
}


.ingredient-item input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: var(--accent-primary);
}

.ingredient-item input[type="checkbox"]:checked {
  background: var(--accent-primary);
}

@keyframes ingredientSelect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.ingredient-item:has(input:checked) {
  animation: ingredientSelect 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-color: rgba(76, 110, 245, 0.65);
  box-shadow: 0 10px 20px rgba(76, 110, 245, 0.12);
}

.ingredient-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.ingredient-item:hover::before {
  left: 100%;
}


.ingredient-item input:checked + span {
  background: transparent;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Generate Section */
.generate-section {
  text-align: center;
}

.generate-btn {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(79, 172, 254, 0.4);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.api-key-section {
  max-width: 400px;
  margin: 0 auto;
}

.api-key-section input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s ease;
}

.api-key-section input:focus {
  outline: none;
  border-color: #667eea;
}

.api-key-section small {
  color: #718096;
  font-style: italic;
}

/* Results */
.results-container {
  display: grid;
  gap: 1.5rem;
}

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

@keyframes ingredientSelect {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.15) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.shake-result {
  animation: fadeInSlide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.shake-result:nth-child(1) { animation-delay: 0.1s; }
.shake-result:nth-child(2) { animation-delay: 0.2s; }
.shake-result:nth-child(3) { animation-delay: 0.3s; }

.shake-result h3 {
  color: #2d3748;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ingredients-list {
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 15px;
  margin: 1rem 0;
}

.ingredients-list h4 {
  color: #4a5568;
  margin-bottom: 1rem;
}

.ingredients-list ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.ingredients-list li {
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  position: relative;
  padding-left: 2rem;
}

.ingredients-list li::before {
  content: "✓";
  position: absolute;
  left: 0.5rem;
  color: #48bb78;
  font-weight: bold;
}

.tips-section {
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 15px;
  margin-top: 1rem;
}

.tips-section h4 {
  color: #4a5568;
  margin-bottom: 0.5rem;
}

.nutrition-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.nutrition-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.nutrition-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.nutrition-item:hover::before {
  transform: translateX(100%);
}

.nutrition-item .value {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.nutrition-item .label {
  font-size: 0.85rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Nutrition Tooltip */
.nutrition-item {
  position: relative;
  cursor: help;
}

.nutrition-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.nutrition-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

.nutrition-item:hover .nutrition-tooltip {
  opacity: 1;
  visibility: visible;
}

.nutrition-tooltip .tooltip-breakdown {
  text-align: left;
}

.nutrition-tooltip .tooltip-item {
  display: flex;
  justify-content: space-between;
  margin: 0.25rem 0;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nutrition-tooltip .tooltip-item:last-child {
  border-bottom: none;
}

.nutrition-tooltip .tooltip-source {
  font-weight: 500;
}

.nutrition-tooltip .tooltip-value {
  font-weight: bold;
  color: #ffeb3b;
}

/* Mobile-friendly tooltips */
.tooltip-mobile {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  max-width: 250px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: tooltipFadeIn 0.3s ease;
  line-height: 1.4;
}

.tooltip-mobile::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Favorites Section */
.favorites-section {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

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

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.favorite-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.favorite-item:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.favorite-item h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.favorite-item .favorite-meta {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.favorite-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.favorite-btn, .load-favorite-btn, .delete-favorite-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.favorite-btn:hover, .load-favorite-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.delete-favorite-btn:hover {
  background: rgba(255, 0, 0, 0.6);
  border-color: rgba(255, 0, 0, 0.7);
}

.empty-favorites {
  text-align: center;
  padding: 2rem;
  opacity: 0.7;
}

/* Favorite star buttons */

.favorite-star {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
  z-index: 10;
  padding: 0.25rem;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.favorite-star:hover,
.favorite-star:focus-visible {
  color: #ffd43b;
  background: rgba(255, 221, 87, 0.2);
  border-color: rgba(255, 221, 87, 0.4);
  transform: scale(1.05);
  outline: none;
  box-shadow: 0 10px 20px rgba(255, 221, 87, 0.2);
}

.favorite-star .fas {
  color: #ffd700;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
}

.favorite-star .far {
  color: #cbd5e0;
  opacity: 0.6;
}

.favorite-star .far:hover {
  color: #ffd700;
  opacity: 1;
}

/* Update ingredient items to accommodate star */
.ingredient-item {
  position: relative;
  padding-right: 3rem; /* Make room for star */
}

/* Favorite ingredient highlight */

.ingredient-item.is-favorite {
  background: linear-gradient(135deg, rgba(255, 221, 87, 0.18), rgba(254, 249, 195, 0.35));
  border-color: rgba(255, 221, 87, 0.8);
  box-shadow: 0 12px 24px rgba(253, 230, 138, 0.25);
}


.ingredient-item.is-favorite .favorite-star .fas {
  color: #ffd43b;
  text-shadow: 0 0 10px rgba(255, 212, 59, 0.75);
  transform: scale(1.1);
}

/* Filter buttons */
.ingredient-filters {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(148, 163, 209, 0.28);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  letter-spacing: 0.01em;
  min-height: 44px;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  background: var(--surface-main);
  border-color: rgba(76, 110, 245, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(76, 110, 245, 0.12);
  outline: none;
}


.filter-btn.active {
  background: var(--chip-gradient) !important;
  color: white !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(76, 110, 245, 0.3);
}

.filter-btn .count-badge {
  background: rgba(76, 110, 245, 0.12);
  color: var(--accent-primary);
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 1.5rem;
  text-align: center;
}

.filter-btn.active .count-badge {
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent-primary);
}

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

.ingredients-header h2 {
  margin-bottom: 0;
}

/* Animation for favorite toggle */
@keyframes star-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Badge pop animation */
@keyframes badge-pop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

#historyCount.updated,
#favoritesCount.updated {
  animation: badge-pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.favorite-star.favorited {
  animation: star-pop 0.3s ease;
}

/* Mobile Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.notification.error {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
.goal-card:focus-visible,
.history-item:focus-visible,
.favorite-item:focus-visible,
.ingredient-item:focus-visible,
.health-item:focus-visible {
  outline: 3px solid #ffeb3b;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 235, 59, 0.2);
  position: relative;
}

button:focus-visible {
  transform: scale(1.02);
}

.goal-card:focus-visible,
.history-item:focus-visible,
.favorite-item:focus-visible {
  transform: scale(1.02);
}

/* Focus-within for containers */
.smart-ingredient-selector:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(76, 110, 245, 0.15), 0 25px 60px rgba(76, 110, 245, 0.16);
  transform: translateY(-2px);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --surface-main: #1a202c;
    --surface-muted: #2d3748;
    --surface-elevated: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e0;
    --border-soft: #4a5568;
  }

  body {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  }

  .section {
    background: rgba(45, 55, 72, 0.95);
    color: #e2e8f0;
  }
  
  .ingredient-item span {
    background: rgba(74, 85, 104, 0.8);
    color: #e2e8f0;
  }
  
  .ingredient-item input:checked + span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
  }

  .modal-content {
    background: var(--surface-main);
    color: var(--text-primary);
  }

  .modal-header {
    border-bottom-color: #4a5568;
  }

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

  .modal-footer {
    border-top-color: #4a5568;
  }

  .favorites-section {
    background: linear-gradient(135deg, #5a3a6f 0%, #6b2c47 100%);
  }

  .history-section {
    background: rgba(45, 55, 72, 0.98);
    border-color: rgba(102, 126, 234, 0.2);
  }

  .history-item {
    background: rgba(61, 71, 85, 0.8);
    border-color: #4a5568;
    color: #e2e8f0;
  }

  .history-item:hover {
    border-color: #667eea;
  }

  .shake-result {
    background: linear-gradient(135deg, #4a5f6f 0%, #6b4a5f 100%);
  }

  .nutrition-display {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-color: #4a5568;
  }

  .macro-item {
    background: rgba(61, 71, 85, 0.8);
    color: #e2e8f0;
  }

  .macro-bar {
    background: rgba(107, 114, 140, 0.3);
  }

  .btn-modal {
    background: rgba(61, 71, 85, 0.9);
    color: #e2e8f0;
    border-color: #4a5568;
  }

  .btn-modal:hover {
    background: rgba(107, 114, 140, 0.6);
  }

  .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
  }

  .health-item {
    background: rgba(61, 71, 85, 0.8);
    border-color: #4a5568;
    color: #e2e8f0;
  }

  .health-item:hover {
    background: rgba(107, 114, 140, 0.6);
  }

  .shopping-list-content {
    color: #e2e8f0;
  }

  .shopping-category li {
    color: #cbd5e0;
    border-bottom-color: #4a5568;
  }

  .shopping-category li:hover {
    background: rgba(107, 114, 140, 0.3);
  }

  /* Goal cards in dark mode */
  .goal-card {
    color: white;
  }

  .goal-card[data-goal="indulgent"] {
    color: #1a202c;
  }

  .goal-card[data-goal="indulgent"] h3,
  .goal-card[data-goal="indulgent"] p {
    color: #1a202c;
  }

  /* Ingredient chips in dark mode */
  .ingredient-chip {
    background: rgba(76, 110, 245, 0.15);
    border-color: rgba(76, 110, 245, 0.3);
    color: #cbd5e0;
  }

  .ingredient-chip.focused {
    background: rgba(76, 110, 245, 0.25);
    border-color: rgba(76, 110, 245, 0.5);
  }

  /* Filter buttons in dark mode */
  .filter-btn {
    background: rgba(76, 110, 245, 0.1);
    color: #cbd5e0;
    border-color: rgba(76, 110, 245, 0.2);
  }

  .filter-btn.active {
    background: rgba(76, 110, 245, 0.3);
    border-color: rgba(76, 110, 245, 0.5);
    color: #e2e8f0;
  }

  .filter-btn:hover {
    background: rgba(76, 110, 245, 0.2);
    border-color: rgba(76, 110, 245, 0.4);
  }

  /* Buttons in dark mode */
  .lang-btn,
  .favorite-btn,
  .history-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.15);
  }

  .lang-btn:hover,
  .favorite-btn:hover,
  .history-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .lang-btn.active,
  .favorite-btn.active,
  .history-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: #1a202c;
    border-color: rgba(255, 255, 255, 0.4);
  }

  /* Action buttons in dark mode */
  .action-btn {
    background: rgba(76, 110, 245, 0.15);
    color: #cbd5e0;
    border-color: rgba(76, 110, 245, 0.3);
  }

  .action-btn:hover {
    background: rgba(76, 110, 245, 0.25);
    border-color: rgba(76, 110, 245, 0.5);
  }

  /* Favorite and action buttons */
  .save-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  .favorite-star {
    color: #cbd5e0;
  }

  .favorite-star.active {
    color: #ffd43b;
  }

  /* Selector label in dark mode */
  .selector-label {
    color: #cbd5e0;
  }

  .selector-label i {
    color: rgba(76, 110, 245, 0.8);
  }

  /* Dropdown in dark mode */
  .ingredient-search-input {
    background: rgba(45, 55, 72, 0.8);
    color: #e2e8f0;
    border-color: #4a5568;
  }

  .ingredient-search-input::placeholder {
    color: #718096;
  }

  .dropdown {
    background: #2d3748;
    border-color: #4a5568;
  }

  .dropdown-item {
    color: #cbd5e0;
    border-bottom-color: #4a5568;
  }

  .dropdown-item:hover,
  .dropdown-item.focused {
    background: rgba(76, 110, 245, 0.15);
  }

  /* Favorite card in dark mode */
  .favorite-card {
    background: rgba(45, 55, 72, 0.9);
    border-color: #4a5568;
  }

  .favorite-card:hover {
    border-color: #667eea;
  }
}

/* Print styles */
@media print {
  .generate-section,
  .action-buttons {
    display: none;
  }
  
  .shake-result {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .header {
    margin-bottom: 1rem;
  }

  .language-selector {
    position: sticky;
    top: 10px;
    z-index: 999;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.95) 0%, rgba(102, 126, 234, 0.8) 100%);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    gap: 0.25rem;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    margin-top: 0;
  }

  .lang-btn, .favorite-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .goal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .goal-card {
    padding: 1rem;
  }

  .goal-card h3 {
    font-size: 1rem;
  }

  .ingredient-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .health-conditions {
    grid-template-columns: 1fr;
  }

  .nutrition-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .nutrition-item {
    padding: 0.75rem;
  }

  .nutrition-item .value {
    font-size: 1.25rem;
  }

  .nutrition-tooltip {
    left: 0;
    right: 0;
    transform: none;
    white-space: normal;
    max-width: 250px;
  }

  .favorites-grid {
    grid-template-columns: 1fr;
  }

  .favorite-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .generate-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    transform: translateY(-100%);
    max-width: none;
  }

  .notification.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.75rem;
  }

  .goal-grid {
    grid-template-columns: 1fr;
  }

  .nutrition-info {
    grid-template-columns: 1fr;
  }

  .nutrition-tooltip {
    position: fixed;
    top: 50%;
    left: 10px;
    right: 10px;
    transform: translateY(-50%);
    max-width: none;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 10px;
    z-index: 10000;
  }
}

/* Health Conditions Grid */
.health-conditions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.health-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f7fafc;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.health-item:hover {
  background: #e2e8f0;
}

.health-item input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
  accent-color: #e53e3e;
}

.health-item:has(input:checked) {
  background: linear-gradient(135deg, #e53e3e20, #c5303020);
  border-color: #e53e3e;
}

.health-description {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 1rem;
  font-style: italic;
}

/* Category Headers with Collapse */
.category-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.category-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.category-toggle {
  transition: transform 0.3s ease;
  font-size: 0.9rem;
  opacity: 0.7;
}

.category-header:hover .category-toggle {
  opacity: 1;
}

.category-content {
  transition: all 0.3s ease;
}

/* Improved Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 140px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
}

.action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.save-btn {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.save-btn:hover {
  background: linear-gradient(135deg, #45a049, #4CAF50);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.share-btn {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: white;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.share-btn:hover {
  background: linear-gradient(135deg, #1976D2, #2196F3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

/* Rating System */
.rating-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #fff5e1 0%, #ffe8b6 100%);
  padding: 12px 20px;
  border-radius: 25px;
  border: 2px solid #ffd700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.rating-label {
  font-weight: 600;
  color: #f39c12;
  font-size: 0.95rem;
}

.rating-stars {
  display: flex;
  gap: 0.4rem;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #d4af37;
  transition: all 0.2s ease;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.star-btn:hover {
  color: #ffd700;
  transform: scale(1.25) rotate(15deg);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.star-btn.active {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  animation: starBurst 0.4s ease;
}

@keyframes starBurst {
  0% { transform: scale(0.8) rotate(0deg); }
  50% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.action-btn i {
  font-size: 1.1rem;
  z-index: 1;
  position: relative;
}

.action-btn span {
  z-index: 1;
  position: relative;
}

/* Legacy button support */
.favorite-btn {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.favorite-btn:hover {
  background: linear-gradient(135deg, #45a049, #4CAF50);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Mobile tooltip styles */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-50%) scale(0.9); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}

.mobile-tooltip {
  animation: fadeIn 0.3s ease;
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
  .nutrition-item {
    min-height: 44px; /* Minimum touch target size */
    cursor: pointer;
    position: relative;
  }
  
  .nutrition-item::after {
    content: "� Håll ned för info";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    opacity: 0.6;
    white-space: nowrap;
    color: #667eea;
    font-weight: 500;
  }

  .nutrition-item[data-nutrition="protein"]::after {
    content: "👆 Håll ned för protein info";
  }

  .nutrition-item[data-nutrition="carbs"]::after {
    content: "👆 Håll ned för kolhydrater info";
  }

  .nutrition-item[data-nutrition="fat"]::after {
    content: "👆 Håll ned för fett info";
  }

  .nutrition-item[data-nutrition="calories"]::after {
    content: "👆 Håll ned för kalori info";
  }

  /* Hide desktop tooltips on mobile */
  .nutrition-tooltip {
    display: none;
  }

  /* Better spacing for mobile hints */
  .nutrition-info {
    margin-bottom: 2rem;
  }
}

/* Improved filter buttons */
.filter-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.filter-btn {
  transition: all 0.3s ease;
}

.filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Generate button loading state */
.generate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.generate-btn:disabled:hover {
  transform: none !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

/* Nutrition values for mobile tooltips */
.nutrition-value {
  cursor: pointer;
  position: relative;
}

.nutrition-value:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Improved ingredient display during filtering */
.ingredient-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ingredient-item[style*="none"] {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* Version Update Modal */
.version-update-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.version-update-modal.visible {
  opacity: 1;
}

.version-update-content {
  background: white;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.version-update-modal.visible .version-update-content {
  transform: scale(1);
}

.version-update-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 20px 20px 0 0;
  text-align: center;
}

.version-update-header i {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: rocket-launch 2s ease-in-out infinite;
}

@keyframes rocket-launch {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.version-update-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.version-update-body {
  padding: 2rem;
  color: #2d3748;
}

.version-number {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea20, #764ba220);
  border-radius: 10px;
  display: inline-block;
  width: 100%;
}

.version-features {
  margin: 1.5rem 0;
}

.version-features h3 {
  color: #4a5568;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.version-features ul {
  list-style: none;
  padding: 0;
}

.version-features li {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #f7fafc;
  border-radius: 10px;
  border-left: 3px solid #667eea;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.version-features li:hover {
  background: #edf2f7;
  transform: translateX(5px);
}

.version-features li i {
  color: #667eea;
  font-size: 1.2rem;
  min-width: 20px;
}

.version-note {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #856404;
}

.version-note i {
  color: #ffc107;
  font-size: 1.2rem;
}

.version-update-footer {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-update-primary,
.btn-update-secondary {
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-update-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-update-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-update-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.btn-update-secondary:hover {
  background: #cbd5e0;
}

.version-update-loading {
  padding: 3rem;
  text-align: center;
  color: #2d3748;
}

.version-update-loading .spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  border: 4px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.version-update-loading p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.version-update-loading .small {
  font-size: 0.9rem;
  color: #718096;
}

@media (max-width: 768px) {
  .version-update-content {
    width: 95%;
  }
  
  .version-update-header {
    padding: 1.5rem;
  }
  
  .version-update-header h2 {
    font-size: 1.5rem;
  }
  
  .version-update-body {
    padding: 1.5rem;
  }
  
  .version-update-footer {
    flex-direction: column;
  }
  
  .btn-update-primary,
  .btn-update-secondary {
    width: 100%;
    justify-content: center;
  }
}

.category-content {
  transition: opacity 0.3s ease;
}

/* Nutrition Calculator Display */
.nutrition-display {
  background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);
  border-radius: 15px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid #e2e8f0;
}

.nutrition-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 1rem;
}

.nutrition-header i {
  color: #667eea;
  font-size: 1.2rem;
}

.nutrition-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.macro-item {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.macro-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.macro-item i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.macro-item i.fa-fire {
  color: #f56565;
}

.macro-item i.fa-drumstick-bite {
  color: #ed8936;
}

.macro-item i.fa-bread-slice {
  color: #ecc94b;
}

.macro-item i.fa-cheese {
  color: #48bb78;
}

.macro-label {
  display: block;
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.macro-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #2d3748;
  line-height: 1;
}

.macro-unit {
  display: block;
  font-size: 0.75rem;
  color: #a0aec0;
  margin-top: 0.2rem;
}

.nutrition-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.macro-bar-container {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.macro-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
}

.macro-bar {
  background: #e2e8f0;
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.macro-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.macro-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.protein-bar {
  background: linear-gradient(90deg, #ed8936 0%, #f6ad55 100%);
}

.carbs-bar {
  background: linear-gradient(90deg, #ecc94b 0%, #f6e05e 100%);
}

.fat-bar {
  background: linear-gradient(90deg, #48bb78 0%, #68d391 100%);
}

/* Protein Recommendation */
.protein-recommendation {
  background: linear-gradient(135deg, rgba(237, 137, 54, 0.08) 0%, rgba(246, 173, 85, 0.08) 100%);
  border-left: 4px solid #ed8936;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.protein-progress {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.protein-progress-bar {
  background: #e2e8f0;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.protein-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ed8936 0%, #f6ad55 100%);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
  position: relative;
  overflow: hidden;
}

.protein-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2s infinite;
}

.recommendation-text {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a5568;
  text-align: center;
}

.recommendation-text.achieved {
  color: #48bb78;
  font-weight: 700;
}

.recommendation-text.warning {
  color: #ed8936;
}

@media (max-width: 768px) {
  .nutrition-totals {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .macro-value {
    font-size: 1.5rem;
  }
  
  .protein-recommendation {
    padding: 1rem;
  }
}

/* Recipe History Panel */
.history-section {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(102, 126, 234, 0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.history-header h2 {
  color: #4a5568;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.history-header h2 i {
  color: #667eea;
}

.history-header-actions {
  display: flex;
  gap: 0.5rem;
}

.clear-history-btn,
.history-close-btn {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-history-btn:hover {
  background: #fed7d7;
  border-color: #fc8181;
  color: #c53030;
}

.history-close-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e0;
}

.history-list {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.history-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.empty-history {
  text-align: center;
  padding: 3rem 1rem;
  color: #a0aec0;
}

.history-item {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.history-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
  transform: translateX(5px);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.history-item-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #2d3748;
  font-size: 1rem;
}

.history-item-title i {
  color: #667eea;
}

.history-item-actions {
  display: flex;
  gap: 0.25rem;
}

.history-action-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #718096;
  transition: all 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-action-btn:hover {
  background: #f7fafc;
}

.regenerate-btn:hover {
  color: #667eea;
}

.delete-btn:hover {
  color: #f56565;
}

.history-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 0.5rem;
}

.history-timestamp,
.history-goal {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.history-item-ingredients {
  font-size: 0.85rem;
  color: #a0aec0;
}

.history-item-ingredients i {
  margin-right: 0.25rem;
}

@media (max-width: 768px) {
  .history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .history-header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .history-item {
    padding: 0.75rem;
  }
  
  .history-item-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .history-item-actions {
    align-self: flex-end;
  }
}

/* Color-coded goal icons in history */
.history-item[data-goal="recovery"] .history-item-title i {
  color: #f97316;
}

.history-item[data-goal="weightloss"] .history-item-title i {
  color: #12b886;
}

.history-item[data-goal="muscle"] .history-item-title i {
  color: #f56565;
}

.history-item[data-goal="indulgent"] .history-item-title i {
  color: #ffd43b;
}

/* Shopping List Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.modal-header h2 {
  color: #4a5568;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.modal-header h2 i {
  color: #667eea;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #a0aec0;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.modal-close-btn:hover {
  background: #f7fafc;
  color: #4a5568;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.shopping-list-content {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.shopping-category {
  margin-bottom: 1.5rem;
}

.shopping-category h3 {
  color: #667eea;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shopping-category h3 i {
  font-size: 1rem;
}

.shopping-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shopping-category li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  color: #4a5568;
  border-bottom: 1px solid #f7fafc;
}

.shopping-category li:before {
  content: '☐';
  position: absolute;
  left: 0;
  color: #a0aec0;
  font-size: 1.2rem;
}

.shopping-category li:hover {
  background: #f7fafc;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

.btn-modal {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-modal i {
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f7fafc;
  color: #4a5568;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e0;
}

.export-shopping-btn {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white !important;
  border: none;
}

.export-shopping-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 1rem;
    flex-direction: column;
  }
  
  .btn-modal {
    width: 100%;
  }
}

/* ========================================
   SMART INGREDIENT SELECTOR
   ======================================== */

.smart-ingredient-selector {
  background: var(--surface-main);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 20px 45px rgba(31, 41, 55, 0.08);
  border: 1.5px solid var(--border-soft);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  color: var(--text-secondary);
}

.smart-ingredient-selector:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 25px 60px rgba(76, 110, 245, 0.16);
  transform: translateY(-2px);
}

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

.selector-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  cursor: default;
  flex: 1;
  min-width: 200px;
}

.selector-label.ingredient-selected {
  animation: ingredientSelect 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.selector-label i {
  color: var(--accent-primary);
}

.selector-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  background: rgba(102, 126, 234, 0.08);
  padding: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(102, 126, 234, 0.15);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--accent-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(76, 110, 245, 0.3);
}

.filter-btn i {
  font-size: 0.9rem;
}

.quick-add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, var(--accent-secondary) 0%, #ff922b 100%);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 12px 30px rgba(247, 103, 7, 0.25);
}

.quick-add-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 36px rgba(247, 103, 7, 0.3);
}

.quick-add-btn i {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Search Input */
.search-wrapper {
  position: relative;
  margin-bottom: 1rem;
}


.ingredient-search-input {
  width: 100%;
  padding: 0.9rem 3rem 0.9rem 1rem;
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  background: var(--surface-muted);
  color: var(--text-primary);
}

.ingredient-search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--surface-main);
  box-shadow: 0 0 0 4px rgba(76, 110, 245, 0.16);
}

.ingredient-search-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}


.search-clear-btn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-main);
  border: 1.5px solid var(--border-soft);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
  box-shadow: 0 6px 12px rgba(31, 41, 55, 0.08);
}

.search-clear-btn:hover {
  background: var(--accent-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 18px rgba(76, 110, 245, 0.25);
}

/* Selected Ingredients Chips */

.selected-ingredients-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  background: var(--surface-muted);
  border-radius: 14px;
  margin-bottom: 1.2rem;
  border: 1.5px dashed var(--border-soft);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.selected-ingredients-chips:has(.ingredient-chip) {
  border-style: solid;
  border-color: var(--accent-primary);
  background: var(--surface-elevated);
  box-shadow: inset 0 0 0 1px rgba(76, 110, 245, 0.08), 0 12px 28px rgba(76, 110, 245, 0.12);
}

.chips-placeholder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.6rem;
}

.chips-placeholder i {
  font-size: 1.1rem;
}


.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  background: var(--chip-gradient);
  color: white;
  border-radius: 28px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  animation: chipSlideIn 0.3s ease;
  box-shadow: 0 12px 24px rgba(76, 110, 245, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@keyframes chipSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


.ingredient-chip:hover,
.ingredient-chip:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(69, 92, 204, 0.32);
  outline: none;
}

.chip-icon {
  font-size: 1rem;
}


.chip-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.chip-remove {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  min-width: 44px;
  min-height: 44px;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  color: white;
}

.chip-remove:hover,
.chip-remove:focus-visible {
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(90deg);
  outline: none;
}

/* Favorite Star Button */
.chip-favorite-star {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  min-width: 44px;
  min-height: 44px;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

.chip-favorite-star:hover,
.chip-favorite-star:focus-visible {
  background: rgba(255, 105, 180, 0.25);
  color: #ff69b4;
  transform: scale(1.15);
  outline: none;
}

.chip-favorite-star i.fas {
  color: #ff1493;
  animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Dropdown Results */

.dropdown-results {
  position: relative;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface-main);
  border: 1.5px solid var(--border-soft);
  border-radius: 16px;
  margin-bottom: 1.2rem;
  box-shadow: 0 25px 55px rgba(31, 41, 55, 0.14);
  animation: dropdownSlideDown 0.3s ease;
}

@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.dropdown-content {
  padding: 0.75rem;
}


.dropdown-category {
  margin-bottom: 1.25rem;
}

.dropdown-category:last-child {
  margin-bottom: 0;
}


.category-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, rgba(76, 110, 245, 0.08) 0%, rgba(95, 61, 196, 0.08) 100%);
  border-radius: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.category-icon {
  font-size: 1.1rem;
}


.category-count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
}


.category-items {
  display: grid;
  gap: 0.4rem;
}


.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.05rem;
  background: var(--surface-main);
  border: 1.5px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item.focused {
  background: rgba(76, 110, 245, 0.08);
  border-color: rgba(76, 110, 245, 0.4);
  transform: translateX(6px);
  box-shadow: 0 12px 26px rgba(76, 110, 245, 0.16);
}


.item-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px rgba(31, 41, 55, 0.12));
}


.item-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}


.item-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.item-category {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


.add-ingredient-btn {
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(76, 110, 245, 0.28);
}

.add-ingredient-btn:hover,
.add-ingredient-btn:focus-visible {
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 14px 30px rgba(76, 110, 245, 0.35);
  background: var(--accent-primary-dark);
  outline: none;
}


.dropdown-empty {
  text-align: center;
  padding: 2.2rem 1.5rem;
  color: var(--text-muted);
}

.dropdown-empty i {
  font-size: 2.7rem;
  margin-bottom: 0.6rem;
  display: block;
  opacity: 0.5;
}

.dropdown-empty p {
  font-size: 0.96rem;
}

/* Selector Footer */

.selector-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1.5px solid var(--border-soft);
}

.selection-count {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.clear-all-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: rgba(247, 103, 7, 0.08);
  color: var(--accent-danger);
  border: 1.5px solid rgba(247, 103, 7, 0.35);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.clear-all-btn:hover,
.clear-all-btn:focus-visible {
  background: rgba(247, 103, 7, 0.16);
  border-color: rgba(247, 103, 7, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(247, 103, 7, 0.18);
  outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .smart-ingredient-selector {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .selector-header {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-add-btn {
    width: 100%;
    justify-content: center;
  }

  .ingredient-search-input {
    font-size: 16px;
  }

  .chip-name {
    max-width: 100px;
  }

  .dropdown-results {
    max-height: 320px;
  }

  .item-info {
    gap: 0;
  }

  .item-category {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  .smart-ingredient-selector {
    background: #151a28;
    border-color: rgba(148, 163, 209, 0.18);
    box-shadow: 0 24px 60px rgba(8, 10, 20, 0.55);
  }

  .selector-label {
    color: #e2e8f0;
  }

  .ingredient-search-input {
    background: #0f1421;
    border-color: rgba(148, 163, 209, 0.25);
    color: #f8fbff;
  }

  .ingredient-search-input:focus {
    background: #151a28;
    box-shadow: 0 0 0 4px rgba(76, 110, 245, 0.35);
  }

  .search-clear-btn {
    background: #151a28;
    border-color: rgba(148, 163, 209, 0.3);
    color: #9da9c9;
  }

  .selected-ingredients-chips {
    background: #0f1421;
    border-color: rgba(148, 163, 209, 0.18);
  }

  .selected-ingredients-chips:has(.ingredient-chip) {
    background: linear-gradient(135deg, rgba(76, 110, 245, 0.18) 0%, rgba(95, 61, 196, 0.2) 100%);
  }

  .chips-placeholder {
    color: #9da9c9;
  }

  .dropdown-results {
    background: #151a28;
    border-color: rgba(148, 163, 209, 0.22);
  }

  .dropdown-item {
    background: #0f1421;
    color: #f8fbff;
  }

  .dropdown-item:hover,
  .dropdown-item.focused {
    background: rgba(76, 110, 245, 0.25);
    border-color: rgba(132, 146, 255, 0.6);
    box-shadow: 0 16px 32px rgba(25, 32, 58, 0.55);
  }

  .item-name {
    color: #f8fbff;
  }

  .item-category {
    color: #9da9c9;
  }

  .category-label {
    background: linear-gradient(135deg, rgba(76, 110, 245, 0.12) 0%, rgba(95, 61, 196, 0.15) 100%);
    color: #e2e8f0;
  }

  .selector-footer {
    border-color: rgba(148, 163, 209, 0.25);
  }

  .selection-count {
    color: #e2e8f0;
  }

  .clear-all-btn {
    background: rgba(247, 103, 7, 0.15);
    border-color: rgba(247, 103, 7, 0.5);
  }
}

/* Scrollbar Styling */
.dropdown-results::-webkit-scrollbar {
  width: 8px;
}

.dropdown-results::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 4px;
}

.dropdown-results::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.dropdown-results::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a4192 100%);
}

