/* ========== 世界地图样式 ========== */

/* 地图容器 */
#map-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

#map-container svg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

/* 路径连线 */
.map-connection {
  stroke-width: 2;
  fill: none;
}

.map-connection-active {
  stroke: #4a9a4a;
  stroke-opacity: 0.25;
  stroke-width: 2.5;
}

.map-connection-locked {
  stroke: #374151;
  stroke-opacity: 0.2;
  stroke-dasharray: 5, 5;
}

.map-connection-highlight {
  stroke: #d4af37;
  stroke-opacity: 0.6;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4));
}

/* 节点通用基色——按类型渲染（inline fill）不再由 CSS 设置 */
.map-node circle {
  cursor: pointer;
  transition: all 0.3s ease;
}
.map-node:hover circle {
  filter: brightness(1.3) drop-shadow(0 0 10px rgba(255,255,255,0.3));
  stroke-width: 3;
}

/* 当前节点——亮色 + 脉冲光环 */
.map-node-current {
  animation: nodePulse 2s ease-in-out infinite;
}
.map-node-current circle {
  fill: #d4af37;
  stroke: #fbbf24;
  stroke-width: 3;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.8));
}
.map-node-current .map-node-label {
  fill: #fbbf24;
  font-weight: bold;
}

@keyframes nodePulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6)); opacity: 0.8; }
  50% { filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.9)); opacity: 1; }
}

/* 已解锁节点 */
.map-node-unlocked circle {
  stroke: #2d6a4f;
  stroke-width: 2;
}
.map-node-unlocked .map-node-label {
  fill: #86efac;
}
.map-node-unlocked:hover circle {
  stroke: #34d399;
  stroke-width: 3;
}

/* 可解锁节点——灰显 + 虚线 */
.map-node-discoverable circle {
  stroke: #6b7280;
  stroke-width: 2;
  stroke-dasharray: 4, 3;
}
.map-node-discoverable .map-node-label {
  fill: #9ca3af;
}
.map-node-discoverable .map-node-cost {
  fill: #fbbf24;
}
.map-node-discoverable:hover circle {
  stroke: #d4af37;
  stroke-width: 3;
  stroke-dasharray: none;
}

/* 不可见节点——暗淡 */
.map-node-hidden circle {
  stroke: #374151;
  stroke-width: 1;
}
.map-node-hidden .map-node-label {
  fill: #4b5563;
}

/* 节点图标文字 */
.map-node-icon {
  pointer-events: none;
  user-select: none;
}

/* 节点详情面板 */
#map-node-detail {
  display: none;
}

/* 节点详情卡片内的动作按钮样式 */
#map-node-detail .btn,
#area-detail .btn {
  margin-bottom: 4px;
}

/* 节点详情采集预览 */
#area-detail .drop-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.8rem;
  border-bottom: 1px solid #2d3742;
}

/* 响应式适配（移动端） */
@media (max-width: 768px) {
  #map-container {
    min-height: 200px;
  }

  #map-container svg {
    min-height: 200px;
  }

  /* 移动端：地图节点文本更小 */
  .map-node-label {
    font-size: 10px !important;
  }

  .map-node-cost {
    font-size: 8px !important;
  }

  /* 图例移到右下角减小影响 */
  #map-container svg g:last-child {
    transform: translate(0, -10px);
  }
}

/* 修仙主题点缀 */
#map-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(212, 175, 55, 0.03), transparent 60%);
  border-radius: 8px;
}
