body {
  font-family: "Trebuchet MS", sans-serif;
  background: #0b1220;
  color: #e2e8f0;
  text-align: center;
  margin: 0;
  padding: 25px 15px 40px 15px;
}

h1 {
  font-size: 2.6rem;
  margin: 0 0 5px 0;
  color: #38bdf8;
}

.subtitle {
  color: #94a3b8;
  margin: 0 0 20px 0;
}

.controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

button, select {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid #38bdf8;
  background: transparent;
  color: #38bdf8;
  cursor: pointer;
}

button:hover, select:hover {
  background: rgba(56, 189, 248, 0.15);
}

.map-holder {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  /* A drop shadow so the map floats off the page a little */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* The little name that follows your mouse */
#tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #38bdf8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.95rem;
  display: none;
  white-space: nowrap;
}

/* ---- The facts card ---- */
#card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  background: #111c33;
  border: 2px solid #38bdf8;
  border-radius: 16px;
  padding: 25px 30px 30px 30px;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  z-index: 10;
}

#card.hidden {
  display: none;
}

#card h2 {
  margin: 0 0 15px 0;
  font-size: 1.9rem;
  color: #38bdf8;
}

#card-flag {
  font-size: 2.2rem;
}

#card ul {
  margin: 0;
  padding-left: 22px;
  line-height: 1.6;
}

#card li {
  margin-bottom: 14px;
}

#card .sorry {
  color: #94a3b8;
  line-height: 1.6;
}

#close {
  float: right;
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 2rem;
  line-height: 1;
  padding: 0 5px;
  cursor: pointer;
}

#close:hover {
  color: white;
  background: none;
}

footer {
  margin-top: 30px;
  color: #64748b;
}

/* ---- Back button to the arcade menu ---- */
.arcade-back {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 27, 46, 0.85);
  border: 1px solid #3a4568;
  color: #e8ecf8;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.arcade-back:hover {
  background: #ff6b9d;
  border-color: #ff6b9d;
  color: #fff;
}
