.globe-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

#globe-main {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: clamp(9rem, 16vw, 12rem);
}

.globe-toolbar {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(920px, calc(100% - 32px));
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  isolation: isolate;
}

.globe-title {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.globe-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

#globeContainer {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
}
#globeContainer:active {
  cursor: grabbing;
}

.webgl-fallback {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(40,40,40,0.9);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 5;
}

/* Custom HTML Marker Styling */
.earth-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f3f3f3;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Pass drag events through to the globe canvas */
  pointer-events: none;
}
.earth-marker:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6), 0 0 0 4px rgba(255,255,255,0.2);
  z-index: 100;
}
.earth-marker img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  /* Only the photo itself is clickable */
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Tooltip on hover */
.earth-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0a0a0a;
  color: #f3f3f3;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.earth-marker:hover .earth-tooltip {
  display: block;
}

@media (max-width: 760px) {
  #globe-main {
    padding-top: clamp(12rem, 32vw, 15rem);
  }

  .globe-toolbar {
    width: min(calc(100% - 16px), 100%);
    padding: 0.9rem 1rem;
    border-radius: 1.25rem;
  }

  .globe-title {
    font-size: 1.4rem;
    text-align: center;
  }
}
