/* ===== 排行榜右侧栏 ===== */

.rank-sidebar {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  overflow-y: auto;
  font-size: 12px;
}

.rank-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rank-panel-header {
  padding: 8px 8px 4px;
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.rank-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
}

.rank-tab {
  flex: 1;
  padding: 6px 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: background 0.15s;
}

.rank-tab:hover {
  background: #e2e8f0;
}

.rank-tab.active {
  background: #dbeafe;
  border-bottom: 2px solid #3b82f6;
}

.rank-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  gap: 6px;
  transition: background 0.1s;
}

.rank-item:hover {
  background: #e2e8f0;
}

.rank-num {
  width: 22px;
  text-align: center;
  font-weight: 700;
  color: #64748b;
  flex-shrink: 0;
}

.rank-item:first-child .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  font-size: 16px;
}

.rank-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.rank-coin {
  font-weight: 600;
  color: #f59e0b;
  flex-shrink: 0;
}

.rank-loading,
.rank-empty {
  text-align: center;
  color: #94a3b8;
  padding: 16px 8px;
  list-style: none;
}

.rank-view-all {
  display: block;
  text-align: center;
  padding: 8px;
  font-size: 11px;
  color: #3b82f6;
  text-decoration: none;
  border-top: 1px solid #e2e8f0;
  transition: background 0.15s;
}

.rank-view-all:hover {
  background: #eff6ff;
}

/* ---- 移动端：flex-row 游戏里隐藏侧栏 ---- */
@media (max-width: 600px) {
  .game-layout > .rank-sidebar {
    display: none;
  }
}
