/* ==================== CSS VARIABLES ==================== */
:root {
  --bg-primary: #0a1628;
  --bg-secondary: #0f1f35;
  --bg-tertiary: #152238;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-elevated: rgba(255, 255, 255, 0.06);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-tertiary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.4);
  
  --accent-teal: #2dd4bf;
  --accent-blue: #60a5fa;
  --accent-amber: #fbbf24;
  --accent-green: #34d399;
  --accent-red: #f87171;
  --accent-purple: #a78bfa;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(45, 212, 191, 0.3);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(45, 212, 191, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --nav-height: 72px;
  --header-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse 800px 600px at 20% 10%, rgba(45, 212, 191, 0.08), transparent),
    radial-gradient(ellipse 600px 500px at 80% 20%, rgba(96, 165, 250, 0.06), transparent),
    radial-gradient(ellipse 700px 500px at 50% 90%, rgba(251, 191, 36, 0.04), transparent);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==================== APP CONTAINER ==================== */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.status-bar-spacer {
  height: var(--safe-top);
  min-height: 12px;
}

/* ==================== SCREENS ==================== */
.screen {
  display: none;
  padding: 0 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
  animation: fadeIn 0.3s ease;
  height: calc(100vh - var(--safe-top) - 12px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  display: block;
}

/* Home screen - scrollable with pull to refresh */
#screen-home {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Pull to Refresh Indicator */
.pull-refresh-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(30, 30, 50, 0.95));
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  transform: translateY(-50px);
  opacity: 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.pull-refresh-indicator.refreshing .refresh-spinner {
  animation: spin 1s linear infinite;
}

.refresh-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
}

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

.refresh-text {
  font-size: 12px;
  color: var(--accent-gold);
  font-weight: 500;
  transition: all 0.2s ease;
}

.pull-refresh-indicator.ready .refresh-text {
  font-weight: 700;
  font-size: 13px;
}

.pull-refresh-indicator.ready .refresh-spinner {
  border-color: var(--accent-gold);
  transform: scale(1.2);
}

/* Sync Status Indicator */
.sync-status-indicator {
  position: fixed;
  top: 50px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(20, 20, 35, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 11px;
  color: #fff;
  z-index: 9998;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sync-status-indicator.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}

.sync-status-indicator:active {
  transform: scale(0.95);
}

.sync-status-indicator .sync-icon {
  font-size: 10px;
}

.sync-status-indicator .sync-text {
  font-weight: 500;
}

.sync-status-indicator.connected {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.15);
}

.sync-status-indicator.syncing {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.15);
}

.sync-status-indicator.syncing .sync-icon {
  animation: spin 1s linear infinite;
}

.sync-status-indicator.pending {
  border-color: rgba(234, 179, 8, 0.3);
  background: rgba(234, 179, 8, 0.15);
}

.sync-status-indicator.offline {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.15);
}

/* Refresh Confirmation Dialog */
.refresh-confirm-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.refresh-confirm-dialog.visible {
  opacity: 1;
}

.refresh-confirm-content {
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.98), rgba(20, 20, 35, 0.98));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.refresh-confirm-dialog.visible .refresh-confirm-content {
  transform: scale(1);
}

.refresh-confirm-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.refresh-confirm-content p {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.refresh-confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.refresh-btn-no,
.refresh-btn-yes {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.refresh-btn-no {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.refresh-btn-no:hover,
.refresh-btn-no:active {
  background: rgba(255, 255, 255, 0.15);
}

.refresh-btn-yes {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.8), rgba(255, 165, 0, 0.8));
  color: #1a1a2e;
}

.refresh-btn-yes:hover,
.refresh-btn-yes:active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 1), rgba(255, 165, 0, 1));
  transform: scale(1.05);
}

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

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

/* ==================== PERSISTENT HOME BUTTON ==================== */
.home-float-btn {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border: none;
  color: white;
  font-size: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
  cursor: pointer;
  z-index: 100;
  transition: all var(--transition-fast);
}

.home-float-btn:active {
  transform: scale(0.9);
}

.home-float-btn.visible {
  display: flex;
}

/* ==================== BRAND HEADER ==================== */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-img {
  height: 100px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.4));
}

.header-logo-video {
  height: 100px;
  width: auto;
  border-radius: 16px;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.3));
  object-fit: contain;
}

.logo-icon {
  font-size: 32px;
  filter: drop-shadow(0 4px 8px rgba(0, 212, 170, 0.3));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-family: 'Pacifico', cursive;
  font-size: 26px;
  font-weight: 400;
  background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
  line-height: 1.1;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(255, 107, 107, 0.2);
  text-align: center;
  padding-bottom: 8px;
}

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

.app-slogan {
  font-family: 'Quicksand', sans-serif;
  font-size: 11px;
  color: var(--accent-amber);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 4px;
  text-align: center;
}

.brand-text {
  text-align: center;
}

.greeting-section {
  margin-bottom: 16px;
}

.greeting-question {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

/* ==================== HEADER ==================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 8px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.greeting-text {
  display: block;
  font-size: 13px;
  color: var(--text-tertiary);
}

.user-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #252a35;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition-fast);
}

.icon-btn:active {
  transform: scale(0.95);
  background: #353a45;
}

.notification-btn {
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--accent-red);
}

/* ==================== USER PROFILE MENU ==================== */
.user-menu-container {
  position: relative;
}

/* Simple Profile Avatar Button */
.profile-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2a2a38;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.profile-avatar-btn:hover {
  background: #3a3a48;
  border-color: rgba(255, 255, 255, 0.2);
}

.profile-avatar-btn:active {
  transform: scale(0.95);
}

.profile-avatar-btn .avatar-initials {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  text-transform: uppercase;
  line-height: 1;
}

/* Show user icon if no initials */
.profile-avatar-btn .avatar-initials:empty::before {
  content: '👤';
  font-size: 1.2rem;
}

/* Clean Dropdown Menu */
.user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  min-width: 180px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
}

.user-menu-header {
  padding: 12px 14px;
  background: #222230;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-menu-header .header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3a3a48;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Show user icon if no initials in dropdown */
.user-menu-header .header-avatar:empty::before {
  content: '👤';
  font-size: 0.9rem;
}

.user-menu-header .header-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.user-menu-header .user-name {
  display: block;
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-header .user-role {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.user-menu-item:hover {
  background: #2a2a38;
}

.user-menu-item .menu-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.user-menu-item.logout-item {
  color: #f87171;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-menu-item.logout-item:hover {
  background: rgba(248, 113, 113, 0.1);
}

.user-menu-item.discord-menu-item {
  color: #7289DA;
}

.user-menu-item.discord-menu-item:hover {
  background: rgba(114, 137, 218, 0.15);
}

.user-menu-item.hidden {
  display: none;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .profile-avatar-btn {
    width: 42px;
    height: 42px;
  }
  
  .profile-avatar-btn .avatar-initials {
    font-size: 0.95rem;
  }
  
  .profile-avatar-btn .avatar-initials:empty::before {
    font-size: 1.1rem;
  }
  
  .user-menu {
    min-width: 170px;
    right: 0;
  }
  
  .user-menu-header {
    padding: 12px;
  }
  
  .user-menu-header .header-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  
  .user-menu-header .user-name {
    font-size: 0.85rem;
  }
  
  .user-menu-item {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* ==================== SCREEN HEADER ==================== */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 8px;
}

.screen-header h1 {
  color: #FFD700;
}

.screen-header.standalone {
  justify-content: space-between;
}

.screen-header h1 {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #252a35;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  transition: all var(--transition-fast);
}

.back-btn:active {
  transform: scale(0.95);
  background: #353a45;
}

.back-btn.light {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Inventory Buttons Row */
.inventory-buttons {
  display: flex;
  gap: 12px;
}

.inventory-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.inventory-btn:active {
  transform: scale(0.97);
  background: rgba(45, 55, 72, 0.9);
}

.inv-icon {
  font-size: 32px;
}

.inv-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* AI Meal Finder Button */
.ai-finder-btn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6);
  border: none;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.ai-finder-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.ai-finder-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  animation: glowMove 3s ease-in-out infinite;
}

@keyframes glowMove {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20%, 20%); }
}

.ai-icon {
  font-size: 24px;
  z-index: 1;
}

.ai-text {
  flex: 1;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  color: white;
  z-index: 1;
}

.ai-arrow {
  font-size: 20px;
  color: white;
  z-index: 1;
}

/* Analyzer Buttons Row */
.analyzer-buttons {
  display: flex;
  gap: 12px;
}

.analyzer-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.analyzer-btn.kcal {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(249, 115, 22, 0.1));
  border-color: rgba(251, 146, 60, 0.3);
}

.analyzer-btn.recipe {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
  border-color: rgba(34, 197, 94, 0.3);
}

.analyzer-btn:active {
  transform: scale(0.97);
}

.analyzer-btn.kcal:active {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(249, 115, 22, 0.2));
}

.analyzer-btn.recipe:active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(22, 163, 74, 0.2));
}

.analyzer-icon {
  font-size: 24px;
}

.analyzer-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==================== NEW HOME SCREEN CARDS ==================== */
.home-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* Glass Card Base Style */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all var(--transition-base);
}

.glass-card:active {
  transform: scale(0.98);
}

/* AI Meal Finder Large Card - 3D Effect */
.ai-finder-card {
  position: relative;
  padding: 22px 20px;
  background: linear-gradient(145deg, rgba(55, 65, 85, 0.95), rgba(35, 45, 65, 0.98));
  border: 2px solid rgba(251, 191, 36, 0.3);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 20px rgba(251, 191, 36, 0.15);
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 
      0 8px 20px rgba(0, 0, 0, 0.4),
      0 4px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 20px rgba(251, 191, 36, 0.15);
  }
  50% {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 
      0 8px 20px rgba(0, 0, 0, 0.4),
      0 4px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 30px rgba(251, 191, 36, 0.35),
      0 0 50px rgba(251, 191, 36, 0.15);
  }
}

/* Background Video for AI Finder Card */
.ai-finder-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

.ai-finder-card:active {
  transform: perspective(1000px) rotateX(0deg) scale(0.98);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.ai-finder-card .ai-finder-glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.2) 0%, transparent 65%);
  pointer-events: none;
}

.ai-finder-content {
  position: relative;
  z-index: 1;
}

.ai-sparkle {
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

.ai-finder-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ai-finder-subtitle-container {
  height: 24px;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.ai-finder-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  transition: all 0.5s ease;
  opacity: 1;
}

.ai-finder-subtitle.hidden {
  opacity: 0;
  transform: translateY(-10px);
}

/* Golden ON Button Icon - Always Visible */
.ai-finder-on-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  margin-top: 4px;
}

/* Always visible state with animation */
.ai-finder-on-btn.always-visible {
  opacity: 1;
  transform: scale(1);
  animation: onIconPulse 2.5s ease-in-out infinite;
}

/* Legacy class for backward compatibility */
.ai-finder-on-btn.visible {
  opacity: 1;
  transform: scale(1);
  animation: onIconPulse 2.5s ease-in-out infinite;
}

.on-btn-svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8));
}

.tap-text {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
  letter-spacing: 1px;
}

/* Outer glow ring */
.ai-finder-on-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, rgba(251, 191, 36, 0.15) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 1;
  animation: outerGlowPulse 2.5s ease-in-out infinite;
}

.ai-finder-on-btn.visible::before,
.ai-finder-on-btn.always-visible::before {
  opacity: 1;
  animation: outerGlowPulse 2.5s ease-in-out infinite;
}

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

@keyframes outerGlowPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.4;
  }
}
  opacity: 1;
  transform: translateY(0);
}

.ai-finder-subtitle.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.ai-finder-subtitle.fade-in {
  opacity: 0;
  transform: translateY(10px);
}

/* Two Cards Row */
.home-cards-row {
  display: flex;
  gap: 8px;
}

/* ==================== RAMADAN KAREEM PANEL ==================== */
.ramadan-panel {
  position: relative;
  margin-top: 12px;
  padding: 28px 20px 24px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(30, 25, 15, 0.95), rgba(20, 15, 10, 0.98));
  border: 1.5px solid rgba(255, 195, 0, 0.35);
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 195, 0, 0.08),
    inset 0 1px 0 rgba(255, 215, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ramadan-panel:active {
  transform: scale(0.98);
}

.ramadan-glow-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255, 195, 0, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(255, 170, 0, 0.08) 0%, transparent 50%);
  animation: ramadanGlow 3s ease-in-out infinite alternate;
}

@keyframes ramadanGlow {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.r-star {
  position: absolute;
  color: rgba(255, 215, 0, 0.5);
  font-size: 10px;
  animation: ramadanTwinkle 2s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes ramadanTwinkle {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.ramadan-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ramadan-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ramadan-crescent {
  font-size: 36px;
  filter: drop-shadow(0 0 12px rgba(255, 195, 0, 0.6));
  animation: crescentFloat 3s ease-in-out infinite;
}

@keyframes crescentFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.ramadan-title {
  font-family: 'Aref Ruqaa', serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  background: linear-gradient(
    180deg,
    #fff8c4 0%,
    #ffd700 20%,
    #ffb800 40%,
    #ffd700 60%,
    #fff3a0 80%,
    #ffc800 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(255, 195, 0, 0.5));
  animation: goldShimmer 3s ease-in-out infinite;
  position: relative;
}

@keyframes goldShimmer {
  0%, 100% {
    filter: drop-shadow(0 2px 8px rgba(255, 195, 0, 0.5))
            drop-shadow(0 0 20px rgba(255, 195, 0, 0.2));
  }
  50% {
    filter: drop-shadow(0 2px 12px rgba(255, 195, 0, 0.8))
            drop-shadow(0 0 40px rgba(255, 195, 0, 0.4));
  }
}

.ramadan-title::after {
  content: 'رمضان كريم';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 45%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.4) 55%,
    transparent 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: textShine 4s ease-in-out infinite;
}

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

.ramadan-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 215, 0, 0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
}

.ramadan-lanterns {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.lantern {
  position: absolute;
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.5));
  animation: lanternSway 2.5s ease-in-out infinite;
}

.lantern:first-child {
  top: 8px;
  left: 14px;
}

.lantern:last-child {
  top: 8px;
  right: 14px;
}

@keyframes lanternSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ==================== RAMADAN MODAL ==================== */
.ramadan-modal-content {
  max-height: 90vh;
  background: linear-gradient(180deg, #1a1408 0%, #0f0f1a 30%);
  border: 1px solid rgba(255, 195, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ramadan-modal-header {
  position: relative;
  text-align: center;
  padding: 24px 20px 16px;
  background: linear-gradient(180deg, rgba(255, 195, 0, 0.08), transparent);
  border-bottom: 1px solid rgba(255, 195, 0, 0.15);
  flex-shrink: 0;
}

.ramadan-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ramadan-modal-moon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(255, 195, 0, 0.5));
}

.ramadan-modal-title {
  font-family: 'Aref Ruqaa', serif;
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(180deg, #fff8c4, #ffd700, #ffb800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(255, 195, 0, 0.4));
}

/* Language Toggle */
.ramadan-lang-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.ramadan-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ramadan-lang-btn .lang-flag {
  font-size: 16px;
}

.ramadan-lang-btn.active {
  background: rgba(255, 195, 0, 0.15);
  border-color: rgba(255, 195, 0, 0.5);
  color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 195, 0, 0.15);
}

.ramadan-lang-btn:active {
  transform: scale(0.95);
}

.ramadan-modal-subtitle {
  font-size: 13px;
  color: rgba(255, 215, 0, 0.5);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* RTL Support for Arabic */
.ramadan-modal-content[dir="rtl"] .ramadan-modal-subtitle {
  font-family: 'Aref Ruqaa', serif;
  font-size: 14px;
  letter-spacing: 0;
}

.ramadan-modal-content[dir="rtl"] .ramadan-category-name {
  font-family: 'Aref Ruqaa', serif;
  font-size: 20px;
}

.ramadan-modal-content[dir="rtl"] .ramadan-dish-btn {
  text-align: right;
  font-family: 'Aref Ruqaa', serif;
  font-size: 18px;
}

.ramadan-modal-content[dir="rtl"] .ramadan-dish-name {
  font-family: 'Aref Ruqaa', serif;
  font-size: 18px;
  line-height: 1.5;
}

.ramadan-modal-content[dir="rtl"] .ramadan-dish-origin {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
}

.ramadan-modal-content[dir="rtl"] .ramadan-category-header {
  flex-direction: row-reverse;
}

.ramadan-modal-content[dir="rtl"] .modal-close-btn {
  right: auto;
  left: 12px;
}

.ramadan-modal-content .modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ramadan-modal-content .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.ramadan-categories {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 195, 0, 0.2) transparent;
}

.ramadan-category {
  background: rgba(255, 195, 0, 0.04);
  border: 1px solid rgba(255, 195, 0, 0.12);
  border-radius: 16px;
  padding: 16px;
}

.ramadan-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 195, 0, 0.1);
}

