:root {
  --bg: #131315;
  --bg-soft: #17181c;
  --panel: rgba(25, 27, 33, 0.62);
  --panel-strong: rgba(29, 31, 38, 0.78);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #e5e1e4;
  --muted: #a9adbb;
  --primary: #adc6ff;
  --primary-strong: #4d8eff;
  --secondary: #4edea3;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top center, rgba(173, 198, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #16171b 0%, #111216 100%);
  color: var(--text);
  font-family: "Inter", "PingFang SC", sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 18px 24px;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(19, 19, 21, 0.72);
}

.brand-wrap {
  width: min(100%, 1320px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-family: "Geist", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.page {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 72px 24px 80px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-card,
.chart-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.28);
}

.hero-card {
  width: min(100%, 720px);
  padding: 44px 32px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-orb {
  position: absolute;
  top: -48px;
  left: 50%;
  width: 360px;
  height: 140px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(173, 198, 255, 0.12);
  filter: blur(52px);
  pointer-events: none;
}

.hero-icon-wrap {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 18px;
  border: 1px solid rgba(173, 198, 255, 0.18);
  background: rgba(173, 198, 255, 0.08);
}

.hero-icon {
  font-size: 30px;
  color: var(--primary);
}

.hero-card h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.import-button {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(173, 198, 255, 0.22);
  background: rgba(173, 198, 255, 0.11);
  color: var(--primary);
  text-decoration: none;
  font-family: "Geist", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(173, 198, 255, 0.18);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.import-button:hover {
  transform: translateY(-1px);
  background: rgba(173, 198, 255, 0.16);
  border-color: rgba(173, 198, 255, 0.3);
}

.button-icon {
  font-size: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--muted);
  font-family: "Geist", sans-serif;
  font-size: 12px;
}

.meta-pill strong {
  font-weight: 500;
}

.meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--secondary);
  box-shadow: 0 0 10px rgba(78, 222, 163, 0.4);
}

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

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px 14px;
}

.chart-head h2 {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.refresh-button:hover {
  color: var(--text);
  border-color: rgba(173, 198, 255, 0.22);
  background: rgba(173, 198, 255, 0.06);
}

.chart-card {
  padding: 18px;
}

.chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  min-height: 20px;
  margin-bottom: 8px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: "Geist", sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.chart-frame {
  position: relative;
  height: 420px;
  border-radius: 14px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at top center, rgba(173, 198, 255, 0.06), transparent 32%),
    var(--panel-strong);
  background-size: 100% 25%, 25% 100%, auto, auto;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}

#chart {
  width: 100%;
  height: 100%;
  display: block;
}

.axis-labels {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  color: rgba(229, 225, 228, 0.56);
  font-family: "Geist", sans-serif;
  font-size: 11px;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .page {
    padding: 48px 16px 56px;
  }

  .topbar {
    padding: 14px 16px;
  }

  .brand {
    font-size: 20px;
  }

  .hero-card {
    padding: 34px 20px 24px;
  }

  .hero-card h1 {
    font-size: 28px;
  }

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

  .chart-frame {
    height: 320px;
  }

  .chart-head {
    padding-inline: 2px;
  }

  .chart-legend {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .axis-labels {
    font-size: 10px;
    left: 12px;
    right: 12px;
  }
}
