:root {
  --atlas-black: #040306;
  --atlas-panel: #120f18;
  --atlas-cream: #fff3d7;
  --atlas-muted: #b9a98d;
  --atlas-green: #00ff99;
  --atlas-pink: #ff2bd6;
  --atlas-amber: #ffcc33;
  --atlas-blue: #32a9ff;
  --atlas-red: #ff3b3b;
  --atlas-land: rgba(255, 243, 215, 0.115);
  --atlas-land-strong: rgba(0, 255, 153, 0.12);
  --atlas-land-line: rgba(0, 255, 153, 0.42);
  --atlas-line: rgba(255, 243, 215, 0.22);
  --atlas-glow-green:
    0 0 12px rgba(0, 255, 153, 0.75),
    0 0 34px rgba(0, 255, 153, 0.25);
  --atlas-glow-pink:
    0 0 12px rgba(255, 43, 214, 0.78),
    0 0 34px rgba(255, 43, 214, 0.28);
  --atlas-max-width: 1320px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--atlas-cream);
  background: var(--atlas-black);
  font-family:
    "Courier New",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.045) 0,
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.42;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    transparent 42%,
    rgba(0, 0, 0, 0.62) 100%
  );
}

#main-content {
  padding-top: 72px;
}

.atlas-page,
.atlas-page * {
  box-sizing: border-box;
}

.atlas-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 48px 0 72px;
  color: var(--atlas-cream);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 43, 214, 0.13), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(0, 255, 153, 0.12), transparent 26%),
    radial-gradient(circle at 52% 100%, rgba(50, 169, 255, 0.10), transparent 30%),
    var(--atlas-black);
}

.atlas-page a {
  color: inherit;
  text-decoration: none;
}

.atlas-page h1,
.atlas-page h2,
.atlas-page h3,
.atlas-page p {
  margin-top: 0;
}

.atlas-background {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 18px 18px;
  transform: rotate(-2deg);
  animation: atlas-grid-drift 18s linear infinite;
}

.atlas-container {
  width: min(calc(100% - 28px), var(--atlas-max-width));
  margin-inline: auto;
}

.atlas-hero {
  display: grid;
  gap: 24px;
  align-items: end;
  margin-bottom: 34px;
}

.atlas-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--atlas-amber);
  font-size: 0.8125rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 204, 51, 0.55);
}

.atlas-kicker::before {
  content: "[ ";
  color: var(--atlas-green);
}

.atlas-kicker::after {
  content: " ]";
  color: var(--atlas-green);
}

.atlas-title {
  max-width: 980px;
  margin-bottom: 16px;
  color: var(--atlas-cream);
  font-size: clamp(2.75rem, 10vw, 6.75rem);
  line-height: 0.82;
  letter-spacing: -0.12em;
  text-transform: uppercase;
  text-shadow:
    3px 0 0 rgba(255, 43, 214, 0.8),
    -3px 0 0 rgba(0, 255, 153, 0.7),
    0 0 28px rgba(255, 243, 215, 0.18);
}

.atlas-subtitle {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--atlas-muted);
  font-size: clamp(0.9375rem, 2.2vw, 1.1875rem);
  line-height: 1.65;
}

.atlas-terminal {
  padding: 16px;
  border: 2px solid rgba(0, 255, 153, 0.5);
  background: rgba(3, 12, 8, 0.68);
  box-shadow:
    inset 0 0 28px rgba(0, 255, 153, 0.12),
    0 0 30px rgba(0, 255, 153, 0.12);
}

.atlas-terminal__bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(0, 255, 153, 0.35);
  color: var(--atlas-muted);
  font-size: 0.75rem;
}

.atlas-lamp {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.atlas-lamp--red {
  background: var(--atlas-red);
  box-shadow: 0 0 10px var(--atlas-red);
}

.atlas-lamp--amber {
  background: var(--atlas-amber);
  box-shadow: 0 0 10px var(--atlas-amber);
}

.atlas-lamp--green {
  background: var(--atlas-green);
  box-shadow: 0 0 10px var(--atlas-green);
}

.atlas-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.atlas-stat {
  padding: 12px;
  border: 1px solid rgba(255, 243, 215, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.atlas-stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--atlas-muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
}

.atlas-stat strong {
  display: block;
  overflow: hidden;
  color: var(--atlas-green);
  font-size: clamp(1.375rem, 5vw, 2.125rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.08em;
  text-overflow: ellipsis;
  text-shadow: var(--atlas-glow-green);
  white-space: nowrap;
}

.atlas-controls {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
  border: 2px solid var(--atlas-line);
  background: rgba(11, 7, 16, 0.92);
  box-shadow: 6px 6px 0 rgba(255, 43, 214, 0.55);
}

.atlas-search {
  position: relative;
}

.atlas-search::before {
  content: ">";
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--atlas-green);
  font-weight: 900;
  text-shadow: var(--atlas-glow-green);
  transform: translateY(-50%);
}

.atlas-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 34px;
  border: 2px solid rgba(0, 255, 153, 0.35);
  outline: none;
  color: var(--atlas-green);
  background: #030905;
  box-shadow: inset 0 0 20px rgba(0, 255, 153, 0.08);
  font: inherit;
  font-weight: 900;
}

.atlas-search input::placeholder {
  color: rgba(0, 255, 153, 0.45);
}

.atlas-search input:focus {
  border-color: var(--atlas-green);
  text-shadow: var(--atlas-glow-green);
}

.atlas-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.atlas-filter {
  min-height: 40px;
  padding: 0 12px;
  border: 2px solid var(--atlas-line);
  color: var(--atlas-muted);
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.atlas-filter:hover,
.atlas-filter:focus-visible,
.atlas-filter.is-active {
  border-color: var(--atlas-green);
  color: var(--atlas-green);
  box-shadow: 3px 3px 0 rgba(255, 43, 214, 0.55);
  text-shadow: var(--atlas-glow-green);
}

.atlas-filter:focus-visible,
.atlas-search input:focus-visible,
.atlas-button:focus-visible,
.atlas-node:focus-visible {
  outline: 2px solid var(--atlas-cream);
  outline-offset: 3px;
}

.atlas-results {
  min-height: 1em;
  margin: 0;
  color: var(--atlas-amber);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.atlas-dashboard {
  display: grid;
  gap: 22px;
  align-items: start;
}

.atlas-map-shell {
  position: relative;
  padding: 14px;
  border: 3px solid var(--atlas-cream);
  background:
    linear-gradient(135deg, rgba(255, 43, 214, 0.15), transparent 32%),
    linear-gradient(315deg, rgba(0, 255, 153, 0.14), transparent 36%),
    #0c0811;
  box-shadow:
    9px 9px 0 rgba(255, 43, 214, 0.82),
    -9px -9px 0 rgba(0, 255, 153, 0.6),
    0 0 60px rgba(255, 43, 214, 0.12);
}

.atlas-screen {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(0, 255, 153, 0.65);
  background:
    radial-gradient(circle at 50% 40%, rgba(0, 255, 153, 0.10), transparent 32%),
    #030905;
  box-shadow: inset 0 0 42px rgba(0, 255, 153, 0.18);
}

.atlas-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 255, 153, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(0, 255, 153, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

.atlas-map-top {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px dashed rgba(0, 255, 153, 0.25);
  color: var(--atlas-green);
  font-size: 0.75rem;
  font-weight: 900;
  text-shadow: var(--atlas-glow-green);
  text-transform: uppercase;
}

.atlas-map-wrap {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.atlas-svg {
  display: block;
  width: 100%;
  min-height: 470px;
  height: auto;
}

.atlas-graticule {
  fill: none;
  stroke: rgba(0, 255, 153, 0.13);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.atlas-continent,
.atlas-island {
  fill: var(--atlas-land);
  stroke: var(--atlas-land-line);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition:
    fill 150ms ease,
    stroke 150ms ease,
    filter 150ms ease;
}

.atlas-continent:hover,
.atlas-island:hover {
  fill: var(--atlas-land-strong);
  stroke: var(--atlas-green);
  filter: drop-shadow(0 0 8px rgba(0, 255, 153, 0.7));
}

.atlas-coast-detail {
  fill: none;
  stroke: rgba(255, 243, 215, 0.12);
  stroke-width: 1;
  stroke-dasharray: 3 8;
  vector-effect: non-scaling-stroke;
}

.atlas-line {
  fill: none;
  stroke: rgba(255, 204, 51, 0.32);
  stroke-width: 1.2;
  stroke-dasharray: 6 8;
  vector-effect: non-scaling-stroke;
  animation: atlas-dash 5s linear infinite;
}

.atlas-node {
  cursor: pointer;
}

.atlas-node-dot {
  fill: var(--atlas-green);
  stroke: #030905;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(0, 255, 153, 0.9));
  transform-origin: center;
  transition:
    transform 150ms ease,
    fill 150ms ease,
    filter 150ms ease;
}

.atlas-node-core {
  fill: #030905;
  stroke: var(--atlas-cream);
  stroke-width: 1;
  pointer-events: none;
}

.atlas-node-ring {
  fill: none;
  stroke: rgba(0, 255, 153, 0.58);
  stroke-width: 2;
  opacity: 0.75;
  pointer-events: none;
  transform-origin: center;
  animation: atlas-ring-pulse 2.6s ease-out infinite;
}

.atlas-node.is-hot .atlas-node-dot {
  fill: var(--atlas-pink);
  filter: drop-shadow(0 0 10px rgba(255, 43, 214, 0.95));
}

.atlas-node.is-hot .atlas-node-ring {
  stroke: rgba(255, 43, 214, 0.62);
}

.atlas-node:hover .atlas-node-dot,
.atlas-node:focus-visible .atlas-node-dot {
  fill: var(--atlas-amber);
  filter: drop-shadow(0 0 12px rgba(255, 204, 51, 0.9));
  transform: scale(1.8);
}

.atlas-node-label {
  fill: var(--atlas-cream);
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  opacity: 0.82;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(255, 243, 215, 0.4);
}

.atlas-node.is-dimmed,
.atlas-line.is-dimmed {
  opacity: 0.16;
}

.atlas-node.is-focused .atlas-node-dot {
  fill: var(--atlas-amber) !important;
  filter: drop-shadow(0 0 14px rgba(255, 204, 51, 0.95)) !important;
  transform: scale(2.1);
}

.atlas-node.is-focused .atlas-node-ring {
  stroke: rgba(255, 204, 51, 0.75) !important;
}

.atlas-side-panel {
  padding: 16px;
  border: 2px solid rgba(0, 255, 153, 0.4);
  background: rgba(3, 12, 8, 0.58);
  box-shadow: inset 0 0 28px rgba(0, 255, 153, 0.09);
}

.atlas-side-panel h2,
.atlas-side-panel h3 {
  margin-bottom: 16px;
  color: var(--atlas-pink);
  font-size: 1.5rem;
  letter-spacing: -0.06em;
  text-shadow: var(--atlas-glow-pink);
  text-transform: uppercase;
}

.atlas-selected-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 3px double var(--atlas-amber);
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 204, 51, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 43, 214, 0.08), transparent 40%),
    #100b14;
  box-shadow: 6px 6px 0 rgba(0, 255, 153, 0.35);
}

.atlas-selected-city {
  margin-bottom: 10px;
  color: var(--atlas-green);
  font-size: 1.875rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.09em;
  text-shadow: var(--atlas-glow-green);
  text-transform: uppercase;
}

.atlas-selected-meta {
  margin-bottom: 14px;
  color: var(--atlas-amber);
  font-size: 0.75rem;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 204, 51, 0.35);
  text-transform: uppercase;
}

.atlas-selected-message {
  margin-bottom: 0;
  color: var(--atlas-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.atlas-ranking {
  display: grid;
  gap: 10px;
}

.atlas-rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px dashed rgba(255, 243, 215, 0.18);
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.atlas-rank-row:hover,
.atlas-rank-row:focus-visible {
  color: var(--atlas-green);
  text-shadow: var(--atlas-glow-green);
}

.atlas-rank-number {
  color: var(--atlas-pink);
  font-weight: 900;
  text-shadow: var(--atlas-glow-pink);
}

.atlas-rank-city {
  color: var(--atlas-cream);
  font-weight: 900;
  text-transform: uppercase;
}

.atlas-rank-count {
  color: var(--atlas-green);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--atlas-glow-green);
}

.atlas-tooltip {
  position: fixed;
  z-index: 1300;
  min-width: 210px;
  max-width: 280px;
  padding: 10px;
  border: 1px solid var(--atlas-amber);
  pointer-events: none;
  color: var(--atlas-amber);
  background: rgba(9, 7, 13, 0.97);
  box-shadow:
    4px 4px 0 rgba(255, 43, 214, 0.7),
    0 0 18px rgba(255, 204, 51, 0.22);
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transform: translate(12px, 12px);
  transition: opacity 80ms ease, visibility 80ms ease;
}

.atlas-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.atlas-tooltip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--atlas-green);
  font-size: 0.9375rem;
  text-shadow: var(--atlas-glow-green);
}

.atlas-ticker {
  overflow: hidden;
  margin-top: 24px;
  padding: 12px 0;
  border: 2px solid rgba(255, 43, 214, 0.55);
  color: var(--atlas-pink);
  background: rgba(255, 43, 214, 0.07);
  box-shadow: 5px 5px 0 rgba(0, 255, 153, 0.38);
  text-shadow: var(--atlas-glow-pink);
  white-space: nowrap;
}

.atlas-ticker__track {
  display: inline-block;
  padding-left: 100%;
  font-weight: 900;
  text-transform: uppercase;
  animation: atlas-ticker 24s linear infinite;
}

.atlas-claim {
  max-width: 860px;
  margin: 88px auto 20px;
  text-align: center;
}

.atlas-claim h2 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 7vw, 5.25rem);
  line-height: 0.88;
  letter-spacing: -0.1em;
  text-transform: uppercase;
  text-shadow:
    2px 0 0 rgba(255, 43, 214, 0.5),
    -2px 0 0 rgba(0, 255, 153, 0.45);
}