.ramadan-category-emoji {
  font-size: 24px;
}

.ramadan-category-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.ramadan-dishes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ramadan-dish-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  line-height: 1.3;
}

.ramadan-dish-btn:active {
  transform: scale(0.96);
  background: rgba(255, 195, 0, 0.15);
  border-color: rgba(255, 195, 0, 0.3);
}

.ramadan-dish-emoji {
  font-size: 20px;
  flex-shrink: 0;
}

.ramadan-dish-name {
  flex: 1;
  min-width: 0;
}

.ramadan-dish-origin {
  display: block;
  font-size: 10px;
  color: rgba(255, 215, 0, 0.4);
  margin-top: 2px;
}

/* ---- Country Picker Panel ---- */
.ramadan-country-picker-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(50, 40, 10, 0.9), rgba(30, 25, 8, 0.95));
  border: 1.5px solid rgba(255, 195, 0, 0.35);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 195, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ramadan-country-picker-panel:active {
  transform: scale(0.98);
}
.rcp-flags {
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1.6;
  flex-shrink: 0;
  max-width: 130px;
  overflow: hidden;
  word-break: break-all;
}
.rcp-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.rcp-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffd700;
}
.rcp-subtitle {
  font-size: 11px;
  color: rgba(255, 215, 0, 0.5);
  margin-top: 3px;
}
.rcp-arrow {
  font-size: 18px;
  color: rgba(255, 215, 0, 0.5);
}

/* ---- Back Button ---- */
.ramadan-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ramadan-back-btn:active {
  transform: scale(0.96);
  background: rgba(255, 215, 0, 0.15);
}

/* ---- Countries Grid ---- */
.ramadan-countries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ramadan-country-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 10px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(50, 40, 10, 0.85), rgba(25, 20, 5, 0.95));
  border: 1.5px solid rgba(255, 195, 0, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.ramadan-country-card:active {
  transform: scale(0.95);
  border-color: rgba(255, 195, 0, 0.5);
  box-shadow: 0 0 20px rgba(255, 195, 0, 0.1);
}
.ramadan-country-card[disabled] {
  opacity: 0.35;
  pointer-events: none;
}
.rcc-flag {
  font-size: 42px;
  line-height: 1;
}
.rcc-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffd700;
  text-align: center;
}
.rcc-count {
  font-size: 10px;
  color: rgba(255, 215, 0, 0.45);
}

/* ---- Category count badge ---- */
.ramadan-category-count {
  font-size: 11px;
  color: rgba(255, 215, 0, 0.35);
  margin-left: 6px;
}

/* RTL overrides for country views */
.ramadan-modal-content[dir="rtl"] .ramadan-back-btn {
  font-family: 'Aref Ruqaa', serif;
  font-size: 16px;
}
.ramadan-modal-content[dir="rtl"] .rcp-title {
  font-family: 'Aref Ruqaa', serif;
  font-size: 18px;
}
.ramadan-modal-content[dir="rtl"] .rcp-subtitle {
  font-family: 'Aref Ruqaa', serif;
  font-size: 13px;
}
.ramadan-modal-content[dir="rtl"] .rcc-name {
  font-family: 'Aref Ruqaa', serif;
  font-size: 16px;
}
.ramadan-modal-content[dir="rtl"] .ramadan-category-count {
  margin-left: 0;
  margin-right: 6px;
}

/* My Pantry & Smart Scan Cards - Enhanced Glassmorphism */
.pantry-card,
.scan-card {
  flex: 1;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(145deg, rgba(40, 45, 65, 0.85), rgba(30, 35, 55, 0.9));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 20px rgba(100, 120, 180, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pantry-card:active,
.scan-card:active {
  transform: scale(0.98);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Card Icon Box Base */
.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

/* My Pantry Icon - Orange/Pink/Yellow Gradient */
.pantry-icon-box {
  background: linear-gradient(145deg, #ff9a56, #ff6b8a, #ffb347);
  box-shadow: 0 4px 12px rgba(255, 154, 86, 0.4);
}

.pantry-icon-gradient {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  position: relative;
}

.pantry-icon-gradient::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 8px;
  background: linear-gradient(90deg, #ff9a56, #ff6b8a);
  border-radius: 3px 3px 0 0;
}

.pantry-icon-gradient::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 8px;
  background: linear-gradient(90deg, #ffb347, #ff9a56);
  border-radius: 2px;
}

/* Smart Scan Icon - Teal Ring with Glow */
.scan-icon-box-new {
  background: transparent;
}

.scan-ring {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(45, 212, 191, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 212, 191, 0.08);
  box-shadow: 
    0 0 15px rgba(45, 212, 191, 0.4),
    inset 0 0 10px rgba(45, 212, 191, 0.1);
  animation: scanPulse 2s ease-in-out infinite;
}

.scan-dot {
  width: 12px;
  height: 12px;
  background: linear-gradient(145deg, #2dd4bf, #22d3ee);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.6);
}

@keyframes scanPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(45, 212, 191, 0.4), inset 0 0 10px rgba(45, 212, 191, 0.1); }
  50% { box-shadow: 0 0 25px rgba(45, 212, 191, 0.6), inset 0 0 15px rgba(45, 212, 191, 0.2); }
}

/* Legacy camera lens (keeping for backward compat) */
.scan-icon-box {
  background: linear-gradient(145deg, #2a2a3a, #1a1a2a);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-lens {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(200, 180, 130, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(50, 70, 90, 0.5), rgba(30, 50, 70, 0.7));
}

.lens-dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(145deg, #6090c0, #5080b0);
  border-radius: 50%;
  border: 1px solid rgba(100, 160, 220, 0.7);
}

/* ==================== STANDARDIZED ICONS ==================== */
/* Camera Icon - Used across all camera buttons */
.std-camera-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.std-camera-icon .camera-body {
  position: relative;
  width: 18px;
  height: 14px;
  background: transparent;
  border: 2px solid rgba(255, 215, 0, 0.8);
  border-radius: 3px;
}

.std-camera-icon .camera-body::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 5px;
  width: 8px;
  height: 4px;
  background: transparent;
  border: 2px solid rgba(255, 215, 0, 0.8);
  border-bottom: none;
  border-radius: 2px 2px 0 0;
}

.std-camera-icon .camera-lens-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border: 2px solid rgba(255, 215, 0, 0.8);
  border-radius: 50%;
}

/* Upload Icon - Used across all upload/gallery buttons */
.std-upload-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.std-upload-icon svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 215, 0, 0.8);
  stroke-width: 2;
  fill: none;
}

/* Icon Button Wrapper */
.icon-btn-styled {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #252a35;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn-styled:active {
  transform: scale(0.95);
  background: #353a45;
}

.icon-btn-styled.gold-border {
  border-color: rgba(255, 215, 0, 0.3);
}

.card-icon {
  font-size: 14px;
}

.card-icon.scan-icon {
  color: var(--accent-teal);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-buttons {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.sub-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  background: transparent;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

/* Sub Icon Box - Dark rounded square base */
.sub-icon-box {
  width: 46px;
  height: 46px;
  background: linear-gradient(145deg, rgba(45, 50, 70, 0.95), rgba(25, 30, 45, 0.98));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 3D Border Effect */
  border: 1.5px solid rgba(100, 110, 140, 0.5);
  /* Multi-layer 3D Shadow */
  box-shadow: 
    /* Outer glow */
    0 0 12px rgba(100, 120, 180, 0.15),
    /* Drop shadow for depth */
    0 6px 16px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3),
    /* Inner highlight (top) */
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    /* Inner shadow (bottom) for 3D */
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.sub-icon-box svg {
  width: 28px;
  height: 28px;
  stroke: rgba(255, 255, 255, 0.85);
}

/* My Fridge Icon - Blue Gradient */
.fridge-icon-box {
  background: linear-gradient(145deg, rgba(45, 50, 70, 0.95), rgba(25, 30, 45, 0.98));
}

.fridge-icon {
  width: 22px;
  height: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fridge-top {
  flex: 1;
  background: linear-gradient(145deg, #60a5fa, #3b82f6);
  border-radius: 4px 4px 2px 2px;
  position: relative;
}

.fridge-top::after {
  content: '';
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}

.fridge-bottom {
  flex: 1.5;
  background: linear-gradient(145deg, #93c5fd, #60a5fa);
  border-radius: 2px 2px 4px 4px;
  position: relative;
}

.fridge-bottom::after {
  content: '';
  position: absolute;
  right: 3px;
  top: 6px;
  width: 3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}

/* My Kitchen Icon - Green Gradient Oven */
.kitchen-icon-box {
  background: linear-gradient(145deg, rgba(45, 50, 70, 0.95), rgba(25, 30, 45, 0.98));
}

.kitchen-icon {
  width: 26px;
  height: 24px;
  background: linear-gradient(145deg, #34d399, #10b981);
  border-radius: 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 3px;
  gap: 2px;
}

.oven-display {
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 2px;
}

.oven-display::before,
.oven-display::after {
  content: '';
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
}

.oven-door {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Kcal Finder Icon - Pink Droplet */
.kcal-icon-box {
  background: linear-gradient(145deg, rgba(35, 40, 55, 0.95), rgba(25, 30, 45, 0.98));
}

.kcal-droplet {
  width: 18px;
  height: 24px;
  background: linear-gradient(180deg, #f472b6, #ec4899, #db2777);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  position: relative;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.kcal-droplet::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 4px;
  width: 5px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: rotate(-20deg);
}

/* Recipe Finder Icon - Purple Magnifier */
.recipe-icon-box {
  background: linear-gradient(145deg, rgba(35, 40, 55, 0.95), rgba(25, 30, 45, 0.98));
}

.recipe-magnifier {
  position: relative;
  width: 28px;
  height: 28px;
}

.magnifier-glass {
  width: 18px;
  height: 18px;
  border: 3px solid #a78bfa;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(167, 139, 250, 0.15);
  box-shadow: inset 0 0 6px rgba(167, 139, 250, 0.3);
}

.magnifier-glass::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.magnifier-handle {
  width: 10px;
  height: 4px;
  background: linear-gradient(90deg, #a78bfa, #8b5cf6);
  border-radius: 2px;
  position: absolute;
  bottom: 4px;
  right: 2px;
  transform: rotate(45deg);
}

.sub-btn:active {
  background: rgba(255, 255, 255, 0.05);
  transform: scale(0.96);
}

.sub-btn:hover .sub-icon-box {
  border-color: rgba(130, 140, 180, 0.6);
  box-shadow: 
    0 0 16px rgba(100, 120, 180, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.sub-btn:active .sub-icon-box {
  transform: scale(0.95);
  border-color: rgba(150, 160, 200, 0.7);
  box-shadow: 
    0 0 8px rgba(100, 120, 180, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -1px 1px rgba(255, 255, 255, 0.1);
}

.sub-icon {
  font-size: 20px;
}

.sub-text {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.btn-divider {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  margin-top: 10px;
}

/* Old profile button styles removed - now using .profile-avatar-btn */

/* ==================== SUGGESTED FOR YOU SECTION ==================== */
.suggested-section {
  margin-bottom: 20px;
}

.suggested-section .section-header {
  margin-bottom: 10px;
}

.suggested-section .section-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.suggested-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  min-height: 180px;
}

.suggested-scroll::-webkit-scrollbar {
  display: none;
}

/* Suggested Meal Card */
.suggested-card {
  flex: 0 0 160px;
  min-width: 160px;
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.suggested-card:active {
  transform: scale(0.97);
}

.suggested-card-image {
  position: relative;
  width: 100%;
  height: 110px;
  overflow: hidden;
}

.suggested-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suggested-card-image .placeholder-emoji {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.8), rgba(30, 41, 59, 0.9));
}

.flag-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  padding: 2px 6px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.saved-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  background: rgba(255, 215, 0, 0.9);
  color: #000;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
  z-index: 2;
}

.match-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 8px;
  background: rgba(34, 197, 94, 0.9);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  color: white;
}

.favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.favorite-btn:active {
  transform: scale(0.9);
}

.favorite-btn.active {
  background: rgba(239, 68, 68, 0.8);
}

.suggested-card-info {
  padding: 10px;
}

.suggested-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggested-card-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Meal Analyzer Modal */
.meal-analyzer-modal {
  padding: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  max-height: none;
}

/* Meal Analysis Result */
.meal-analysis-result {
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
}

.analysis-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.analysis-header .back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.analysis-header h2 {
  font-size: 18px;
  margin: 0;
  flex: 1;
}

.analysis-header .modal-close-btn {
  flex-shrink: 0;
}

.analysis-image-container {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-secondary);
}

.analysis-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.analysis-content {
  padding: 20px;
}

/* Nutrition Grid */
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.nutrition-item {
  background: rgba(30, 41, 59, 0.6);
  padding: 14px;
  border-radius: 12px;
  text-align: center;
}

.nutrition-item.calories {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(249, 115, 22, 0.1));
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.nutrition-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.nutrition-item.calories .nutrition-value {
  font-size: 32px;
  color: #fb923c;
}

.nutrition-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Meal Details */
.meal-details-section {
  margin-top: 16px;
}

.meal-details-section h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.meal-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meal-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 10px;
}

.meal-detail-item span:first-child {
  color: var(--text-secondary);
}

.meal-detail-item span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.analysis-actions {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  position: sticky;
  bottom: 0;
}

.analysis-actions button {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
}

.analysis-actions .primary-btn {
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #FFD700;
}

.analysis-actions .secondary-btn {
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* ==================== FILTERS ==================== */
.filter-section {
  margin-bottom: 24px;
}

.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-pill.active {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border-color: transparent;
  color: var(--bg-primary);
  font-weight: 600;
}

.filter-pill:active {
  transform: scale(0.96);
}

/* ==================== CATEGORIES ==================== */
.categories-section {
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.see-all-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-teal);
}

.categories-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  min-width: 80px;
}

.category-card:active {
  transform: scale(0.95);
  background: var(--bg-card-hover);
}

.category-emoji {
  font-size: 28px;
}

.category-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==================== MEAL CARDS ==================== */
.meals-section {
  margin-bottom: 24px;
}

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

.meal-card {
  border-radius: 16px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.meal-card:active {
  transform: scale(0.98);
  background: #252a35;
}

.meal-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.meal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.meal-card:active .meal-image img {
  transform: scale(1.05);
}

.meal-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}

.badge {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  transition: all var(--transition-fast);
}

.favorite-btn.filled {
  background: var(--accent-red);
  color: white;
}

.meal-info {
  padding: 12px;
}

.meal-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  line-height: 1.3;
}

.meal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.match-score {
  color: var(--accent-green);
  font-weight: 600;
}

.meal-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.tag.healthy {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-green);
}

.tag.comfort {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
}

/* ==================== NAV SPACER ==================== */
.nav-spacer {
  height: 80px;
}

.nav-spacer.extra {
  height: 110px;
}

/* ==================== BOTTOM NAVIGATION ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 18px 8px calc(18px + var(--safe-bottom));
  /* Transparent Fuzzy Glassmorphism - Very See-Through */
  background: rgba(15, 20, 40, 0.2);
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  /* Subtle shadows */
  box-shadow: 
    0 -8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
  z-index: 100;
}

/* Top edge highlight */
.bottom-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.15) 30%,
    transparent 45%,
    transparent 55%,
    rgba(255, 255, 255, 0.15) 70%, 
    transparent 100%);
  border-radius: 28px;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-width: 0;
}

