/* The page round the game: a full-window canvas, a loading card and the licence notice, in the game's colours. */
:root {
  --bg: #0b1020;
  --plate-top: #273144;
  --plate-bottom: #1a2130;
  --edge: rgba(255, 255, 255, 0.08);
  --text: #eef2fa;
  --text-2: #9aa6bd;
  --accent: #2f6fe6;
  --accent-2: #62cf8f;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Phones: no pull-to-refresh or bounce while dragging the map. */
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#game {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  /* On phones the visible height, without the browser's bars over the HUD. */
  height: 100dvh;
  background: var(--bg);
  outline: none;
  /* Fingers on the map belong to the game: no page scroll, zoom, text selection or long-press menu. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(ellipse at 50% 40%, #16213a 0%, var(--bg) 70%);
  transition: opacity 0.4s ease;
}

.overlay.done {
  opacity: 0;
  pointer-events: none;
}

.overlay[hidden] {
  display: none;
}

.card {
  width: min(420px, 100%);
  padding: 28px 28px 22px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: linear-gradient(var(--plate-top), var(--plate-bottom));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  background: url("favicon.svg") center / contain no-repeat;
}

h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.tagline {
  margin: 4px 0 22px;
  color: var(--text-2);
}

.bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.fill {
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #5a93ff);
  transition: width 0.2s ease;
}

.status {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.message {
  margin: 12px 0 0;
  color: var(--text-2);
}

#notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  padding: 0 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
  transition: opacity 0.4s ease;
}

/* Once the game runs, its own footer shows the notice. */
#notice.done {
  opacity: 0;
  pointer-events: none;
}

a {
  color: var(--text);
}

#source-corner {
  position: fixed;
  right: 8px;
  bottom: 4px;
  font-size: 11px;
  color: rgba(238, 242, 250, 0.5);
  text-decoration: none;
}

#source-corner:hover {
  color: var(--text);
  text-decoration: underline;
}
