* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Changed to white background and Google-style colors */
body {
  font-family: "Google Sans", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #202124;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e8eaed;
}

.header-content h1 {
  font-size: 2rem;
  font-weight: 400;
  color: #202124;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #5f6368;
  font-size: 0.95rem;
  font-weight: 400;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* Updated buttons to Google Material Design style */
.btn-primary {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 0.625rem 1.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-primary:hover {
  background: #1765cc;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.btn-secondary {
  background: #ffffff;
  color: #1a73e8;
  border: 1px solid #dadce0;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #262626;
  border-color: #dadce0;
}

.btn-danger {
  background: #d93025;
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-danger:hover {
  background: #c5221f;
}

.btn-danger-small {
  background: transparent;
  color: #d93025;
  border: 1px solid #dadce0;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-small:hover {
  background: #fce8e6;
}

/* Updated unit switcher to Google-style toggle */
.unit-switcher {
  margin-bottom: 2rem;
}

.toggle-group {
  display: inline-flex;
  background: #f1f3f4;
  border-radius: 8px;
  padding: 4px;
}

.toggle-btn {
  background: transparent;
  color: #5f6368;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: #ffffff;
  color: #1a73e8;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
}

.toggle-btn:hover:not(.active) {
  color: #202124;
}

/* Dashboard Grid */
.dashboard-grid {
  column-count: 3;
  column-gap: 1.5rem;
  width: 100%;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    column-count: 1;
  }
}

/* Updated cards to white with subtle shadows */
.card {
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  margin-bottom: 1.5rem;
  break-inside: avoid;
  display: inline-block;
  width: 100%;
}

.card:hover {
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 400;
  color: #202124;
  margin-bottom: 1.5rem;
}

/* Updated input styles to Google Material Design */
.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  color: #5f6368;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.input-group input[type="number"],
.input-group select {
  width: 100%;
  background: #ffffff;
  border: 1px solid #dadce0;
  color: #202124;
  
  border-radius: 4px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.input-group input[type="number"]:focus,
.input-group select:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.input-group input[type="number"]:hover,
.input-group select:hover {
  border-color: #5f6368;
}

/* Updated slider to Google-style */
.slider {
  width: 100%;
  height: 4px;
  background: #dadce0;
  border-radius: 2px;
  outline: none;
  margin: 0.75rem 0;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #1a73e8;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.slider::-webkit-slider-thumb:hover {
  background: #1765cc;
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #1a73e8;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb:hover {
  background: #1765cc;
  transform: scale(1.2);
}

/* Imperial Height */
.imperial-height {
  display: flex;
  gap: 1rem;
}

.imperial-height > div {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.imperial-height input {
  flex: 1;
}

.imperial-height span {
  color: #5f6368;
  font-size: 0.875rem;
}

.hidden {
  display: none !important;
}

/* BMI Display */
.bmi-display {
  text-align: center;
  margin-bottom: 2rem;
}

.bmi-value {
  font-size: 4rem;
  font-weight: 300;
  color: #1a73e8;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.bmi-category {
  font-size: 1.25rem;
  color: #5f6368;
  font-weight: 400;
}

/* Gauge Container */
.gauge-container {
  margin: 2rem 0;
  height: 200px;
}

/* Progress Bar */
.progress-bar-container {
  margin: 2rem 0;
}

.progress-bar {
  position: relative;
  height: 8px;
  background: linear-gradient(to right, #1a73e8 0%, #34a853 25%, #fbbc04 50%, #ea4335 75%, #d93025 100%);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.progress-marker {
  position: absolute;
  top: -6px;
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid #1a73e8;
  border-radius: 50%;
  transform: translateX(-50%);
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  color: #5f6368;
  font-size: 0.75rem;
}

/* Category Legend */
.category-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #5f6368;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.legend-item.underweight .legend-color {
  background: #1a73e8;
}

.legend-item.normal .legend-color {
  background: #34a853;
}

.legend-item.overweight .legend-color {
  background: #fbbc04;
}

.legend-item.obese .legend-color {
  background: #ea4335;
}

/* Updated metrics to light theme */
.metric-item {
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.metric-label {
  color: #5f6368;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 400;
  color: #1a73e8;
  margin-bottom: 0.25rem;
}

.metric-status {
  font-size: 0.875rem;
  color: #5f6368;
}

.metric-description {
  font-size: 0.875rem;
  color: #5f6368;
}

/* Weight Range */
.weight-range-display {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.range-item {
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
}

.range-item.highlight {
  border-color: #1a73e8;
  background: #e8f0fe;
}

.range-label {
  color: #5f6368;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.range-value {
  font-size: 1.5rem;
  font-weight: 400;
  color: #202124;
}

/* Suggestions */
.suggestions-content {
  color: #5f6368;
  line-height: 1.8;
}

.suggestions-content p {
  margin-bottom: 1rem;
}

.suggestions-content strong {
  color: #1a73e8;
  font-weight: 500;
}

.suggestions-content ul {
  list-style: none;
  padding-left: 0;
}

.suggestions-content li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.suggestions-content li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #1a73e8;
  font-size: 1.25rem;
}

/* Comparison */
.comparison-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.comparison-item {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
}

.comparison-label {
  color: #5f6368;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.comparison-value {
  font-size: 1.5rem;
  font-weight: 400;
  color: #1a73e8;
}

/* Charts */
.chart-container {
  position: relative;
  height: 250px;
  margin-top: 1.5rem;
}

/* History */
.history-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.history-table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  background: #f8f9fa;
  color: #5f6368;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #e8eaed;
}

.history-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e8eaed;
  color: #202124;
  font-size: 0.875rem;
}

.history-table .no-data {
  text-align: center;
  color: #5f6368;
  padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .header-actions button {
    flex: 1;
    min-width: 120px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .comparison-content {
    grid-template-columns: 1fr;
  }

  .category-legend {
    grid-template-columns: 1fr;
  }

  .bmi-value {
    font-size: 3rem;
  }
}

/* Updated color states to Google colors */
.bmi-value.underweight {
  color: #1a73e8;
}

.bmi-value.normal {
  color: #34a853;
}

.bmi-value.overweight {
  color: #fbbc04;
}

.bmi-value.obese {
  color: #ea4335;
}

.bmi-category.underweight {
  color: #1a73e8;
}

.bmi-category.normal {
  color: #34a853;
}

.bmi-category.overweight {
  color: #fbbc04;
}

.bmi-category.obese {
  color: #ea4335;
}