.nav-item:active {
  transform: scale(0.92);
}

/* SVG Icon Styles */
.nav-icon-svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-tertiary);
  opacity: 0.7;
  transition: all var(--transition-fast);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-item.active .nav-icon-svg {
  stroke: var(--accent-teal);
  opacity: 1;
  filter: drop-shadow(0 2px 8px rgba(45, 212, 191, 0.4));
}

.nav-icon {
  font-size: 26px;
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  opacity: 0.8;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-align: center;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-item.active .nav-label {
  color: var(--accent-teal);
  opacity: 1;
}

/* Monica Button - Center Navigation Item - Elevated */
.nav-item.monica-nav-btn {
  position: relative;
  flex: 1.2;
  padding-top: 0;
  margin-top: -30px;
  z-index: 10;
}

.nav-item.monica-nav-btn .monica-btn-glow {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 165, 0, 0.15) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: monicaGoldPulse 2.5s ease-in-out infinite;
}

@keyframes monicaGoldPulse {
  0%, 100% { 
    opacity: 0.6; 
    transform: translateX(-50%) scale(1);
    filter: blur(10px);
  }
  50% { 
    opacity: 1; 
    transform: translateX(-50%) scale(1.12);
    filter: blur(14px);
  }
}

.monica-icon-wrapper {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Transparent Fuzzy Glass - Very See-Through */
  background: rgba(20, 20, 45, 0.25);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 
    0 6px 28px rgba(255, 215, 0, 0.3),
    0 0 35px rgba(255, 165, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}

/* Inner glass reflection */
.monica-icon-wrapper::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 10%;
  right: 10%;
  height: 30%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  border-radius: 50% 50% 40% 40%;
  pointer-events: none;
}

.monica-mic-svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
  animation: micGlitter 3s ease-in-out infinite;
}

@keyframes micGlitter {
  0%, 100% { 
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
  }
  50% { 
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 20px rgba(255, 165, 0, 0.4));
  }
}

.nav-item.monica-nav-btn:active .monica-icon-wrapper {
  transform: scale(0.92);
  box-shadow: 
    0 2px 10px rgba(255, 215, 0, 0.2),
    0 0 15px rgba(255, 165, 0, 0.15);
}

.nav-item.monica-nav-btn .nav-label {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(255, 215, 0, 0.9);
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
}

/* Legacy styles (keep for backwards compatibility) */
.nav-item.monica-nav-btn .monica-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
  border-radius: 50%;
  font-size: 24px;
  opacity: 1;
  box-shadow: 
    0 8px 24px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.15);
  transition: all var(--transition-base);
}

.nav-item.center {
  flex: 1.2;
  position: relative;
  margin-top: -20px;
  padding-bottom: 0;
}

.nav-icon-center {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--bg-primary);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.35);
  transition: all var(--transition-fast);
}

.nav-item.center:active .nav-icon-center {
  transform: scale(0.95);
}

/* ==================== INGREDIENTS SCREEN ==================== */
.input-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.input-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: 14px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-fast);
}

.input-method-card.active {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
}

.input-method-card:active {
  transform: scale(0.95);
  background: #252a35;
}

.method-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #252a35;
  border-radius: 10px;
  font-size: 18px;
}

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

.method-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

/* Search */
.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.6;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border-radius: 14px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-fast);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.4);
  background: #252a35;
}

/* Selected Ingredients */
.selected-ingredients {
  margin-bottom: 24px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--accent-teal);
  color: var(--bg-primary);
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

.clear-btn {
  font-size: 13px;
  font-weight: 600;
  color: #ff6b6b;
  padding: 8px 14px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.clear-btn:active {
  background: rgba(255, 107, 107, 0.2);
}

.selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ingredient-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(96, 165, 250, 0.1));
  border: 1px solid var(--border-accent);
  font-size: 14px;
  font-weight: 500;
}

.remove-chip {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Ingredient Categories */
.ingredient-categories h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ═══════════ FRIDGE GLASS SECTION ═══════════ */
.fridge-glass-section {
  padding: 16px;
}

.ingredient-category {
  margin-bottom: 20px;
}

/* Glass Category Card */
.ingredient-category.glass-category {
  background: rgba(15, 25, 40, 0.4);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.ingredient-category.glass-category:hover {
  border-color: rgba(255, 215, 0, 0.2);
  box-shadow: 
    0 6px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(255, 215, 0, 0.05);
}

.ingredient-category h3 {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
}

.ingredient-category.glass-category h3 {
  font-size: 15px;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  letter-spacing: 0.5px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

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

.ingredient-btn {
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(20, 30, 50, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.25s ease;
  cursor: pointer;
}

.ingredient-btn:hover {
  background: rgba(30, 45, 70, 0.7);
  border-color: rgba(255, 215, 0, 0.25);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Single tap - selected but not yet added */
.ingredient-btn.selected {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.4);
  color: #FFD700;
  transform: scale(1.02);
  box-shadow: 
    0 0 0 2px rgba(255, 215, 0, 0.2),
    0 4px 16px rgba(255, 215, 0, 0.15);
}

/* Double tap - added to inventory */
.ingredient-btn.in-inventory {
  background: rgba(255, 215, 0, 0.2);
  border-color: #FFD700;
  color: #FFD700;
  font-weight: 600;
  transform: scale(1.02);
  box-shadow: 
    0 0 15px rgba(255, 215, 0, 0.25),
    0 0 30px rgba(255, 215, 0, 0.1);
}

.ingredient-btn.in-inventory::after {
  content: ' ✓';
  font-weight: 700;
}

.ingredient-btn:active {
  transform: scale(0.95);
}

/* Sticky Bottom */
.sticky-bottom {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 398px;
  z-index: 50;
}

.primary-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 14px;
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.4);
  font-size: 16px;
  font-weight: 700;
  color: #FFD700;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.1);
  transition: all var(--transition-fast);
}

.primary-btn:active {
  transform: scale(0.98);
  background: #353a45;
}

.primary-btn.large {
  padding: 18px 28px;
  font-size: 17px;
}

.btn-badge {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.15);
  font-size: 13px;
  font-weight: 600;
}

.btn-icon {
  font-size: 20px;
}

/* ==================== RESULTS SCREEN ==================== */
.results-filter {
  margin-bottom: 16px;
}

.mode-toggle-section {
  margin-bottom: 20px;
}

.mode-toggle {
  display: flex;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.mode-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  z-index: 1;
}

.mode-btn.active {
  color: var(--bg-primary);
}

.mode-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  transition: transform var(--transition-base);
}

/* Results List */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.result-card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.result-card:active {
  transform: scale(0.99);
}

.result-card.featured {
  border-color: var(--border-accent);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.08), rgba(96, 165, 250, 0.05));
}

.result-badge {
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.2), transparent);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-teal);
}

.result-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

.result-image-small {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.result-card:not(.featured) {
  display: flex;
  padding: 12px;
  gap: 14px;
}

.result-content {
  padding: 14px;
  flex: 1;
}

.result-card:not(.featured) .result-content {
  padding: 0;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.result-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.match-percent {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 700;
}

.result-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.result-stats {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.result-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-ingredients span {
  font-size: 12px;
  font-weight: 500;
}

.result-ingredients .has {
  color: var(--accent-green);
}

.result-ingredients .missing {
  color: var(--accent-amber);
}

.result-ingredients.mini {
  gap: 10px;
}

/* ==================== RESULTS SCREEN ==================== */
#screen-results {
  overscroll-behavior-y: contain; /* Disable native pull-to-refresh */
}

/* ==================== MEAL DETAIL SCREEN ==================== */
#screen-meal-detail {
  padding: 0;
  overscroll-behavior-y: contain; /* Disable native pull-to-refresh */
}

.detail-emoji {
  font-size: 120px;
  text-align: center;
  padding: 60px 0;
}

.ingredient-item.available {
  color: var(--accent-green);
}

.ingredient-item.missing {
  color: var(--text-tertiary);
}

.ingredient-item.missing .ingredient-check {
  color: var(--text-muted);
}

.detail-header {
  position: absolute;
  top: var(--safe-top);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  z-index: 10;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.icon-btn.light {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.1);
}

.icon-btn.favorite {
  color: var(--accent-red);
}

.detail-hero {
  position: relative;
  height: 320px;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-emoji-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-emoji {
  font-size: 120px;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

.hero-ai-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.hero-ai-image:active {
  transform: scale(0.98);
}

.hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
}

/* Generate Photo Button */
.generate-photo-btn {
  position: absolute;
  bottom: 80px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  z-index: 10;
}

.generate-photo-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.generate-photo-btn:active {
  transform: scale(0.95);
}

.generate-photo-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.generate-photo-btn.loading .gen-icon {
  animation: pulse 1s infinite;
}

.generate-photo-btn.queued {
  pointer-events: none;
  opacity: 0.8;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.generate-photo-btn.queued .gen-icon {
  animation: bounce 1s infinite;
}

.generate-photo-btn.generated {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
}

.gen-icon {
  font-size: 18px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.detail-content {
  position: relative;
  margin-top: -40px;
  padding: 0 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 30px);
}

.detail-title-section {
  margin-bottom: 20px;
}

.detail-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.badge-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.detail-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.2;
}

.detail-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-teal);
}

.stat-label {
  font-size: 9px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Version Toggle */
.version-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.version-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.version-btn.active {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(96, 165, 250, 0.1));
  border-color: var(--accent-teal);
}

.version-btn.not-generated {
  opacity: 0.7;
}

.version-btn.not-generated .version-cal {
  color: var(--accent-teal);
  font-weight: 600;
}

.version-btn:active {
  transform: scale(0.98);
}

.version-icon {
  font-size: 24px;
}

.version-text {
  font-size: 14px;
  font-weight: 700;
}

.version-cal {
  font-size: 12px;
  color: var(--text-tertiary);
}

.version-btn.active .version-cal {
  color: var(--accent-teal);
}

/* Health Changes Section */
.health-changes-section {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(45, 212, 191, 0.08));
  border-radius: var(--radius-lg);
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.health-changes-section h4 {
  margin-bottom: 10px;
  color: var(--accent-green);
  font-size: 13px;
}

.health-changes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-change-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.health-change-item .change-icon {
  color: var(--accent-green);
  font-size: 11px;
  flex-shrink: 0;
}

.health-change-item.calories-saved {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(34, 197, 94, 0.2);
}

.health-change-item.calories-saved .change-text {
  color: var(--accent-teal);
}

/* Detail Sections */
.detail-section {
  margin-bottom: 24px;
}

.detail-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* Nutrition */
.nutrition-details {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-subtle);
}

.nutrition-details h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

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

.nutrition-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.nutrition-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.nutrition-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nutrition-bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.nutrition-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--percent);
  background: var(--color);
  border-radius: var(--radius-full);
}

.nutrition-value {
  font-size: 16px;
  font-weight: 700;
}

.nutrition-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Ingredients Checklist */
.ingredients-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Ingredients Summary */
.ingredients-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.ingredients-summary .summary-icon {
  font-size: 20px;
}

.ingredients-summary .summary-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
}

.ingredients-summary .summary-text strong {
  color: var(--accent-teal);
}

.ingredients-summary .ready-badge {
  padding: 4px 10px;
  background: var(--accent-green);
  color: white;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.ingredient-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ingredient-check.have-it {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.ingredient-check.need-it {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.3);
}

.ingredient-check input {
  display: none;
}

.check-icon {
  font-size: 18px;
  min-width: 24px;
  text-align: center;
}

.ingredient-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.ingredient-measure {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.status-tag {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-tag.have {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
}

.status-tag.need {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-amber);
}

.optional-tag {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: 600;
}

/* Steps Preview */
.steps-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.step-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-item.more {
  opacity: 0.6;
}

.step-item.more .step-number {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

/* Media Options */
.media-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.media-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.media-card:active {
  transform: scale(0.98);
}

.media-preview {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

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

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.ai-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.media-label {
  display: block;
  padding: 10px 12px 2px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.media-source {
  display: block;
  padding: 0 12px 10px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: left;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  padding: 16px;
  padding-bottom: 16px;
  background: linear-gradient(to top, var(--bg-primary) 80%, transparent);
  z-index: 50;
}

/* ==================== COOKING SCREEN ==================== */
#screen-cooking {
  padding: 0;
  background: var(--bg-secondary);
  overscroll-behavior-y: contain; /* Disable native pull-to-refresh */
}

.cooking-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  padding-top: calc(16px + var(--safe-top));
}

.cooking-progress {
  flex: 1;
}

.step-indicator {
  display: block;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.progress-bar {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.cooking-content {
  padding: 0 16px;
  padding-bottom: calc(100px + var(--nav-height) + var(--safe-bottom));
}

.cooking-step-image {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.cooking-step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-emoji-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
}

.step-emoji {
  font-size: 80px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.3));
}

.step-ai-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.step-ai-image:active {
  transform: scale(0.98);
}

.cooking-step-image {
  position: relative;
}

.generate-step-photo-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  z-index: 5;
}

.generate-step-photo-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

.generate-step-photo-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.generate-step-photo-btn.queued {
  pointer-events: none;
  opacity: 0.8;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.generate-step-photo-btn.regenerate {
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
}

/* Step Ingredients */
.step-ingredients {
  margin: 16px 0;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-teal);
}

.step-ingredients h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-ingredients ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.step-ingredients li {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.step-ingredients li strong {
  color: var(--accent-teal);
  font-weight: 700;
  margin-right: 4px;
}

/* Ingredient measurements in meal detail */
.ingredient-measure {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--accent-teal);
  color: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

.ingredient-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ingredient-check .ingredient-name {
  flex: 1;
}

.cooking-instruction {
  padding-bottom: 120px;
}

.step-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

.step-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.step-tips {
  margin-bottom: 20px;
}

.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.tip-icon {
  font-size: 20px;
}

.tip-text {
  font-size: 14px;
  color: var(--accent-amber);
  line-height: 1.5;
}

.step-timer {
  margin-bottom: 20px;
}

.timer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.timer-btn:active {
  transform: scale(0.98);
}

.timer-icon {
  font-size: 20px;
}

.timer-text {
  font-size: 15px;
  font-weight: 600;
}

.cooking-nav {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  gap: 10px;
  padding: 16px;
  padding-bottom: 16px;
  background: linear-gradient(to top, var(--bg-secondary) 80%, transparent);
  z-index: 50;
}

.nav-step-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-step-btn.primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border-color: transparent;
  color: var(--bg-primary);
}

.nav-step-btn:active {
  transform: scale(0.98);
}

/* ==================== BROWSE SCREEN ==================== */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 8px;
}

.browse-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.browse-card:active {
  transform: scale(0.98);
  background: var(--bg-card-hover);
}

.browse-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.browse-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.browse-card p {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ==================== FAVORITES SCREEN ==================== */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding-top: 8px;
}

/* ==================== PROFILE SCREEN ==================== */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 14px;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-tertiary);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.profile-stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-teal);
}

