:root {
  /* HSL Color Palette - Premium & Modern */
  --primary: 215 90% 55%;   /* Vibrant Blue */
  --primary-dark: 215 80% 45%;
  --secondary: 260 80% 60%; /* Soft Purple */
  --accent: 330 80% 60%;    /* Pinkish Accent for emotions */
  --bg-gradient-start: 210 50% 98%;
  --bg-gradient-end: 220 50% 95%;
  --text-main: 215 30% 15%;
  --text-muted: 215 20% 45%;
  --surface: 0 0% 100%;
  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 2px 8px rgba(31, 41, 55, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.08);
  --shadow-lg: 0 20px 40px rgba(31, 41, 55, 0.12);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: linear-gradient(135deg, hsl(var(--bg-gradient-start)), hsl(var(--bg-gradient-end)));
  color: hsl(var(--text-main));
  min-height: 100vh;
  line-height: 1.6;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0px); } }

.fade-in { animation: fadeIn 0.6s ease-out forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  font-weight: 500;
  color: hsl(var(--text-muted));
  transition: var(--transition);
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: hsl(var(--primary));
}

/* Cards & Glassmorphism */
.card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.9);
}

.card h2, .card h3 {
  margin-top: 0;
  color: hsl(var(--text-main));
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Typography & Helpers */
.text-center { text-align: center; }
.muted { color: hsl(var(--text-muted)); font-size: 0.9rem; }
.hero-title { font-size: 3rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; color: hsl(var(--text-main)); }
.hero-subtitle { font-size: 1.2rem; color: hsl(var(--text-muted)); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 0.95rem;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-dark)));
  color: white;
  box-shadow: 0 4px 12px hsla(var(--primary), 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 20px hsla(var(--primary), 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: hsl(var(--primary));
  border: 1px solid hsla(var(--primary), 0.2);
}

.btn-secondary:hover {
  background: hsl(215, 50%, 98%);
  border-color: hsla(var(--primary), 0.4);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-sm); }

/* Inputs */
input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.8);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: hsl(var(--primary));
  background: #fff;
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.1);
}

/* Feature Specifics */
/* Nutrition */
.food-list-item { display: flex; justify-content: space-between; padding: 12px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.food-list-item:last-child { border-bottom: none; }
.progress-bar { height: 16px; background: rgba(0,0,0,0.05); border-radius: 99px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%); transition: width 0.5s ease; }

/* Emotions */
.emotion-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.emotion-btn {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 8px 16px;
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}
.emotion-btn:hover { background: hsl(var(--primary)); color: white; border-color: transparent; }
.emotion-btn.active { background: hsl(var(--primary)); color: white; }

/* Chat */
.chat-window { height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; background: rgba(255,255,255,0.5); border-radius: var(--radius-md); margin-bottom: 16px; }
.chat-msg { max-width: 80%; padding: 12px 16px; border-radius: 18px; font-size: 0.95rem; line-height: 1.5; animation: fadeIn 0.3s ease; }
.chat-msg.user { align-self: flex-end; background: hsl(var(--primary)); color: white; border-bottom-right-radius: 4px; }
.chat-msg.bot { align-self: flex-start; background: #fff; color: hsl(var(--text-main)); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }

/* Breathing */
.breath-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 0; }
.breath-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(161, 140, 209, 0.4);
  transition: transform 0.1s linear; /* JS handles smooth timing */
}

/* Dashboard Tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.stat-value { font-size: 2rem; font-weight: 700; color: hsl(var(--text-main)); }
.stat-label { color: hsl(var(--text-muted)); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Mobile Menu - simple implementation */
@media (max-width: 768px) {
  .header-nav { display: none; } /* In a real app we'd add a toggle */
  .grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
}
