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

body {
  background-color: #000;
  color: #fff;
  font-family: "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  width: 100%;
  padding: 20px;
  text-align: center;
  background-color: #111;
  border-bottom: 2px solid #ffd700;
}

h1 {
  font-size: 1.8rem;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.subtitle {
  margin-top: 5px;
  font-size: 1rem;
  color: #aaa;
}

.header-texts {
  text-align: center;
}

.header-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}

.header-action {
  font-size: 0.95rem;
  color: #ccc;
  background-color: #222;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #444;
}

.header-action a {
  margin-left: 5px;
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.header-action a:hover {
  color: #fff;
  text-decoration: underline;
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #222;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #444;
}

.filter-container label {
  font-size: 0.95rem;
  color: #ccc;
}

.filter-container select {
  padding: 5px 10px;
  background-color: #111;
  color: #ffd700;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
}

.filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.btn-clear {
  background-color: #222;
  color: #ccc;
  border: 1px solid #444;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear:hover {
  background-color: #333;
  color: #fff;
  border-color: #666;
}

#map-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

#map {
  width: 100%;
  height: 650px;
  background-color: #111; /* Changed from #000 to match CartoDB dark */
  border: 1px solid #333;
  border-radius: 8px;
  z-index: 1;
}

.btn-recenter {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  padding: 15px 25px;
  background-color: #ffd700;
  color: #000;
  border: 2px solid #000;
  border-radius: 50px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
  transition: all 0.3s ease;
}

.btn-recenter:hover {
  background-color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}

footer {
  width: 100%;
  padding: 25px 20px;
  text-align: center;
  background-color: #111;
  border-top: 2px solid #ffd700;
  font-size: 0.9rem;
  color: #888;
  line-height: 1.6;
}

footer .disclaimer {
  font-size: 0.8rem;
  color: #555;
}

.footer-credits {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #aaa;
}

.footer-credits strong {
  color: #ccc;
}

.footer-credits a {
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.footer-credits a:hover {
  color: #fff;
  text-decoration: underline;
}

.header-stats {
  margin-top: 12px;
  display: inline-block;
  padding: 6px 14px;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 6px;
}

.header-stats .status-msg {
  margin-top: 0;
  font-size: 1rem;
}

.status-msg {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #ffcc00;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #333;
  border-top: 4px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-text {
  color: #ffd700;
  font-size: 1.1rem;
}


/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  padding: 30px;
  background-color: #111;
  border: 2px solid #ffd700;
  border-radius: 8px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: #ffd700;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.modal-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.modal-header h2 {
  font-size: 1.6rem;
  color: #ffd700;
}

.modal-header h3 {
  margin-top: 5px;
  font-size: 1.1rem;
  font-weight: normal;
  color: #aaa;
}

.modal-foto {
  width: 100%;
  max-height: 400px;
  margin-bottom: 20px;
  object-fit: contain;
  background-color: #000;
  border: 1px solid #333;
  border-radius: 6px;
}

.modal-info p {
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.5;
}

.modal-info strong {
  color: #ffd700;
}

/* Custom MarkerCluster Styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(255, 215, 0, 0.6);
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: rgba(255, 215, 0, 0.9);
  color: #000;
  font-weight: bold;
}

@media (max-width: 600px) {
  .header-controls {
    flex-direction: column;
    gap: 10px;
  }

  .filter-container {
    flex-direction: column;
    width: 100%;
  }

  .filter-container select {
    width: 100%;
  }

  .header-texts {
    text-align: center;
  }
}
