/**
 * 我的页面样式
 */

/* 页面容器 - 使用静态HTML容器，样式由JS设置 */
/* .profile-page 类不再需要，样式通过 initPage() 的 cssText 设置 */

/* 用户信息区域 */
.profile-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 30px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

.profile-avatar-wrapper {
  position: relative;
  cursor: pointer;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #ff6b6b, #feca57);
  transition: transform 0.2s;
}

.profile-avatar-wrapper:hover .profile-avatar {
  transform: scale(1.05);
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-avatar-pending {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #FFD700;
  color: #333;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.profile-nickname {
  font-size: 24px;
  font-weight: bold;
  color: white;
  margin-bottom: 8px;
}

.profile-user-id {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* 功能按钮区域 */
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 30px;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.profile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 90px;
  background: white;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-action-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.profile-action-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* 榜单列表页面 */
.ranking-list-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1001;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  overflow-y: auto;
  padding-bottom: 40px;
}

.ranking-list-header {
  display: flex;
  align-items: center;
  padding: 20px;
  color: white;
}

.ranking-list-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}

.ranking-list-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ranking-list-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-right: 40px;
}

.ranking-list-content {
  padding: 0 20px;
}

/* 注意: .ranking-card 样式定义在文件后面的"热门排行榜页更新"区域 */

.ranking-card-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  margin-right: 16px;
}

.ranking-card-info {
  flex: 1;
}

.ranking-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.ranking-card-desc {
  font-size: 12px;
  color: #888;
}

.ranking-card-arrow {
  font-size: 20px;
  color: #ccc;
}

.ranking-card-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 10px;
}

.ranking-card-score-value {
  font-size: 18px;
  font-weight: bold;
  color: #667eea;
}

.ranking-card-score-level {
  font-size: 12px;
  color: #888;
}

/* 榜单详情页面 */
.ranking-detail-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1002;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  overflow-y: auto;
  padding-bottom: 40px;
}

.ranking-detail-header {
  display: flex;
  align-items: center;
  padding: 20px;
  color: white;
}

.ranking-detail-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}

.ranking-detail-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ranking-detail-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-right: 40px;
}

/* 用户分数展示 */
.user-score-card {
  background: white;
  border-radius: 20px;
  margin: 0 20px 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.user-score-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #667eea;
  margin-bottom: 16px;
}

.user-score-value {
  font-size: 48px;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.user-score-level {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

.user-score-meta {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.user-score-meta-item {
  text-align: center;
}

.user-score-meta-value {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.user-score-meta-label {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* 打榜按钮 */
.ranking-action-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 20px auto;
  padding: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ranking-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.ranking-action-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 排行榜列表 */
.leaderboard-section {
  padding: 0 20px;
}

.leaderboard-title {
  font-size: 18px;
  font-weight: bold;
  color: white;
  margin-bottom: 16px;
}

.leaderboard-list {
  background: white;
  border-radius: 16px;
  overflow: hidden;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}

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

.leaderboard-rank {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: #666;
  margin-right: 12px;
}

.leaderboard-rank.top-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  border-radius: 50%;
}

.leaderboard-rank.top-2 {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: white;
  border-radius: 50%;
}

.leaderboard-rank.top-3 {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  color: white;
  border-radius: 50%;
}

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.leaderboard-name {
  flex: 1;
  font-size: 15px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-score {
  font-size: 16px;
  font-weight: bold;
  color: #667eea;
}

/* 隐藏其他用户信息 */
.leaderboard-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  background: linear-gradient(135deg, #ccc, #999);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
}

.leaderboard-hidden {
  color: #999 !important;
}

.leaderboard-item.is-me {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  margin: 4px -4px;
  padding: 14px 20px;
}

.leaderboard-item.is-me .leaderboard-name {
  font-weight: bold;
  color: #667eea;
}

/* 超越百分比 */
.beat-percentage {
  text-align: center;
  padding: 16px 20px;
  font-size: 15px;
  color: #FFD700;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* 加载状态 */
.profile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: relative;
  z-index: 10;
}

.profile-loading-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: pulse 1.5s ease-in-out infinite;
}

.profile-loading-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); }
}

/* ===== 榜单详情新UI布局 ===== */
.ranking-detail-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  text-align: center;
}

.ranking-detail-nickname {
  font-size: 22px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
}