.stat-desc {
  font-size: 12px;
  color: var(--text-tertiary);
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.menu-item:active {
  transform: scale(0.99);
  background: var(--bg-card-hover);
}

.menu-icon {
  font-size: 22px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.menu-arrow {
  font-size: 18px;
  color: var(--text-muted);
}

/* ==================== MODALS ==================== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: #0d1520;
  border-radius: 20px 20px 0 0;
  padding: 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.modal.active .modal-content {
  transform: translateY(0);
}

/* Voice Modal */
.voice-modal {
  text-align: center;
  padding: 48px 24px;
}

.voice-animation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.voice-circle {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--accent-teal);
  animation: voicePulse 1.2s ease-in-out infinite;
}

.voice-circle:nth-child(2) {
  animation-delay: 0.2s;
}

.voice-circle:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes voicePulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(2.5); opacity: 1; }
}

.voice-modal h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.voice-modal p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-close-btn {
  padding: 14px 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  font-size: 16px;
  font-weight: 700;
  color: var(--bg-primary);
}

/* Camera Modal - Base styles overridden below */

.camera-frame {
  width: 70%;
  height: 50%;
  position: relative;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid var(--accent-teal);
}

.corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.camera-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  color: white;
  white-space: nowrap;
}

.camera-actions {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.capture-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #252a35;
  border: 2px solid rgba(255, 215, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.15);
}

/* Video Player Modal */
.video-player-modal {
  padding: 0;
  border-radius: 0;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.close-video-btn {
  position: absolute;
  top: calc(16px + var(--safe-top));
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  z-index: 10;
}

.video-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  gap: 16px;
}

.play-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
}

.video-play-overlay p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

/* Extra small phones (iPhone SE, Galaxy S Mini) */
@media (max-width: 374px) {
  .screen-content {
    padding: 12px;
  }
  
  .greeting-text {
    font-size: 12px;
  }
  
  .user-name,
  .greeting-question {
    font-size: 17px;
  }
  
  .section-title {
    font-size: 14px;
  }
  
  .quick-actions {
    gap: 10px;
    margin-bottom: 16px;
  }
  
  .inventory-btn {
    padding: 12px 10px;
    font-size: 13px;
  }
  
  .inventory-btn .btn-icon {
    font-size: 18px;
  }
  
  .input-method-card {
    padding: 10px 6px;
  }
  
  .method-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  
  .method-label {
    font-size: 10px;
  }
  
  .suggested-card {
    width: 130px;
  }
  
  .suggested-card img {
    height: 85px;
  }
  
  .suggested-card h4 {
    font-size: 12px;
  }
  
  .nav-label {
    font-size: 10px;
  }
  
  .nav-icon-svg {
    width: 26px;
    height: 26px;
  }
  
  .nav-icon {
    font-size: 22px;
  }
  
  .monica-icon-wrapper {
    width: 52px !important;
    height: 52px !important;
  }
  
  .nav-item.monica-nav-btn {
    margin-top: -26px;
  }
  
  .nav-item.monica-nav-btn .monica-btn-glow {
    width: 76px;
    height: 76px;
  }
}

/* Small phones (iPhone 8, standard Android) */
@media (min-width: 375px) and (max-width: 389px) {
  .screen-content {
    padding: 14px;
  }
  
  .suggested-card {
    width: 140px;
  }
}

/* Medium phones (iPhone X/11/12/13/14) */
@media (min-width: 390px) and (max-width: 413px) {
  /* Default sizing - optimized for this range */
}

/* Large phones (iPhone Plus/Max, large Android) */
@media (min-width: 414px) and (max-width: 430px) {
  .user-name,
  .greeting-question {
    font-size: 22px;
  }
  
  .section-title {
    font-size: 17px;
  }
  
  .inventory-btn {
    padding: 16px 14px;
  }
  
  .suggested-card {
    width: 160px;
  }
  
  .suggested-card img {
    height: 105px;
  }
}

/* Desktop wrapper */
@media (min-width: 431px) {
  body {
    background: #050a12;
  }
  
  #app {
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    box-shadow: 0 0 100px rgba(45, 212, 191, 0.05);
  }
}

/* ==================== HIDE SCROLLBARS ==================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ==================== CHAT SCREEN ==================== */
#screen-chat {
  flex-direction: column;
  height: calc(100vh - var(--safe-top) - 12px - var(--nav-height) - var(--safe-bottom));
  height: calc(100dvh - var(--safe-top) - 12px - var(--nav-height) - var(--safe-bottom));
  padding-bottom: 0;
  overflow: hidden;
  background: #0d1520;
  overscroll-behavior-y: contain; /* Disable native pull-to-refresh */
}

#screen-chat.active {
  display: flex;
}

#screen-chat .screen-header {
  flex-shrink: 0;
  background: #151c28;
  margin: 0 -16px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header-info {
  flex: 1;
}

.chat-header-info h1 {
  font-size: 18px;
  margin: 0;
  color: #FFD700;
}

.chat-status {
  font-size: 12px;
  color: rgba(255, 215, 0, 0.6);
}

.chat-messages {
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px;
  padding-bottom: calc(80px + var(--nav-height) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  touch-action: pan-y;
  scroll-behavior: smooth;
  background: #0d1520;
}

.chat-message {
  display: flex;
  gap: 10px;
  max-width: 90%;
  animation: messageIn 0.3s ease;
}

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

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.chat-message.user .message-avatar {
  display: none;
}

.message-content {
  padding: 12px 16px;
  border-radius: 16px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-message.user .message-content {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #FFD700;
}

.message-content p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.message-content p:last-child {
  margin-bottom: 0;
}

.chat-message.user .message-content p {
  color: #FFD700;
}

.message-content .chat-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-md);
  object-fit: cover;
  display: block;
}


.message-content ul {
  margin: 8px 0;
  padding-left: 20px;
  font-size: 14px;
}

.message-content li {
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.chat-meals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.chat-meal-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  transition: all var(--transition-fast);
}

.chat-meal-card:active {
  transform: scale(0.98);
  background: #252a35;
}

.meal-emoji {
  font-size: 24px;
}

.chat-meal-card .meal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-meal-card .meal-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.chat-meal-card .meal-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.chat-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-ingredient {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--border-accent);
  font-size: 12px;
  color: var(--accent-teal);
}

/* Chat Recipe Action Button */
.chat-recipe-action {
  margin-top: 12px;
}

.chat-recipe-card {
  background: #1a2030;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 16px;
  margin: 8px 0;
}

.recipe-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recipe-emoji {
  font-size: 28px;
}

.recipe-name {
  font-size: 18px;
  font-weight: 700;
  color: #FFD700;
}

.recipe-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
  line-height: 1.4;
}

.generate-recipe-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  color: #FFD700;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
  box-shadow: 
    0 4px 0 #15803d,
    0 6px 12px rgba(22, 163, 74, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  position: relative;
  top: 0;
}

.generate-recipe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #15803d,
    0 10px 20px rgba(22, 163, 74, 0.5);
}

.generate-recipe-btn:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #15803d,
    0 3px 6px rgba(22, 163, 74, 0.3);
}

.generate-recipe-btn span {
  font-size: 18px;
}

/* Beverage suggestion button in chat */
.chat-beverage-action {
  margin-top: 12px;
}

.generate-beverage-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #2d1f3d 0%, #1a1225 100%);
  border: 1px solid rgba(147, 51, 234, 0.4);
  border-radius: 12px;
  color: #c084fc;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
  box-shadow: 
    0 4px 0 #581c87,
    0 6px 12px rgba(147, 51, 234, 0.3);
  /* Mobile touch support */
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(147, 51, 234, 0.3);
  user-select: none;
  -webkit-user-select: none;
}

.generate-beverage-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #581c87,
    0 10px 20px rgba(147, 51, 234, 0.5);
  background: linear-gradient(135deg, #3d2a52 0%, #251830 100%);
}

.generate-beverage-btn:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #581c87,
    0 3px 6px rgba(147, 51, 234, 0.3);
}

.generate-beverage-btn span {
  font-size: 18px;
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-tertiary);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Chat Input */
.chat-input-container {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  /* Glassmorphism effect - more transparent */
  background: rgba(15, 22, 35, 0.45);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  overflow: visible;
  z-index: 60;
  max-width: 430px;
  margin: 0 auto;
}

.chat-voice-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--transition-fast);
}

.chat-voice-btn.recording {
  background: var(--accent-red);
  border-color: var(--accent-red);
  animation: pulse 1s infinite;
}

/* Live Chat Button - Glassmorphism */
.live-chat-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* Glassmorphism */
  background: rgba(255, 215, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.live-chat-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.chat-image-menu-container {
  position: relative;
  z-index: 100;
}

.chat-camera-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* Glassmorphism */
  background: rgba(255, 215, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.chat-camera-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.4);
}

.chat-camera-btn:active {
  transform: scale(0.95);
}

.chat-image-menu {
  position: absolute;
  bottom: 54px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transform-origin: bottom left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  pointer-events: none;
}

.chat-image-menu::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 16px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #252542;
}

.chat-image-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.image-menu-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  white-space: nowrap;
}

.image-menu-option:hover {
  background: rgba(255, 215, 0, 0.1);
}

.image-menu-option:active {
  transform: scale(0.98);
  background: rgba(255, 215, 0, 0.15);
}

.image-menu-option svg {
  flex-shrink: 0;
}

.live-chat-btn.active {
  background: rgba(255, 100, 100, 0.2);
  border-color: rgba(255, 100, 100, 0.5);
  animation: livePulse 1.5s ease-in-out infinite;
}

.live-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  opacity: 0;
  pointer-events: none;
}

.live-chat-btn.active .live-pulse {
  animation: livePulseRing 1.5s ease-out infinite;
}

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

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

/* ==================== RECIPE ASSISTANT (Floating Voice Button) ==================== */
.recipe-assistant-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 80px);
  right: 20px;
  width: 70px;
  height: 70px;
  flex-direction: column;
  gap: 2px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 22px;
  cursor: pointer;
  z-index: 1000;
  display: none; /* Hidden by default, shown via JS */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.recipe-assistant-fab:hover {
  transform: scale(1.05);
}

/* Connecting state */
.recipe-assistant-fab.connecting {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  animation: fab-pulse-connecting 1s ease-in-out infinite;
}

@keyframes fab-pulse-connecting {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Connected/Ready state - tap and hold to talk */
.recipe-assistant-fab.connected {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

/* Speaking/Recording state - user is holding button */
.recipe-assistant-fab.speaking {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 30px rgba(239, 68, 68, 0.6);
  transform: scale(1.1);
}

.recipe-assistant-fab.speaking .fab-pulse {
  animation: pulse-ring 1s ease-out infinite;
}

.fab-icon {
  position: relative;
  font-size: 24px;
  line-height: 1;
}

.fab-text {
  font-size: 10px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: -2px;
  z-index: 2;
  pointer-events: none;
}

.fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  z-index: 1;
  opacity: 0;
}

.fab-status {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  white-space: nowrap;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 8px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.recipe-assistant-fab.connecting .fab-status,
.recipe-assistant-fab.connected .fab-status,
.recipe-assistant-fab.speaking .fab-status {
  opacity: 1;
}

/* Live Chat Modal - Glassmorphism */
.live-chat-modal {
  padding: 0;
  height: auto;
  max-height: 85vh;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  /* Glassmorphism effect - more transparent */
  background: rgba(13, 21, 32, 0.5);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  margin: auto 16px;
  overflow: hidden;
}

/* Character Avatar Wrapper with Switcher Arrows */
.character-avatar-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto;
}

.character-video-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.character-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.character-arrow:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.4);
  color: #FFD700;
  transform: scale(1.1);
}

.character-arrow:active {
  transform: scale(0.95);
}

.character-arrow svg {
  width: 16px;
  height: 16px;
}

/* Character Video Container (renamed from monica-video-container) */
.character-video-container {
  position: relative;
  width: 180px;
  height: 180px;
  min-height: 180px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 0 25px rgba(255, 215, 0, 0.2),
    0 8px 30px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 215, 0, 0.3);
  background: #0d1520;
  transition: box-shadow 0.3s ease, border 0.3s ease;
}

.character-video-container.speaking {
  box-shadow: 
    0 0 40px rgba(255, 215, 0, 0.4),
    0 0 60px rgba(255, 165, 0, 0.2),
    0 8px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 215, 0, 0.5);
}

.character-video-container.listening {
  box-shadow: 
    0 0 30px rgba(255, 100, 100, 0.3),
    0 8px 30px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 100, 100, 0.5);
  background: #0d1520;
}

/* Character Name Badge - Below Video */
.character-name {
  text-align: center;
  padding: 6px 0 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #FFD700;
  letter-spacing: 0.5px;
}

/* Character Videos */
.character-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.character-video.active {
  opacity: 1;
}

/* Hide non-active character videos */
.character-video.monica-video {
  display: block;
}

.character-video.adam-video {
  display: none;
}

.character-video-container.adam .monica-video {
  display: none;
}

.character-video-container.adam .adam-video {
  display: block;
}

/* Legacy support - keep monica-video class working */
.monica-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.monica-video.active {
  opacity: 1;
}

.live-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  /* Glassmorphism header - more transparent */
  background: rgba(21, 28, 40, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.live-chat-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.live-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  /* Glassmorphism button */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.live-close-btn:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.95);
}

/* Live Chat Context Toggles */
.live-context-toggles {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.context-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.context-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.context-toggle .toggle-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.context-toggle input[type="checkbox"] {
  display: none;
}

.context-toggle .toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: #ef4444;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.context-toggle .toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.context-toggle input[type="checkbox"]:checked + .toggle-switch {
  background: #22c55e;
}

.context-toggle input[type="checkbox"]:checked + .toggle-switch::after {
  left: 18px;
}

/* OFF state styling */
.context-toggle:has(input:not(:checked)) {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.context-toggle:has(input:not(:checked)) .toggle-label {
  color: rgba(255, 255, 255, 0.5);
}

/* ON state styling */
.context-toggle:has(input:checked) {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.context-toggle:has(input:checked) .toggle-label {
  color: #4ade80;
}

/* Dietary toggles (Keto, Vegetarian) - special styling */
.context-toggle.dietary-toggle {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.25);
}

.context-toggle.dietary-toggle:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
}

.context-toggle.dietary-toggle .toggle-switch {
  background: #6b7280;
}

.context-toggle.dietary-toggle input[type="checkbox"]:checked + .toggle-switch {
  background: #8b5cf6;
}

.context-toggle.dietary-toggle:has(input:not(:checked)) {
  border-color: rgba(107, 114, 128, 0.4);
  background: rgba(107, 114, 128, 0.1);
}

.context-toggle.dietary-toggle:has(input:not(:checked)) .toggle-label {
  color: rgba(255, 255, 255, 0.5);
}

.context-toggle.dietary-toggle:has(input:checked) {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.15);
}

