/* 通用基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

html, body {
    width: 100%;
    height: 100dvh;   /* 动态视口高度，移动端不会被地址栏挤压 */
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    line-height: 1.5;
    position: relative;
    background: linear-gradient(135deg, #f5f9ff, #e8f4ff);
    color: #333;
}

#map-container {
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  position: relative;
}


/* 搜索框 */
.search-box {
    position: absolute;
    top: 10px;
    left: 2.5%;
    z-index: 1000;
    width: 95%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    display: flex;
}

#search-input {
    flex: 1;
    border: 1px solid #cccccc;
    outline: none;
    padding: 8px 12px;
    font-size: 16px;
    background: transparent;
    border-radius: 8px;
}

#search-btn {
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 8px 15px;
    margin-left: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

/* 控制按钮 */
.control-panel {
    position: absolute;
    right: 10px;
    top: 120px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    font-weight: bold;
}

/* 开关轨道容器（和你原来一样大小） */
.ai-toggle-btn {
  display: block;
  width: 100%;
  height: 30px;
  background: #ddd;
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 蓝色圆点（拇指） */
.ai-toggle-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;   /* 默认在左侧，和原来滑块效果一致 */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #4a90e2;
  transform: translateY(-50%);
  transition: left 0.25s ease;
}

/* 选中状态时，蓝色圆点移到右侧 */
.ai-switch:checked + .ai-toggle-btn::after {
  left: calc(100% - 45px);
}

/* 保留原容器样式 */
.ai-slider-container {
  position: absolute;
  left: 10px;
  bottom: 30px;
  z-index: 1000;
  width: 115px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.ai-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 5px;
  margin-top: 5px;
  font-size: 14px;
  font-weight: bold;
}


/* 卡通人物 */
.character,
#character {
    position: fixed;
    right: 0px;
    bottom: 20px;
    z-index: 1000;
    width: 140px;
    height: 180px;
    /* background-image: url('../images/yangbo.png'); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform-origin: center;
}


/* 气泡菜单按钮 */
.bubble-menu {
    position: fixed;
    right: 100px;
    bottom: 165px;
    width: 0;
    height: 0;
    z-index: 1001;
    display: none;
}

#home-btn {
    /* background-image: url('../images/fanhui.png'); */
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.9);
    /* 白底保持一致 */
    border-radius: 12px;
}

.bubble-btn {
    position: absolute;
    width: 75px;
    height: 75px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    font-weight: bold;
    cursor: pointer;
    border: none;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    transform-origin: center;
}

.bubble-btn img {
    width: 110%;
    height: 110%;
    object-fit: contain;
}

/* 响应式弹窗 */
#infoBox {
    position: fixed;
    left: 50%;
    bottom: 5%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 380px;
    background-color: #fff8dc;
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 20px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
     /* 允许关闭按钮超出弹窗显示 */
  overflow: visible;  
}

#infoBox .close-btn {
  position: absolute;
  top: -20px;     /* 负值 = 往上移一半 */
  right: -20px;   /* 负值 = 往右移一半 */
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 10000;
}

#infoBox .close-btn img {
    width: 50px;   /* 可以改成24/32，看你图片大小 */
    height: 50px;
    display: block;
}

.name-with-tags {
  display: flex;
  flex-wrap: wrap;      /* 容器允许换行 */
  align-items: center;
  gap: 8px;             /* 名称和标签之间的间距 */
  margin-bottom: 8px;
}

.poi-name {
  font-size: 22px;
  font-weight: bold;
  white-space: normal;   /* ✅ 允许名称在必要时换行 */
  word-break: break-word;/* ✅ 单词/长串字符换行 */
  flex-shrink: 1;        /* ✅ 避免挤压标签 */
}

#tagContainer {
  display: flex;
  flex-wrap: wrap;      /* 标签自动换行 */
  gap: 8px;             /* 标签间距 */
  align-items: center;
}

.poi-tag {
  display: inline-block;
  background-color: #15b406; /* 浅绿色背景 */
  color: white;
  border: 1px solid #003703; /* 深绿色边框 */
  font-weight: bold;
  border-radius: 6px;
  margin-right: 2px;   /* 标签间距 */
  padding: 2px 8px;
  font-size: 16px;
  white-space: nowrap;       /* 单个标签不换行 */
}

