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

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

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

.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.purple { background: rgba(var(--primary-rgb), 0.1); }
.stat-icon.green { background: rgba(34, 197, 94, 0.1); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.1); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); }

.stat-info { flex: 1; }

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-change {
  font-size: var(--font-size-xs);
  margin-top: 4px;
}

.stat-change.positive { color: var(--green-dark); }
.stat-change.neutral { color: var(--text-secondary); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.leaderboard-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.leaderboard-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leaderboard-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-list {
  padding: 8px 12px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  margin-bottom: 4px;
  position: relative;
}

.leaderboard-item:hover {
  background: var(--bg);
}

.leaderboard-item.rank-1 {
  background: linear-gradient(135deg, rgba(234,179,8,0.06) 0%, rgba(234,179,8,0.02) 100%);
}

.leaderboard-item.rank-1:hover {
  background: linear-gradient(135deg, rgba(234,179,8,0.1) 0%, rgba(234,179,8,0.04) 100%);
}

.rank-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  flex-shrink: 0;
  background: var(--bg);
  color: var(--text-secondary);
}

.rank-1 .rank-number {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.rank-2 .rank-number {
  background: linear-gradient(135deg, #94A3B8, #64748B);
  color: #fff;
}

.rank-3 .rank-number {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: #fff;
}

.rank-4 .rank-number {
  background: var(--bg);
  color: var(--text-secondary);
}

.leaderboard-team {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.team-color-bar {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}

.team-color-bar.red { background: var(--red); }
.team-color-bar.blue { background: var(--blue); }
.team-color-bar.green { background: var(--green); }
.team-color-bar.yellow { background: var(--yellow); }

.team-info { min-width: 0; }

.team-name {
  font-weight: 600;
  font-size: var(--font-size-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-detail {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.leaderboard-score {
  text-align: right;
  flex-shrink: 0;
}

.score-value {
  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: 1.2;
}

.score-label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.score-value.red { color: var(--red); }
.score-value.blue { color: var(--blue); }
.score-value.green { color: var(--green); }
.score-value.yellow { color: var(--yellow); }

.leaderboard-progress {
  margin-top: 8px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-fill.red { background: linear-gradient(90deg, var(--red), var(--red-light)); }
.progress-bar-fill.blue { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.progress-bar-fill.green { background: linear-gradient(90deg, var(--green), var(--green-light)); }
.progress-bar-fill.yellow { background: linear-gradient(90deg, var(--yellow), var(--yellow-light)); }

.recent-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.recent-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recent-title {
  font-size: var(--font-size-md);
  font-weight: 600;
}

.recent-list {
  padding: 8px 12px;
  max-height: 420px;
  overflow-y: auto;
}

.recent-list::-webkit-scrollbar { width: 4px; }
.recent-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.recent-item:hover { background: var(--bg); }

.recent-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: var(--bg);
}

.recent-info { flex: 1; min-width: 0; }

.recent-name {
  font-size: var(--font-size-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-meta {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.recent-score {
  font-weight: 600;
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.trophy-icon {
  font-size: 1.3rem;
}

.crown-icon {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 1rem;
}