.context-toggle.dietary-toggle:has(input:checked) .toggle-label {
  color: #a78bfa;
}

/* Mobile adjustments for toggles */
@media (max-width: 480px) {
  .live-context-toggles {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
  }
  
  .context-toggle {
    padding: 5px 8px;
    gap: 5px;
    flex: 0 0 calc(50% - 3px);
  }
  
  .context-toggle .toggle-label {
    font-size: 10px;
  }
  
  .context-toggle .toggle-switch {
    width: 32px;
    height: 18px;
  }
  
  .context-toggle .toggle-switch::after {
    width: 10px;
    height: 10px;
  }
  
  .context-toggle input[type="checkbox"]:checked + .toggle-switch::after {
    left: 16px;
  }
}

@media (max-width: 340px) {
  .context-toggle {
    flex: 0 0 100%;
  }
}

/* Text Chat Ingredients Toggle */
.text-chat-toggles {
  display: flex;
  justify-content: center;
  padding: 10px 15px;
  background: rgba(21, 28, 40, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.text-chat-toggles .context-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.text-chat-toggles .context-toggle:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.text-chat-toggles .toggle-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  white-space: nowrap;
}

/* OFF state for text chat toggle */
.text-chat-toggles .context-toggle:has(input:not(:checked)) {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
}

.text-chat-toggles .context-toggle:has(input:not(:checked)) .toggle-label {
  color: rgba(255, 255, 255, 0.5);
}

/* ON state for text chat toggle */
.text-chat-toggles .context-toggle:has(input:checked) {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.15);
}

.text-chat-toggles .context-toggle:has(input:checked) .toggle-label {
  color: #4ade80;
}

.live-chat-status {
  padding: 20px;
  text-align: center;
}

.live-connecting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
}

.live-connecting .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.live-visualizer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 80px;
}

.audio-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 50px;
  margin-bottom: 12px;
}

.audio-wave span {
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, #FFD700, #FFA500);
  border-radius: 2px;
  animation: audioWave 1s ease-in-out infinite;
}

.audio-wave span:nth-child(1) { animation-delay: 0s; }
.audio-wave span:nth-child(2) { animation-delay: 0.1s; }
.audio-wave span:nth-child(3) { animation-delay: 0.2s; }
.audio-wave span:nth-child(4) { animation-delay: 0.3s; }
.audio-wave span:nth-child(5) { animation-delay: 0.4s; }
.audio-wave span:nth-child(6) { animation-delay: 0.5s; }
.audio-wave span:nth-child(7) { animation-delay: 0.6s; }
.audio-wave span:nth-child(8) { animation-delay: 0.7s; }
.audio-wave span:nth-child(9) { animation-delay: 0.8s; }
.audio-wave span:nth-child(10) { animation-delay: 0.9s; }

@keyframes audioWave {
  0%, 100% { height: 20px; }
  50% { height: 50px; }
}

.live-visualizer.speaking .audio-wave span {
  animation-duration: 0.5s;
}

.live-visualizer.listening .audio-wave span {
  background: linear-gradient(180deg, #ff6b6b, #ee5a5a);
}

.live-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin: 0;
}

.live-transcript {
  max-height: 100px;
  overflow-y: auto;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.live-transcript-item {
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  font-size: 13px;
}

.live-transcript-item.user {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
  margin-left: 30px;
}

.live-transcript-item.assistant {
  background: #252a35;
  color: rgba(255, 255, 255, 0.85);
  margin-right: 30px;
}

/* Voice Image Preview */
.voice-image-preview {
  position: relative;
  margin: 12px 20px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 2px solid var(--accent-teal);
}

.voice-image-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.voice-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.voice-image-hint {
  display: block;
  padding: 8px 12px;
  background: rgba(45, 212, 191, 0.1);
  text-align: center;
  font-size: 12px;
  color: var(--accent-teal);
}

.voice-upload-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-upload-btn:active {
  transform: scale(0.95);
  background: #353a45;
}

/* Live Recipe Action Button */
.live-recipe-action {
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #151c28;
  animation: slideUp 0.3s ease-out;
}

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

.live-recipe-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #FFD700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.15);
}

.live-recipe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}

.live-recipe-btn:active {
  transform: scale(0.98);
  background: #353a45;
}

.recipe-btn-icon {
  font-size: 20px;
}

.recipe-btn-text {
  font-family: var(--font-body);
}

/* Manual mode styling - orange/warning color */
.live-recipe-action.manual-mode .live-recipe-btn {
  border-color: rgba(255, 165, 0, 0.5);
  color: #FFA500;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.15);
  animation: pulse-orange 2s infinite;
}

.live-recipe-action.manual-mode .live-recipe-btn:hover {
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.25);
}

@keyframes pulse-orange {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.15);
  }
  50% {
    box-shadow: 0 4px 25px rgba(255, 165, 0, 0.3);
  }
}

/* Live Wine Action Button - SEPARATE from recipe button */
.live-wine-action {
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #151c28;
  animation: slideUp 0.3s ease-out;
}

.live-wine-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2d1f3d 0%, #1a1225 100%);
  border: 1px solid rgba(147, 51, 234, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #c084fc;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(147, 51, 234, 0.3);
}

.live-wine-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.3);
  background: linear-gradient(135deg, #3d2a52 0%, #251830 100%);
}

.live-wine-btn:active {
  transform: scale(0.98);
}

.wine-btn-icon {
  font-size: 20px;
}

.wine-btn-text {
  font-family: var(--font-body);
}

/* Wine button pulse animation */
@keyframes pulse-purple {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
  }
  50% {
    box-shadow: 0 4px 25px rgba(147, 51, 234, 0.4);
  }
}

.live-wine-btn {
  animation: pulse-purple 2s infinite;
}

.live-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #151c28;
}

.push-to-talk-btn {
  flex: 2;
  padding: 14px 20px;
  border-radius: 30px;
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #FFD700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.push-to-talk-btn:active,
.push-to-talk-btn.recording {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #ef4444;
  color: white;
  transform: scale(0.98);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  animation: pttPulse 0.5s ease-in-out infinite;
}

.push-to-talk-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

@keyframes pttPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.8); }
}

.ptt-icon {
  font-size: 20px;
}

.live-end-btn {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Chat Instructions */
.chat-instruction {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 6px 0;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  font-size: 13px;
}

.inst-icon {
  font-size: 18px;
}

.chat-example {
  margin-top: 12px;
  padding: 10px;
  background: rgba(45, 212, 191, 0.1);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent-teal);
  font-style: italic;
}

.chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  /* Glassmorphism input */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.chat-input:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.chat-send-btn {
  min-width: 60px;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  /* Glassmorphism button */
  background: rgba(255, 215, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 
    0 2px 8px rgba(255, 215, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #FFD700;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.chat-send-btn:active {
  transform: scale(0.95);
  background: #353a45;
}

/* ==================== VOICE MODAL UPDATES ==================== */
.voice-modal {
  text-align: center;
  padding: 32px 24px;
}

.voice-animation.active .voice-circle {
  animation: voicePulse 1.2s ease-in-out infinite;
}

.voice-transcript {
  min-height: 60px;
  padding: 16px;
  margin: 16px 0;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  font-size: 16px;
  color: var(--text-primary);
  font-style: italic;
}

.voice-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.voice-actions .modal-close-btn {
  flex: 1;
  max-width: 140px;
}

.modal-close-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.modal-close-btn.primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  color: var(--bg-primary);
}

.modal-close-btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== CAMERA MODAL UPDATES ==================== */
.camera-modal {
  padding: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  background: #0d1520;
}

.camera-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  padding-top: calc(16px + var(--safe-top));
  background: #151c28;
}

.camera-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #252a35;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.camera-header span {
  font-size: 16px;
  font-weight: 600;
}

.camera-preview {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

#camera-video,
#analyzer-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  background: #151c28;
}

.camera-flip-btn,
.camera-gallery-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #252a35;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.camera-flip-btn:active,
.camera-gallery-btn:active {
  transform: scale(0.95);
  background: #353a45;
}

.camera-actions .capture-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #252a35;
  border: 2px solid rgba(255, 215, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.15);
}

.camera-actions .capture-btn:active {
  transform: scale(0.95);
  background: #353a45;
}

.capture-icon {
  font-size: 32px;
}

/* Video Mode Toggle */
.camera-mode-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #151c28;
}

.mode-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.mode-toggle-btn.active {
  background: rgba(255, 215, 0, 0.15);
  color: #FFD700;
  border-color: rgba(255, 215, 0, 0.4);
}

.mode-toggle-btn svg {
  width: 16px;
  height: 16px;
}

/* Video Recording Button */
.video-btn {
  background: rgba(255, 100, 100, 0.2);
  border-color: rgba(255, 100, 100, 0.5);
  box-shadow: 0 8px 32px rgba(255, 100, 100, 0.2);
}

.video-btn.recording {
  animation: pulse-record 1s infinite;
}

@keyframes pulse-record {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 8px 40px rgba(239, 68, 68, 0.5); }
}

/* Video Timer */
.video-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
}

.timer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.timer-text {
  font-size: 18px;
  font-weight: 600;
  color: #ef4444;
  font-variant-numeric: tabular-nums;
}

.timer-countdown {
  font-size: 24px;
  font-weight: 700;
  color: #ef4444;
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  text-align: center;
}

.timer-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Flashlight button */
.camera-flash-btn {
  position: absolute;
  top: 60px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.camera-flash-btn:hover {
  background: rgba(0,0,0,0.7);
}

.camera-flash-btn.active {
  background: rgba(255, 193, 7, 0.3);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.camera-flash-btn span {
  font-size: 22px;
}

/* ==================== ANALYZING MODAL ==================== */
.analyzing-modal {
  text-align: center;
  padding: 40px 24px;
}

.analyzing-animation {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.analyzing-circle {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--accent-teal);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

.analyzing-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
}

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

.analyzing-modal h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.analyzing-modal p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ==================== CONFIRMATION MODAL ==================== */
.confirm-modal {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.confirm-header {
  padding: 20px 20px 16px;
  text-align: center;
}

.confirm-header h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.confirm-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
}

.confirm-ingredients-grid {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 50vh;
}

.confirm-ingredient-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  position: relative;
  transition: all var(--transition-fast);
}

.confirm-ingredient-item.selected {
  border-color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.1);
}

.confirm-emoji {
  font-size: 28px;
}

.confirm-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.confirm-qty {
  font-size: 12px;
  color: var(--text-tertiary);
}

.confirm-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--accent-teal);
  color: var(--bg-primary);
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
}

.confirm-ingredient-item.selected .confirm-check {
  display: flex;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.confirm-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.confirm-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.confirm-btn.primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.confirm-count {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.2);
  font-size: 13px;
}

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 40px;
}

.loading-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-icon {
  font-size: 80px;
  animation: bounce 1s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0, 212, 170, 0.4));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.thinking-dots {
  position: absolute;
  bottom: -10px;
  display: flex;
  gap: 6px;
}

.thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50% { transform: scale(1); opacity: 1; }
}

.loading-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 8px;
}

.loading-text {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.5;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 8px;
}

.loading-bar-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
  border-radius: var(--radius-full);
  animation: loading-progress 2s ease-in-out infinite;
}

@keyframes loading-progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-teal);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 20px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--bg-primary);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 400;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== KITCHEN INVENTORY SCREEN ==================== */
.quick-action-btn.secondary {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  margin-top: 12px;
}

.quick-action-btn.secondary:active {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card-hover));
}

.inventory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 0;
}

.stat-card {
  background: #1a2030;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 2px;
}

.stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.kitchen-inventory-container {
  padding: 0;
}

.current-inventory-section {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 16px 16px 24px;
}

.section-header-large {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-main {
  font-size: 18px;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.empty-state-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #1a2030;
  border-radius: 12px;
  border: 1px dashed var(--border-subtle);
}

.empty-icon-small {
  font-size: 32px;
  opacity: 0.6;
}

.empty-state-inline p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.inventory-count-badge {
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-teal);
}

.empty-hint {
  padding: 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

/* Meal Results */
.meal-emoji-large {
  font-size: 80px;
  text-align: center;
  padding: 40px 0;
}

.meal-emoji-display {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
}

.emoji-large {
  font-size: 64px;
}

.result-image-small .meal-emoji-display {
  border-radius: var(--radius-md);
}

.result-image-small .emoji-large {
  font-size: 48px;
}

.missing-items {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.meal-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 8px 0;
  line-height: 1.4;
}

.difficulty {
  text-transform: capitalize;
}

.missing-ingredients {
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.missing-label {
  font-weight: 600;
  color: var(--accent-amber);
  margin-right: 4px;
}

.cooking-tip {
  margin: 0 16px 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(96, 165, 250, 0.1));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cooking-tip strong {
  color: var(--accent-teal);
}

.match-badge {
  background: var(--accent-green);
  color: white;
  font-weight: 600;
}

#kitchen-selected-section .kitchen-inventory-container {
  padding: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-tertiary);
}

.inventory-category {
  margin-bottom: 24px;
}

.category-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-items {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.inventory-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

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

.inventory-item:active {
  background: var(--bg-elevated);
}

.item-emoji {
  font-size: 28px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.item-name {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: capitalize;
}

.item-qty {
  font-size: 14px;
  color: var(--text-tertiary);
  padding: 4px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.item-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.item-remove:hover {
  background: var(--bg-elevated);
  color: var(--accent-red);
}

.item-remove:active {
  transform: scale(0.9);
}

/* ==================== MEAL PREFERENCES MODAL ==================== */
.preferences-modal {
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0d1520 !important;
}

.modal-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-top: 4px;
}

.preferences-form {
  padding: 0;
}

.pref-section {
  margin-bottom: 24px;
}

.pref-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.pref-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pref-chip {
  padding: 10px 16px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.pref-chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: #252a35;
}

.pref-chip.selected {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.4);
  color: #FFD700;
  font-weight: 600;
}

.pref-chip:active {
  transform: scale(0.95);
}

/* Recipe Mode Section */
.recipe-mode-section {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.recipe-mode-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Beverage Type Selection (inside recipe mode) */
.beverage-type-selection {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.1), rgba(0, 0, 0, 0.2));
  border-radius: 12px;
  border: 1px solid rgba(128, 0, 32, 0.2);
  animation: slideDown 0.3s ease;
}

.beverage-type-selection .pref-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Beverage Panels Container */
.beverage-panels-container {
  margin-bottom: 16px;
}

.pref-chip.mode-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: 14px;
  text-align: center;
}

.mode-chip .mode-icon {
  font-size: 24px;
}

.mode-chip .mode-text {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.mode-chip .mode-desc {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0.8;
}

.mode-chip.selected .mode-text {
  color: #FFD700;
}

.mode-chip.selected .mode-desc {
  color: rgba(255, 215, 0, 0.7);
}

/* Disabled mode chip (when inventory is empty) */
.mode-chip.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  position: relative;
}

.mode-chip.disabled::after {
  content: '🔒';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.mode-chip.disabled:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.05);
}

.mode-chip.disabled:active {
  transform: none;
}

