.desktop-container {
      max-width: 600px;
      margin: 0 auto;
      text-align: center;
      padding: 50px 20px;
    }
    
    .logo-container {
      margin-bottom: 30px;
    }
    
    .logo {
      width: 120px;
      height: 120px;
      border-radius: 20px;
      object-fit: cover;
    }
    
    .message-container {
      background-color: white;
      border-radius: 15px;
      padding: 30px;
      box-shadow: var(--shadow);
    }
    
    .device-icon {
      font-size: 48px;
      color: var(--primary);
      margin-bottom: 20px;
    }
    
    h1 {
      font-size: 24px;
      margin-bottom: 15px;
      color: var(--dark);
    }
    
    p {
      margin-bottom: 25px;
      color: var(--gray);
      line-height: 1.6;
    }
    
    .qr-container {
      margin-top: 30px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    
    .qr-code {
      width: 200px;
      height: 200px;
      background-color: var(--light);
      border-radius: 10px;
      padding: 15px;
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    
    .qr-code img {
      max-width: 100%;
      max-height: 100%;
      border-radius: 5px;
    }
    
    .qr-loading {
      position: absolute;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
    }
    
    .qr-loading i {
      font-size: 24px;
      color: var(--primary);
      animation: spin 1.5s linear infinite;
      margin-bottom: 10px;
    }
    
    .qr-loading p {
      font-size: 12px;
      margin: 0;
    }
    
    .qr-error {
      position: absolute;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      text-align: center;
      padding: 15px;
    }
    
    .qr-error i {
      font-size: 24px;
      color: var(--danger);
      margin-bottom: 10px;
    }
    
    .qr-error p {
      font-size: 12px;
      margin: 0;
      color: var(--danger);
    }
    
    @keyframes spin {
      100% { transform: rotate(360deg); }
    }
    
    /* Dark theme adjustments */
    body.dark-theme .message-container {
      background-color: #2d3748;
    }
    
    body.dark-theme h1 {
      color: var(--light);
    }
    
    body.dark-theme p {
      color: #a0aec0;
    }
    
    body.dark-theme .qr-code {
      background-color: #4a5568;
    }
    
    .theme-switch {
      position: absolute;
      top: 20px;
      right: 20px;
      z-index: 10;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 20px;
      color: var(--primary);
    }
    
    @media (max-width: 768px) {
      .desktop-container {
        padding: 30px 15px;
      }
    }


:root {
  --primary: #5D5FEF;
  --primary-dark: #4849CC;
  --primary-light: #7879F1;
  --secondary: #FF7262;
  --secondary-light: #FF9D93;
  --accent: #34D399;
  --dark: #2D3748;
  --light: #F7FAFC;
  --gray: #A0AEC0;
  --light-gray: #EDF2F7;
  --success: #48BB78;
  --warning: #F6AD55;
  --danger: #F56565;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  /* margin: 0; */
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f6f9fc 0%, #f0f4f8 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--dark);
}

.app-container {
  background-color: white;
  width: 100%;
  max-width: 800px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.app-header {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 30px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.app-header p {
  margin-top: 8px;
  opacity: 0.9;
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.app-body {
  padding: 30px;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.btn:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

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

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

.btn-secondary {
  background-color: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--light);
  color: var(--primary);
  border: none;
  position: absolute;
  top: 20px;
  
  z-index: 10;
}

.btn-icon:hover {
  background-color: var(--primary-light);
  color: white;
}

.upload-container {
  position: relative;
  margin-top: 15px;
}

input[type="file"] {
  display: none;
}

.upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 2px dashed var(--gray);
  border-radius: 12px;
  color: var(--gray);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  background-color: var(--light);
}

.upload-label:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: rgba(93, 95, 239, 0.05);
}

.upload-label i {
  font-size: 24px;
  transition: var(--transition);
}

.upload-label:hover i {
  transform: translateY(-3px);
}

.preview-container {
  margin-top: 25px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: none;
  position: relative;
  background-color: var(--light);
}

.preview-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  justify-content: center;
  z-index: 5;
}

#video, #photo {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  background-color: var(--light);
  display: block;
}

#canvas {
  display: none;
}

.capture-btn {
  position: relative;
  z-index: 10;
}

.results-container {
  margin-top: 30px;
  padding: 0;
  border-radius: 16px;
  background-color: white;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.results-header {
  padding: 25px;
  background-color: var(--light);
  border-bottom: 1px solid #E2E8F0;
}

.results-header h2 {
  font-size: 22px;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--dark);
}

.health-stats {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 5px;
}

