html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

#controls {
  position: absolute;
  top: 10px;
  left: 15%;
  z-index: 1000;
  background: rgba(33, 33, 33, 0.95);
  color: #e0e0e0;
  padding: 15px;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 60%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: width 0.3s ease;
}

#controls.collapsed {
  width: 50px;
}

#controls.collapsed .control-content {
  display: none;
}

#sidepanel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: rgba(33, 33, 33, 0.95);
  color: #e0e0e0;
  padding: 15px;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 300px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: width 0.3s ease;
}

#sidepanel.collapsed {
  width: 50px;
}

#sidepanel.collapsed .sidepanel-content {
  display: none;
}

#event-description h2 {
  margin: 0 0 8px 0;
  font-size: 1.2em;
  color: #ffffff;
}

#event-description h3 {
  margin: 0 0 8px 0;
  font-size: 1em;
  color: #cccccc;
}

#event-description p {
  margin: 0 0 12px 0;
  line-height: 1.4;
}

#slider {
  margin: 12px 0;
  width: 100%;
}

/* Dark mode noUiSlider styling */
.noUi-target {
  background: #555;
  border: none;
  border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.noUi-base {
  background: #333;
  height: 6px;
}

.noUi-connect {
  background: #e74c3c;
  box-shadow: none;
}

.noUi-handle {
  background: #e0e0e0;
  border: 2px solid #333;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.noUi-handle:before,
.noUi-handle:after {
  background: #333;
  width: 2px;
  height: 12px;
  top: 4px;
}

#date-display {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 10px;
}

button {
  margin-right: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #333;
  color: #e0e0e0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
  font-weight: 500;
}

button:hover {
  background: #555;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Leaflet Popup Dark Mode */
.leaflet-popup-content-wrapper {
  background: rgba(33, 33, 33, 0.95);
  color: #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-tip {
  background: rgba(33, 33, 33, 0.95);
}

.popup-content h2 {
  margin: 0 0 8px 0;
  font-size: 1.2em;
  color: #ffffff;
}

.popup-content h3 {
  margin: 0 0 8px 0;
  font-size: 1em;
  color: #cccccc;
}

.popup-content p {
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.popup-content img {
  display: block;
  margin: 8px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.popup-content img:hover {
  transform: scale(1.05);
}

/* Event List */
#event-list {
  margin: 10px 0 0 0;
  padding: 0;
  list-style: none;
  max-height: 60px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  display: flex;
  scrollbar-width: none;
  /* Firefox */
}

#event-list::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Edge */
}

#event-list li {
  padding: 5px 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-right: 5px;
  margin-bottom: 5px;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.9em;
}

#event-list li.current {
  background: rgba(255, 255, 255, 0.2);
  border-color: #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

#event-list li:hover {
  background: rgba(255, 255, 255, 0.1);
}

#event-list li div {
  line-height: 1.2;
}

#event-list li div:first-child {
  font-weight: bold;
}

#event-list li div:nth-child(2) {
  font-size: 0.8em;
  color: #cccccc;
}

#event-list li div:nth-child(3) {
  font-size: 0.8em;
  color: #aaaaaa;
}

#event-list li.spacer {
  padding: 5px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #e0e0e0;
  text-align: center;
  margin-right: 5px;
  margin-bottom: 5px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

#event-list li.spacer:hover {
  color: #ffffff;
}

/* Photos (added for the admin / members feature) */
.sidepanel-content {
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px;
  margin: 8px 0;
}

.photo-strip a {
  position: relative;
  display: block;
}

.photo-strip img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.popup-content .photo-strip {
  grid-template-columns: repeat(3, 84px);
}

.private-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffb3a7;
}

#auth-bar {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85em;
  color: #aaaaaa;
}

#auth-bar a {
  color: #e74c3c;
}
