/* 基础样式 */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background-color: #f7f8fa;
  overflow: hidden;
}

/* 颜色变量 */
:root {
  --primary-color: #0D6EFD;
  --primary-color-rgb: 13, 110, 253; /* 添加RGB值用于透明度设置 */
  --text-color: #333333;
  --light-text: #6B7280;
  --accent-color: #FF6B6B;
  --success-color: #10B981;
  --warning-color: #F59E0B;
  --danger-color: #EF4444;
  
  --rarity-common: #9CA3AF;
  --rarity-uncommon: #10B981;
  --rarity-rare: #3B82F6;
  --rarity-epic: #8B5CF6;
  --rarity-legendary: #F59E0B;
}

/* 确保页面在iframe中自适应大小 */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* 使phone-container适应父容器 */
.phone-container {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* 适应iframe大小 */
@media (max-width: 430px) {
  .phone-container {
    width: 100%;
    height: 100%;
  }
}

/* 地图容器样式 */
.map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* 固定在顶部的导航栏，确保在地图上层 */
.fixed-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 筛选栏z-index提高 */
.achievement-filter-bar {
  position: absolute;
  top: 70px;
  left: 20px;
  right: 20px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 50;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.achievement-filter-bar::-webkit-scrollbar {
  display: none;
}

.achievement-filter-item {
  flex: 0 0 auto;
  padding: 6px 12px;
  margin-right: 8px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  background-color: #f3f4f6;
  color: var(--text-color);
}

.achievement-filter-item.active {
  background-color: var(--primary-color);
  color: white;
}

/* 地图标记 */
.map-marker {
  background: none;
  border: none;
}

.marker-achievement {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #FFD700; /* 金黄色 */
  color: #8B4513; /* 深棕色图标，增加对比度 */
  border-radius: 50%;
  border: 3px solid #FFA500; /* 橙色边框 */
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8); /* 金色光晕效果 */
  text-align: center;
  font-size: 24px;
  text-shadow: none;
  width: 45px;
  height: 45px;
  transition: all 0.2s ease;
}

.marker-achievement:hover {
  transform: scale(1.2); /* 鼠标悬停时放大 */
  box-shadow: 0 0 15px rgba(255, 215, 0, 1); /* 增强光晕效果 */
}

.marker-user {
  color: var(--primary-color);
  font-size: 24px;
  animation: pulse 1.5s infinite;
}

/* 其他用户角色标记 */
.marker-other-user {
  color: #3498db;
  font-size: 20px;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
  animation: subtle-bounce 3s infinite;
  z-index: 500 !important; /* 确保用户标记在其他元素上方 */
}

@keyframes subtle-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.marker-user-image {
  width: 50px; /* 增加头像大小 */
  height: 50px;
  border-radius: 50%;
  border: 3px solid white; /* 内边框改为白色 */
  object-fit: cover;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3); /* 增强阴影效果 */
  position: relative;
  z-index: 10;
}

/* 添加用户头像标记的脉冲效果 */
.marker-user-image {
  animation: pulse-avatar 2s infinite;
}

@keyframes pulse-avatar {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
  }
}

/* 用户头像装饰框 */
.avatar-frame {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #9b59b6);
  z-index: 5;
}

.avatar-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.2));
  opacity: 0.6;
}

.avatar-frame.gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.avatar-frame.silver {
  background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
}

