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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #fff;
  cursor: none;
}

#globe-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#markers-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.marker {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.18s ease-out;
  will-change: transform, opacity;
  transform: translate3d(-9999px, -9999px, 0);
  contain: layout style;
}

#markers-layer {
  contain: layout style;
}

.marker-bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(220, 235, 255, 0.55) 50%, rgba(140, 180, 240, 0.15) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 20px rgba(120, 180, 255, 0.55),
    0 0 40px rgba(120, 180, 255, 0.25),
    inset 0 2px 8px rgba(255, 255, 255, 0.5);
  font-size: 24px;
  line-height: 1;
  animation: float 4s ease-in-out infinite;
}

.marker-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 8px rgba(120, 180, 255, 0.8);
}

.marker-tether {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 14px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
}

.marker:hover .marker-bubble {
  animation-play-state: paused;
  transform: scale(1.18);
  box-shadow:
    0 0 30px rgba(180, 220, 255, 0.9),
    0 0 60px rgba(120, 180, 255, 0.5),
    inset 0 2px 12px rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marker-label {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.marker:hover .marker-label {
  opacity: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* 顶部信息 */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 28px 36px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.title-block {
  pointer-events: auto;
}

.title {
  font-size: 22px;
  font-weight: 200;
  letter-spacing: 0.18em;
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(120, 180, 255, 0.4);
}

.title-cn {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: rgba(180, 210, 255, 0.85);
}

.counter {
  pointer-events: auto;
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(180, 210, 255, 0.7);
  line-height: 1.8;
}

.counter span {
  display: block;
}

.counter .num {
  font-size: 36px;
  font-weight: 100;
  color: #fff;
  letter-spacing: 0;
  font-feature-settings: 'tnum';
}

/* 底部提示 */
.hint-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(180, 210, 255, 0.55);
  text-align: center;
  pointer-events: none;
}

.hint-bar .key {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 4px;
  border: 1px solid rgba(180, 210, 255, 0.3);
  border-radius: 3px;
  color: rgba(220, 235, 255, 0.85);
}

/* 搜索框 */
.search-wrap {
  position: fixed;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  width: 360px;
  max-width: calc(100% - 48px);
  pointer-events: none;
}

.search-wrap .search-box,
.search-wrap .search-results { pointer-events: auto; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 25, 50, 0.7), rgba(10, 18, 40, 0.85));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(120, 180, 255, 0.22);
  border-radius: 22px;
  padding: 0 14px;
  height: 38px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box:focus-within {
  border-color: rgba(180, 210, 255, 0.55);
  box-shadow:
    0 0 0 3px rgba(120, 180, 255, 0.08),
    0 0 24px rgba(120, 180, 255, 0.18);
}

.search-icon {
  color: rgba(180, 210, 255, 0.65);
  margin-right: 10px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255, 255, 255, 0.95);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: text;
}

.search-input::placeholder {
  color: rgba(180, 210, 255, 0.4);
  letter-spacing: 0.08em;
}

.search-clear {
  background: transparent;
  border: none;
  color: rgba(180, 210, 255, 0.55);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  display: none;
  line-height: 1;
}

.search-clear:hover { color: #fff; }
.search-wrap.has-query .search-clear { display: block; }

.search-results {
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(15, 25, 50, 0.92), rgba(10, 18, 40, 0.96));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(120, 180, 255, 0.2);
  border-radius: 8px;
  max-height: 60vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.search-results.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(120, 180, 255, 0.08);
  transition: background 0.15s ease;
}

.search-result:last-child { border-bottom: none; }
.search-result:hover,
.search-result.active {
  background: rgba(120, 180, 255, 0.1);
}

.search-result-emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(120, 180, 255, 0.3));
}