.ranking-detail-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.ranking-detail-score-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.ranking-detail-score-value {
  font-size: 32px;
  font-weight: bold;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ranking-detail-score-divider {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
}

.ranking-detail-level {
  font-size: 18px;
  font-weight: 600;
  color: #FFD700;
  background: rgba(255, 215, 0, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-detail-level .level-badge {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  padding: 2px 8px;
  border-radius: 10px;
}

.ranking-detail-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px;
}

.ranking-detail-rank-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.ranking-detail-rank-value {
  font-size: 64px;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.ranking-detail-beat {
  font-size: 15px;
  color: #FFD700;
  margin-bottom: 16px;
  font-weight: 500;
}

.ranking-detail-participants {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== 技能横幅 ===== */
.ranking-skills-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.ranking-skill-banner {
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
}

.ranking-skill-banner.skill1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.skill-label {
  font-weight: 600;
  margin-right: 6px;
}

.ranking-skill-banner.skill1 .skill-label {
  color: #FFD700;
}

.skill-text {
  color: white;
  font-size: 14px;
}

/* ===== 分数计算明细Section ===== */
.score-details-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  margin: 20px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.score-details-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.score-details-loading,
.score-details-error,
.score-details-empty {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.score-details-error {
  color: #ff6b6b;
}

.loading-icon {
  margin-right: 8px;
}

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

.score-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.score-detail-star {
  display: flex;
  align-items: center;
  gap: 10px;
}

.star-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.star-palace {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.score-detail-calc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.calc-base {
  color: rgba(255, 255, 255, 0.8);
}

.calc-operator,
.calc-equals {
  color: rgba(255, 255, 255, 0.4);
}

.calc-weight {
  color: rgba(255, 255, 255, 0.6);
}

.calc-result {
  color: #4ade80;
  font-weight: 600;
  font-size: 15px;
}

/* 身宫加分样式 */
.body-palace-bonus {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.body-palace-bonus .star-name {
  color: #fbbf24;
}

.body-palace-bonus .star-palace {
  color: rgba(251, 191, 36, 0.7);
}

.body-palace-bonus .calc-result.bonus {
  color: #fbbf24;
  font-size: 16px;
}

.score-details-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* ===== 热门排行榜页更新（2025-12-09）===== */
.ranking-list-header {
  display: flex;
  align-items: center;
  padding: 20px;
  color: white;
  position: relative;
}

.ranking-list-my-rank {
  position: absolute;
  right: 20px;
  font-size: 14px;
  color: #FFD700;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  transition: all 0.2s;
}

.ranking-list-my-rank:hover {
  background: rgba(255, 215, 0, 0.1);
}

.ranking-list-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: 20px;
  padding: 0 20px;
}

/* 更新榜单卡片样式 */
.ranking-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: white;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ranking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ranking-card-main {
  display: flex;
  align-items: center;
  flex: 1;
}

.ranking-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ranking-card-hot-tag {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  padding: 2px 8px;
  border-radius: 10px;
}

.ranking-card-done-tag {
  font-size: 10px;
  font-weight: 500;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.ranking-card-participants {
  font-size: 12px;
  color: #888;
}

.ranking-card-action {
  font-size: 13px;
  font-weight: 500;
  color: #667eea;
  padding: 6px 12px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ranking-card-action:hover {
  color: #764ba2;
  background: rgba(102, 126, 234, 0.2);
}

.ranking-card-action.participated {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.ranking-card-action.participated:hover {
  color: #22c55e;
  background: rgba(74, 222, 128, 0.2);
}

/* ===== 榜单预览页 ===== */
.ranking-preview-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1002;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  display: flex;
  flex-direction: column;
}

.ranking-preview-header {
  display: flex;
  align-items: center;
  padding: 20px;
  color: white;
}

.ranking-preview-back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
  white-space: nowrap;
}

.ranking-preview-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ranking-preview-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

.ranking-preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.ranking-preview-icon {
  font-size: 100px;
  margin-bottom: 24px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.ranking-preview-name {
  font-size: 28px;
  font-weight: bold;
  color: white;
  margin-bottom: 12px;
}

.ranking-preview-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
  max-width: 300px;
}

.ranking-preview-participants {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.ranking-preview-btn {
  width: calc(100% - 40px);
  margin: 20px;
  padding: 18px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.ranking-preview-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

/* ===== Loading页 ===== */
.ranking-loading-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1003;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ranking-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ranking-loading-icon {
  font-size: 80px;
  margin-bottom: 30px;
  animation: bounce 1s ease-in-out infinite;
}

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

.ranking-loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ranking-loading-text {
  font-size: 22px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.ranking-loading-subtext {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== 榜单结果页 ===== */
.ranking-result-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1002;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  overflow-y: auto;
  padding-bottom: 40px;
}

.ranking-result-header {
  display: flex;
  align-items: center;
  padding: 20px;
  color: white;
}

.ranking-result-back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
  white-space: nowrap;
}

.ranking-result-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ranking-result-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

.ranking-result-content {
  padding: 20px;
}

.ranking-result-user-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ranking-result-nickname {
  font-size: 22px;
  font-weight: 600;
  color: white;
}

.ranking-result-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ranking-result-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.ranking-result-score-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.ranking-result-score-value {
  font-size: 36px;
  font-weight: bold;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ranking-result-divider {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
}

.ranking-result-level {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #FFD700;
  background: rgba(255, 215, 0, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.ranking-result-level .level-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  padding: 2px 8px;
  border-radius: 10px;
}

.ranking-result-level .level-icon {
  font-size: 18px;
}

.ranking-result-level .level-title {
  font-size: 14px;
  color: white;
}

.ranking-result-rank-section {
  text-align: center;
  padding: 30px 0;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.ranking-result-rank-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.ranking-result-rank-value {
  font-size: 72px;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.ranking-result-beat {
  font-size: 15px;
  color: #FFD700;
  margin-bottom: 12px;
  font-weight: 500;
}

.ranking-result-participants {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.ranking-result-leaderboard {
  margin-top: 24px;
}

.ranking-result-leaderboard .leaderboard-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}

.ranking-result-leaderboard .leaderboard-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 8px;
}

.ranking-result-leaderboard .leaderboard-item.top-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.ranking-result-leaderboard .leaderboard-item.top-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(160, 160, 160, 0.2));
  border: 1px solid rgba(192, 192, 192, 0.3);
}

.ranking-result-leaderboard .leaderboard-item.top-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(139, 69, 19, 0.2));
  border: 1px solid rgba(205, 127, 50, 0.3);
}

.ranking-result-leaderboard .leaderboard-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
  margin-right: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.ranking-result-leaderboard .leaderboard-item.top-1 .leaderboard-rank {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
}

.ranking-result-leaderboard .leaderboard-item.top-2 .leaderboard-rank {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: white;
}

.ranking-result-leaderboard .leaderboard-item.top-3 .leaderboard-rank {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  color: white;
}

.ranking-result-leaderboard .leaderboard-name {
  flex: 1;
  font-size: 15px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-result-leaderboard .leaderboard-score {
  font-size: 15px;
  font-weight: 600;
  color: #FFD700;
  margin-right: 8px;
}

.ranking-result-leaderboard .leaderboard-level {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== 我的排名历史页 ===== */
.ranking-history-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1002;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  overflow-y: auto;
  padding-bottom: 40px;
}

.ranking-history-header {
  display: flex;
  align-items: center;
  padding: 20px;
  color: white;
}

.ranking-history-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}

.ranking-history-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ranking-history-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-right: 40px;
}

.ranking-history-count {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.ranking-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.ranking-history-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.ranking-history-empty .empty-text {
  font-size: 18px;
  color: white;
  margin-bottom: 8px;
}

.ranking-history-empty .empty-hint {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.ranking-history-list {
  padding: 0 20px;
}

.ranking-history-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.history-item-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  margin-right: 14px;
}

.history-item-info {
  flex: 1;
}

.history-item-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
}

.history-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-item-score {
  font-size: 14px;
  color: #FFD700;
  font-weight: 500;
}

.history-item-level-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  padding: 2px 8px;
  border-radius: 10px;
}

.history-item-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.history-item-beat {
  text-align: right;
  font-size: 13px;
  color: #FFD700;
  font-weight: 500;
  white-space: nowrap;
}

/* ===== 头像设置页面 ===== */
.avatar-settings-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1001;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  overflow-y: auto;
  padding-bottom: 40px;
}

.avatar-settings-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
}

.avatar-settings-back {
  padding: 8px 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

.avatar-settings-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.avatar-settings-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: white;
}

.avatar-settings-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.avatar-settings-loading-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: pulse 1.5s ease-in-out infinite;
}

.avatar-settings-content {
  padding: 20px;
}

/* 当前头像预览 */
.avatar-current-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  margin-bottom: 20px;
}

.avatar-current-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.avatar-pending-hint {
  margin-top: 12px;
  padding: 6px 16px;
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 20px;
  color: #FFD700;
  font-size: 13px;
}

/* 上传区域 */
.avatar-upload-section {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.avatar-section-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
}

.avatar-upload-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.avatar-upload-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.avatar-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.avatar-upload-status {
  margin-top: 12px;
  font-size: 13px;
  min-height: 20px;
}

.avatar-upload-status.uploading {
  color: #FFD700;
}

.avatar-upload-status.success {
  color: #4ade80;
}

.avatar-upload-status.error {
  color: #ff6b6b;
}

/* 系统头像区域 */
.avatar-system-section {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.avatar-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.avatar-option:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.avatar-option.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.2);
}

.avatar-option.loading {
  opacity: 0.6;
  pointer-events: none;
}

.avatar-option img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.avatar-option-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Toast 提示 */
.avatar-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  border-radius: 25px;
  font-size: 14px;
  z-index: 9999;
  animation: toastFadeIn 0.3s ease;
}

.avatar-toast.success {
  background: rgba(74, 222, 128, 0.9);
  color: #fff;
}

.avatar-toast.error {
  background: rgba(255, 107, 107, 0.9);
  color: #fff;
}

@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ===== 能量岛信息卡片 ===== */
.profile-energy-island {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  margin: 0 20px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 10;
}

.profile-energy-island-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.profile-energy-island-name {
  font-size: 28px;
  font-weight: bold;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.profile-energy-island-note {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 215, 0, 0.8);
  font-style: italic;
}
