* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
}

.legend-panel {
  width: 250px;
  background-color: #f5f5f5;
  padding: 15px;
  overflow-y: auto;
  border-right: 1px solid #ddd;
}

.legend-panel h2 {
  margin-bottom: 15px;
}

.legend {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-bottom: 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.legend:hover {
  background-color: #e0e0e0;
}

.legend.selected {
  background-color: #d0d0d0;
}

.legend img {
  margin-right: 10px;
}

main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #e5e5e5;
}

.map-container {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  background-image: url('images/map_background.jpg');
  background-size: cover;
  cursor: grab;
}

.map-container.grabbing {
  cursor: grabbing;
}

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
  user-select: none;
  cursor: pointer;
}

.marker img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.safezone-overlay {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(0, 255, 0, 0.2);
  border: 2px solid rgba(0, 255, 0, 0.5);
  transform: translate(-50%, -50%);
  z-index: 5;
}

.spice-blow-overlay {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 215, 0, 0.2);
  border: 2px solid rgba(255, 215, 0, 0.5);
  transform: translate(-50%, -50%);
  z-index: 5;
}

.controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.controls button {
  width: 40px;
  height: 40px;
  font-size: 20px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}   

.info-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 100;
}

#map {
  position: relative;
  overflow: hidden;
}

.marker {
  position: absolute;
}