/* Exploration HUD (stars, % explored, minimap), the big banner and small toasts. */

.hud {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
body.is-intro .hud { opacity: 0; }

/* ---------- Top right: stars and % explored ---------- */
.hud__status {
  position: absolute;
  top: 70px;
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-shadow: 0 2px 6px rgba(20, 8, 40, 0.75);
}
.hud__stars { display: flex; gap: 4px; }
.hud__star {
  width: 24px;
  height: 24px;
  fill: rgba(27, 22, 48, 0.5);
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 1.4;
  transition: fill 0.3s ease;
}
.hud__star.is-on { fill: var(--yellow); stroke: var(--navy); }
.hud__star.is-new { animation: star-pop 0.7s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes star-pop { 0% { transform: scale(0.3) rotate(-40deg); } 100% { transform: none; } }

.hud__label {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.hud__percent {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.1;
  color: #fff7fb;
  -webkit-text-stroke: 1px var(--navy);
  paint-order: stroke fill;
}

/* ---------- Bottom left: round minimap (opens the full map) ---------- */
.hud__map {
  position: absolute;
  left: var(--gutter);
  bottom: 24px;
  width: 132px;
  height: 132px;
  padding: 0;
  border-radius: 50%;
  border: 4px solid #fff7fb;
  box-shadow: 0 0 0 2px var(--navy), 0 10px 30px rgba(20, 8, 40, 0.5);
  overflow: hidden;
  background: var(--navy);
  pointer-events: auto;
  transition: transform 0.2s ease;
}
.hud__map:hover { transform: scale(1.05); }
.hud__map canvas { display: block; width: 100%; height: 100%; }
.hud__map-label {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(27, 22, 48, 0.8);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

/* ---------- Big banner ---------- */
.mission {
  position: fixed;
  left: 0;
  right: 0;
  top: 20vh;
  z-index: 25;
  padding: 0 var(--gutter);
  text-align: center;
  pointer-events: none;
  opacity: 0;
}
.mission.is-showing { animation: mission-in 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.mission__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 7vw, 96px);
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 3px var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(20, 8, 40, 0.45), 0 0 50px rgba(255, 122, 47, 0.6);
}
.mission__sub {
  display: inline-block;
  margin: 12px 0 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(27, 22, 48, 0.78);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@keyframes mission-in {
  0% { opacity: 0; transform: scale(1.6); letter-spacing: 0.2em; }
  14% { opacity: 1; transform: scale(0.96); letter-spacing: 0; }
  20% { transform: scale(1); }
  82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.04); }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 24;
  min-width: 240px;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 10px 20px;
  border-radius: 14px;
  background: rgba(27, 22, 48, 0.88);
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
}
.toast.is-showing { animation: toast-in 2.6s ease forwards; }
.toast__title { margin: 0; font-family: var(--display); font-size: 15px; letter-spacing: 0.02em; }
.toast__sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
@keyframes toast-in {
  0% { opacity: 0; transform: translate(-50%, 16px); }
  10%, 85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 8px); }
}
body.is-driving .toast { bottom: auto; top: 120px; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .hud__status { top: 64px; }
  .hud__star { width: 16px; height: 16px; }
  .hud__percent { font-size: 15px; }
  .hud__label { font-size: 9px; }
  .hud__map { width: 92px; height: 92px; left: auto; right: 12px; bottom: auto; top: 128px; }
  body.is-driving .hud__map { display: none; }
}
