:root {
  --page: #060b16;
  --surface: #101a30;
  --surface-2: #16223d;
  --ink: #ffffff;
  --ink-secondary: #aab8d6;
  --ink-muted: #6c7ca0;
  --grid: #223056;
  --baseline: #2e3f6b;
  --accent: #3987e5;
  --accent-strong: #2a78d6;
  --accent-soft: #86b6ef;
  --yellow: #f4c430;
  --yellow-strong: #d9a913;
  --border: rgba(130, 170, 255, 0.16);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
}

body {
  font-family: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
  padding: 0 16px 64px;
  background:
    radial-gradient(ellipse 900px 480px at 50% -8%, rgba(57, 135, 229, 0.28), transparent 62%),
    radial-gradient(ellipse 600px 320px at 85% 10%, rgba(244, 196, 48, 0.08), transparent 60%),
    var(--page);
}

main {
  max-width: 880px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 56px 0 32px;
}

.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(1.6rem, 4.8vw, 2.4rem);
  font-weight: 700;
  color: var(--ink-secondary);
}

.hero-can {
  display: block;
  margin: 0 auto 32px;
  max-height: 220px;
  width: auto;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 36px rgba(244, 196, 48, 0.18));
  animation: floatCan 6s ease-in-out infinite;
}

@keyframes floatCan {
  0%, 100% { transform: translateY(0)     rotate(-8deg); }
  50%      { transform: translateY(-14px) rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-can { animation: none; }
}

.counter {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 3vw, 28px);
  flex-wrap: wrap;
  min-height: 96px;
  margin-top: 16px;
}

.counter-loading {
  font-size: 1.1rem;
  color: var(--ink-muted);
}

.counter-empty {
  font-size: 1.1rem;
  color: var(--ink-secondary);
  max-width: 32ch;
}

.counter-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter-segment .value {
  font-size: clamp(2.6rem, 11vw, 5.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 0 42px rgba(57, 135, 229, 0.45);
}

.counter-segment .unit {
  margin-top: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--yellow);
}

.last-details {
  margin: 28px 0 0;
  color: var(--ink-secondary);
  font-size: 0.95rem;
}

.last-details strong {
  color: var(--ink);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin: 0;
}

.stats {
  margin-top: 40px;
}

.stat-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.stat-card {
  background: var(--surface);
  padding: 18px 16px;
  border-top: 2px solid var(--yellow);
  transition: background-color 0.15s ease;
}

.stat-card:hover {
  background: var(--surface-2);
}

.stat-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.stat-value {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
}

.chart-section {
  margin-top: 32px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px 8px;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-wrap {
  margin-top: 14px;
}

.chart {
  width: 100%;
  height: 180px;
  display: block;
  overflow: visible;
}

.chart rect.bar {
  fill: var(--accent);
  cursor: pointer;
  transition: fill 0.1s ease;
}

.chart rect.bar:hover,
.chart rect.bar:focus {
  fill: var(--yellow);
  outline: none;
}

.chart line.baseline {
  stroke: var(--baseline);
  stroke-width: 1;
}

.chart line.gridline {
  stroke: var(--grid);
  stroke-width: 1;
}

.chart text.axis-label {
  fill: var(--ink-muted);
  font-size: 10px;
}

.chart text.grid-label {
  fill: var(--ink-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.tooltip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--ink);
  transform: translate(-50%, -110%);
  white-space: nowrap;
}

.tooltip .tooltip-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tooltip .tooltip-label {
  color: var(--ink-muted);
  margin-left: 6px;
}

.pin-icon {
  display: inline-block;
  vertical-align: -2px;
  color: var(--yellow);
  margin: 0 2px;
}

@media (max-width: 480px) {
  .hero { padding: 40px 0 24px; }
  .hero-can { max-height: 160px; }
}