.avatar-frame.bronze {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.avatar-frame.elite {
  background: linear-gradient(135deg, #9b59b6, #4a235a);
}

/* 用户头像容器 */
.avatar-container {
  position: relative;
  width: 50px;
  height: 50px;
}

/* 用户头像等级标识 */
.avatar-level-indicator {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: #333;
  border: 2px solid #3498db;
  z-index: 15;
}

/* 附近用户列表面板 */
.nearby-users-panel {
  position: absolute;
  top: 70px;
  right: 10px;
  width: 250px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow: hidden;
  transform: translateX(260px);
  transition: transform 0.3s ease;
}

.nearby-users-panel.visible {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: var(--primary-color);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-panel-btn {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background-color 0.2s;
}

.close-panel-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.nearby-count {
  font-size: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
}

.users-list {
  max-height: 300px;
  overflow-y: auto;
}

.user-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.user-item:hover {
  background-color: #f9f9f9;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

.user-distance {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.user-level {
  display: flex;
  align-items: center;
  font-size: 12px;
  background-color: #fff5e6;
  color: #ff9800;
  padding: 2px 6px;
  border-radius: 10px;
}

.user-level i {
  font-size: 10px;
  margin-right: 3px;
}

/* 地图聊天系统 */
.map-chat-system {
  position: absolute;
  bottom: 70px;
  left: 10px;
  right: 10px;
  height: 400px; /* 默认使用扩展高度 */
  background-color: white;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateY(410px); /* 默认隐藏 */
  transition: transform 0.3s ease;
}

.map-chat-system.visible {
  transform: translateY(0);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 12px 12px 0 0;
  transition: background-color 0.3s ease;
}

/* 未展开时的聊天标题 */
.map-chat-system:not(.visible) .chat-header {
  border-radius: 12px;
  background-color: rgba(var(--primary-color-rgb), 0.85);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* 最近消息显示样式 */
.latest-message-display {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-right: 10px; /* 确保内容不会与按钮重叠 */
}

.latest-message-sender {
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 1);
}

.latest-message-text {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.9);
  max-width: calc(100% - 100px); /* 确保不会超出按钮 */
}

/* 聊天切换按钮样式 */
.chat-toggle-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.chat-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-controls {
  display: flex;
  gap: 10px;
}

.chat-controls button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.chat-controls button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.chat-messages {
  flex: 1;
  padding: 10px 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-system-message {
  align-self: center;
  font-size: 12px;
  color: #888;
  background-color: #f5f5f5;
  padding: 4px 10px;
  border-radius: 10px;
  margin: 5px 0;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  max-width: 85%;
}

.chat-message.received {
  align-self: flex-start;
}

.chat-message.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 8px;
}

.message-bubble {
  background-color: #f0f2f5;
  border-radius: 18px;
  padding: 8px 12px;
  position: relative;
}

.chat-message.sent .message-bubble {
  background-color: var(--primary-color);
  color: white;
}

.message-sender {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 3px;
  color: #555;
}

.chat-message.sent .message-sender {
  display: none;
}

.message-content {
  font-size: 14px;
  line-height: 1.4;
}

.message-time {
  font-size: 10px;
  color: #999;
  margin-top: 3px;
  text-align: right;
}

.chat-message.sent .message-time {
  color: rgba(255, 255, 255, 0.8);
}

.chat-input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid #eee;
}

#chatInput {
  flex: 1;
  border: none;
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 10px 15px;
  font-size: 14px;
  outline: none;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.send-btn:hover {
  background-color: #0056b3;
}

/* 聊天快捷按钮 */
.chat-quick-btn {
  position: absolute;
  bottom: 80px;
  right: 15px;
  width: 25px; /* 缩小一倍 */
  height: 25px; /* 缩小一倍 */
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 999;
  font-size: 12px; /* 缩小图标 */
  transition: transform 0.2s, background-color 0.2s;
}

.chat-quick-btn:hover {
  transform: scale(1.05);
  background-color: #0056b3;
}

.chat-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ff4757;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 地图控制按钮 */
.map-controls {
  position: absolute;
  bottom: 150px; /* 调整位置避免与底部导航栏重叠 */
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
}

.map-control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-color);
}

/* 成就弹出窗口 */
.achievement-popup {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 420px;
  margin: 0 auto;
  background-color: white;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 20px;
  transform: translateY(120%); /* 初始状态完全隐藏在屏幕外 */
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0; /* 确保完全不可见 */
  visibility: hidden; /* 确保不会被点击 */
  pointer-events: none; /* 确保不会接收交互事件 */
}

.achievement-popup.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.close-popup {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
  color: var(--light-text);
}

@keyframes pulse-marker {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* 成就解锁动画 */
.achievement-unlocked {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, #4F46E5, #A78BFA);
  color: white;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  z-index: 2000;
  width: 80%;
  max-width: 320px;
  opacity: 0;
  transition: all 0.5s ease;
  pointer-events: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.achievement-unlocked.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.achievement-unlock-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background-color: white;
  color: #4F46E5;
  position: relative;
}

.achievement-unlock-icon::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  border: 2px dashed white;
  animation: rotate 10s linear infinite;
}

.achievement-unlock-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.achievement-unlock-desc {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.exp-gain {
  font-size: 16px;
  color: #FFC107;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* 探索地图界面 */
.explore-map-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 2000;
  display: none;
}

.explore-map-container.active {
  display: block;
}

/* 地图彩蛋标记 */
.easter-egg-marker {
  position: absolute;
  z-index: 40;
  cursor: pointer;
}

.easter-egg-marker .pulse-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 193, 7, 0.2);
  animation: pulse-circle 3s infinite;
}

