*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-alt: #f0f5f3;
  --lake-bg: #e1f5ee;
  --lake-text: #04342c;
  --lake-muted: #0f6e56;
  --lake-accent: #1d9e75;
  --lake-light: #5dcaa5;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border: rgba(0,0,0,0.08);
  --badge-bg: #faeeda;
  --badge-text: #854f0b;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 680px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.75rem;
}
.header-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #dbeafe;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.header-title { font-size: 20px; font-weight: 600; }
.header-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 1px; }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lake-accent);
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Cards */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.card-lake {
  background: var(--lake-bg);
  border-color: transparent;
}

.card-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.card-lake .card-label { color: var(--lake-muted); }

.card-value {
  font-size: 30px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1;
}
.card-lake .card-value { color: var(--lake-text); }

.card-badge {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.card-detail {
  margin-top: 14px;
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}
.card-lake .card-detail { color: var(--lake-muted); }

/* Small stat cards */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover { transform: translateY(-1px); }
.stat-card.card-lake {
  background: var(--lake-bg);
  border-color: transparent;
}
.stat-card.card-lake .stat-label { color: var(--lake-muted); }
.stat-card.card-lake .stat-value { color: var(--lake-text); }
.stat-card.card-lake .stat-sub   { color: var(--lake-muted); }
.stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.stat-value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 4px;
}
.stat-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Chart section */
.chart-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  margin-top: 12px;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.chart-title {
  font-size: 15px;
  font-weight: 600;
}
.chart-toggles {
  display: flex;
  gap: 4px;
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 3px;
}
.chart-toggle {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.2s ease;
}
.chart-toggle.active {
  background: var(--surface);
  color: var(--lake-accent);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.chart-toggle:hover:not(.active) { color: var(--text-primary); }

.chart-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 8px; height: 8px;
  border-radius: 2px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 240px;
}
#sunArcContainer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Fade-in animation */
.fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.5s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
