/* 运动地图页面样式 */
html, body { height: 100%; margin: 0; }
#map { height: 100%; width: 100%; }

/* 返回主页按钮 */
.back-home-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.back-home-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.5);
}
.back-home-btn:active {
  transform: translateY(0) scale(0.98);
}
.back-home-btn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s;
}
.back-home-btn:hover svg {
  transform: translateX(-3px);
}

/* 加载指示器 */
.loading {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 14px;
  z-index: 1000;
  display: none;
}
.loading.show { display: block; }

/* 自定义点：更好看 + 动画 */
.hike-pin {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #DEB887 30%, #D2691E 70%, #8B4513 100%);
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  position: relative;
  transform: translate(-50%, -50%) scale(1);
  cursor: pointer;
}

/* 外圈脉冲 */
.hike-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(210, 105, 30, 0.3);
  animation: pulse 1.8s ease-out infinite;
}

/* 点击时的"放大缩小"弹跳动画 */
.bounce {
  animation: bounce 520ms cubic-bezier(.2,.9,.25,1.2);
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: .8; }
  70% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; }
  100% { opacity: 0; }
}

@keyframes bounce {
  0%   { transform: translate(-50%, -50%) scale(1); }
  40%  { transform: translate(-50%, -50%) scale(1.55); }
  70%  { transform: translate(-50%, -50%) scale(.92); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* 模态弹窗遮罩 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.modal-overlay.show { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 模态弹窗主体 */
.modal-content {
  background: #fff;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 弹窗头部 */
.modal-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header .title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
}

/* 关闭按钮 */
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  position: relative;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}
.modal-close:active {
  transform: scale(0.95);
}
.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
.modal-close::before {
  transform: rotate(45deg);
}
.modal-close::after {
  transform: rotate(-45deg);
}

/* 弹窗元信息 */
.modal-meta {
  padding: 12px 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  color: #58606e;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.modal-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-meta .meta-label {
  color: #889;
  font-weight: 500;
}

/* 弹窗内容区 */
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.8;
  font-size: 15px;
  color: #333;
}
.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #999;
}
.modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}
.modal-body p {
  margin: 12px 0;
}
.modal-body h1,
.modal-body h2,
.modal-body h3 {
  margin-top: 20px;
  margin-bottom: 12px;
  color: #1a1a1a;
}

/* 轨迹地图容器 */
.track-map-container {
  width: 100%;
  height: 250px;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}
.track-map {
  width: 100%;
  height: 100%;
}
.track-info {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #58606e;
}
.track-info .info-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}
.track-info .label {
  font-weight: 500;
  color: #889;
}
