body {
  margin: 0;
  padding: 20px;
  font-family: sans-serif;
  background-color: #f9f9f9;
  overflow: auto; /* scroll if map is too big */
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* map starts from left */
}

/* Center controls */
#controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* centers dropzone & output */
}

h1 {
  margin-bottom: 20px;
  text-align: center;
  width: 100%;
}

#dropzone {
  position: relative;
  width: 300px;
  height: 120px;
  border: 2px dashed #aaa;
  border-radius: 8px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #333;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  margin-bottom: 20px;
  text-align: center;
}

#dropzone input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0; /* fully invisible */
  cursor: pointer; /* clickable */
}

#dropzone:hover {
  background-color: #eef;
}

#output {
  font-size: 14px;
  color: #555;
  max-width: 500px;
  word-wrap: break-word;
  margin-bottom: 20px;
}

#map {
  aspect-ratio: 3/2;
  max-height: 100vh;
  max-width: 100%;
  width: 100%;
  border: 2px solid #ccc;
  border-radius: 10px;
  margin: 20px auto; /* center horizontally */
  background: radial-gradient(circle at center, #1a1a1a 0%, #0d0d0d 80%);
}

.grid-label {
  color: white;
  font-weight: bold;
  font-size: 15px;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000; /* black outline */
  text-align: center;
  pointer-events: none; /* don't block map interactions */
}
