/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* 全局金币和等级展示 */
.coin-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 8px 16px;
  background: white;
  border-bottom: 1px solid #e8eaf6;
  font-size: 0.85rem;
}

.coin-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.coin-icon {
  font-size: 1rem;
}

.coin-value {
  font-weight: 600;
  color: #667eea;
}

.level-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
}

.level-value {
  font-weight: 600;
  color: #764ba2;
}

.profile-link {
  padding: 4px 12px;
  background: #f0f4ff;
  color: #667eea;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.8rem;
}

.profile-link:hover {
  background: #e8eaf6;
}

/* 用户档案页面样式 */
.profile-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.profile-header {
  text-align: center;
  padding: 30px 20px;
  background: #667eea;
  color: white;
  border-radius: 12px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-id {
  font-size: 0.8rem;
  opacity: 0.8;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card .v {
  font-size: 1.5rem;
  font-weight: 600;
  color: #667eea;
}

.stat-card .l {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.course-progress-list {
  background: white;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.progress-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.progress-item:last-child {
  border-bottom: none;
}

.progress-bar-mini {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin: 0 12px;
  overflow: hidden;
}

.progress-fill-mini {
  height: 100%;
  background: #667eea;
  border-radius: 3px;
}

.back-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #667eea;
  color: white;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 16px;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .coin-bar {
    padding: 6px 12px;
    font-size: 0.75rem;
    gap: 10px;
  }
  
  .profile-page {
    padding: 12px;
  }
  
  .profile-header {
    padding: 20px 14px;
  }
  
  .profile-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .profile-name {
    font-size: 1.2rem;
  }
  
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-card .v {
    font-size: 1.3rem;
  }
  
  .progress-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .progress-bar-mini {
    margin: 6px 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .coin-bar {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .profile-link {
    font-size: 0.7rem;
    padding: 3px 10px;
  }
  
  .back-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
  }
}