.search-result-text {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-name .cn {
  color: rgba(180, 210, 255, 0.85);
  margin-left: 6px;
  font-size: 12px;
}

.search-result-loc {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(180, 210, 255, 0.55);
  margin-top: 2px;
  text-transform: uppercase;
}

.search-result mark {
  background: rgba(180, 210, 255, 0.28);
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
}

.search-empty {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(180, 210, 255, 0.55);
  letter-spacing: 0.15em;
}

.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb {
  background: rgba(180, 210, 255, 0.25);
  border-radius: 2px;
}

/* 区域指示器 */
.zone-indicator {
  position: fixed;
  top: 0;
  height: 100%;
  width: 30%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.zone-indicator.left {
  left: 0;
  background: linear-gradient(to right, rgba(120, 180, 255, 0.06), transparent);
}

.zone-indicator.right {
  right: 0;
  background: linear-gradient(to left, rgba(120, 180, 255, 0.06), transparent);
}

.zone-indicator.active {
  opacity: 1;
}

.zone-indicator .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  font-weight: 100;
  color: rgba(180, 210, 255, 0.4);
  text-shadow: 0 0 20px rgba(120, 180, 255, 0.6);
}

.zone-indicator.left .arrow {
  left: 40px;
}

.zone-indicator.right .arrow {
  right: 40px;
}

/* 自定义光标 */
.cursor {
  position: fixed;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(180, 210, 255, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: difference;
}

.cursor.hover {
  width: 50px;
  height: 50px;
  background: rgba(180, 210, 255, 0.15);
}

.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -50%);
}

/* 详情面板 */
.detail-panel {
  position: fixed;
  top: 50%;
  right: -480px;
  transform: translateY(-50%);
  width: 440px;
  max-height: 80vh;
  background: linear-gradient(135deg, rgba(15, 20, 40, 0.92), rgba(10, 15, 35, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(120, 180, 255, 0.2);
  border-radius: 8px;
  padding: 36px 36px 32px;
  z-index: 20;
  transition: right 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(60, 100, 180, 0.15);
  overflow-y: auto;
}

.detail-panel.open {
  right: 36px;
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(180, 210, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: rgba(220, 235, 255, 0.8);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.detail-close:hover {
  background: rgba(180, 210, 255, 0.15);
  color: #fff;
  border-color: rgba(180, 210, 255, 0.6);
}

.detail-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 16px rgba(120, 180, 255, 0.4));
}

.detail-name {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.detail-name-cn {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(180, 210, 255, 0.85);
  margin-bottom: 18px;
}

.detail-meta {
  margin: 8px 0 24px;
  padding: 16px 18px;
  background: rgba(120, 180, 255, 0.05);
  border: 1px solid rgba(120, 180, 255, 0.18);
  border-radius: 6px;
}

.meta-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 6px 0;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.meta-row + .meta-row {
  border-top: 1px dashed rgba(120, 180, 255, 0.12);
}

.meta-label {
  flex: 0 0 110px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(180, 210, 255, 0.55);
  text-transform: uppercase;
}

.meta-value {
  flex: 1;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.03em;
  font-feature-settings: 'tnum';
  font-size: 14px;
  font-weight: 300;
}

.detail-story {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(230, 240, 255, 0.92);
  letter-spacing: 0.02em;
}

/* 加载屏 */
.loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6a9fff, #1a3a8a 60%, #050a1f);
  box-shadow: 0 0 40px rgba(120, 180, 255, 0.5), 0 0 80px rgba(120, 180, 255, 0.25);
  margin-bottom: 30px;
  animation: orb-spin 4s linear infinite;
}

@keyframes orb-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: rgba(180, 210, 255, 0.7);
  margin-bottom: 16px;
}

.loader-progress {
  width: 200px;
  height: 1px;
  background: rgba(180, 210, 255, 0.15);
  overflow: hidden;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: rgba(180, 210, 255, 0.9);
  box-shadow: 0 0 8px rgba(180, 210, 255, 0.9);
  transition: width 0.3s ease;
}

/* 滚动条 */
.detail-panel::-webkit-scrollbar {
  width: 4px;
}
.detail-panel::-webkit-scrollbar-track {
  background: transparent;
}
.detail-panel::-webkit-scrollbar-thumb {
  background: rgba(180, 210, 255, 0.25);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .detail-panel {
    width: calc(100% - 24px);
    right: -100%;
    padding: 28px 24px;
  }
  .detail-panel.open {
    right: 12px;
  }
  .marker-bubble {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}
