/* StreetSole Explore Page — Dark theme matching the app */

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

:root {
  --bg: #080808;
  --surface: #111111;
  --accent: #39FF14;
  --text-primary: #F0EDE8;
  --text-muted: #666666;
  --text-dim: #4A4A4A;
  --grid-color: #242424;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Map ---------- */

#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Remove MapLibre default attribution styling clutter */
.maplibregl-ctrl-attrib {
  background: rgba(8, 8, 8, 0.7) !important;
  color: var(--text-dim) !important;
  font-size: 10px !important;
}

.maplibregl-ctrl-attrib a {
  color: var(--text-dim) !important;
}

/* ---------- City overlay ---------- */

#city-overlay {
  position: absolute;
  top: 0;
  left: 0;
  padding: 24px 24px 16px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#city-overlay.visible {
  opacity: 1;
}

#city-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  line-height: 1.0;
  letter-spacing: 1px;
  color: var(--text-primary);
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

#city-stats {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

/* ---------- Loading ---------- */

#loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  transition: opacity 0.4s ease;
}

#loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loading p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 16px;
}

#loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--text-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Error ---------- */

#error {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
}

#error p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 16px;
}

.error-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--accent);
  padding: 8px 20px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}

.error-link:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- CTA bar ---------- */

#cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(8, 8, 8, 0.95) 60%, transparent);
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#cta-bar.visible {
  opacity: 1;
}

#cta-button {
  display: block;
  width: 100%;
  max-width: 400px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  border-radius: 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(57, 255, 20, 0.3);
}

#cta-button:active {
  transform: translateY(0);
}

/* ---------- Desktop ---------- */

@media (min-width: 768px) {
  #city-overlay {
    padding: 40px 40px 20px;
  }

  #city-name {
    font-size: 64px;
  }

  #city-stats {
    font-size: 16px;
  }

  #cta-bar {
    padding: 20px 24px;
  }

  #cta-button {
    width: auto;
    min-width: 280px;
  }
}
