/* webapp/static/css/leaderboard.css */
.panel-controls { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.controls-split { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 600px) {
  .controls-split { flex-direction: row; }
  .controls-split > * { flex: 1; }
}
.dropdown-wrapper { display: flex; flex-direction: column; gap: 6px; }

.table-header-row {
  display: flex;
  align-items: center;
  padding: 0 10px 8px 10px;
  border-bottom: 1px solid var(--divider);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  gap: 10px;
}
.th-rank { width: 32px; flex-shrink: 0; }
.th-info { flex: 1; }
.th-score { text-align: right; }

.table-container { display: flex; flex-direction: column; }

.board-row {
  display: flex;
  align-items: center;
  min-height: var(--table-row-height);
  padding: 8px 10px;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
  gap: 10px;
  border-radius: 8px;
  transition: background var(--dur-fast) var(--ease-out);
}
.board-row:last-child { border-bottom: none; }
.board-row:hover { background: var(--bg-hover); }
.board-row.my-row { background: var(--bg-selected); }

.cell-rank {
  width: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.board-row.my-row .cell-rank { color: var(--text-primary); font-weight: 700; }
.cell-info { flex: 1; min-width: 0; }
.cell-name {
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.cell-sub {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  font-variant-numeric: tabular-nums;
}
.cell-score {
  text-align: right;
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-primary);
}

/* Skeleton Loader */
.skeleton-row {
  display: flex;
  align-items: center;
  height: var(--table-row-height);
  padding: 0 10px;
  gap: 10px;
  border-bottom: 1px solid var(--divider);
}
.skeleton-row:last-child { border-bottom: none; }
.skel-block {
  background: var(--bg-field);
  border-radius: 5px;
  animation: skel-pulse 1.4s ease-in-out infinite;
}
.skel-rank { width: 22px; height: 14px; }
.skel-main { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.skel-title { width: 55%; height: 13px; }
.skel-sub { width: 38%; height: 10px; }
.skel-score { width: 52px; height: 14px; }
@keyframes skel-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.sticky-bar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 640px;
  background: var(--bg-surface);
  border-radius: var(--radius-surface);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  gap: 12px;
}
.rank-summary { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-badge {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--bg-field);
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.rank-km { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; display: block; }
.rank-sub {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-card {
  background: var(--bg-surface);
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-surface);
  padding: 22px;
  border: none;
  box-shadow: none;
  animation: modal-enter var(--dur-modal) var(--ease-out);
}
@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-title { font-size: 17px; font-weight: 600; }
.paywall-intro { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.feature-list { list-style: none; margin: 12px 0 18px 0; display: flex; flex-direction: column; gap: 8px; }
.feature-list li { font-size: 13px; display: flex; align-items: flex-start; gap: 8px; }
.feature-list li::before { content: "•"; color: var(--text-secondary); font-weight: 700; }
.trial-active-box {
  background: var(--bg-field);
  color: var(--text-primary);
  padding: 10px;
  border-radius: var(--radius-control);
  font-size: 13px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 12px;
}
