* {
  box-sizing: border-box;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue",  Arial, sans-serif;
}

/* 新增全局样式解决空白和滚动条问题 */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden; /* 禁用全局滚动条 */
  width: 100%;
  height: 100%;
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 确保背景图覆盖全屏 */
  z-index: -1; /* 置于底层 */
}

.container {
    width: 100vw;
    height: 100vh; /* 使用视口高度 */
    max-width: none;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 0;
    box-shadow: none;
    margin: 0; /* 移除自动居中 */
}

.button-group {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 2px;
  margin-bottom: 2px;
  align-items: center;
  position: relative; /* 添加相对定位作为锚点 */
}

/* 动态文本长条样式 */
.dynamic-text-bar {
  position: absolute; /* 使用绝对定位 */
  right: 110%; /* 定位在按钮组的左侧 */
  top: 50%; /* 垂直居中 */
  transform: translateY(-50%); /* 精确垂直居中 */
  
  /* 尺寸和文本样式 */
  max-width: 150px;
  min-width: 50px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.3); /* 半透明背景 */
  border-radius: 4px;
  font-size: 12px;
  color: #ff9e40;
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  
  /* 确保不占用空间 */
  z-index: 10; /* 确保在内容上方 */
  pointer-events: none; /* 不干扰点击事件 */
}

/* 可选：不同状态样式
.dynamic-text-bar.alert {
  background: #ffebee;
  color: #c62828;
}
.dynamic-text-bar.success {
  background: #e8f5e9;
  color: #2e7d32;
}
*/

.header h3 {
  text-align: center;
  color: #ff9e40;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  margin: 0;
  line-height: 15px;
  flex-shrink: 0;
}

.header {
  --header-height: 28px; /* 默认高度 */
  display: flex;
  position: relative;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  height: var(--header-height); /* 固定高度确保一致性 */
  box-sizing: border-box; /* 包含内边距在高度内 */
  /* 新增深色背景样式 */
  background-color: #1a1a1a; /* 深灰黑色背景 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* 添加阴影增加深度感 */
  border-bottom: 1px solid #333; /* 底部边框分隔 */
}

.header-section {
    flex: 1;
    display: flex;
    min-width: 0;
    align-items: center; /* 确保子元素垂直居中 */
    height: 100%; /* 继承父元素高度 */
}
        
.left-section {
    justify-content: flex-start;
}
        
.center-section {
    justify-content: center;
}
        
.right-section {
    justify-content: flex-end;
}
        
#AppTitle, #TargetID {
    color: #ff9e40; /* 保持原始橙色 */
    font-size: 14px; /* 调整为合适大小 */
    font-weight: 600;
    margin: 0;
    line-height: 1px;
    display: flex;
    align-items: center; /* 垂直居中 */
    height: 100%; /* 继承父元素高度 */
}

.map-container {
    height: calc(100vh - var(--header-height)); /* 根据标题栏高度自适应 */
    width: 100vw;
    overflow: hidden; /* 隐藏地图容器滚动条 */
    position: relative; /* 添加相对定位作为锚点 */
}
        
/* 地图样式 */
.map {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden; /* 禁止地图区域滚动 */
}
        
.header > h1 {
  font-style: normal;
  font-weight: 600;
  font-size: 48px;
  line-height: 150%;
  display: flex;
  align-items: center;
  text-align: center;
  color: #ffffff;
}

.header > p {
  font-style: normal;
  font-weight: 400;
  font-size: 24px;
  line-height: 150%;
  text-align: center;
  color: #ffffff;
  flex-grow: 0;
  margin: 16px 0px;
}

.options {
  display: flex;
  flex-direction: row;
}

.options > a {
  color: #ffffff;
  text-decoration: underline;
  margin: 0px 8px;
  font-weight: 400;
  font-size: 24px;
  line-height: 150%;
}

.options > a:first-of-type {
  margin-right: 30px;
}

.logo {
  margin-top: 75px;
}

.logo > img {
  width: 160px;
  height: 64px;
}

@media screen and (max-width: 600px) {
    --header-height: 26px;
    .map-container {
        height: calc(100vh - var(--header-height)); /* 移动端标题栏高度减小 */
    }
    .header {
        height: var(--header-height); /* 移动端减小高度 */
        padding: 8px 0; /* 调整内边距 */
        background-color: #1a1a1a; /* 确保移动端也是深色 */
    }
}


/* 加载动画容器 - 默认隐藏 */
#loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* 旋转动画主体 */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #3498db;
  animation: spin 1s linear infinite;
}

/* 加载文字样式 */
#loading-spinner p {
  margin-top: 15px;
  color: #333;
  font-family: Arial, sans-serif;
  font-size: 16px;
}

/* 旋转动画关键帧 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  #loading-spinner {
    background: rgba(0, 0, 0, 0.7);
  }
  .spinner {
    border-top-color: #1abc9c;
  }
  #loading-spinner p {
    color: #eee;
  }
}

.toast {
    position: fixed;
    top: 50%;          /* 定位到垂直中央 */
    left: 50%;         /* 定位到水平中央 */
    transform: translate(-50%, -50%); /* 精确居中 */

    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 500;

    z-index: 10000;    /* 确保在最顶层 */
    opacity: 0;        /* 初始不可见 */
    transition: opacity 0.3s ease, transform 0.3s ease;

/* 添加弹性效果 */
    transform-origin: center;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
        
.toast.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    pointer-events: none;
}
