* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
}

header {
  height: 120px;
  background: #ffffff;
  color: black;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid #444;
  z-index: 10;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-left img.logo {
  height: 90px;
}

.header-left button {
  background: #fff;
  border: 1px solid #ccc;
  padding: 0.5em 1em;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  cursor: pointer;
}

.home-icon {
  color: black;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.header-left button:hover, .home-icon:hover {
  text-decoration: underline;
}

.home-icon img {
  height: 28px;
  filter: invert(1);
}

#main-container {
  display: flex;
  padding-top: 120px;
  height: calc(100vh - 120px);
  position: relative;
  overflow: hidden;
}

#sidebar {
  width: 240px;
  overflow-y: auto;
  background: linear-gradient(135deg, #ffffff 0%, #81c4f1 100%);
  padding: 1rem;
  border-right: 1px solid #ccc;
  z-index: 2;
  position: relative;
  transition: transform 0.3s ease;
  color: rgb(0, 0, 0);
  flex-shrink: 0; /* Prevent sidebar from shrinking */
}

#sidebar.hidden {
  transform: translateX(-100%);
}

/* Toggle button positioned OUTSIDE the sidebar */
#sidebar-toggle {
  position: fixed;
  top: 50%;
  left: 240px;
  transform: translateY(-50%);
  width: 30px;
  height: 60px;
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  border: none;
  border-radius: 0 8px 8px 0;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 1000; /* Very high z-index to stay above everything */
  transition: left 0.3s ease, transform 0.3s ease;
  box-shadow: 2px 0 5px rgba(0,0,0,0.2);
}

#sidebar-toggle:hover {
  background: linear-gradient(135deg, #34495e 0%, #5dade2 100%);
  transform: translateY(-50%) scale(1.05);
}

/* When sidebar is hidden, move button to left edge and change style */
#sidebar-toggle.flipped {
  left: 0;
  border-radius: 0 8px 8px 0;
  transform: translateY(-50%);
}

#sidebar-toggle.flipped:hover {
  transform: translateY(-50%) scale(1.05);
}

#map {
  flex: 1;
  height: 100%;
  position: relative;
  z-index: 1;
  transition: margin-left 0.3s ease;
}

/* When sidebar is hidden, map expands to full width */
#main-container.sidebar-hidden #map {
  margin-left: -240px; /* Pull map to fill sidebar space */
}

.spot-item {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.spot-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

#sidebar h2, #sidebar h3 {
  margin-bottom: 0.2rem;
}

#sidebar label {
  display: block;
  margin-bottom: 0.2rem;
  cursor: pointer;
}

#sidebar input[type="checkbox"] {
  margin-right: 0.5rem;
}