
    html, body {
      margin: 0;
      padding: 0;
      height: 100%;
      width: 100%;
      font-family: "Calibri", "Trebuchet MS", "Ubuntu", Serif;
      font-size: 11pt;
    }

    #map {
      height: 100%;
      width: 100%;
    }
   

    .ol-control.layer-switcher {
      top: 60px;
      left: .5em;
      background: rgba(255, 255, 255, 0.9);
      padding: 5px;
      border-radius: 5px;
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
      max-height: 200px;
      overflow-y: auto;
      font-size: 12px;
    }

    /* 自定义鹰眼样式 */
    .ol-custom-overviewmap,
    .ol-custom-overviewmap.ol-uncollapsible {
      bottom: auto;
      left: auto;
      right: 0;
      top: 0;
    }

    .ol-custom-overviewmap:not(.ol-collapsed) {
      border: 1px solid black;
    }

    .ol-custom-overviewmap .ol-overviewmap-map {
      border: none;
      width: 300px;
    }

    .ol-custom-overviewmap .ol-overviewmap-box {
      border: 2px solid red;
    }

    .ol-custom-overviewmap:not(.ol-collapsed) button {
      bottom: auto;
      left: auto;
      right: 1px;
      top: 1px;
    }
    /* 图例样式 */
    .legend-toggle {
    position: absolute;
    top: 200px;
    left: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-right: none;
    z-index: 2000;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 0 6px 6px 0;
  }

  .legend-panel {
    position: absolute;
    top: 250px;
    left: 0;
    width: 260px;
    max-height: 60%;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 1999;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
  }

  .legend-panel.open {
    transform: translateX(0);
  }

  .legend-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
  }

  .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
  }

  .legend-color {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 1px solid #888;
    flex-shrink: 0;
  }
  /* 关于我们 */
  .about-toggle {
  position: absolute;
  top: 200px;
  right: 0;
  background: red;
  color: white;
  padding: 6px 12px;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  z-index: 1001;
  user-select: none;
}

.about-panel {
  position: absolute;
  top: 240px;
  right: 0;
  width: 300px;
  background: rgba(255, 255, 255, 0.95);
  border-left: 2px solid #2196f3;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 1000;
  font-size: 12pt;
}

.about-panel .about-header {
  background: #2196f3;
  color: white;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.about-panel .about-header button {
  background: none;
  border: none;
  color: white;
  font-size: 14pt;
  cursor: pointer;
}

.about-panel .about-content {
  padding: 10px;
  color: #333;
}
/* 指北针 */
.ol-rotate {
  position: absolute !important;
  top: 300px !important;
  right: 1em !important;  /* 右上角 */
  left: auto !important;  /* 取消左边定位 */
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  padding: 6px;
  width: 36px;       /* 固定宽度 */
  height: 36px;      /* 固定高度 */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: block !important;  /* 不用 flex，防止撑满 */
  z-index: 1500;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.ol-rotate:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.ol-rotate button {
  /* background: transparent; */
  border: none;
  width: 100%;      /* 按钮撑满父容器 */
  height: 100%;
  /* background-image: url('https://cdn-icons-png.flaticon.com/512/54/54342.png'); */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}
/* 工具箱 */
.tools-toggle {
    position: absolute;
    bottom: 110px;
    right: 10px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 1000;
    font-family: "微软雅黑";
  }

  .tools-panel {
    position: absolute;
    bottom: 150px;
    right: 10px;
    width: 180px;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-family: "微软雅黑";
  }

  .tools-panel button {
    width: 100%;
    margin-bottom: 6px;
    padding: 6px;
    font-size: 14px;
    cursor: pointer;
  }
  
   .modal {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -30%);
    background: white;
    border: 1px solid #ccc;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: none;
    font-family: "微软雅黑";
  }
  .modal button {
    margin-top: 10px;
  }
/* 搜索框 */

.search-container {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999; /* 确保在地图上方 */
  background: white;
  padding: 5px 10px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.search-container input {
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.search-container button {
  padding: 5px 10px;
  margin-left: 5px;
  border: none;
  background: #0078d7;
  color: white;
  border-radius: 3px;
  cursor: pointer;
}

.search-container button:hover {
  background: #005a9e;
}

.search-results {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: white;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  width: 300px;
  display: none; /* 默认隐藏 */
}

.search-results div {
  padding: 8px;
  cursor: pointer;
}

.search-results div:hover {
  background: #f0f0f0;
}
/* 搜索功能 */
.search-panel { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.9); padding: 5px; border-radius: 4px; z-index: 1000; }
.search-results { max-height: 200px; overflow-y: auto; margin-top: 5px; }
.search-results div { padding: 3px 5px; cursor: pointer; }
.search-results div:hover { background-color: #e6f7ff; }
