/* Profile & rankings overlay — retro dialog matching the auth window. */

.status-rank {
  cursor: pointer;
  text-decoration: underline dotted var(--text-dim);
}
.status-rank:hover { color: var(--text-bright); }

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

.profile-dialog {
  width: 460px;
  max-width: 92vw;
  max-height: 86vh;
  background: var(--bg-panel);
  border: 2px outset var(--border-raised-light);
  display: flex;
  flex-direction: column;
}

.profile-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-outer);
  padding: 4px 8px;
  color: var(--text-cyan);
  font-weight: 700;
  letter-spacing: 1px;
}
.profile-close {
  background: var(--bg-toolbar);
  border: 2px outset var(--border-raised-light);
  color: var(--text-bright);
  width: 22px;
  height: 20px;
  line-height: 1;
  cursor: pointer;
}
.profile-close:active { border-style: inset; }

.profile-body {
  padding: 12px;
  overflow-y: auto;
}

/* ---- your profile ---- */
.profile-me { margin-bottom: 14px; }
.profile-rankline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.profile-handle { color: var(--text-bright); font-weight: 700; }
.profile-rank { color: var(--text-yellow); }

.profile-bar {
  height: 12px;
  background: var(--bg-input);
  border: 1px inset var(--border-inner);
  overflow: hidden;
}
.profile-bar-fill {
  height: 100%;
  background: var(--text-green);
  transition: width 0.4s ease;
}
.profile-bar-label {
  color: var(--text-dim);
  font-size: 11px;
  margin: 4px 0 8px;
}

.profile-unlocks {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}
.profile-unlocks li {
  padding: 2px 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.profile-unlocks li.have { color: var(--text-primary); }
.profile-unlocks li.locked { color: var(--text-dim); }
.profile-unlocks .ul-mark { width: 14px; flex: none; }
.profile-unlocks .ul-lvl { color: var(--text-cyan); flex: none; }

/* ---- leaderboards ---- */
.profile-section { margin-top: 14px; }
.profile-section h4 {
  color: var(--text-cyan);
  border-bottom: 1px solid var(--border-outer);
  padding-bottom: 3px;
  margin: 0 0 6px;
  letter-spacing: 1px;
  font-size: 12px;
}
.profile-dim { color: var(--text-dim); font-size: 12px; }

.lb-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  gap: 8px;
  padding: 2px 4px;
  font-size: 12px;
  align-items: baseline;
}
.lb-row:nth-child(odd) { background: var(--bg-hover); }
.lb-self { background: var(--bg-selected) !important; color: var(--text-bright); }
.lb-bot .lb-handle { color: var(--text-red); }
.lb-pos { color: var(--text-dim); text-align: right; }
.lb-tag { color: var(--text-magenta); }
.lb-rank { color: var(--text-yellow); }
.lb-up { color: var(--text-green); text-align: right; }

/* Locked toolbar feature (e.g. COMPARE before level 2). */
.pane-btn.locked {
  opacity: 0.45;
  cursor: not-allowed;
}
