:root {
  --bg: #0b0f14;
  --text: #e6edf3;
  --muted: #a9b4c0;
  --axis: rgba(230, 237, 243, 0.35);
  --grid: rgba(230, 237, 243, 0.08);
  --stroke: rgba(230, 237, 243, 0.2);
  --panel: rgba(15, 22, 32, 0.78);
  --bubbleFill: rgba(122, 162, 255, 0.22);
  --bubbleStroke: rgba(230, 237, 243, 0.24);
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

body {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
}

#app {
  width: 100vw;
  height: 100vh;
  position: relative;
}

.hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 5;
  pointer-events: none;
}

.hud .left,
.hud .right {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.titleblock {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.titleblock .title {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.titleblock .meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

button {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.2px;
}

button:hover {
  border-color: rgba(230, 237, 243, 0.38);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input[type="range"] {
  width: min(34vw, 420px);
  accent-color: rgba(122, 162, 255, 1);
}

.year-readout {
  min-width: 62px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  letter-spacing: 0.4px;
}

svg {
  width: 100%;
  height: 100%;
  display: block;
}

.axis path,
.axis line {
  stroke: var(--axis);
  shape-rendering: crispEdges;
}

.axis text {
  fill: rgba(230, 237, 243, 0.82);
  font-size: 12px;
}

.grid line {
  stroke: var(--grid);
  shape-rendering: crispEdges;
}

.grid .domain {
  display: none;
}

.node circle {
  fill: var(--bubbleFill);
  stroke: var(--bubbleStroke);
  stroke-width: 1;
}

.node text {
  fill: rgba(230, 237, 243, 0.9);
  paint-order: stroke;
  stroke: rgba(11, 15, 20, 0.7);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
  user-select: none;
  text-anchor: middle;
  dominant-baseline: middle;
  font-weight: 900;
  letter-spacing: 0.1px;
}

.watermark {
  position: absolute;
  right: 18px;
  bottom: 14px;
  font-size: clamp(64px, 10vw, 140px);
  font-weight: 950;
  color: rgba(230, 237, 243, 0.06);
  letter-spacing: 1px;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.tooltip {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  background: rgba(15, 22, 32, 0.96);
  border: 1px solid rgba(230, 237, 243, 0.18);
  border-radius: 12px;
  padding: 10px 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  color: var(--text);
  line-height: 1.35;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  max-width: 340px;
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tooltip .title {
  font-weight: 900;
  margin-bottom: 4px;
}

.tooltip .muted {
  color: var(--muted);
}

.tooltip .row {
  color: rgba(230, 237, 243, 0.88);
}
