@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

/* When the map is showing, kill the bottom padding so the map fills the full height */
#main-content:has(.map-viewport) {
  padding-bottom: 0;
  overflow: hidden;
}

.map-viewport {
  width: 100%;
  height: 100%;
  overflow: auto;
  position: relative;
  background-color: #0c0c0c;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  scroll-behavior: smooth;
}

.map-viewport::-webkit-scrollbar {
  display: none;
}

.map-viewport.map-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.map-world-scaler {
  position: relative;
  width: 2000px;
  height: 2000px;
}

.map-world {
  width: 2000px;
  height: 2000px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  will-change: transform;
}

/* Zoom controls */
.map-zoom-controls {
  position: fixed;
  bottom: 110px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.map-zoom-btn {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 10px;
  font-size: 20px;
  font-family: 'Jost', sans-serif;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.2s ease;
  user-select: none;
}

.map-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.artist-node {
  position: absolute;
  transform: translate(-50%, -50%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  z-index: 10;
  display: none;
  opacity: 0;
  will-change: transform, opacity;
}

/* CSS-based filtering */
.map-world[data-active-genre="nepali_indie"] .artist-node[data-genre="nepali_indie"],
.map-world[data-active-genre="nepali_pop"] .artist-node[data-genre="nepali_pop"],
.map-world[data-active-genre="classic_nepali_pop"] .artist-node[data-genre="classic_nepali_pop"],
.map-world[data-active-genre="nephop"] .artist-node[data-genre="nephop"] {
  display: flex;
  opacity: 1;
}

.artist-node:hover {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 50;
}

.artist-node-link {
  display: flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
  color: #e0e0e0;
  white-space: nowrap;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
  user-select: none;
  padding: 4px;
}

.artist-node:hover .artist-node-link {
  color: #ffffff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.artist-node-avatar {
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.artist-node:hover .artist-node-avatar {
  transform: scale(1.2);
  border-color: #ffffff;
}

.artist-node-name-text {
  letter-spacing: -0.01em;
}

.artist-node-link.visited {
  color: #B8B0E8;
  opacity: 0.75;
}

.artist-node-link.visited .artist-node-avatar {
  border-color: rgba(108, 92, 231, 0.9);
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.6);
}

.artist-node:hover .artist-node-link.visited {
  opacity: 1;
}

/* My Artists panel — fixed layer above map, below nav tabs */
.map-artists-panel {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #0c0c0c;
  overflow-y: auto;
  padding: 80px 16px 100px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: none;
}

.map-artists-panel::-webkit-scrollbar {
  display: none;
}

.map-artists-panel.visible {
  display: block;
}

.map-artists-panel-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.map-artists-panel-title {
  font-family: 'Jost', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.map-artists-panel-count {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

/* Empty state */
.map-artists-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  text-align: center;
  gap: 8px;
}

.map-artists-empty-title {
  font-family: 'Jost', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.map-artists-empty-sub {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 16px;
}

/* Unauthenticated state */
.map-artists-unauth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.map-artists-unauth-headline {
  text-align: center;
}

.map-artists-unauth-headline h2 {
  font-family: 'Jost', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.map-artists-unauth-headline p {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* Compact auth card inside the map panel */
.map-artists-unauth .auth-card {
  padding: 20px 20px;
  width: 100%;
  max-width: 320px;
}

.map-artists-unauth .auth-card h1 {
  font-size: 18px;
  margin-bottom: 14px;
}

.map-artists-unauth .auth-form {
  gap: 10px;
}

.map-artists-unauth .form-group {
  gap: 4px;
}

.map-artists-unauth .form-control {
  padding: 9px 12px;
  font-size: 14px;
}

.map-artists-unauth .btn-primary {
  padding: 11px;
  font-size: 14px;
  margin-top: 4px;
}

.map-artists-unauth .auth-links {
  margin-top: 12px !important;
  font-size: 13px;
}

/* Map Navigation Overlay */
.map-nav-overlay {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 16px;
  pointer-events: none;
}

.map-nav-overlay::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.map-nav-btn {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Jost', sans-serif;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.map-nav-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-2px);
}

.map-nav-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}


