/* ==================== 成就页面专用样式 ==================== */

.achievement-content {
  max-width: 1400px;
}

/* ==================== 用户信息卡片 ==================== */
.user-profile-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
}

.user-avatar-section {
  position: relative;
  text-align: center;
}

.user-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 4px 20px rgba(24, 144, 255, 0.3);
}

.user-level-badge {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-gradient);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.user-info-section {
  text-align: center;
}

.user-nickname {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.user-title {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding: 6px 16px;
  background: var(--bg-light);
  border-radius: 20px;
  display: inline-block;
}

.user-exp-bar {
  max-width: 400px;
  margin: 0 auto;
}

.exp-bar-bg {
  height: 12px;
  background: var(--bg-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.exp-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.exp-text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.user-stats-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  min-width: 180px;
}

.stat-icon {
  font-size: 32px;
}

.stat-content {
  text-align: left;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== 成就分类标签 ==================== */
.achievement-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.tab-btn span:first-child {
  font-size: 18px;
}

/* ==================== 成就列表区域 ==================== */
.achievements-section {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-description {
  font-size: 16px;
  color: var(--text-secondary);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.achievement-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.achievement-card.unlocked {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
}

.achievement-card.locked {
  opacity: 0.7;
}

.achievement-icon {
  font-size: 48px;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.achievement-card.unlocked .achievement-icon {
  background: linear-gradient(135deg, #ffd700 0%, #ffecb3 100%);
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.achievement-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.achievement-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 50px;
  text-align: right;
}

.achievement-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-left: 16px;
  border-left: 1px solid var(--border-color);
}

.reward-icon {
  font-size: 20px;
}

.reward-exp {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  white-space: nowrap;
}

/* ==================== 等级说明区域 ==================== */
.level-info-section {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

.level-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.level-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.level-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.level-item.current {
  border: 2px solid var(--primary-color);
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(54, 207, 201, 0.1) 100%);
}

.level-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.level-item.current .level-number {
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(24, 144, 255, 0);
  }
}

.level-info {
  flex: 1;
}

.level-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.level-exp {
  font-size: 12px;
  color: var(--text-muted);
}

.level-icon {
  font-size: 32px;
  margin-top: 12px;
}

/* ==================== 小程序推广卡片 ==================== */
.miniprogram-promo-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.promo-content {
  display: flex;
  align-items: center;
  gap: 32px;
}

.promo-icon {
  font-size: 64px;
}

.promo-text {
  flex: 1;
}

.promo-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.promo-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.promo-qr {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.promo-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
  .user-profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .user-avatar-section {
    display: inline-block;
  }

  .user-stats-section {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .level-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .achievement-content {
    padding: 16px;
  }

  .user-profile-card {
    padding: 24px;
  }

  .user-avatar {
    width: 80px;
    height: 80px;
  }

  .user-nickname {
    font-size: 24px;
  }

  .achievements-section {
    padding: 24px;
  }

  .section-title {
    font-size: 24px;
  }

  .achievement-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
  }

  .tab-btn {
    flex-shrink: 0;
  }

  .level-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .promo-content {
    flex-direction: column;
    text-align: center;
  }
}
