/* 首屏全息地球 · WebGL 画布、静态回退图、国家气泡标签
 * 由 index.html 在 main.css 之后引入 */

.hero-visual {
  flex: 0 0 500px;
  width: 500px;
  padding-top: 33px;
  position: relative;
  overflow: visible;
}

.hero-earth {
  width: 500px;
  height: 500px;
  position: relative;
  overflow: visible;
  background: transparent;
}

.hero-earth canvas,
.hero-earth__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.hero-earth__fallback {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.hero-earth.earth-static canvas,
.hero-earth.earth-static .hero-earth__canvas {
  display: none !important;
}

.hero-earth.earth-handoff canvas,
.hero-earth.earth-handoff .hero-earth__canvas {
  pointer-events: auto;
}

.hero-earth.earth-leaving canvas,
.hero-earth.earth-leaving .hero-earth__canvas {
  opacity: 0 !important;
  visibility: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-earth canvas,
  .hero-earth__canvas {
    transition: none;
  }
}

.hero-earth__markers {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.hero-earth__marker {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

.hero-earth__marker.is-branch {
  z-index: 2;
}

.hero-earth__marker.is-singapore {
  z-index: 3;
}

.hero-earth__marker-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(8, 28, 42, 0.82);
  border: 1px solid rgba(0, 229, 255, 0.38);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.18);
}

.hero-earth__marker.is-branch .hero-earth__marker-label {
  color: #101820;
  background: #17ead9;
  border-color: #80F6F1;
  box-shadow: 0 0 10px rgba(23, 234, 217, 0.16);
}

.hero-earth__marker.is-singapore .hero-earth__marker-label {
  color: #fff;
  background: #e64a19;
  border-color: #ffccbc;
  box-shadow: 0 0 10px rgba(230, 74, 25, 0.22);
}

.hero-earth__marker.is-pending .hero-earth__marker-label {
  color: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.hero-earth__marker-pending {
  font-size: 10px;
  font-style: normal;
  opacity: 0.75;
}

.hero-earth.earth-leaving .hero-earth__markers {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 767px) {
  .hero-earth__marker-label {
    font-size: 9px;
    padding: 2px 6px;
  }

  .hero-earth__marker-pending {
    font-size: 9px;
  }
}

@media (max-width: 1200px) and (min-width: 1024px) {
  .hero-visual {
    flex: 0 0 auto;
    width: clamp(320px, 36vw, 420px);
    padding-top: 16px;
  }

  .hero-earth {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 420px;
    max-height: 420px;
  }
}

@media (max-width: 1023px) {
  .hero-visual {
    flex: none;
    width: 100%;
    max-width: none;
    padding-top: 0;
    display: flex;
    justify-content: center;
    height: auto;
  }

  .hero-earth {
    width: min(400px, 100%);
    height: min(400px, 100%);
    aspect-ratio: 1;
  }
}
