:root {
  /* Colors */
  --primary: #FF6B00;
  --primary-glow: #FF8800;
  --primary-gradient: linear-gradient(135deg, #FF6B00 0%, #FF9500 100%);
  --accent-cyan: #06b6d4;
  --secondary: #f4f4f5;
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 10px 25px -5px rgba(255, 107, 0, 0.3);
  --text-main: #18181b;
  --text-muted: #71717a;
  --border: #e4e4e7;
  --success: #16a34a;
  --warning: #f59e0b;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Layout */
  --header-height: 60px;
  --nav-height: 70px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
}

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

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

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(255, 107, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-10px);}
  60% {transform: translateY(-5px);}
}

.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-bounce { animation: bounce 2s infinite; }
.animate-slide-up { animation: slideUp 0.6s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.5s ease-out forwards; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse-glow 2s infinite; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

body {
  margin: 0;
  padding: 0;
  background-color: #f4f4f5; /* Outer background */
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* Mobile Simulation Container */
.app-container {
  width: 100%;
  max-width: 480px; /* Mobile width cap */
  background-color: #f8fafc; /* Slightly off-white for depth */
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 50px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, p { margin: 0; }

h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
h3 { font-size: 18px; font-weight: 600; }
.text-sm { font-size: 14px; color: var(--text-muted); }
.text-xs { font-size: 12px; color: var(--text-muted); }
.text-highlight { color: var(--primary); }

/* Components */
.btn {
  border: none;
  border-radius: var(--radius-full);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--primary-gradient);
  color: #09090b;
  box-shadow: 0 8px 20px -4px rgba(248, 46, 0, 0.4);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-icon.active {
  background: var(--primary-gradient);
  border: none;
}

.input-field {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 16px;
  border-radius: var(--radius-md);
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  margin-bottom: 16px;
  outline: none;
}

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

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.card-food {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.card-food img, .card-food .placeholder-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-food-content {
  padding: 16px;
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.p-md { padding: 16px; }
.p-lg { padding: 24px; }
.mt-auto { margin-top: auto; }
.mb-md { margin-bottom: 16px; }
.text-center { text-align: center; }
.w-full { width: 100%; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Placeholders */
.placeholder-logo {
  width: 80px;
  height: 80px;
  background: var(--primary-gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  color: white;
  margin: 0 auto 24px;
}

.placeholder-image {
  background-color: #e4e4e7;
  display: block;
}

.placeholder-avatar {
  width: 40px;
  height: 40px;
  background: #333;
  border-radius: 50%;
}

.placeholder-map {
  width: 100%;
  height: 300px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-map::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}

.placeholder-pin {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 10px 20px rgba(248, 46, 0, 0.4);
  position: relative;
  z-index: 10;
}

.placeholder-pin::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
}

/* Navigation */
.nav-bottom {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  width: 24px;
  height: 24px;
  background: currentColor;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}

/* Headers */
.header-top {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 50;
}

/* Mood/AI Section */
.mood-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  white-space: nowrap;
}

.mood-pill.active {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

/* Categories */
.category-scroller {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 0 24px 24px;
  scrollbar-width: none;
}
.category-scroller::-webkit-scrollbar { display: none; }

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 70px;
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* Specific Page: Tracking */
.track-line {
  position: absolute;
  left: 20px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--border);
  z-index: 0;
}
.track-step {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}
.track-dot {
  width: 12px;
  height: 12px;
  background: var(--bg-dark);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  margin-top: 6px;
  margin-left: 13px; /* align with line */
}
.track-step.active .track-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(248, 46, 0, 0.2);
}

/* Splash Screen */
.splash-bg {
  background: #ffffff;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,107,0,0.15) 0%, rgba(255,255,255,0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  animation: pulse-glow 3s infinite;
}

.logo-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.logo-icon-splash {
  width: 96px;
  height: 96px;
  background: var(--primary-gradient);
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  box-shadow: var(--shadow-glow);
  transform: rotate(-10deg);
}

.logo-text-splash {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #18181b 0%, #52525b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: -16px;
}

.splash-footer {
  position: absolute;
  bottom: 48px;
  color: var(--text-muted);
  font-size: 14px;
}
