/* ── Social / Community styles ── */

/* ── Page hero ──────────────────────────────────────────────────────── */
.social-hero {
  background: linear-gradient(135deg, var(--bg2) 0%, #12102a 60%, var(--bg2) 100%);
  border-bottom: 1px solid var(--border-g);
  padding: 36px 24px 28px;
  position: relative;
  overflow: hidden;
}
.social-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(212,165,32,.07) 0%, transparent 65%);
  pointer-events: none;
}
.social-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.social-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--gold2);
  letter-spacing: .5px;
}
.social-hero p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

/* ── Filter bar ─────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 50;
}
.filter-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 2px;
  align-items: center;
  height: 46px;
}
.filter-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.filter-btn:hover { background: var(--bg3); color: var(--text); }
.filter-btn.active { background: var(--bg3); color: var(--gold2); }

/* ── Main 2-column layout ───────────────────────────────────────────── */
.social-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .social-layout { grid-template-columns: 1fr; }
  .social-sidebar { order: -1; }
}

/* ── Card base ──────────────────────────────────────────────────────── */
.s-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.s-card-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
}
.s-card-body { padding: 14px 16px; }

/* ── Composer ───────────────────────────────────────────────────────── */
.composer {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.composer-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.composer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.composer-input-wrap { flex: 1; }
.composer-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  resize: none;
  min-height: 80px;
  transition: border-color .15s;
}
.composer-textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.composer-textarea::placeholder { color: var(--muted); }
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.composer-char { font-size: 11px; color: var(--muted); margin-right: auto; }

/* ── Post card ──────────────────────────────────────────────────────── */
.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.post-card:hover { border-color: rgba(255,255,255,.14); }

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}
.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  text-decoration: none;
}
.post-meta { flex: 1; }
.post-author {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}
.post-author:hover { color: var(--gold2); }
.post-time { font-size: 12px; color: var(--muted); margin-top: 1px; }
.post-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.post-type-ach   { background: rgba(212,165,32,.15); color: var(--gold2); }
.post-type-hero  { background: rgba(168,85,247,.15); color: var(--purple); }
.post-type-text  { background: rgba(255,255,255,.06); color: var(--muted); }

.post-body { padding: 0 16px 12px; }
.post-content {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Special post types */
.post-special {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-special-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.post-special-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  margin-bottom: 2px;
}
.post-special-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.post-special-sub {
  font-size: 12px;
  color: var(--muted2);
  margin-top: 1px;
}

/* ── Reactions bar ──────────────────────────────────────────────────── */
.post-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
}
.reaction-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  padding: 4px 10px;
  transition: all .15s;
  font-family: inherit;
}
.reaction-btn:hover { background: var(--bg3); border-color: var(--border); color: var(--text); }
.reaction-btn.active { border-color: var(--gold); color: var(--gold2); background: rgba(212,165,32,.08); }
.reaction-count { font-size: 12px; font-weight: 600; }

.comment-btn {
  background: none;
  border: none;
  border-radius: 20px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 10px;
  font-family: inherit;
  transition: all .15s;
  margin-left: auto;
}
.comment-btn:hover { background: var(--bg3); color: var(--text); }

.delete-post-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
  transition: all .15s;
}
.delete-post-btn:hover { color: var(--red); background: rgba(204,34,51,.1); }

/* ── Comments section ───────────────────────────────────────────────── */
.comments-section {
  border-top: 1px solid var(--border);
  padding: 12px 16px 14px;
  background: var(--bg3);
  border-radius: 0 0 10px 10px;
  display: none;
}
.comments-section.open { display: block; }

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.comment-bubble {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  flex: 1;
}
.comment-author { font-weight: 700; font-size: 12px; color: var(--text); }
.comment-time   { font-size: 11px; color: var(--muted); margin-left: 6px; }
.comment-text   { font-size: 13px; color: var(--text); margin-top: 3px; white-space: pre-wrap; word-break: break-word; }

.comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.comment-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 14px;
  transition: border-color .15s;
}
.comment-input:focus { outline: none; border-color: var(--gold); }
.comment-input::placeholder { color: var(--muted); }

/* ── Sidebar ────────────────────────────────────────────────────────── */
.sidebar-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.sidebar-section-head {
  padding: 12px 14px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.sidebar-section-body { padding: 10px 14px 14px; }

.sidebar-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.sidebar-player-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-player-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.sidebar-player-name:hover { color: var(--gold2); }
.sidebar-player-meta { font-size: 11px; color: var(--muted); }
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-block;
}
.tag-pill:hover { border-color: var(--gold); color: var(--gold2); }

/* ── Player profile cover ───────────────────────────────────────────── */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, #0a0a1e 0%, #1a1040 50%, #0f2040 100%);
  border-bottom: 1px solid var(--border-g);
  position: relative;
  overflow: hidden;
}
.profile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(212,165,32,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,.08) 0%, transparent 50%);
  pointer-events: none;
}

