/* NAVBAR */
.navbar ul {
  display: flex;
  list-style-type: none;
  margin: 0px;
  padding: 0px;
  overflow: hidden;
  justify-content: flex-end;
  background-color: hsl(0, 0%, 0%);
  font-family: sans-serif;
}

.navbar a {
  color: white;
  text-decoration: none;
  display: block;
  justify-content: center;
  padding: 14px;
  cursor: pointer;
}

.navbar a:hover {
  background-color: hsl(0, 0%, 10%);
}

/* GLOBAL */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  background-color: #2196f3;
}

/* MAP */
svg path {
  fill: #4caf50;
  cursor: pointer;
}

/* CONTAINER */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 9px;
  font-family: sans-serif;
}

/* HEADLINE */
#myH1 {
  margin-right: 20px;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 5px;
  font-family: sans-serif;
  font-weight: bold;
}

/* LABEL */
label {
  display: flex;
  font-size: 18px;
  font-family: sans-serif;
  font-weight: bold;
  color: hsl(180, 100%, 97%);
  background-color: hsl(0, 62%, 50%);
  padding: 10px;
  border-radius: 7px;
  margin-left: 150px;
  overflow: hidden;
}

/* SCOREBOARDS */
#scoreBoard {
  position: absolute;
  right: 150px;
}

#attemptsBoard {
  position: absolute;
  right: 10px;
}

/* BUTTONS */
button {
  font-weight: bold;
  font-size: large;
  font-family: sans-serif;
  border: none;
  padding: 10px;
  border-radius: 7px;
  background-color: hsl(120, 70%, 43%);
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: hsl(120, 70%, 48%);
}

button:active {
  background-color: hsl(120, 70%, 33%);
}

/* OVERLAY */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.8);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
}

.overlay.hidden {
  display: none;
}

.overlay-card {
  width: min(520px, 92vw);
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  border: 1px solid rgba(226, 232, 240, 0.12);
}

.overlay-card h2 {
  margin: 0 0 18px;
  font-size: 1.6rem;
  letter-spacing: 0.3px;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(226, 232, 240, 0.06);
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.label {
  font-weight: 600;
}

.value {
  font-weight: 700;
}

.primary-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.primary-btn:hover {
  background: #1e40af;
}

/* Disable map interaction when overlay is open */
.overlay:not(.hidden) ~ svg,
.overlay:not(.hidden) ~ .container {
  pointer-events: none;
  user-select: none;
}

/* 📱 MOBILE RESPONSIVENESS */
@media screen and (max-width: 600px) {
  #scoreBoard,
  #attemptsBoard {
    position: static;
    display: block;
    margin: 10px auto;
    text-align: center;
  }

  label {
    margin-left: 0;
    font-size: 16px;
    padding: 8px;
  }

  .container {
    flex-direction: column;
    font-size: 8px;
  }

  .navbar ul {
    flex-direction: column;
    align-items: center;
  }

  .navbar a {
    padding: 10px;
    text-align: center;
  }
}