/* 东南亚电子沙盘 3D 实景与态势看板核心样式 (对标 Tier 3 MapBoard) */
html, body {
  background-color: #0b132b !important;
  color: #f1f5f9 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.bg-darkbg { background-color: #0b132b !important; }
.bg-cardbg { background-color: #1c2541 !important; }

/* 军工级暗黑雷达脉冲光晕动效 */
@keyframes radar-pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.85); }
  70% { box-shadow: 0 0 0 16px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}
@keyframes radar-pulse-orange {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.85); }
  70% { box-shadow: 0 0 0 14px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}
@keyframes radar-pulse-yellow {
  0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.85); }
  70% { box-shadow: 0 0 0 12px rgba(234, 179, 8, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}
@keyframes radar-pulse-blue {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.75); }
  70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes metricPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); color: #fbbf24 !important; text-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
  100% { transform: scale(1); }
}
.metric-bump {
  display: inline-block;
  animation: metricPulse 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pulse-dot-red {
  width: 14px; height: 14px; border-radius: 50%;
  background-color: #f43f5e;
  border: 2px solid #ffffff;
  animation: radar-pulse-red 1.8s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.pulse-dot-red:hover { transform: scale(1.3); }

.pulse-dot-orange {
  width: 13px; height: 13px; border-radius: 50%;
  background-color: #f97316;
  border: 2px solid #ffffff;
  animation: radar-pulse-orange 2s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.pulse-dot-orange:hover { transform: scale(1.3); }

.pulse-dot-yellow {
  width: 12px; height: 12px; border-radius: 50%;
  background-color: #eab308;
  border: 2px solid #ffffff;
  animation: radar-pulse-yellow 2.2s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.pulse-dot-yellow:hover { transform: scale(1.3); }

.pulse-dot-blue {
  width: 11px; height: 11px; border-radius: 50%;
  background-color: #6366f1;
  border: 2px solid #ffffff;
  animation: radar-pulse-blue 2.5s infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.pulse-dot-blue:hover { transform: scale(1.3); }

/* 滚动条美化 */
.scroll-custom::-webkit-scrollbar { width: 4px; height: 4px; }
.scroll-custom::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.6); }
.scroll-custom::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.5); border-radius: 2px; }
.scroll-custom::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.8); }

.tactical-grid {
  background-image: 
    linear-gradient(to right, rgba(58, 80, 107, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(58, 80, 107, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* MapLibre 弹窗军事级极光暗黑毛玻璃风 (对标 Tier 3 MapBoard) */
.spark-tactical-popup {
  z-index: 10050 !important;
}
.spark-tactical-popup .maplibregl-popup-tip {
  display: none !important; /* 由左下角 SVG 长款战术弧形大箭头接管 */
}
.spark-tactical-popup .maplibregl-popup-content {
  background: rgba(11, 19, 43, 0.94) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.85), 0 0 20px rgba(56, 189, 248, 0.25) !important;
  color: #f1f5f9 !important;
  font-family: inherit !important;
}
.spark-tactical-popup .maplibregl-popup-close-button {
  color: #94a3b8 !important;
  font-size: 16px !important;
  right: 8px !important;
  top: 8px !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
}
.spark-tactical-popup .maplibregl-popup-close-button:hover {
  color: #ffffff !important;
  background-color: rgba(244, 63, 94, 0.3) !important;
}

/* 战术流动线与雷达同心环 */
@keyframes dash-flow {
  to { stroke-dashoffset: -24; }
}
.tactical-leader-path {
  animation: dash-flow 1.5s linear infinite;
}

@keyframes leader-pulse-ring {
  0% { r: 5; opacity: 1; }
  100% { r: 18; opacity: 0; }
}
.leader-target-ring-global {
  animation: leader-pulse-ring 1.8s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}

/* MapLibre 控件暗黑化 */
.maplibregl-ctrl-group {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(51, 65, 85, 0.7) !important;
  border-radius: 10px !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}
.maplibregl-ctrl-group button {
  border-bottom: 1px solid rgba(51, 65, 85, 0.5) !important;
}
.maplibregl-ctrl-group button:last-child {
  border-bottom: none !important;
}
.maplibregl-ctrl-icon {
  filter: invert(0.85) hue-rotate(180deg) !important;
}
.maplibregl-ctrl-attrib {
  display: none !important;
}

/* 沙盘主框架响应式 */
.sandtable-main-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 8px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 动态多比例尺战术地名与行政注记 (尺寸恒定，严格遵循 MapLibre 坐标定位，彻底杜绝拉伸放大) */
.tactical-map-label {
  pointer-events: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  z-index: 5;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
}
.tactical-map-label.tier-1 .label-text {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 6px rgba(15, 23, 42, 0.95);
  letter-spacing: 0.5px;
}
.tactical-map-label.tier-1 .label-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}
.tactical-map-label.tier-2 .label-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 6px rgba(15, 23, 42, 0.9);
}
.tactical-map-label.tier-2 .label-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #94a3b8;
}
.tactical-map-label.tier-3 {
  flex-direction: row;
}
.tactical-map-label.tier-3 .label-dot {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 5px #38bdf8;
  margin-right: 2px;
  flex-shrink: 0;
}
.tactical-map-label.tier-3 .label-text {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 5px rgba(0, 0, 0, 0.95), 1px 1px 2px #000000;
  letter-spacing: 0.3px;
}
.tactical-map-label.tier-3 .label-en {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 5px rgba(0, 0, 0, 0.95), 1px 1px 2px #000000;
  margin-left: 3px;
}
.tactical-map-label.label-fading-in {
  animation: labelFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes labelFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