.stat-item {
  flex: 1;
  padding: 15px;
  border-radius: 12px;
  background: white;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-item p {
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-item .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.stat-item.score .value {
  color: var(--primary);
}

.stat-item.calories .value {
  color: var(--secondary);
}

.stat-icon {
  padding: 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.score .stat-icon {
  background-color: rgba(93, 95, 239, 0.1);
  color: var(--primary);
}

.calories .stat-icon {
  background-color: rgba(255, 114, 98, 0.1);
  color: var(--secondary);
}

.food-list {
  padding: 0;
}

.food-item {
  padding: 25px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: var(--transition);
}

.food-item:hover {
  background-color: var(--light);
}

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

.food-details {
  flex: 1;
}

.food-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--dark);
}

.food-ingredients {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 15px;
  line-height: 1.4;
}

.food-macros {
  display: flex;
  gap: 20px;
  font-size: 13px;
  margin-bottom: 15px;
}

.macro {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.protein {
  background-color: rgba(128, 90, 213, 0.1);
  color: #805AD5;
}

.carbs {
  background-color: rgba(66, 153, 225, 0.1);
  color: #4299E1;
}

.fats {
  background-color: rgba(246, 173, 85, 0.1);
  color: #F6AD55;
}

.macro-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.protein .macro-icon {
  background-color: #805AD5;
}

.carbs .macro-icon {
  background-color: #4299E1;
}

.fats .macro-icon {
  background-color: #F6AD55;
}

.food-calories {
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  color: white;
  font-size: 18px;
  background: linear-gradient(120deg, var(--secondary) 0%, var(--secondary-light) 100%);
  white-space: nowrap;
  min-width: 100px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.food-calories small {
  font-size: 11px;
  opacity: 0.8;
  font-weight: 400;
}

.food-health {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 14px;
}

.health-score {
  font-weight: 600;
  min-width: 70px;
}

.health-bar {
  height: 8px;
  width: 120px;
  background-color: var(--light-gray);
  border-radius: 4px;
  overflow: hidden;
  flex: 1;
}

.health-progress {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-out;
}

.analysis-loading {
  text-align: center;
  padding: 40px;
  color: var(--gray);
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-left-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.analysis-loading p {
  font-size: 16px;
  font-weight: 500;
}

.analysis-loading small {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.7;
}

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

.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state-icon {
  font-size: 40px;
  color: var(--gray);
  margin-bottom: 15px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--dark);
}

.empty-state p {
  color: var(--gray);
  max-width: 300px;
  margin: 0 auto;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  position: absolute;
  bottom: 0;
  left: 0;
}

.progress-bar-fill {
  height: 100%;
  background-color: white;
  width: 0%;
  transition: width 0.5s ease;
}

.tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.tooltip-trigger:hover + .tooltip {
  opacity: 1;
}

.nutrition-summary {
  background-color: var(--light);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.nutrition-summary h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark);
}

.nutrition-chart {
  display: flex;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.chart-segment {
  height: 100%;
  transition: width 1s ease-out;
}

.chart-protein {
  background-color: #805AD5;
}

.chart-carbs {
  background-color: #4299E1;
}

.chart-fats {
  background-color: #F6AD55;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.theme-switch {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.theme-switch i {
  font-size: 16px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .app-header {
    padding: 25px 20px;
  }
  
  .app-header h1 {
    font-size: 24px;
  }
  
  .app-body {
    padding: 20px;
  }
  
  .health-stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .food-item {
    flex-direction: column;
    padding: 20px;
  }
  
  .food-macros {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .food-calories {
    margin-top: 15px;
    align-self: flex-start;
  }
}

/* Add these dark mode styles to your existing CSS */
body.dark-theme {
background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
color: var(--light);
}

body.dark-theme .app-container {
background-color: #2d3748;
box-shadow: var(--shadow-lg);
}

body.dark-theme .app-header {
background: linear-gradient(120deg, #4849CC 0%, #5D5FEF 100%);
}

body.dark-theme .app-body {
color: var(--light);
}

body.dark-theme .btn-secondary {
background-color: #4a5568;
color: white;
border: 2px solid #5D5FEF;
}

body.dark-theme .btn-secondary:hover {
background-color: #2d3748;
}

body.dark-theme .upload-label {
border: 2px dashed #718096;
color: #a0aec0;
background-color: #4a5568;
}

body.dark-theme .upload-label:hover {
border-color: var(--primary);
color: var(--primary-light);
background-color: rgba(93, 95, 239, 0.1);
}

body.dark-theme .preview-container {
background-color: #4a5568;
}

body.dark-theme .results-container {
background-color: #2d3748;
}

body.dark-theme .results-header {
background-color: #4a5568;
border-bottom: 1px solid #2d3748;
}

body.dark-theme .stat-item {
background: #4a5568;
color: var(--light);
}

body.dark-theme .stat-item p {
color: #a0aec0;
}

body.dark-theme .stat-item .value {
color: var(--light);
}

body.dark-theme .food-item {
border-bottom: 1px solid #4a5568;
}

body.dark-theme .food-item:hover {
background-color: #3a4559;
}

body.dark-theme .food-name {
color: var(--light);
}

body.dark-theme .food-ingredients {
color: #a0aec0;
}

body.dark-theme .tooltip {
background-color: rgba(255, 255, 255, 0.8);
color: #2d3748;
}

body.dark-theme .empty-state-icon {
color: #a0aec0;
}

body.dark-theme .empty-state h3 {
color: var(--light);
}

body.dark-theme .empty-state p {
color: #a0aec0;
}

body.dark-theme .nutrition-summary {
background-color: #4a5568;
}

body.dark-theme .nutrition-summary h3 {
color: var(--light);
}

body.dark-theme .btn-icon {
background-color: #4a5568;
color: var(--primary-light);
}

body.dark-theme .btn-icon:hover {
background-color: var(--primary-light);
color: white;
}

/* Fix for the theme switch button in dark mode */
body.dark-theme .theme-switch {
color: rgba(255, 255, 255, 0.8);
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }