:root {
  --ink: #e8fffb;
  --muted: #91b8bd;
  --teal: #00c9d1;
  --orange: #f26f3d;
  --line: rgba(0, 201, 209, 0.26);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #061113;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#renderCanvas {
  width: 100vw;
  height: 100vh;
  display: block;
  outline: none;
  touch-action: none;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 18px;
  left: 18px;
  right: 18px;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 19, 23, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), inset 0 0 28px rgba(0, 201, 209, 0.08);
}

.brand-link,
.topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-link {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-link img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.title p,
.hud p {
  margin: 0 0 3px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.topbar button {
  height: 36px;
  min-width: 88px;
  border: 0;
  border-radius: 7px;
  color: #91b8bd;
  background: rgba(0, 201, 209, 0.08);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.topbar button:hover,
.topbar button.is-active {
  color: #061113;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(0, 201, 209, 0.35);
}

.hud {
  position: fixed;
  z-index: 10;
  left: 18px;
  bottom: 18px;
  width: min(425px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 19, 23, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), inset 0 0 28px rgba(0, 201, 209, 0.08);
}

.hud h2 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.05;
}

.hud span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.metric-grid div {
  padding: 10px;
  border: 1px solid rgba(0, 139, 147, 0.14);
  border-radius: 8px;
  background: rgba(0, 201, 209, 0.08);
}

.metric-grid strong {
  display: block;
  color: var(--orange);
  font-size: 20px;
}

.metric-grid span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.minimap {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  width: 244px;
  padding: 12px;
  border: 1px solid rgba(0, 201, 209, 0.2);
  border-radius: 999px 999px 14px 14px;
  background: rgba(5, 19, 23, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), inset 0 0 26px rgba(0, 201, 209, 0.06);
  pointer-events: none;
}

#miniMapCanvas {
  display: block;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(0, 201, 209, 0.34);
  border-radius: 50%;
  background: #edf7f4;
  box-shadow: 0 0 0 6px rgba(0, 201, 209, 0.06);
}

.minimap div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.minimap strong {
  color: var(--teal);
}

.minimap.is-hidden {
  display: none;
}

@media (max-width: 860px) {
  .minimap {
    right: 12px;
    bottom: 12px;
    width: 176px;
  }

  #miniMapCanvas {
    width: 150px;
    height: 150px;
  }
}