.easter-egg-marker .marker-icon {
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rarity-legendary);
  color: black;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.easter-egg-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  width: 150px;
  display: none;
}

.easter-egg-marker:hover .easter-egg-tooltip {
  display: block;
}

@keyframes pulse-circle {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* 区域收集进度 */
.collection-progress-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.progress-region {
  position: absolute;
  border: 2px dashed rgba(79, 70, 229, 0.5);
  border-radius: 8px;
  overflow: hidden;
}

.region-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(79, 70, 229, 0.2);
}

/* 任务指示点样式 */
.task-marker-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.task-difficulty {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.difficulty-easy {
  color: #10B981;
}

.difficulty-medium {
  color: #F59E0B;
}

.difficulty-hard {
  color: #EF4444;
}

/* 高亮用户项 */
.user-item.highlight {
  background-color: #f0f7ff;
  animation: highlight-pulse 1s;
}

@keyframes highlight-pulse {
  0%, 100% {
    background-color: #f0f7ff;
  }
  50% {
    background-color: #dceeff;
  }
}

/* 用户弹窗样式 */
.user-popup {
  width: 220px;
}

.user-popup-content {
  padding: 0;
}

.user-popup-header {
  padding: 15px;
  display: flex;
  align-items: center;
}

.user-popup-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid white;
  margin-right: 0;
  object-fit: cover;
}

.user-popup-info {
  margin-left: 15px;
}

.user-popup-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
}

.user-popup-level {
  font-size: 12px;
  color: #ff9800;
  background-color: #fff5e6;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
}

.user-popup-actions {
  display: flex;
  padding: 10px;
  border-top: 1px solid #eee;
}

.user-popup-btn {
  flex: 1;
  border: none;
  background-color: #f5f5f5;
  color: #333;
  padding: 6px 0;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  margin: 0 2px;
  transition: background-color 0.2s;
}

.user-popup-btn:hover {
  background-color: #e9e9e9;
}

.user-popup-btn i {
  margin-right: 3px;
}

/* 用户名标签样式 */
.user-name-label {
  z-index: 499 !important;
}

