/* Mission Fit - Global Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #22d3ee;
  --primary-dark: #06b6d4;
  --accent: #f472b6;
  --accent-dark: #ec4899;
  --bg-dark: #050814;
  --bg-card: rgba(16, 22, 48, 0.78);
  --bg-elevated: rgba(28, 34, 68, 0.72);
  --text-primary: #f0f4ff;
  --text-secondary: #a8b5d8;
  --text-muted: #6b7a9c;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
  --ring-progress: #22d3ee;
  --gloss-border: rgba(255,255,255,0.1);
  --gloss-highlight: rgba(255,255,255,0.06);
  --gloss-shine: rgba(255,255,255,0.15);
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --pink-glow: rgba(244, 114, 182, 0.2);
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Super Rich Glossy Cyan/Pink Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    /* Deep rich base - near black with blue undertone */
    linear-gradient(180deg, #02040a 0%, #050814 20%, #070b18 50%, #060a14 80%, #04060e 100%),
    /* Large cyan glow top-left - more intense */
    radial-gradient(ellipse 140% 100% at 5% 10%, rgba(6, 182, 212, 0.22) 0%, transparent 50%),
    /* Rich pink glow top-right - more intense */
    radial-gradient(ellipse 120% 100% at 92% 8%, rgba(244, 114, 182, 0.2) 0%, transparent 48%),
    /* Vibrant blue glow bottom-center */
    radial-gradient(ellipse 100% 80% at 50% 95%, rgba(59, 130, 246, 0.16) 0%, transparent 45%),
    /* Magenta accent mid-left */
    radial-gradient(ellipse 80% 70% at 15% 55%, rgba(236, 72, 153, 0.12) 0%, transparent 42%),
    /* Cyan-teal accent mid-right */
    radial-gradient(ellipse 90% 60% at 80% 60%, rgba(34, 211, 238, 0.1) 0%, transparent 40%),
    /* Soft violet upper-mid */
    radial-gradient(ellipse 60% 50% at 60% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    /* Soft ambient light spots - brighter for glossy feel */
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.035) 0%, transparent 25%),
    radial-gradient(circle at 80% 35%, rgba(255,255,255,0.02) 0%, transparent 20%),
    radial-gradient(circle at 40% 75%, rgba(255,255,255,0.025) 0%, transparent 30%),
    /* Horizontal sheen line for glossy effect */
    linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.015) 15%, transparent 30%),
    /* Subtle noise texture overlay for depth */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Animated glossy overlay with subtle movement */
.glossy-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.04) 0%, transparent 35%),
    linear-gradient(225deg, rgba(244, 114, 182, 0.04) 0%, transparent 35%),
    linear-gradient(315deg, rgba(59, 130, 246, 0.02) 0%, transparent 30%);
  pointer-events: none;
  animation: glossShift 15s ease-in-out infinite alternate;
}

@keyframes glossShift {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.9; }
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 4px; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes scan-line {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-slide-up { animation: slideUp 0.3s ease-out forwards; }
.animate-pulse-ring { animation: pulse-ring 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Utility Classes - Super Rich Glossy */
.glass {
  background: linear-gradient(165deg, rgba(28, 36, 68, 0.82) 0%, rgba(18, 24, 48, 0.68) 40%, rgba(24, 32, 62, 0.75) 100%);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.08),
    inset 0 -1px 1px rgba(0,0,0,0.12),
    0 10px 40px rgba(0,0,0,0.3),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 40px rgba(6, 182, 212, 0.04);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.glass-strong {
  background: linear-gradient(165deg, rgba(22, 30, 58, 0.92) 0%, rgba(14, 20, 42, 0.82) 40%, rgba(20, 28, 54, 0.88) 100%);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.1),
    inset 0 -1px 1px rgba(0,0,0,0.18),
    0 16px 48px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.03),
    0 0 50px rgba(6, 182, 212, 0.06);
  position: relative;
  overflow: hidden;
}

.glass-strong::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.gradient-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 40%, #0e7490 100%);
}

.gradient-accent {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 60%, #db2777 100%);
}

.gradient-cyan-pink {
  background: linear-gradient(135deg, #22d3ee 0%, #67e8f9 30%, #f472b6 70%, #ec4899 100%);
}

.gradient-card {
  background: linear-gradient(165deg, rgba(28, 36, 68, 0.9) 0%, rgba(18, 24, 48, 0.72) 45%, rgba(26, 34, 64, 0.82) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.07),
    inset 0 -1px 1px rgba(0,0,0,0.1),
    0 6px 28px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 30px rgba(6, 182, 212, 0.03);
  position: relative;
  overflow: hidden;
}

.gradient-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.text-gradient {
  background: linear-gradient(135deg, #22d3ee, #67e8f9, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-pink {
  background: linear-gradient(135deg, #f472b6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-glow {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25), 0 0 60px rgba(6, 182, 212, 0.08);
}

.shadow-glow-pink {
  box-shadow: 0 0 25px rgba(244, 114, 182, 0.25), 0 0 60px rgba(244, 114, 182, 0.08);
}

/* Super Rich Glossy card effect */
.glossy {
  background:
    linear-gradient(165deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 35%, rgba(255,255,255,0.06) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.12),
    0 10px 40px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 40px rgba(6, 182, 212, 0.05);
  position: relative;
  overflow: hidden;
}

.glossy::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

.glossy::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.04) 50%,
    transparent 60%
  );
  animation: shimmerRotate 10s linear infinite;
  pointer-events: none;
}

