html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#map {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

#spot-card {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  width: 300px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}

#spot-card.hidden {
  display: none;
}

#spot-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

#spot-card button {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* 💬 Styl popupu */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  background: #fff;
  overflow: hidden;
}

.leaflet-popup-content-wrapper:hover {
  transform: translateY(-2px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}


/* 🖼️ Obrázek s blur pozadím */
.leaflet-popup-content > div {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

/* Rozmazané pozadí */
.leaflet-popup-content > div::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--popup-bg-img);
  background-size: cover;
  background-position: center;
  filter: blur(10px) brightness(0.9);
  transform: scale(1.1);
  z-index: 0;
}

/* Samotný obrázek */
.leaflet-popup-content > div > img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
}

.leaflet-popup-content img:hover {
  transform: scale(1.02);      /* jemný zoom efekt */
}

/* 🔗 Ukaž, že popup je klikací */
.leaflet-popup-content {
  cursor: pointer;
  user-select: text; /* dovolí označování textu */
}

/* 🖋️ Při označování textu se kurzor změní zpět na text */
.leaflet-popup-content::selection {
  cursor: text;
}

/* ✨ Název a text */
.leaflet-popup-content strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.leaflet-popup-content span {
  font-size: 13px;
  color: #666;
}

/* 🔍 Vyhledávání */
#search-bar {
  position: absolute;
  top: 18px;
  left: 60px;
  z-index: 1500;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

#search-bar input {
  border: none;
  outline: none;
  font-family: "Inter", "Poppins", "Segoe UI", sans-serif;
  font-size: 14px;
  width: 180px;
  background: transparent;
  color: #222;
}

#search-bar input::placeholder {
  color: #666;
}

/* 🎚️ Dropdown filtr obtížností */
#difficulty-dropdown {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 1500;
  font-family: "Inter", "Poppins", "Segoe UI", sans-serif;
}

#difficulty-toggle {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: none;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}

#difficulty-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
}

/* Dropdown obsah */
#difficulty-options {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  gap: 6px;
}

#difficulty-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

#difficulty-options input[type="checkbox"] {
  accent-color: #007bff;
  transform: scale(1.1);
}

#difficulty-options hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 6px 0;
}

#difficulty-options .select-all {
  font-weight: 600;
  color: #007bff;
}

/* 🎨 Legenda obtížností */
#legend {
  position: absolute;
  bottom: 25px;
  right: 25px;
  background: rgba(255, 255, 255, 0.8); /* náhrada za --blur-bg */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 12px; /* náhrada za --radius */
  padding: 12px 18px;
  width: 200px;
  text-align: center;
  font-family: "Inter", "Poppins", "Segoe UI", sans-serif; /* náhrada za --font-ui */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* náhrada za --shadow */
  z-index: 1500;
}

#legend .gradient {
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, #a8e6a3, #b30000);
  margin-bottom: 8px;
}

#legend .labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #333;
  font-weight: 500;
}


/* 📍 Najdi mě */
#locate-me {
  position: absolute;
  bottom: 90px;
  right: 25px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #007bff;
  transition: all 0.25s ease;
  z-index: 1500;
}

#locate-me:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.05);
  color: #0056d6;
}

#locate-me svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

#locate-me.active {
  color: #0056d6;
  transform: scale(1.15);
}

#locate-me.loading {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