.atlas-claim > p:not(.atlas-kicker) {
  margin-bottom: 26px;
  color: var(--atlas-muted);
  line-height: 1.65;
}

.atlas-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 2px solid var(--atlas-line);
  color: var(--atlas-cream);
  background: #0b0710;
  box-shadow: 5px 5px 0 rgba(255, 43, 214, 0.7);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    color 120ms ease,
    border-color 120ms ease;
}

.atlas-button:hover {
  border-color: var(--atlas-green);
  color: var(--atlas-green);
  box-shadow: 2px 2px 0 rgba(255, 43, 214, 0.7);
  text-shadow: var(--atlas-glow-green);
  transform: translate(3px, 3px);
}

.atlas-button--primary {
  border-color: var(--atlas-green);
  color: var(--atlas-green);
  background: linear-gradient(135deg, #130a18, #071510);
  box-shadow:
    5px 5px 0 var(--atlas-pink),
    0 0 22px rgba(0, 255, 153, 0.22);
  text-shadow: var(--atlas-glow-green);
}

@keyframes atlas-grid-drift {
  from {
    transform: translate3d(0, 0, 0) rotate(-2deg);
  }

  to {
    transform: translate3d(72px, 36px, 0) rotate(-2deg);
  }
}

@keyframes atlas-dash {
  to {
    stroke-dashoffset: -80;
  }
}

@keyframes atlas-ring-pulse {
  0% {
    r: 4;
    opacity: 0.8;
  }

  100% {
    r: 24;
    opacity: 0;
  }
}

@keyframes atlas-ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@keyframes atlas-cursor-blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.atlas-cursor {
  display: inline-block;
  width: 0.65em;
  color: var(--atlas-green);
  animation: atlas-cursor-blink 1s steps(2, end) infinite;
}

@media (min-width: 760px) {
  .atlas-hero {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .atlas-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .atlas-controls {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .atlas-results {
    grid-column: 1 / -1;
  }

  .atlas-dashboard {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}

@media (max-width: 540px) {
  .atlas-page {
    padding-top: 36px;
  }

  .atlas-filter {
    flex: 1 1 calc(50% - 10px);
  }

  .atlas-map-shell {
    box-shadow:
      6px 6px 0 rgba(255, 43, 214, 0.82),
      -6px -6px 0 rgba(0, 255, 153, 0.6);
  }

  .atlas-map-top {
    flex-wrap: wrap;
    font-size: 0.625rem;
  }

  .atlas-svg {
    min-height: 390px;
  }

  .atlas-node-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .atlas-background,
  .atlas-line,
  .atlas-node-ring,
  .atlas-ticker__track,
  .atlas-cursor {
    animation: none;
  }

  .atlas-continent,
  .atlas-island,
  .atlas-node-dot,
  .atlas-button,
  .atlas-tooltip {
    transition: none;
  }
}