/* Shimmer highlight on cards */
.shimmer-card {
  position: relative;
  overflow: hidden;
}

.shimmer-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.03) 50%,
    transparent 60%
  );
  animation: shimmerRotate 8s linear infinite;
  pointer-events: none;
}

@keyframes shimmerRotate {
  0% { transform: translateX(-100%) rotate(0deg); }
  100% { transform: translateX(100%) rotate(0deg); }
}

/* Progress Ring */
.progress-ring-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05);
}

.progress-ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

/* Bottom Navigation - Super Rich Glossy */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(14, 20, 42, 0.94) 0%, rgba(10, 14, 32, 0.97) 100%);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow:
    0 -6px 32px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.06),
    0 0 40px rgba(6, 182, 212, 0.04);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 10px;
  gap: 4px;
  position: relative;
}

.bottom-nav-item.active {
  color: var(--primary);
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
}

.bottom-nav-item i {
  font-size: 20px;
  transition: transform 0.2s;
}

.bottom-nav-item:active i {
  transform: scale(0.85);
}

/* Cards - Super Rich Glossy */
.card {
  background: linear-gradient(165deg, rgba(32, 40, 72, 0.85) 0%, rgba(20, 26, 52, 0.68) 45%, rgba(30, 38, 68, 0.78) 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.07),
    inset 0 -1px 1px rgba(0,0,0,0.1),
    0 6px 24px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 35px rgba(6, 182, 212, 0.04);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.02) 50%,
    transparent 60%
  );
  animation: shimmerRotate 12s linear infinite;
  pointer-events: none;
}

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

.card-hover:hover {
  box-shadow:
    0 14px 48px rgba(0,0,0,0.4),
    0 0 0 1px rgba(6, 182, 212, 0.15),
    0 0 45px rgba(6, 182, 212, 0.08),
    0 0 80px rgba(244, 114, 182, 0.04);
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.22);
}

/* Buttons - Super Rich Glossy */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}

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

.btn-primary {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #0891b2 100%);
  color: white;
  box-shadow:
    0 6px 28px rgba(6, 182, 212, 0.45),
    inset 0 1px 1px rgba(255,255,255,0.25),
    inset 0 -1px 1px rgba(0,0,0,0.12),
    0 0 0 1px rgba(6, 182, 212, 0.15);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  box-shadow:
    0 8px 35px rgba(6, 182, 212, 0.55),
    inset 0 1px 1px rgba(255,255,255,0.3),
    0 0 0 1px rgba(6, 182, 212, 0.2),
    0 0 40px rgba(6, 182, 212, 0.1);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, #f9a8d4 0%, #f472b6 50%, #ec4899 100%);
  color: white;
  box-shadow:
    0 6px 28px rgba(244, 114, 182, 0.45),
    inset 0 1px 1px rgba(255,255,255,0.25),
    inset 0 -1px 1px rgba(0,0,0,0.12),
    0 0 0 1px rgba(244, 114, 182, 0.15);
}

.btn-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s;
}

.btn-accent::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.btn-accent:hover::before {
  left: 100%;
}

.btn-accent:hover {
  box-shadow:
    0 8px 35px rgba(244, 114, 182, 0.55),
    inset 0 1px 1px rgba(255,255,255,0.3),
    0 0 0 1px rgba(244, 114, 182, 0.2),
    0 0 40px rgba(244, 114, 182, 0.1);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.04);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.08), inset 0 1px 1px rgba(255,255,255,0.06);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 16px;
}

/* Form Elements */
.input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.2s;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15), 0 0 20px rgba(6, 182, 212, 0.08);
}

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

/* Food Cards */
.food-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(28, 34, 62, 0.6) 0%, rgba(18, 22, 45, 0.5) 100%);
  border-radius: 12px;
  border: 1px solid var(--gloss-border);
  transition: all 0.2s;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.04), 0 4px 12px rgba(0,0,0,0.15);
}

.food-card:active { background: rgba(255,255,255,0.06); }

.food-card-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.food-card-info { flex: 1; min-width: 0; }

.food-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.food-card-cal {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* Meal Sections - Super Rich Glossy */
.meal-section {
  background: linear-gradient(165deg, rgba(32, 40, 72, 0.85) 0%, rgba(20, 26, 52, 0.68) 45%, rgba(30, 38, 68, 0.78) 100%);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.06),
    inset 0 -1px 1px rgba(0,0,0,0.1),
    0 6px 24px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 35px rgba(6, 182, 212, 0.03);
  position: relative;
  overflow: hidden;
}

.meal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

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

