/* ══════════════════════════════
   STATS TRACKER — FULL PROFILE
   ══════════════════════════════ */
.profile-card {
  display: flex; gap: 28px; padding: 28px; align-items: flex-start;
}
.profile-card .avatar {
  width: 120px; height: 120px; border-radius: 16px;
  border: 2px solid var(--border);
  object-fit: cover; flex-shrink: 0;
}
.profile-card .avatar-skeleton {
  width: 120px; height: 120px; border-radius: 16px; flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-info h2 {
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  margin-bottom: 2px;
}
.profile-info .username { color: var(--accent); font-size: 0.9rem; margin-bottom: 4px; }
.profile-info .uid { color: var(--text-dim); font-size: 0.8rem; margin-bottom: 10px; }
.profile-info .desc {
  color: var(--text-dim); font-size: 0.88rem; line-height: 1.5;
  margin-bottom: 14px;
}
.stat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--text);
}
.stat-pill span { color: var(--accent); }

/* ── Profile sub-tabs ── */
.profile-tabs {
  display: flex; gap: 4px; padding: 16px 0 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.profile-tabs button {
  font-family: var(--font); font-weight: 600; font-size: 0.85rem;
  padding: 10px 20px;
  background: none; border: none;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.25s;
  margin-bottom: -1px;
}
.profile-tabs button:hover { color: var(--text); }
.profile-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.profile-tab-panel { display: none; animation: fadeUp 0.3s ease; }
.profile-tab-panel.active { display: block; }

/* ── Inventory grid ── */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.inventory-item {
  padding: 12px; text-align: center;
  cursor: default;
}
.inventory-item img {
  width: 72px; height: 72px; border-radius: 10px;
  margin-bottom: 8px;
  background: var(--bg2);
}
.inventory-item .inv-name {
  font-weight: 600; font-size: 0.78rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.inventory-item .inv-type {
  font-size: 0.68rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.03em;
}

/* ── Friends grid ── */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.friend-card {
  padding: 14px; text-align: center; cursor: pointer;
}
.friend-card img {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--border);
  margin-bottom: 8px;
}
.friend-card .friend-name {
  font-weight: 600; font-size: 0.82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.friend-card .friend-user {
  color: var(--text-dim); font-size: 0.72rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Badges grid ── */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.badge-card { padding: 14px; text-align: center; }
.badge-card img {
  width: 64px; height: 64px; border-radius: 10px;
  margin-bottom: 8px;
}
.badge-card .badge-name {
  font-weight: 600; font-size: 0.82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Games grid ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.game-card { overflow: hidden; cursor: pointer; }
.game-card img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.game-card .game-body { padding: 12px 14px; }
.game-card .game-name {
  font-weight: 600; font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.game-card .game-meta {
  color: var(--text-dim); font-size: 0.75rem;
}

@media (max-width: 600px) {
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
  .stat-pills { justify-content: center; }
  .profile-tabs { overflow-x: auto; }
  .friends-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .games-grid { grid-template-columns: 1fr; }
}
