/* src/main/resources/static/css/leaderboard.css */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,13,16,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--hull);
  border: 1px solid var(--phosphor);
  padding: 16px 20px;
  width: min(90vw, 320px);
  font-family: inherit;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; letter-spacing: 0.16em;
  color: var(--phosphor);
  margin-bottom: 12px;
}
.modal-close {
  background: none; border: none; color: var(--read-dim);
  font-size: 16px; cursor: pointer;
}
#handle-input {
  width: 100%;
  background: var(--void);
  border: 1px solid var(--phosphor-faint);
  color: var(--read);
  font-family: inherit; font-size: 14px;
  padding: 8px;
  letter-spacing: 0.04em;
  box-sizing: border-box;
}
#handle-input:focus {
  outline: none; border-color: var(--phosphor);
}
.modal-hint {
  font-size: 11px; color: var(--read-dim);
  margin: 8px 0 4px;
  letter-spacing: 0.08em;
}
.handle-error {
  color: var(--crit);
  font-size: 11px;
  min-height: 14px;
  margin: 4px 0;
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 12px;
}
.modal-actions .cta { padding: 6px 12px; }
.modal-actions .cancel { color: var(--read-dim); border-color: var(--read-dim); }

/* Page header */
.page-title {
  letter-spacing: 0.2em;
  color: var(--phosphor);
  text-transform: lowercase;
  font-size: 14px;
}
.back-link {
  color: var(--phosphor);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* Tab strip */
.tab-strip {
  display: flex; gap: 0;
  width: 100%; max-width: var(--play-width, 480px);
  margin: 0 auto 12px;
  border-bottom: 1px solid var(--phosphor-faint);
}
.tab-strip .tab {
  padding: 8px 16px;
  background: none;
  color: var(--read-dim);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color 150ms;
}
.tab-strip .tab:hover { color: var(--phosphor-dim); }
.tab-strip .tab.active {
  color: var(--phosphor);
  border-bottom: 1px solid var(--phosphor);
}

/* Leaderboard table */
.leaderboard-table {
  width: 100%; max-width: var(--play-width, 480px);
  margin: 0 auto;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.leaderboard-row {
  display: grid;
  grid-template-columns: 28px 1fr 60px 80px 24px;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px dashed var(--phosphor-faint);
  color: var(--read);
}
.leaderboard-row.you {
  border-left: 2px solid var(--phosphor);
  padding-left: 6px;
}
.leaderboard-row .rank { color: var(--read-dim); }
.leaderboard-row .handle { color: var(--read); }
.leaderboard-row .peak { color: var(--goal); text-align: right; }
.leaderboard-row .drops { color: var(--read-dim); text-align: right; font-size: 11px; }
.replay-btn {
  background: none; border: none;
  color: var(--phosphor);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  opacity: 0.7;
}
.replay-btn:hover { opacity: 1; }
.no-replay { color: var(--read-dim); text-align: center; opacity: 0.4; }

/* Empty state */
.empty-state {
  padding: 32px 0;
  text-align: center;
  color: var(--read-dim);
  font-size: 12px;
  letter-spacing: 0.12em;
}

/* Your-rank divider */
.your-rank-divider {
  margin: 16px 0 4px;
  text-align: center;
  color: var(--read-dim);
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* Game-over fragment */
.leaderboard-fragment {
  margin-top: 16px;
  width: 100%; max-width: 360px;
}
.fragment-header {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--phosphor-dim);
  margin-bottom: 8px;
}
.fragment-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--phosphor);
  text-decoration: none;
}

/* Mobile */
@media (max-width: 480px) {
  .leaderboard-row {
    grid-template-columns: 24px 1fr 50px 60px 24px;
    font-size: 12px;
  }
  .leaderboard-row .drops { font-size: 10px; }
}

/* Replay overlay */
.replay-overlay {
  position: fixed; inset: 0;
  background: rgba(10,13,16,0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  z-index: 150;
  padding: 16px;
}
.replay-overlay.hidden { display: none; }
.replay-header {
  display: flex; justify-content: space-between; align-items: center;
  width: min(90vw, 480px);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--phosphor-dim);
}
.replay-close {
  background: none; border: none; color: var(--read-dim);
  font-size: 18px; cursor: pointer;
}
#replay-stage {
  width: min(90vw, 480px);
  aspect-ratio: 5 / 7;
}
.replay-controls {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(90vw, 480px);
}
.replay-status {
  font-size: 11px;
  color: var(--phosphor-dim);
  letter-spacing: 0.16em;
}
