/* ==========================================================================
   排行榜页样式（RankingsView.vue scoped 样式静态化）
   ========================================================================== */

.rank-hero { padding: 120px 0 32px; text-align: center; }
.rank-hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 8px; }
.rank-hero p { font-size: 16px; color: #8b8b9e; }

.rank-content { padding: 0 0 80px; }

/* 一级菜单 */
.main-tabs { display: flex; gap: 0; margin-bottom: 16px; background: #111118; border-radius: 12px; padding: 4px; border: 1px solid #23233a; }
.main-tabs button { flex: 1; padding: 12px 24px; border: none; background: transparent; color: #8b8b9e; font-size: 15px; font-weight: 500; cursor: pointer; border-radius: 8px; transition: all 0.2s; }
.main-tabs button.active { background: #23233a; color: #e8e8ed; }

/* 二级菜单 */
.sub-tabs { display: flex; gap: 0; margin-bottom: 16px; background: #16161f; border-radius: 8px; padding: 3px; width: fit-content; }
.sub-tabs button { padding: 8px 20px; border: none; background: transparent; color: #5c5c72; font-size: 13px; cursor: pointer; border-radius: 6px; transition: all 0.2s; }
.sub-tabs button.active { background: #23233a; color: #e8e8ed; }
.sub-tabs button[hidden] { display: none; }

/* 三级菜单：能力筛选 */
.feature-tabs { display: flex; gap: 0; margin-bottom: 24px; background: #0d0d14; border-radius: 6px; padding: 2px; width: fit-content; }
.feature-tabs[hidden] { display: none; }
.feature-tabs button { padding: 6px 16px; border: none; background: transparent; color: #5c5c72; font-size: 12px; cursor: pointer; border-radius: 4px; transition: all 0.2s; }
.feature-tabs button.active { background: #1c1c28; color: #a78bfa; }

/* 表格 */
.rank-table { background: #111118; border-radius: 12px; border: 1px solid #23233a; overflow: hidden; min-height: 200px; }
.rank-table[hidden] { display: none; }
.rank-header { display: grid; padding: 14px 24px; background: #0a0a0f; font-size: 12px; font-weight: 600; color: #5c5c72; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #23233a; }
.rank-row { display: grid; padding: 14px 24px; border-bottom: 1px solid #1c1c28; align-items: center; transition: background 0.2s; }
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: #16161f; }
.rank-row.top-3 { background: rgba(99,102,241,0.03); }

/* 列定义 */
.rank-header, .rank-row { grid-template-columns: 60px 2fr 1fr 1fr 1fr 100px; }
.speed-header, .speed-row { grid-template-columns: 60px 2fr 140px 1fr; }
.agent-header { grid-template-columns: 60px 2fr 1fr 1fr 1fr 80px; }

.col-rank { text-align: center; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; font-size: 13px; font-weight: 700; background: #1c1c28; color: #8b8b9e; }
.rank-badge.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #0a0a0f; }
.rank-badge.r2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #0a0a0f; }
.rank-badge.r3 { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: white; }

.col-name { display: flex; align-items: center; }
.name-text { font-weight: 600; font-size: 14px; color: #e8e8ed; }
.agent-info { display: flex; flex-direction: column; gap: 2px; }
.agent-desc { font-size: 12px; color: #5c5c72; }

.col-calls, .col-users { font-variant-numeric: tabular-nums; font-size: 14px; color: #e8e8ed; }
.col-tokens { font-variant-numeric: tabular-nums; font-size: 13px; color: #8b8b9e; }
.col-speed { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.col-trend { font-size: 13px; }
.col-features { display: flex; flex-wrap: wrap; gap: 4px; }
.feature-tag { display: inline-block; padding: 1px 6px; border: 1px solid; border-radius: 4px; font-size: 11px; line-height: 16px; }
.no-features { color: #5c5c72; }

.speed-fast { color: #22c55e; }
.speed-medium { color: #fbbf24; }
.speed-slow { color: #ef4444; }
.trend-up { color: #22c55e; }
.trend-down { color: #ef4444; }

.rank-empty { text-align: center; padding: 60px 20px; color: #5c5c72; }
.rank-footer { margin-top: 32px; text-align: center; }
.rank-footer p { font-size: 13px; color: #5c5c72; }

@media (max-width: 768px) {
  .rank-header, .rank-row { grid-template-columns: 50px 1fr 80px 80px; }
  .col-tokens:last-child, .col-trend, .col-speed, .col-cache { display: none; }
  .main-tabs { flex-wrap: wrap; }
}