.meal-title {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.meal-calories {
  font-size: 13px;
  color: var(--text-muted);
}

/* Camera / Scanner */
.camera-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.camera-viewfinder {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camera-frame {
  width: 280px;
  height: 280px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  position: relative;
}

.camera-frame::before,
.camera-frame::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--primary);
  border-style: solid;
}

.camera-frame::before {
  top: -2px;
  left: -2px;
  border-width: 4px 0 0 4px;
  border-radius: 20px 0 0 0;
}

.camera-frame::after {
  bottom: -2px;
  right: -2px;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 20px 0;
}

.scan-line {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: scan-line 2s ease-in-out infinite;
  box-shadow: 0 0 10px var(--primary);
}

.camera-controls {
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
}

.shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  border: 4px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
}

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

.shutter-btn-inner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: white;
  border: 2px solid #333;
}

/* Charts */
.chart-container {
  position: relative;
  height: 200px;
  width: 100%;
}

/* Macro Bars */
.macro-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}

.macro-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.macro-protein { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.macro-carbs { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.macro-fat { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Water Tracker */
.water-cup {
  width: 36px;
  height: 48px;
  border: 2px solid var(--bg-elevated);
  border-radius: 4px 4px 12px 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.water-cup.filled {
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.1);
}

.water-cup .water-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #22d3ee, #06b6d4);
  transition: height 0.4s ease;
}

/* Exercise Cards */
.exercise-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(28, 34, 62, 0.78) 0%, rgba(18, 22, 45, 0.62) 50%, rgba(28, 34, 62, 0.72) 100%);
  border-radius: 14px;
  border: 1px solid var(--gloss-border);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.05),
    0 4px 16px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.exercise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.exercise-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Community Post */
.community-post {
  background: linear-gradient(145deg, rgba(28, 34, 62, 0.78) 0%, rgba(18, 22, 45, 0.62) 50%, rgba(28, 34, 62, 0.72) 100%);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--gloss-border);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.05),
    0 4px 16px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.community-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

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

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  background: linear-gradient(145deg, rgba(28, 34, 62, 0.9) 0%, rgba(18, 22, 45, 0.85) 50%, rgba(28, 34, 62, 0.88) 100%);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.06),
    0 -8px 32px rgba(0,0,0,0.3);
  position: relative;
}

.modal-sheet::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

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

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* Search Bar - Super Rich Glossy */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(165deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.06),
    0 4px 16px rgba(0,0,0,0.15),
    0 0 0 1px rgba(6, 182, 212, 0.04);
  transition: all 0.25s;
}

.search-bar:focus-within {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.08),
    0 4px 20px rgba(0,0,0,0.2),
    0 0 0 1px rgba(6, 182, 212, 0.1),
    0 0 25px rgba(6, 182, 212, 0.08);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
}

/* Tags - Super Rich Glossy */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}

.tag-primary {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18) 0%, rgba(34, 211, 238, 0.1) 100%);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.08), inset 0 1px 1px rgba(255,255,255,0.06);
}

.tag-accent {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.18) 0%, rgba(236, 72, 153, 0.1) 100%);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.25);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.08), inset 0 1px 1px rgba(255,255,255,0.06);
}

.tag-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Streak Flame */
.streak-flame {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 700;
}

/* Nutrient Grid */
.nutrient-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.nutrient-item {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

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

.nutrient-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Page Transitions */
.page-enter {
  animation: fadeIn 0.3s ease-out;
}

/* Safe Areas */
.pt-safe { padding-top: env(safe-area-inset-top, 0); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom, 0); }

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  transition: all 0.3s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Photo upload area */
.photo-upload {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.2s;
  background: linear-gradient(145deg, rgba(28, 34, 62, 0.5) 0%, rgba(18, 22, 45, 0.4) 50%, rgba(28, 34, 62, 0.45) 100%);
  position: relative;
  overflow: hidden;
}

.photo-upload::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.photo-upload:active {
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.08);
}

/* Intermittent Fasting Timer - Super Rich Glossy */
.fasting-timer {
  background: linear-gradient(165deg, rgba(32, 40, 72, 0.9) 0%, rgba(20, 26, 52, 0.75) 45%, rgba(30, 38, 68, 0.85) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.07),
    inset 0 -1px 1px rgba(0,0,0,0.12),
    0 10px 40px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 45px rgba(6, 182, 212, 0.05);
}

.fasting-timer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), rgba(244, 114, 182, 0.3), transparent);
}

.fasting-timer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.03) 50%,
    transparent 60%
  );
  animation: shimmerRotate 10s linear infinite;
  pointer-events: none;
}

.fasting-progress-ring {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.fasting-progress-ring svg {
  transform: rotate(-90deg);
}

.fasting-progress-ring .ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05);
}

.fasting-progress-ring .ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.fasting-status-active {
  color: #22d3ee;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.fasting-status-completed {
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.fasting-status-inactive {
  color: var(--text-muted);
}

/* Responsive */
@media (min-width: 768px) {
  .mobile-container {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.05);
  }
}

/* Hide scrollbar for horizontal scroll */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Horizontal scroll container */
.h-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px;
  scroll-snap-type: x mandatory;
}

.h-scroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}
