* { margin: 0; padding: 0; box-sizing: border-box; }
    body { 
      font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
      background-color: #f5f5f5; 
      overflow: hidden; 
      height: 100vh; 
    }


   /* 顶部导航 */
        .top-nav {
      display: flex;
            top: 0;
            left: 0;
            right: 0;
            height: 44px;
            background-color: #ff69b4; /* 粉色导航栏 */
            align-items: center;
            padding: 0 16px;
            box-shadow: 0 1px 2px rgba(255,105,180,0.3); /* 粉色阴影 */
            z-index: 999;
        }

        .back-btn {
            width: 24px;
            height: 24px;
            cursor: pointer;margin-right:18px;
            color: #fff; /* 白色返回图标 */
        }

        .nav-title {
            flex: 1;
            text-align: left;
            font-size: 17px;
            font-weight: 500;
            color: #fff; /* 白色标题 */
        }
    .top-nav a {
      color: white;
      text-decoration: none;
      margin-right: 20px;
      font-size: 16px;
      text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    }

    .top-nav a.active {
      border-bottom: 2px solid white;
      font-weight: bold;
      padding-bottom: 3px;
      text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    }


    #mapContainer { width: 100vw; height: calc(100vh - 44px); }
    .loading {
      position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
      color: #666; font-size: 16px; background: rgba(255,255,255,0.8); padding: 10px 20px; border-radius: 4px;
      z-index: 1001;
    }
    .error-message {
      position: fixed; top: 60px; left: 0; right: 0; 
      padding: 10px; background: #fee; color: #dc2626; 
      font-size: 14px; text-align: center; display: none;
      z-index: 1001;
    }

/* 自定义头像标记样式（固定宽高+正圆） */
.custom-marker {
  width: 36px;
  height: 36px; /* 必须与width完全相等 */
  border-radius: 50%; /* 宽高相等时，50%就是正圆 */
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  /* 新增：确保容器本身不被拉伸 */
  display: inline-block;
  vertical-align: middle;
}

/* 头像图片强制按正圆容器缩放 */
.custom-marker img {
  width: 36px;
  height: 36px;
  object-fit: cover; /* 不变形缩放并裁剪 */
  object-position: center; /* 居中显示核心区域 */
}

/* 弹窗头像同步设置正圆 */
.user-popup-avatar {
  width: 40px;
  height: 40px; /* 与width相等 */
  border-radius: 50%;
  margin-right: 8px;
  float: left;
  overflow: hidden;
}

/* 弹窗头像图片样式 */
.user-popup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}



    /* 弹窗样式优化（解决昵称显示不完整） */
    .user-popup {
      padding: 8px;
      min-width: 150px;
      max-width: 200px;
    }
    
    .user-popup-info {
      overflow: hidden;
    }
    .user-popup-name {
      font-weight: bold;
      margin-bottom: 4px;
      word-break: break-all; /* 长昵称自动换行 */
    }
    .user-popup-name a {
      color: #22c55e;
      font-size: 12px;
      margin-left: 5px;
      text-decoration: none;
    }
    .user-popup-distance {
      font-size: 12px;
      color: #666;
    }

    /* 罗盘样式 */
.compass {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* 关键：隐藏超出罗盘的指针部分 */
}

/* 微调指针位置（确保中心点对齐） */
.compass-needle {
  position: absolute;
  width: 2px;
  height: 25px; /* 高度等于罗盘半径（50px/2），避免多余溢出 */
  background: #dc2626;
  transform-origin: center bottom; /* 旋转原点在底部（罗盘中心） */
  bottom: 25px; /* 指针底部对齐罗盘中心 */
}
    .compass-label {
      font-size: 10px;
      font-weight: bold;
      color: #1e293b;
      position: absolute;
    }
    .compass-n { top: 8px; }
    .compass-e { right: 8px; }
    .compass-s { bottom: 8px; }
    .compass-w { left: 8px; }

    /* 新样式：侧边功能按钮组 */

.map-controls {
  position: absolute;
  bottom: 50px; /* 距离底部20px */
  right: 15px; /* 距离右侧15px */
  z-index: 1000;
  display: flex;
  flex-direction: column; /* 纵向排列按钮 */
  gap: 12px;
}

    .control-btn {
      width: 42px;
      height: 42px;
      border-radius: 8px;
      background: #fff;
      border: none;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      display: flex;margin-top:8px;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }
    .control-btn:active {
      transform: scale(0.95);
      background: #f5f5f5;
    }
    .control-btn svg {
      width: 22px;
      height: 22px;
    }
    .zoom-in svg { fill: #333; }
    .zoom-out svg { fill: #333; }
    .locate-btn svg { fill: #22c55e; }

/* 聚合点样式 */
.custom-cluster-icon {
  background: #4CAF50;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  color: white;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.cluster-icon {
  width: 100%;
  height: 100%;
}

/* 聚合弹窗列表样式 */
.cluster-popup {
  padding: 10px 0;
}
.cluster-user-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}
.cluster-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 8px;
}
.cluster-user-info {
  flex: 1;
}
.cluster-user-name {
  font-size: 14px;
  font-weight: bold;
}
.cluster-user-distance {
  font-size: 12px;
  color: #666;
}
.cluster-user-link {
  color: #4CAF50;
  text-decoration: none;
  font-size: 12px;
  padding: 3px 6px;
  background: #f0f9f0;
  border-radius: 3px;
}