/* Activity Container */
.activity-container {
  font-size: 0.4rem;
  line-height: 1.5;
  color: #2E2E2E;
}

/* Activity User */
.activity-user {
  display: flex;
  text-align: left;
}

.points-icon {
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.1rem;
  border-radius: 50%;
}

.activity-user.error {
  color: #d32f2f;
  background: #ffebee;
}

.user-avatar {
  margin-right: 12px;
}

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

.user-info {
  flex: 1;
}

.user-nickname {
  font-weight: 600;
  margin-bottom: 4px;
}

.user-points,
.user-level {
  font-size: 0.4rem;
  color: #2E2E2E;
  margin-bottom: 0.48rem;
  display: flex;
  align-items: center;
}

/* Mission Item */
.mission-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.mission-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mission-item.completed {
  background: #f1f8e9;
  border-color: #c8e6c9;
}

.mission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.mission-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.mission-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.mission-status.pending {
  background: #f5f5f5;
  color: #666;
}

.mission-status.in_progress {
  background: #e3f2fd;
  color: #1976d2;
}

.mission-status.completed {
  background: #e8f5e8;
  color: #388e3c;
}

.mission-description {
  margin: 0 0 12px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.mission-progress {
  margin: 12px 0;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #81c784);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: #666;
}

.mission-actions {
  margin-top: 12px;
}

.mission-button {
  border: none;
  cursor: pointer;
}


.mission-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.mission-button.completed {
  background: #4caf50;
}

/* Mission List */
.mission-list {
  width: 100%;
  display: flex;
  justify-content: center;
}

.mission-list.loading,
.mission-list.error,
.mission-list.empty {
  text-align: center;
  color: #666;
}

.mission-list.error {
  color: #d32f2f;
}

.mission-list-header {
  margin-bottom: 16px;
}

.mission-list-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.mission-items {
  /* 任务项目容器 */
}

/* Mission Popup */
.mission-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.mission-popup {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.popup-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-button:hover {
  background: #e0e0e0;
}

.popup-content {
  max-height: calc(80vh - 80px);
  overflow-y: auto;
  padding: 20px;
}

.loading-state,
.error-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.error-state {
  color: #d32f2f;
}

.error-state button {
  margin-top: 12px;
  background: #1976d2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.user-section {
  margin-bottom: 24px;
}

.missions-section {
  /* 任务区域 */
}

/* 响应式设计 */
@media (max-width: 768px) {
  .mission-popup {
    width: 95%;
    max-height: 90vh;
  }

  .popup-content {
    max-height: calc(90vh - 80px);
    padding: 16px;
  }

  .mission-item {
    padding: 12px;
  }

  .mission-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Mission Item Card - 新的任务卡片样式 */
.mission-item-card {
  width: 10.3rem;
  border-radius: 0.3rem;
  padding: 0.5rem;
  margin-bottom: 0.29rem;
  border: 0.06rem solid #FFF3E6;
  box-sizing: border-box;
}

.mission-content {
  display: flex;
  align-items: center;
}

.mission-info {
  width: 5.56rem;
  display: flex;
  flex-direction: column;
}

.mission-invited-avatar-list {
  display: flex;
}

.mission-invited-avatar-item {
  width: 0.88rem;
  height: 0.88rem;
  border-radius: 50%;
  margin-right: 0.1rem;
}

.mission-title {
  font-size: 0.4rem;
  font-weight: 400;
  color: #2E2E2E;
}

.mission-reward {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 2.3rem;
}

.reward-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.14rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.reward-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* 如果没有图片，显示默认的金币图标 */
.reward-icon:empty::before {
  content: '¥';
  font-size: 12px;
  color: white;
}


.mission-action {
  flex-shrink: 0;
}

.action-button {
  background: #FFE3B4;
  color: #A47959;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.38rem;
  font-weight: 400;
  border-radius: 200px;
  width: 2.01rem;
  height: 0.84rem;
}


.action-button:disabled {
  cursor: not-allowed;
  transform: none;
}

.action-button.completed {
  filter: grayscale(100%);
}

.action-button.updating {
  background: #9e9e9e;
  color: white;
}



.award-list-container {
  min-height: 3rem;
}

.reward-amount {
  white-space: nowrap;
  font-size: 0.36rem;
  color: #C89356;
}

.award-content {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
}

/* 兑换按钮 */
.award-button {
  background: #FFE3B4;
  color: #A47959;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.36rem;
  font-weight: 400;
  border-radius: 200px;
  height: 0.71rem;
  width: 2.72rem;
  transition: all 0.3s ease;
}

.award-grid {
  display: flex;
  justify-content: flex-start;
  gap: 0.22rem;
  transition: opacity 0.3s ease;
  max-width: 100%;
  flex-wrap: wrap;
}

/* 奖励图片 */
.award-image {
  /* margin-bottom: 0.3rem; */
  transition: all 0.3s ease;
}

.award-image img {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.66rem;
  object-fit: cover;
  border: 16rpx solid #fff;
  transition: all 0.3s ease;
}

/* 奖励标题 */
.award-title {
  font-size: 0.34rem;
  font-weight: 500;
  color: #333;
  margin: 0.14rem 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  transition: all 0.3s ease;
}

.award-item-card {
  height: 4.4rem;
  margin-right: 0.22rem;
  transition: all 0.3s ease;
}

.unavailable {
  /** 灰态滤镜 */
  filter: grayscale(100%);
}


.toast-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.toast-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.toast-item {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px 16px;
  border-radius: 50px;
  max-width: 250px;
  min-width: 100px;
  text-align: center;
  margin: 5px 0;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.5;
  animation: toast-enter 0.3s ease, toast-exit 0.3s ease forwards;
  animation-delay: 0s, calc(var(--duration, 2000ms) - 300ms);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  word-break: break-word;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.simple-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  max-width: 80vw;
  text-align: center;
  word-break: break-word;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.simple-toast.show {
  opacity: 1;
}