body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: #f4f7f9;
  color: #333;
  margin: 0;
  padding: 20px;
}
.container {
  width: 95%;
  max-width: 2800px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 25px;
}
.chart-card,
.metric-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  padding: 25px;
  display: flex;
  flex-direction: column;
}
#no-bloating-card {
  background-color: #f8fdf8;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4f8d4' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
h1 {
  color: #1a2b48;
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
}
h2 {
  color: #1a2b48;
  text-align: center;
  margin-top: 0;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.metric-card {
  text-align: center;
}
.metric-value {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4em;
  font-weight: bold;
  color: #28a745;
}
.chart-card canvas {
  flex-grow: 1;
  min-height: 0;
}

/* Navbar styles */
.navbar {
  text-align: center;
  padding: 10px 0;
  margin-bottom: 20px;
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 5px;
  display: inline-flex;
  background-color: #e9ecef;
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar li {
  margin: 0;
}

.navbar a {
  text-decoration: none;
  color: #495057;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 999px;
  transition: all 0.3s ease;
  display: block;
}

.navbar a.active {
  background-color: #ffffff;
  color: #007bff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.navbar a:not(.active):hover {
  color: #0056b3;
}

/* Button link style */
.button-link {
  display: inline-block;
  padding: 10px 15px;
  background-color: #007bff;
  color: #fff !important; /* Ensure text is white */
  text-decoration: none;
  border-radius: 5px;
  margin-top: 10px;
  text-align: center;
  transition: background-color 0.3s;
}

.button-link:hover {
  background-color: #0056b3;
}

/* Styles for 4K and large displays */
@media (min-width: 1080px) {
  .container {
    max-width: 95%; /* Use percentage for very wide screens */
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 30px; /* Increase gap for larger layout */
  }
  .chart-card,
  .metric-card {
    padding: 30px; /* Increase padding */
  }
  h2 {
    font-size: 1.6rem; /* Larger titles for larger cards */
  }
}

/* Toast Notification Styles */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
.toast.success {
  background-color: #28a745;
}
.toast.error {
  background-color: #dc3545;
}
.diet-content {
  text-align: left;
}
.diet-item {
  padding: 10px 4px;
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.5;
}
.diet-item:last-child {
  border-bottom: none;
}
.diet-item strong {
  font-weight: 600;
  color: #1e293b;
}