.profile-info-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.profile-info-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  position: relative;
  padding-top: 0;
}
.profile-avatar-wrap {
  margin-top: -44px;
  flex-shrink: 0;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
}
.profile-name-wrap {
  flex: 1;
  padding: 14px 0 14px;
}
.profile-name {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}
.profile-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(212,165,32,.15);
  color: var(--gold2);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-left: 8px;
  vertical-align: middle;
}
.player-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: .3px;
}
.player-status.online  { color: #4cbb6e; }
.player-status.offline { color: var(--muted); }
.profile-stats-row {
  display: flex;
  gap: 24px;
  margin-top: 6px;
}
.profile-stat { text-align: left; }
.profile-stat-val { font-size: 16px; font-weight: 800; color: var(--text); }
.profile-stat-label { font-size: 11px; color: var(--muted); }
.profile-stat-btn { background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.profile-stat-btn:hover .profile-stat-val { color: var(--gold2); }
.profile-stat-btn:hover .profile-stat-label { color: var(--text); }
.profile-actions { display: flex; gap: 8px; padding: 14px 0; align-self: flex-end; }

/* ── Follow list modal ───────────────────────────────────── */
.follow-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
}
.follow-modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; width: 340px; max-height: 480px;
  display: flex; flex-direction: column; overflow: hidden;
}
.follow-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
}
.follow-modal-title { font-weight: 700; font-size: 15px; }
.follow-modal-close { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.follow-modal-close:hover { color: var(--text); }
.follow-modal-list { overflow-y: auto; flex: 1; padding: 8px 0; }
.follow-modal-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; text-decoration: none; color: var(--text);
}
.follow-modal-item:hover { background: var(--bg3); }
.follow-modal-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
}
.follow-modal-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── Profile tabs ───────────────────────────────────────────────────── */
.profile-tabs {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 50;
}
.profile-tabs-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 2px;
}
.profile-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  text-decoration: none;
  display: block;
}
.profile-tab:hover { color: var(--text); }
.profile-tab.active { color: var(--gold2); border-bottom-color: var(--gold); }

/* ── Profile layout ─────────────────────────────────────────────────── */
.profile-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .profile-layout { grid-template-columns: 1fr; }
}

/* Profile sidebar stat list */
.profile-sidebar-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.profile-sidebar-stat:last-child { border-bottom: none; }
.profile-sidebar-stat-label { color: var(--muted); }
.profile-sidebar-stat-val   { font-weight: 700; color: var(--text); }
.profile-sidebar-stat-val--sm { font-size: 12px; }
.profile-sidebar-stat--sep  { padding: 0; border-bottom: 2px solid var(--border); margin: 4px 0; }

/* Profile hero mini-grid */
.hero-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.hero-mini-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  padding: 3px 8px;
  color: var(--muted2);
  cursor: default;
}
.hero-mini-chip.highlighted { border-color: var(--gold); color: var(--gold2); background: rgba(212,165,32,.08); }

/* ── Ach item ───────────────────────────────────────────────────────── */
.ach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.ach-row:last-child { border-bottom: none; }
.ach-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ach-icon.gold   { background: rgba(212,165,32,.15); }
.ach-icon.silver { background: rgba(192,192,192,.12); }
.ach-icon.bronze { background: rgba(180,100,50,.15); }
.ach-icon.none   { background: var(--bg3); }
.ach-meta { flex: 1; min-width: 0; }
.ach-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-cat  { font-size: 11px; color: var(--muted); }
.ach-score { font-size: 12px; font-weight: 700; color: var(--gold2); }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; font-family: inherit; transition: all .15s; text-decoration: none; }
.btn-primary { background: var(--gold); color: #000; }
.btn-primary:hover { background: var(--gold2); }
.btn-ghost { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-follow { background: rgba(212,165,32,.15); border: 1px solid var(--border-g); color: var(--gold2); }
.btn-follow:hover { background: rgba(212,165,32,.25); }
.btn-follow.following { background: rgba(255,255,255,.06); border-color: var(--border); color: var(--muted); }
.btn-follow.following:hover { background: rgba(204,34,51,.1); border-color: var(--red); color: var(--red); }

/* ── Empty state ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Loading skeleton ───────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── @mention ───────────────────────────────────────────────────────── */
a.mention {
  color: var(--gold2);
  font-weight: 600;
  text-decoration: none;
}
a.mention:hover { text-decoration: underline; }

.mention-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  z-index: 200;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 180px;
  max-width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  overflow: hidden;
}
.mention-item {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background .12s;
}
.mention-item:hover,
.mention-item.active {
  background: rgba(212,165,32,.15);
  color: var(--gold2);
}


/* ── Online indicator ────────────────────────────────────────────────── */
.online-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 6px #4caf5099;
  vertical-align: middle;
  margin-left: 6px;
  flex-shrink: 0;
}

/* ── Server badge & post ───────────────────────────────── */
.chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

.chip-server {
  background: rgba(168,85,247,0.15);
  color: #a855f7;
  border: 1px solid rgba(168,85,247,0.4);
}

.post-card-server {
  border-left: 3px solid #a855f7;
  background: rgba(168,85,247,0.04);
}

.post-card-server .post-author {
  color: #a855f7;
}