/* ==================== BEVERAGE SECTION ==================== */
.beverage-section {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pref-badge {
  font-size: 10px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.beverage-chip {
  position: relative;
}

.beverage-chip.selected {
  background: rgba(139, 69, 19, 0.2);
  border-color: rgba(139, 69, 19, 0.5);
  color: #DEB887;
}

.beverage-chip[data-value="winery"].selected {
  background: rgba(128, 0, 32, 0.2);
  border-color: rgba(128, 0, 32, 0.5);
  color: #C41E3A;
}

.beverage-chip[data-value="cocktails"].selected {
  background: rgba(255, 165, 0, 0.15);
  border-color: rgba(255, 165, 0, 0.4);
  color: #FFA500;
}

.beverage-chip[data-value="mocktails"].selected {
  background: rgba(0, 191, 255, 0.15);
  border-color: rgba(0, 191, 255, 0.4);
  color: #00BFFF;
}

/* Beverage Sub-Panels */
.beverage-sub-panel {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.3s ease;
}

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

.sub-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-panel-header span {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.clear-beverage-btn {
  background: rgba(255, 100, 100, 0.15);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff6b6b;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-beverage-btn:hover {
  background: rgba(255, 100, 100, 0.25);
  border-color: rgba(255, 100, 100, 0.5);
}

/* Sparkling Toggle Switch */
.sparkling-toggle-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  top: 2px;
  left: 3px;
  transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
  background: rgba(255, 215, 0, 0.3);
  border-color: rgba(255, 215, 0, 0.5);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: #FFD700;
}

.toggle-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.toggle-label input[type="checkbox"]:checked ~ .toggle-text {
  color: #FFD700;
}

.sub-pref-group {
  margin-bottom: 14px;
}

.sub-pref-group:last-child {
  margin-bottom: 0;
}

.sub-pref-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.sub-chip {
  padding: 8px 12px;
  font-size: 13px;
}

/* Wine Panel specific */
.wine-panel {
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.1), rgba(0, 0, 0, 0.3));
  border-color: rgba(128, 0, 32, 0.2);
}

.wine-panel .sub-chip.selected {
  background: rgba(128, 0, 32, 0.25);
  border-color: rgba(196, 30, 58, 0.5);
  color: #C41E3A;
}

/* Wine Country Dropdown */
.wine-country-dropdown-container {
  margin-top: 12px;
}

.wine-country-dropdown {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background: rgba(128, 0, 32, 0.15);
  border: 1px solid rgba(196, 30, 58, 0.3);
  border-radius: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C41E3A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: all 0.3s ease;
}

.wine-country-dropdown:hover {
  background-color: rgba(128, 0, 32, 0.25);
  border-color: rgba(196, 30, 58, 0.5);
}

.wine-country-dropdown:focus {
  outline: none;
  border-color: #C41E3A;
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.2);
}

.wine-country-dropdown option {
  background: #1a0a10;
  color: #fff;
  padding: 10px;
}

.wine-country-dropdown optgroup {
  background: #2a0a15;
  color: #C41E3A;
  font-weight: 600;
  padding: 8px 0;
}

.wine-country-dropdown.has-selection {
  background-color: rgba(196, 30, 58, 0.2);
  border-color: #C41E3A;
  color: #C41E3A;
  font-weight: 500;
}

/* Cuisine Country Dropdown (Meal Preferences) */
.cuisine-dropdown-container {
  margin-top: 12px;
}

.cuisine-dropdown {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFD700' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: all 0.3s ease;
}

.cuisine-dropdown:hover {
  background-color: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 215, 0, 0.3);
}

.cuisine-dropdown:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.cuisine-dropdown option {
  background: #1e293b;
  color: #fff;
  padding: 10px;
}

.cuisine-dropdown optgroup {
  background: #0f172a;
  color: var(--gold);
  font-weight: 600;
  padding: 8px 0;
}

.cuisine-dropdown.has-selection {
  background-color: rgba(255, 215, 0, 0.1);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 500;
}

/* Cocktail Panel specific */
.cocktail-panel {
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.08), rgba(0, 0, 0, 0.3));
  border-color: rgba(255, 165, 0, 0.2);
}

.cocktail-panel .sub-chip.selected {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  color: #FFA500;
}

/* Mocktail Panel specific */
.mocktail-panel {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.08), rgba(0, 0, 0, 0.3));
  border-color: rgba(0, 191, 255, 0.2);
}

.mocktail-panel .sub-chip.selected {
  background: rgba(0, 191, 255, 0.2);
  border-color: rgba(0, 191, 255, 0.5);
  color: #00BFFF;
}

/* Grey out meal sections when beverage selected */
.meal-pref-section.disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.5);
  position: relative;
}

.meal-pref-section.disabled::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  cursor: not-allowed;
}

/* ==================== WINE RESULT CARDS ==================== */
.wine-result-card {
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.15), rgba(30, 20, 25, 0.95));
  border: 1px solid rgba(196, 30, 58, 0.3);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.wine-result-card:hover {
  border-color: rgba(196, 30, 58, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(128, 0, 32, 0.2);
}

.wine-result-card.featured {
  border-color: rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.2), rgba(40, 25, 30, 0.95));
}

.wine-card-content {
  display: flex;
  gap: 16px;
  padding: 20px;
}

.wine-bottle-image {
  width: 100px;
  height: 200px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wine-bottle-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.wine-details {
  flex: 1;
  min-width: 0; /* Allow flex child to shrink below content size */
  overflow: hidden;
}

.wine-rank {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.wine-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.wine-rating {
  color: #FFD700;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.wine-points {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.15));
  color: #FFD700;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 215, 0, 0.3);
  margin-left: 4px;
}

.rating-disclaimer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  margin-top: 4px;
  font-style: italic;
}

.wine-origin {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.wine-type-badge {
  display: inline-block;
  background: rgba(196, 30, 58, 0.2);
  border: 1px solid rgba(196, 30, 58, 0.4);
  color: #C41E3A;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.wine-description {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wine-description h4 {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.wine-description p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.wine-pairings {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.wine-pairings h4 {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.wine-pairings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pairing-tag {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.wine-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ==================== COCKTAIL RESULT CARDS ==================== */
.cocktail-result-card {
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.08), rgba(30, 25, 20, 0.95));
  border: 1px solid rgba(255, 165, 0, 0.25);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.cocktail-result-card.mocktail {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.08), rgba(20, 25, 30, 0.95));
  border-color: rgba(0, 191, 255, 0.25);
}

.cocktail-result-card:hover {
  border-color: rgba(255, 165, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 165, 0, 0.15);
}

.cocktail-result-card.mocktail:hover {
  border-color: rgba(0, 191, 255, 0.5);
  box-shadow: 0 8px 24px rgba(0, 191, 255, 0.15);
}

.cocktail-card-header {
  display: flex;
  gap: 16px;
  padding: 20px;
}

.cocktail-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  border-radius: 12px;
  overflow: hidden;
}

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

.cocktail-info {
  flex: 1;
}

.cocktail-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.cocktail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.cocktail-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-spirit {
  background: rgba(255, 165, 0, 0.2);
  border: 1px solid rgba(255, 165, 0, 0.4);
  color: #FFA500;
}