.user-name-badge {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 用户标记悬停提示样式 */
.user-marker-tooltip {
  background-color: rgba(52, 152, 219, 0.9);
  border: none;
  color: white;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.user-marker-tooltip::before {
  border-top-color: rgba(52, 152, 219, 0.9);
}

/* 调整Leaflet地图控件的层级 */
.leaflet-control {
  z-index: 800 !important;
}

.leaflet-popup {
  z-index: 600 !important;
}

/* 私聊标记样式 */
.direct-message-tag {
  display: inline-block;
  padding: 1px 5px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 3px;
}

.chat-message.sent .direct-message-tag {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 通知提示 */
.map-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background-color: #fff;
  color: #333;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  transition: transform 0.3s ease;
}

.map-notification.show {
  transform: translateX(-50%) translateY(0);
}

.map-notification i {
  margin-right: 8px;
  font-size: 16px;
}

.map-notification.info i {
  color: var(--primary-color);
}

.map-notification.warning i {
  color: var(--warning-color);
}

/* 为了适应聊天框的特殊样式 */
.chat-input-area {
  position: relative;
}

#chatInput:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

/* 切换按钮通知指示器 */
.toggle-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background-color: #ff4757;
  color: white;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.chat-toggle-btn {
  position: relative;
}

/* 添加品牌活动相关样式 */
/* 品牌活动标记 */
.marker-brand-activity {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  text-align: center;
  font-size: 22px;
  width: 45px;
  height: 45px;
  transition: all 0.2s ease;
}

.marker-brand-activity:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(59, 130, 246, 1);
}

/* 品牌活动弹窗容器 */
.brand-activity-popup-container {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.brand-activity-popup {
  width: 100%;
  max-width: 300px;  /* 从380px减小到300px */
  background: #fff;
  color: #333;
  border-radius: 12px;
  overflow: hidden;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

/* 关闭按钮 */
.brand-activity-popup .close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #fff;
}

.brand-activity-popup .close-popup:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* 品牌活动头部 */
.brand-activity-header {
  padding: 15px;  /* 从20px减少到15px */
  display: flex;
  align-items: center;
  gap: 12px;  /* 从15px减少到12px */
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
}

.brand-logo {
  width: 50px;  /* 从60px减少到50px */
  height: 50px;  /* 相应减小高度 */
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
}

.brand-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-info {
  flex: 1;
}

.brand-activity-title {
  font-size: 16px;  /* 减小标题字体 */
  font-weight: bold;
  margin: 0 0 5px;
}

.brand-sponsor {
  font-size: 12px;
  opacity: 0.9;
}

/* 品牌活动描述 */
.brand-activity-description {
  padding: 12px 15px;  /* 减小内边距 */
  font-size: 13px;  /* 减小字体 */
  line-height: 1.4;
  color: #4b5563;
  border-bottom: 1px solid #eee;
}

/* 品牌活动奖励 */
.brand-activity-rewards {
  padding: 12px 15px;  /* 减小内边距 */
  border-bottom: 1px solid #eee;
}

.reward-section {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px;  /* 从12px减小到10px */
}

.reward-header {
  display: flex;
  align-items: center;
  gap: 8px;  /* 减小间距 */
  margin-bottom: 8px;
}

.reward-header i {
  color: #F59E0B;
}

.reward-header h4 {
  font-size: 14px;  /* 减小标题字体 */
  font-weight: 600;
  margin: 0;
  color: #4b5563;
}

.reward-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-reward-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
}

.brand-reward-item i {
  color: #3B82F6;
  width: 18px;
  text-align: center;
}

/* 品牌活动任务 */
.brand-activity-tasks {
  padding: 12px 15px;  /* 减小内边距 */
}

.tasks-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tasks-header i {
  color: #3B82F6;
}

.tasks-header h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #4b5563;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-task-item {
  display: flex;
  padding: 8px 10px;  /* 减小内边距 */
  background: #f9fafb;
  border-radius: 6px;
  margin-bottom: 8px;
  gap: 10px;
}

.task-indicator {
  color: #3B82F6;
  padding-top: 2px;
}

.brand-task-item.locked .task-indicator {
  color: #9CA3AF;
}

.task-content {
  flex: 1;
}

.task-name {
  color: #333;
  line-height: 1.4;
}

.brand-task-item.locked .task-name {
  color: #9CA3AF;
}

/* 品牌活动底部 */
.brand-activity-footer {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
}

.activity-deadline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
}

.participate-btn {
  padding: 6px 14px;  /* 减小按钮大小 */
  font-size: 13px;  /* 减小字体 */
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}

/* 品牌筛选标签 */
.achievement-filter-item[data-filter="brand"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.1);
  color: #3B82F6;
  font-weight: 500;
}

.achievement-filter-item[data-filter="brand"].active {
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  border: 1px solid transparent;
}
