/* user.css
   Public profile page styling (/u/:username)
   Designed to resemble the existing Account page feel:
   - centered container
   - "surface" card
   - big avatar + identity row
   - stats / actions area
   - secondary cards
*/

.user-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

/* Back link */
.user-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
  text-decoration: none;
}
.user-back:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Main surface */
.user-surface {
  margin-top: 18px;
  padding: 22px;
  border-radius: 16px;

  /* Works with your existing theme vars if present */
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Header row */
.user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.user-id {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.user-avatar {
  width: 108px;
  height: 108px;
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 auto;

  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

/* In case you use <ServerAvatar/> inside */
.user-avatar > * {
  width: 100%;
  height: 100%;
}

.user-who {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.user-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0.78;
  font-size: 13px;
}

/* Role pill */
.user-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Rank tint variants */
.user-role--admin {
  color: rgba(255, 125, 95, 1); /* orangey/red */
  border-color: rgba(255, 125, 95, 0.35);
  background: rgba(255, 125, 95, 0.08);
}
.user-role--editor {
  color: rgba(160, 215, 255, 1);
  border-color: rgba(160, 215, 255, 0.28);
  background: rgba(160, 215, 255, 0.07);
}
.user-role--user {
  color: rgba(220, 220, 220, 0.95);
}

/* Right side: stats / actions */
.user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-stat {
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: right;

  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-stat-k {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 2px;
}
.user-stat-v {
  font-size: 22px;
  font-weight: 800;
}

/* Buttons in same “Akoma UI” spirit */
.user-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-weight: 700;
  opacity: 0.95;
}
.user-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.09);
}
.user-btn.ghost {
  background: transparent;
  opacity: 0.85;
}
.user-btn.ghost:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

/* Divider */
.user-divider {
  height: 1px;
  margin: 18px 0;
  background: rgba(255, 255, 255, 0.07);
}

/* Secondary cards area */
.user-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 900px) {
  .user-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.user-card {
  border-radius: 16px;
  padding: 16px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.user-cardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.user-cardtitle {
  font-weight: 800;
  font-size: 16px;
}

.user-muted {
  opacity: 0.7;
  font-size: 13px;
}

/* Placeholder list items */
.user-list {
  display: grid;
  gap: 10px;
}

.user-listitem {
  padding: 12px;
  border-radius: 14px;

  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-listitem:hover {
  border-color: rgba(255, 255, 255, 0.10);
}

/* Error box similar vibe */
.user-error {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;

  background: rgba(255, 80, 80, 0.10);
  border: 1px solid rgba(255, 80, 80, 0.25);
}