.badge-style {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.badge-strength {
  background: rgba(255, 100, 100, 0.15);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff8888;
}

.badge-non-alcoholic {
  background: rgba(0, 191, 255, 0.2);
  border: 1px solid rgba(0, 191, 255, 0.4);
  color: #00BFFF;
}

.cocktail-time {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.cocktail-body {
  padding: 0 20px 20px;
}

.cocktail-ingredients {
  margin-bottom: 16px;
}

.cocktail-ingredients h4 {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 10px;
}

.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.ingredient-amount {
  color: #FFD700;
  font-weight: 600;
  min-width: 60px;
}

.cocktail-instructions {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.cocktail-instructions h4 {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.cocktail-instructions p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* ==================== FULLSCREEN BEVERAGE DETAIL MODAL ==================== */
.fullscreen-modal .modal-backdrop {
  background: rgba(0, 0, 0, 0.95);
}

.fullscreen-modal-content {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 60px 20px 100px;
  -webkit-overflow-scrolling: touch;
}

.fullscreen-close-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 1002;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.zoom-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.zoom-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.zoom-btn:active {
  transform: scale(0.95);
}

/* Wine Fullscreen Detail */
.wine-fullscreen {
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.3s ease;
}

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

.wine-fullscreen-image {
  width: 100%;
  max-width: 300px;
  margin: 0 auto 24px;
  display: block;
  cursor: grab;
  transition: transform 0.2s ease;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.2), rgba(0, 0, 0, 0.3));
}

.wine-fullscreen-image.zoomed {
  cursor: move;
}

.wine-fullscreen-image img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.wine-fullscreen-header {
  text-align: center;
  margin-bottom: 24px;
}

.wine-fullscreen-rank {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 16px;
  margin-bottom: 12px;
}

.wine-fullscreen-name {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.wine-fullscreen-rating {
  color: #FFD700;
  font-size: 18px;
  margin-bottom: 8px;
}

.wine-fullscreen-origin {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.wine-fullscreen-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.wine-fullscreen-badge {
  display: inline-block;
  background: rgba(196, 30, 58, 0.2);
  border: 1px solid rgba(196, 30, 58, 0.4);
  color: #C41E3A;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

.wine-fullscreen-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.wine-fullscreen-section h4 {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wine-fullscreen-section p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.wine-fullscreen-pairings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wine-fullscreen-pairing {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
}

.wine-fullscreen-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  background: rgba(128, 0, 32, 0.15);
  border-radius: 16px;
  margin-top: 20px;
}

.wine-meta-item {
  text-align: center;
}

.wine-meta-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.wine-meta-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* Cocktail Fullscreen Detail */
.cocktail-fullscreen {
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.3s ease;
}

.cocktail-fullscreen-image {
  width: 100%;
  max-width: 280px;
  height: 280px;
  margin: 0 auto 24px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.1), rgba(0, 0, 0, 0.3));
  cursor: grab;
  transition: transform 0.2s ease;
}

.cocktail-fullscreen-image.mocktail {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(0, 0, 0, 0.3));
}

.cocktail-fullscreen-image.zoomed {
  cursor: move;
}

.cocktail-fullscreen-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.cocktail-fullscreen-header {
  text-align: center;
  margin-bottom: 24px;
}

.cocktail-fullscreen-name {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.cocktail-fullscreen-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cocktail-fullscreen-time {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.cocktail-fullscreen-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.cocktail-fullscreen-section h4 {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cocktail-fullscreen-ingredients {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cocktail-fullscreen-ingredient {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.ingredient-amount-full {
  font-size: 15px;
  font-weight: 700;
  color: #FFD700;
  min-width: 70px;
}

.mocktail .ingredient-amount-full {
  color: #00BFFF;
}

.ingredient-name-full {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.cocktail-fullscreen-instructions {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.cocktail-fullscreen-extras {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.cocktail-extra {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.cocktail-extra-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.cocktail-extra-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cocktail-extra-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-actions .secondary-btn,
.modal-actions .primary-btn {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-actions .secondary-btn {
  background: #1a2030;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-actions .secondary-btn:hover {
  background: #252a35;
}

.modal-actions .primary-btn {
  background: #252a35;
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #FFD700;
}

.modal-actions .primary-btn:active {
  transform: scale(0.98);
  background: #353a45;
}

/* ==================== FULLSCREEN IMAGE VIEWER ==================== */
.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
}

.image-viewer.active {
  display: flex;
}

/* Download Language Selection Modal */
.download-lang-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.download-lang-modal.active {
  display: flex;
}

.download-lang-content {
  background: linear-gradient(145deg, rgba(30, 40, 60, 0.98), rgba(20, 30, 50, 0.98));
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  max-width: 280px;
  width: 90%;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.download-lang-content h3 {
  font-size: 20px;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.download-lang-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

.download-lang-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.download-lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 75px;
}

.download-lang-btn:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
  transform: translateY(-2px);
}

.download-lang-btn:active {
  transform: scale(0.98);
}

.lang-flag {
  font-size: 28px;
  line-height: 1;
}

.lang-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

.download-lang-cancel {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-lang-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Share Progress Modal */
.share-progress-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.share-progress-modal.active {
  display: flex;
}

.share-progress-content {
  background: linear-gradient(145deg, rgba(30, 40, 60, 0.98), rgba(20, 30, 50, 0.98));
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  max-width: 300px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.share-progress-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: pulse-icon 1.5s ease-in-out infinite;
}

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

.share-progress-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.share-progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

.share-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.share-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary, #4ECDC4));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.share-progress-percent {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
  margin: 0;
}

.share-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.share-now-btn {
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
  transition: all 0.3s ease;
  animation: pulse-share 2s infinite;
}

.share-now-btn.share-recipe-btn {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.share-now-btn.share-image-btn {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
  animation: pulse-share-blue 2s infinite;
}

.share-now-btn:hover {
  transform: scale(1.05);
}

.share-now-btn.share-recipe-btn:hover {
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.share-now-btn.share-image-btn:hover {
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
}

.share-now-btn:active {
  transform: scale(0.98);
}

@keyframes pulse-share {
  0%, 100% { box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(76, 175, 80, 0.7); }
}

@keyframes pulse-share-blue {
  0%, 100% { box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(33, 150, 243, 0.7); }
}

.share-cancel-btn {
  margin-top: 12px;
  padding: 10px 24px;
  font-size: 14px;
  background: transparent;
  color: #888;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-cancel-btn:hover {
  background: #f5f5f5;
  color: #666;
}

.image-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  padding-top: calc(16px + var(--safe-top));
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.viewer-close-btn,
.viewer-download-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.viewer-close-btn:hover,
.viewer-download-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.viewer-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  flex: 1;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-viewer-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-x pan-y pinch-zoom;
}

.viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer-hint {
  text-align: center;
  padding: 12px;
  padding-bottom: calc(12px + var(--safe-bottom));
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  background: rgba(0, 0, 0, 0.5);
}

/* ==================== WORLD FOODS CAROUSEL ==================== */
.world-foods-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  transition: opacity 0.3s ease;
}

.world-foods-carousel::-webkit-scrollbar {
  display: none;
}

.world-food-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid var(--border-subtle);
}

.world-food-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.world-food-card:active {
  transform: scale(0.98);
}

.world-food-image {
  height: 160px;
  position: relative;
  overflow: hidden;
}

.world-food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.world-food-card:hover .world-food-image img {
  transform: scale(1.05);
}

.world-food-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.world-food-time {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.world-food-info {
  padding: 14px;
}

.world-food-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.world-food-origin {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.world-food-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: all var(--transition-fast);
}

.carousel-dot.active {
  width: 24px;
  border-radius: var(--radius-full);
  background: var(--accent-teal);
}

/* ==================== GENERATE MORE BUTTON ==================== */
.generate-more-section {
  padding: 24px 0;
  display: flex;
  justify-content: center;
}

.generate-more-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.generate-more-btn:hover {
  border-color: var(--accent-teal);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
}

.generate-more-btn:active {
  transform: scale(0.98);
}

.more-icon {
  font-size: 20px;
}

.more-icon.spinning {
  animation: spin-icon 1s linear infinite;
}

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

.generate-more-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  border-color: var(--accent-teal);
  background: linear-gradient(135deg, rgba(77, 201, 176, 0.1), var(--bg-card));
}

/* ==================== MEAL CARD PHOTOS ==================== */
.meal-image-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 12px;
  gap: 8px;
}

.image-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.meal-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base);
}

.result-card:hover .meal-card-photo {
  transform: scale(1.02);
}

.result-image, .result-image-small {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.result-image {
  min-height: 180px;
}

.result-image-small {
  min-height: 100px;
}

/* ==================== SHARE BUTTON WITH DROPDOWN ==================== */
.share-dropdown-container {
  position: relative;
}

.recipe-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: white;
}

.recipe-share-btn svg {
  width: 20px;
  height: 20px;
  stroke: white;
}

.recipe-share-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.recipe-share-btn:active {
  transform: scale(0.95);
}

.share-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(30, 40, 60, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  min-width: 140px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.share-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.share-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.share-dropdown-item:hover {
  background: rgba(59, 130, 246, 0.2);
}

.share-dropdown-item:active {
  background: rgba(59, 130, 246, 0.3);
}

.share-dropdown-item .dropdown-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

.save-meal-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
}

.save-meal-btn:active {
  transform: scale(0.95);
}

.save-meal-btn.saved {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border-color: transparent;
}

.save-meal-btn .save-icon {
  font-size: 14px;
}

/* ==================== SAVED MEALS SCREEN ==================== */

/* Tabs */
.saved-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.saved-tab {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saved-tab:hover {
  background: rgba(255, 255, 255, 0.08);
}

.saved-tab.active {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.4);
  color: #FFD700;
}

.saved-meals-container {
  padding: 16px;
  padding-bottom: 100px;
}

.saved-meals-container.hidden,
.history-container.hidden {
  display: none;
}

.saved-meals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* History */
.history-container {
  padding: 16px;
  padding-bottom: 100px;
}

.history-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 16px;
}

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

.history-card {
  background: rgba(26, 32, 48, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-card:hover {
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
}

.history-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: rgba(255, 215, 0, 0.5);
}

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

.history-card-info {
  padding: 10px 12px;
}

.history-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.history-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-tertiary);
}

.history-card-time {
  opacity: 0.7;
}

.history-card-origin {
  background: rgba(255, 215, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #FFD700;
}

.history-empty {
  grid-column: span 2;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.history-empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.saved-meal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #1a2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all var(--transition-fast);
}

.saved-meal-card:active {
  transform: scale(0.98);
  background: #252a35;
}

.saved-meal-image {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saved-meal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-meal-image .meal-emoji {
  font-size: 32px;
}

.saved-meal-image .healthy-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 12px;
  background: var(--bg-primary);
  border-radius: 50%;
  padding: 2px;
}

.saved-meal-info {
  flex: 1;
  min-width: 0;
}

.saved-meal-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-meal-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.saved-meal-date {
  font-size: 11px;
  color: var(--text-tertiary);
}

.delete-saved-btn {
  padding: 8px;
  background: rgba(248, 113, 113, 0.1);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  transition: all var(--transition-fast);
}

.delete-saved-btn:active {
  background: rgba(248, 113, 113, 0.3);
  transform: scale(0.9);
}

/* Empty state for saved meals */
.saved-meals-list .empty-state {
  text-align: center;
  padding: 60px 20px;
}

.saved-meals-list .empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.5;
}

.saved-meals-list .empty-state p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 8px;
}

.saved-meals-list .empty-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Saved Meals Count */
.saved-meals-count {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  padding-left: 4px;
}

/* Saved Meals Pagination */
.saved-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px 0;
}

.pagination-btn {
  padding: 10px 20px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

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

.pagination-info {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 100px;
  text-align: center;
}

/* ==================== KCAL TRACKER ==================== */
#screen-kcal {
  padding: 0 0 calc(var(--nav-height) + 20px + var(--safe-bottom)) 0;
  overflow-y: auto !important;
  height: 100vh;
  -webkit-overflow-scrolling: touch;
}

.kcal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.kcal-header h1 {
  font-size: 18px;
  font-weight: 600;
}

.kcal-history-btn {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  color: var(--accent-gold);
}

/* Salads Carousel */
.kcal-salads-section {
  padding: 12px 16px 8px;
}

.section-title-small {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.salads-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.salads-carousel::-webkit-scrollbar {
  display: none;
}

.salad-card {
  flex-shrink: 0;
  width: 140px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.15);
  transition: transform 0.2s ease;
}

.salad-card:active {
  transform: scale(0.98);
}

.salad-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}

.salad-card-info {
  padding: 8px;
}

.salad-card-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salad-card-cal {
  font-size: 10px;
  color: var(--accent-gold);
}

/* Summary Card */
.kcal-summary-card {
  margin: 8px 16px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(20, 20, 35, 0.98));
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.kcal-date-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.date-nav-btn {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.current-date {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Progress Ring */
.kcal-progress-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
}

.progress-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
}

.progress-fill {
  fill: none;
  stroke: url(#goldGradient);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 0.8s ease;
}

.kcal-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.kcal-consumed {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1;
}

.kcal-consumed .net-indicator {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #4caf50;
  background: rgba(76, 175, 80, 0.2);
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kcal-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.kcal-unit {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Nutrition Breakdown */
.nutrition-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nutrition-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nutrition-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nutrition-icon.protein { background: rgba(239, 68, 68, 0.2); }
.nutrition-icon.carbs { background: rgba(251, 191, 36, 0.2); }
.nutrition-icon.fat { background: rgba(34, 197, 94, 0.2); }

.nutrition-info {
  flex: 1;
  min-width: 0;
}

.nutrition-value {
  display: block;
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
}

.nutrition-label {
  font-size: 17px;
  color: var(--text-tertiary);
}

.nutrition-bar {
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.nutrition-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.nutrition-fill.protein { background: linear-gradient(90deg, #ef4444, #f87171); }
.nutrition-fill.carbs { background: linear-gradient(90deg, #fbbf24, #fcd34d); }
.nutrition-fill.fat { background: linear-gradient(90deg, #22c55e, #4ade80); }

/* Set Goal Button - Glassmorphism */
.set-goal-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.set-goal-btn:hover,
.set-goal-btn:active {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 
    0 4px 12px rgba(255, 215, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

/* Goals & Profile Container */
.goals-profile-container {
  padding: 0 16px;
  margin-bottom: 12px;
}

/* Goals & Profile Button - More Visible */
.goals-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 215, 0, 0.06));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
}

.goals-profile-btn:hover,
.goals-profile-btn:active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1));
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.goals-btn-icon {
  font-size: 18px;
}

.goals-btn-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.goals-btn-arrow {
  font-size: 18px;
  color: rgba(255, 215, 0, 0.6);
  margin-left: auto;
}

/* User Profile Summary */
.user-profile-summary {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
}

.profile-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.profile-stat-trend {
  font-size: 11px;
  font-weight: 600;
}

.profile-stat-trend.down {
  color: #4caf50;
}

.profile-stat-trend.up {
  color: #ff6b6b;
}

.profile-stat-trend.same {
  color: rgba(255, 255, 255, 0.5);
}

/* Extended Nutrition Info */
/* Nutrition Grid - Organized Layout */
.nutrition-grid {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nutrition-grid-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nutrition-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nutrition-grid-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nutrition-grid-items.minerals {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.nutrition-grid-items.minerals .nutrition-grid-item {
  padding: 6px;
  gap: 2px;
}

.nutrition-grid-items.minerals .grid-value {
  font-size: 16px;
}

.nutrition-grid-items.minerals .grid-label {
  font-size: 11px;
}

.nutrition-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.nutrition-grid-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.grid-value {
  font-size: 23px;
  font-weight: 700;
  color: var(--text-primary);
}

.grid-label {
  font-size: 15px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.grid-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.grid-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.grid-fill.sugar {
  background: linear-gradient(90deg, #f472b6, #ec4899);
}

.grid-fill.fiber {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

/* Responsive for smaller screens */
@media (max-width: 374px) {
  .nutrition-grid-items.minerals {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-value {
    font-size: 20px;
  }
  
  .grid-label {
    font-size: 13px;
  }
}

/* Legacy support - keep old classes for backwards compatibility */
.nutrition-extended {
  display: none; /* Hide old layout */
}

.nutrition-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.mini-icon {
  font-size: 16px;
}

.mini-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.mini-label {
  font-size: 9px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Goal Settings Modal */
.goal-settings-modal {
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
}

.goal-form {
  padding: 0 20px;
  padding-bottom: 20px;
}

.goal-section {
  margin-bottom: 24px;
}

.goal-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.goal-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.goal-input-group input {
  flex: 1;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.goal-input-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.08);
}

.goal-unit {
  color: var(--text-tertiary);
  font-size: 14px;
  min-width: 40px;
}

.goal-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.goal-presets button {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.goal-presets button:hover,
.goal-presets button:active {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--accent-gold);
}

.macro-goals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.macro-goal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.macro-goal-icon {
  font-size: 18px;
}

.macro-goal-item label {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
}

.macro-goal-item input {
  width: 70px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.macro-goal-item input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

/* Sugar goal - special highlight */
.macro-goal-item.sugar-goal {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.02));
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.macro-goal-item.sugar-goal .macro-goal-icon {
  filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.4));
}

.goal-tip {
  padding: 12px;
  background: rgba(45, 212, 191, 0.1);
  border-radius: 8px;
  font-size: 11px;
  color: var(--accent-teal);
  text-align: center;
  line-height: 1.4;
}

/* Profile Section in Goal Settings */
.profile-section {
  padding: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
}

.profile-section h3 {
  color: var(--accent-gold) !important;
  margin-bottom: 16px !important;
}

.profile-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.profile-input-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-input-item label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-input-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.profile-input-group:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.15);
}

.profile-input-group input {
  flex: 1;
  width: 100%;
  padding: 10px 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.profile-input-group input:focus {
  outline: none;
}

.profile-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.unit-select {
  padding: 10px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
}

.unit-select option {
  background: #1a1a2e;
  color: white;
}

.unit-label {
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 11px;
}

.weight-goal-section {
  margin-top: 4px;
}

.weight-goal-section > label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.weight-goal-options {
  display: flex;
  gap: 8px;
}

.weight-goal-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.weight-goal-btn .goal-icon {
  font-size: 18px;
}

.weight-goal-btn span:last-child {
  font-size: 11px;
  color: var(--text-secondary);
}

.weight-goal-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.weight-goal-btn.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  border-color: rgba(255, 215, 0, 0.4);
}

.weight-goal-btn.active span:last-child {
  color: var(--accent-gold);
  font-weight: 600;
}

.weight-goal-btn[data-goal="lose"].active {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
  border-color: rgba(76, 175, 80, 0.4);
}

.weight-goal-btn[data-goal="lose"].active span:last-child {
  color: #4caf50;
}

.weight-goal-btn[data-goal="gain"].active {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.05));
  border-color: rgba(96, 165, 250, 0.4);
}

.weight-goal-btn[data-goal="gain"].active span:last-child {
  color: #60a5fa;
}

/* Mobile responsiveness for profile */
@media (max-width: 400px) {
  .profile-inputs {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .profile-inputs .profile-input-item:last-child {
    grid-column: span 2;
  }
  
  .profile-inputs .profile-input-item:last-child .profile-input-group {
    max-width: 50%;
  }
}

/* Add Food Section */
.add-food-section {
  display: flex;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.add-food-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: linear-gradient(145deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.add-food-btn:active {
  transform: scale(0.97);
  background: rgba(255, 215, 0, 0.2);
}

.add-food-btn.secondary {
  background: rgba(147, 51, 234, 0.1);
  border-color: rgba(147, 51, 234, 0.3);
  color: #a78bfa;
}

.add-food-btn.tertiary {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.add-food-btn.history {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* Compact top section buttons */
.add-food-section.top-section {
  margin: 12px 16px;
  padding: 0;
}

.add-food-section.top-section .add-food-btn {
  padding: 10px 6px;
  font-size: 10px;
}

.add-food-section.top-section .add-food-btn svg {
  width: 20px;
  height: 20px;
}

.add-food-btn svg {
  width: 24px;
  height: 24px;
}

/* ==================== Meal History Modal ==================== */
.meal-history-modal {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.meal-history-search {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.meal-history-search input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
}

.meal-history-search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.meal-history-search .search-btn {
  background: rgba(255, 215, 0, 0.2);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 16px;
  cursor: pointer;
}

.meal-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  max-height: 50vh;
}

.history-loading {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.history-day-group {
  margin-bottom: 16px;
}

.history-day-header {
  font-size: 12px;
  color: rgba(255, 215, 0, 0.7);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-meal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-meal-item:hover,
.history-meal-item:active {
  background: rgba(255, 215, 0, 0.1);
  transform: scale(0.99);
}

.history-meal-emoji {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.history-meal-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.history-meal-info {
  flex: 1;
}

.history-meal-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.history-meal-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.history-meal-kcal {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.meal-history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.pagination-btn {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 6px;
  padding: 8px 16px;
  color: var(--accent-gold);
  font-size: 13px;
  cursor: pointer;
}

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

.pagination-info {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.history-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ==================== Meal History Detail Modal ==================== */
.meal-history-detail-modal {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-back-btn {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.history-detail-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  max-height: 45vh;
}

.history-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  margin-bottom: 8px;
}

.detail-item-info {
  flex: 1;
}

.detail-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.detail-item-portion {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.detail-item-portion-edit {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent-gold);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:active {
  transform: scale(0.9);
  background: rgba(255, 215, 0, 0.2);
}

/* Meal multiplier control */
.meal-multiplier-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.multiplier-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.multiplier-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.multiplier-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.15);
  color: var(--accent-gold);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.multiplier-btn:active {
  transform: scale(0.9);
  background: rgba(255, 215, 0, 0.3);
}

.multiplier-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
  min-width: 50px;
  text-align: center;
}

/* Read-only item portion display */
.detail-item-portion {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* New item styling */
.history-detail-item.new-item {
  background: rgba(76, 175, 80, 0.1);
  border: 1px dashed rgba(76, 175, 80, 0.3);
}

.history-detail-item.new-item .detail-item-name::before {
  content: "➕ ";
  font-size: 10px;
}

.detail-item-kcal {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
  min-width: 70px;
  text-align: right;
}

.detail-item-remove {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  border-radius: 6px;
  color: #f87171;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}

.add-item-section {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.add-item-section input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
}

.add-item-section input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.add-item-btn {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #34d399;
  font-size: 18px;
  cursor: pointer;
}

.add-item-btn:active {
  transform: scale(0.95);
}

.history-detail-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 215, 0, 0.05);
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.total-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.total-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
}

.add-to-log-btn {
  margin: 12px 16px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  color: #34d399;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.add-to-log-btn:active {
  transform: scale(0.98);
}

/* Activity & Exercise Section */
.activity-section {
  margin: 16px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(20, 20, 35, 0.98));
  border-radius: 16px;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.activity-header .section-title-small {
  margin: 0;
}

.add-activity-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 20px;
  color: #ff6b6b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-activity-btn:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 107, 107, 0.2));
  transform: translateY(-1px);
}

.activity-stats {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  margin-bottom: 12px;
}

.activity-stat {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-stat.highlight {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.05));
  border-color: rgba(255, 107, 107, 0.3);
}

.activity-stat .stat-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.activity-stat .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: white;
  display: block;
}

.activity-stat.highlight .stat-value {
  color: #ff6b6b;
}

.activity-stat .stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Net Calories Info */
.net-calories-info {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.net-calc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.net-calc strong {
  color: white;
}

.net-operator {
  color: rgba(255, 255, 255, 0.4);
  font-weight: bold;
}

.net-result {
  color: #4caf50;
}

.net-result strong {
  color: #4caf50;
  font-size: 15px;
}

.net-message {
  text-align: center;
  font-size: 12px;
  color: #4caf50;
  margin-top: 6px;
}

/* Activity Log */
.activity-log {
  max-height: 120px;
  overflow-y: auto;
}

.empty-activity {
  text-align: center;
  padding: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 6px;
}

.activity-item:last-child {
  margin-bottom: 0;
}

.activity-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-item-icon {
  font-size: 18px;
}

.activity-item-info {
  display: flex;
  flex-direction: column;
}

.activity-item-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.activity-item-details {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.activity-item-calories {
  font-size: 14px;
  font-weight: 700;
  color: #ff6b6b;
}

.activity-item-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  margin-left: 8px;
}

.activity-item-remove:hover {
  color: #ff6b6b;
}

/* Add Activity Modal */
.add-activity-modal {
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
}

.activity-form {
  padding: 16px 0;
}

.activity-type-section {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}

.activity-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.activity-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activity-type-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.activity-type-btn.selected {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
  border-color: #ff6b6b;
}

.activity-type-btn .activity-emoji {
  font-size: 24px;
}

.activity-type-btn span:last-child {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.activity-type-btn.selected span:last-child {
  color: #ff6b6b;
}

.activity-duration-section {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group {
  flex: 1;
}

.duration-input,
.manual-input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.duration-input input,
.manual-input input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 12px;
  color: white;
  font-size: 14px;
  outline: none;
}

.duration-input input::placeholder,
.manual-input input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-suffix {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.form-select option {
  background: #1a1a2e;
  color: white;
}

.estimated-burn {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.estimated-burn strong {
  color: #ff6b6b;
}

.manual-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

.manual-divider::before,
.manual-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.manual-divider span {
  padding: 0 12px;
}

.manual-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manual-inputs-row {
  display: flex;
  gap: 10px;
}

.manual-inputs-row .form-group {
  flex: 1;
}

.manual-inputs .form-label {
  font-size: 11px;
  margin-bottom: 6px;
}

.manual-estimate {
  padding: 10px;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.manual-estimate strong {
  color: #4caf50;
}

.manual-override {
  margin-top: 4px;
}

.manual-override .form-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

/* Activity Section Mobile Responsiveness */
@media (max-width: 480px) {
  .activity-section {
    margin: 12px;
    padding: 14px;
  }
  
  .activity-stats {
    gap: 8px;
  }
  
  .activity-stat {
    padding: 10px 6px;
  }
  
  .activity-stat .stat-value {
    font-size: 16px;
  }
  
  .activity-stat .stat-label {
    font-size: 10px;
  }
  
  .net-calc {
    font-size: 11px;
    gap: 4px;
  }
  
  .add-activity-modal {
    max-width: 95vw;
    margin: 10px;
  }
  
  .activity-types {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  
  .activity-type-btn {
    padding: 10px 6px;
  }
  
  .activity-type-btn .activity-emoji {
    font-size: 20px;
  }
  
  .activity-type-btn span:last-child {
    font-size: 10px;
  }
  
  .manual-inputs-row {
    flex-wrap: wrap;
  }
  
  .manual-inputs-row .form-group {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
  }
  
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
}

/* Food Log Section */
.food-log-section {
  padding: 0 16px;
  margin-bottom: 20px;
}

.food-log-list {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  overflow: hidden;
  max-height: 250px;
  overflow-y: auto;
}

.empty-log {
  text-align: center;
  padding: 30px 20px;
}

.empty-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}

.empty-log p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 4px;
}

.empty-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

.food-log-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 10px;
}

.food-log-item:last-child {
  border-bottom: none;
}

.food-log-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.food-log-emoji {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(255,165,89,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.food-log-info {
  flex: 1;
  min-width: 0;
}

.food-log-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-log-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.food-log-cal {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.food-log-delete {
  background: rgba(239, 68, 68, 0.1);
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 12px;
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
}

.food-log-item {
  cursor: pointer;
  transition: background 0.2s ease;
}

.food-log-item:active {
  background: rgba(255, 215, 0, 0.1);
}

/* Food Detail Popup Modal */
.food-detail-modal {
  max-width: 360px;
}

.food-detail-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: rgba(15, 25, 40, 0.5);
}

.food-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-detail-emoji {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(255,165,89,0.2));
}

.food-detail-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.food-detail-name {
  font-size: 20px;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 6px;
}

.food-detail-time {
  font-size: 12px;
  color: var(--text-tertiary);
}

.food-detail-calories {
  text-align: center;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.food-detail-calories .cal-number {
  font-size: 42px;
  font-weight: 700;
  color: #FFD700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.food-detail-calories .cal-unit {
  font-size: 16px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.food-detail-macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.food-detail-macro {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: rgba(15, 25, 40, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.food-detail-macro-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.food-detail-macro-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.food-detail-extras {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
  background: rgba(15, 25, 40, 0.4);
  border-radius: 10px;
  margin-bottom: 16px;
}

.food-detail-extra {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.food-detail-extra-label {
  color: var(--text-tertiary);
}

.food-detail-extra-value {
  color: var(--text-primary);
  font-weight: 600;
}

.food-detail-portion {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}
}

/* Weekly Overview */
.weekly-overview-section {
  padding: 0 16px;
  margin-bottom: 20px;
}

.weekly-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 100px;
  padding: 12px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  margin-bottom: 12px;
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  cursor: pointer;
}

.week-day.active .day-label {
  color: var(--accent-gold);
  font-weight: 600;
}

.week-day.active .day-fill {
  background: linear-gradient(to top, #fbbf24, #fcd34d) !important;
}

.day-bar {
  width: 20px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.day-fill {
  width: 100%;
  background: linear-gradient(to top, rgba(255, 215, 0, 0.4), rgba(255, 215, 0, 0.2));
  border-radius: 10px;
  transition: height 0.4s ease;
}

.day-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.weekly-stats {
  display: flex;
  justify-content: space-around;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  padding: 12px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
}

.stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

/* Enhanced Analytics Section */
.analytics-section {
  padding: 0 16px;
  margin-bottom: 20px;
}

.analytics-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.analytics-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.analytics-tab.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.analytics-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.analytics-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent-gold);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.analytics-nav-btn:active {
  transform: scale(0.9);
}

.analytics-period {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 150px;
  text-align: center;
}

.analytics-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 80px;
  padding: 8px 4px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  margin-bottom: 4px;
  overflow-x: auto;
  gap: 2px;
}

.analytics-chart.hidden {
  display: none;
}

.chart-bar {
  flex: 1;
  min-width: 8px;
  max-width: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  height: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-bar:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chart-bar-fill {
  width: 100%;
  background: linear-gradient(to top, rgba(255, 215, 0, 0.6), rgba(255, 215, 0, 0.3));
  border-radius: 4px;
  transition: height 0.3s ease;
  min-height: 2px;
}

.chart-bar.peak .chart-bar-fill {
  background: linear-gradient(to top, #fbbf24, #fcd34d);
}

.chart-bar.selected .chart-bar-fill {
  background: linear-gradient(to top, #10b981, #34d399);
}

/* Hourly chart - smaller bars */
.hourly-chart .chart-bar {
  min-width: 6px;
  max-width: 12px;
}

/* Monthly chart */
.monthly-chart .chart-bar {
  min-width: 18px;
  max-width: 30px;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 12px;
}

.chart-label {
  font-size: 8px;
  color: var(--text-tertiary);
  text-align: center;
  flex: 1;
}

.chart-labels.hourly-labels .chart-label {
  flex: none;
  width: auto;
}

.analytics-stats {
  display: flex;
  justify-content: space-around;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  padding: 12px;
  margin-bottom: 12px;
}

.analytics-insights {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 12px;
}

.insight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.insight-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.insight-item:first-child {
  padding-top: 0;
}

.insight-icon {
  font-size: 18px;
}

.insight-text {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
}

.insight-text strong {
  color: var(--accent-gold);
}

/* Monica Tips Section */
.monica-tips-section {
  margin: 0 16px 20px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(147, 51, 234, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: 16px;
  border: 1px solid rgba(147, 51, 234, 0.2);
}

.tips-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tips-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tips-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tips-content {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 12px;
}

.tip-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

#monica-tips {
  transition: opacity 0.15s ease;
}

/* Kcal Scan Modal */
.kcal-scan-modal {
  max-width: 360px;
}

.kcal-scan-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 16px;
}

.kcal-scan-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emoji-thumbnail {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.08));
  border-radius: 12px;
}

.kcal-scan-result {
  text-align: center;
  margin-bottom: 16px;
}

.scan-food-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.scan-portion {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.scan-calories {
  margin-bottom: 16px;
}

.cal-number {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent-gold);
}

.cal-unit {
  font-size: 16px;
  color: var(--text-secondary);
}

.scan-macros {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.macro-item {
  font-size: 12px;
  color: var(--text-secondary);
}

.macro-icon {
  margin-right: 4px;
}

.kcal-scan-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.portion-adjust {
  width: 60px;
  padding: 8px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  text-align: center;
  font-size: 14px;
}

.portion-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ═══════════ KCAL SCAN MODAL V2 - Itemized List ═══════════ */
.kcal-scan-modal-v2 {
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
}

.kcal-scan-modal-v2 .kcal-scan-image {
  height: 160px;
  margin-bottom: 12px;
}

.scan-meal-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.kcal-scan-modal-v2 .scan-food-name {
  font-size: 20px;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 4px;
}

.kcal-scan-modal-v2 .scan-portion {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Items Section */
.scan-items-section {
  background: rgba(15, 25, 40, 0.5);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scan-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.items-edit-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  font-style: italic;
}

.scan-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

/* Individual Item Row */
.scan-item-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(20, 30, 50, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.scan-item-row:hover {
  border-color: rgba(255, 215, 0, 0.2);
  background: rgba(25, 35, 55, 0.7);
}

.scan-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.scan-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.scan-item-info {
  flex: 1;
  min-width: 0;
}

.scan-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.scan-item-macros {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  gap: 12px;
}

.scan-item-macros span {
  opacity: 0.8;
}

/* Quantity Input */
.scan-item-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scan-item-qty-input {
  width: 50px;
  padding: 6px 8px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  color: #FFD700;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

.scan-item-qty-input:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.scan-item-unit {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Item Calories */
.scan-item-calories {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
}

/* Item Delete Button */
.scan-item-delete {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 12px;
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.scan-item-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.scan-item-delete:active {
  transform: scale(0.9);
}

/* Add Item Section */
.scan-add-item-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 215, 0, 0.2);
}

.scan-add-item-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.scan-add-item-input {
  flex: 1;
  padding: 10px 12px;
  background: rgba(15, 25, 40, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.2s ease;
}

.scan-add-item-input::placeholder {
  color: var(--text-tertiary);
}

.scan-add-item-input:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.scan-add-item-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scan-add-item-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.15));
  border-color: #FFD700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.scan-add-item-btn:active {
  transform: scale(0.95);
}

.scan-add-item-btn .add-icon {
  font-size: 18px;
}

.scan-add-item-btn.loading .add-icon {
  animation: spin 1s linear infinite;
}

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

.scan-add-item-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  text-align: center;
  font-style: italic;
}

/* Totals Section */
.scan-totals-section {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.scan-totals-header {
  font-size: 14px;
  font-weight: 600;
  color: #FFD700;
  margin-bottom: 12px;
  text-align: center;
}

.scan-totals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.total-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  background: rgba(15, 25, 40, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.total-item.total-calories {
  grid-column: span 3;
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.3);
  padding: 12px;
}

.total-item.total-calories .total-value {
  font-size: 32px;
  color: #FFD700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.total-item.total-calories .total-label {
  font-size: 14px;
  color: #FFD700;
}

.total-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.total-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Manual Entry Modal */
.kcal-manual-modal {
  max-width: 360px;
}

/* Manual Entry Modal V2 - AI Powered */
.kcal-manual-modal-v2 {
  max-width: 380px;
  width: calc(100% - 32px);
  margin: 16px;
  padding: 20px;
}

.kcal-manual-modal-v2 .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.kcal-manual-modal-v2 .modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.kcal-manual-modal-v2 .modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.kcal-manual-modal-v2 .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.manual-input-section {
  margin-bottom: 16px;
}

.manual-input-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: center;
}

.manual-input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.manual-food-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(15, 25, 40, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.manual-food-input::placeholder {
  color: var(--text-tertiary);
  font-size: 13px;
}

.manual-food-input:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.manual-analyze-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  color: #FFD700;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.manual-analyze-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.15));
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.manual-analyze-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.manual-analyze-btn.loading .analyze-icon {
  animation: spin 1s linear infinite;
}

.manual-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.example-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.example-chip {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.example-chip:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
  color: #FFD700;
}

/* Manual Result Section */
.manual-result-section {
  margin-bottom: 16px;
}

.manual-result-section.hidden {
  display: none;
}

.manual-result-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.03));
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.manual-result-name {
  font-size: 18px;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 4px;
}

.manual-result-portion {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.manual-result-calories {
  margin-bottom: 16px;
}

.manual-result-calories .cal-number {
  font-size: 48px;
  font-weight: 700;
  color: #FFD700;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.manual-result-calories .cal-unit {
  font-size: 18px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.manual-result-macros {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.macro-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  background: rgba(15, 25, 40, 0.5);
  border-radius: 10px;
  min-width: 70px;
}

.macro-box .macro-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.macro-box .macro-label {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.manual-result-extras {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.manual-result-extras strong {
  color: var(--text-secondary);
}

.manual-edit-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.manual-edit-btn:hover {
  border-color: rgba(255, 215, 0, 0.3);
  color: #FFD700;
}

.manual-form {
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input:focus {
  border-color: rgba(255, 215, 0, 0.5);
  outline: none;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group.half {
  flex: 1;
}

/* Day Detail Modal */
.day-detail-modal {
  max-width: 400px;
  max-height: 80vh;
}

.day-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 12px;
  margin-bottom: 16px;
}

.detail-stat {
  text-align: center;
}

.detail-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-gold);
}

.detail-stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
}

.day-detail-list {
  max-height: 40vh;
  overflow-y: auto;
}

/* ==================== DEBUG CONSOLE ==================== */
.debug-console {
  position: fixed;
  bottom: 80px;
  left: 10px;
  right: 10px;
  max-height: 300px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid #333;
  border-radius: 12px;
  z-index: 99999;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 11px;
  overflow: hidden;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.debug-console.hidden {
  display: none !important;
}

.debug-console.minimized {
  max-height: 40px;
}

.debug-console.minimized .debug-content {
  display: none;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  color: #fff;
  font-weight: 600;
}

.debug-actions {
  display: flex;
  gap: 4px;
}

.debug-btn {
  background: #333;
  border: none;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
}

.debug-btn:active {
  background: #555;
}

.debug-content {
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
}

.debug-log {
  padding: 4px 8px;
  margin: 2px 0;
  border-radius: 4px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.debug-log.info {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

.debug-log.warn {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.debug-log.error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.debug-log.success {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.debug-log .timestamp {
  color: #888;
  font-size: 9px;
  margin-right: 8px;
}

/* ==================== RECIPE CHAT SECTION ==================== */
.recipe-chat-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recipe-chat-btn:active {
  transform: scale(0.95);
  background: var(--accent-teal);
}

.recipe-chat-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 24px;
}

.recipe-chat-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}

.recipe-chat-messages {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recipe-chat-messages .chat-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.recipe-chat-messages .chat-message.user {
  flex-direction: row-reverse;
}

.recipe-chat-messages .message-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.recipe-chat-messages .message-content {
  max-width: 80%;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.recipe-chat-messages .chat-message.user .message-content {
  background: var(--accent-teal);
  color: white;
}

.recipe-chat-messages .message-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.recipe-chat-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

#recipe-chat-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

#recipe-chat-input:focus {
  border-color: var(--accent-teal);
}

#recipe-chat-input::placeholder {
  color: var(--text-muted);
}

.recipe-chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-teal);
  border: none;
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recipe-chat-send-btn:active {
  transform: scale(0.95);
}

.recipe-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

