/* basement — профиль */

/* ---------- head ---------- */
.b-profile-head {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 28px;
}
.b-profile-head__bg { position: absolute; inset: 0; z-index: 0; opacity: .22; pointer-events: none; }
.b-profile-head__bg img, .b-profile-head__bg video { width: 100%; height: 100%; object-fit: cover; filter: blur(2px); }
.b-profile-head::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--b-surface) 25%, rgba(24, 24, 24, .55)); }
.b-profile-head > *:not(.b-profile-head__bg) { position: relative; z-index: 2; }

.b-profile-head__avatar { position: relative; justify-self: start; width: max-content; }
.b-profile-head__avatar .b-avatar { box-shadow: 0 0 0 4px var(--b-surface), 0 0 0 6px var(--b-accent-30); }
.b-profile-head__online { position: absolute; right: 6px; bottom: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--b-green); box-shadow: 0 0 0 3px var(--b-surface); }

.b-profile-head__id { min-width: 0; }
.b-profile-head__id h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.b-profile-head__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.b-profile-head__status { margin: 12px 0 0; color: #c9c9c9; font-size: 14px; max-width: 62ch; overflow-wrap: anywhere; }
.b-profile-head__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: var(--b-muted); }
.b-profile-head__meta > a, .b-profile-head__meta > span, .b-body .b-meta-btn {
  display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; padding: 0;
  border: 0; background: none; color: var(--b-muted); font: 500 13px/1.4 var(--b-font); text-decoration: none; font-variant-numeric: tabular-nums;
}
.b-profile-head__meta > a:hover, .b-body .b-meta-btn:hover { background: none; color: var(--b-text); }
.b-live-status.is-playing { color: var(--b-green); }
.b-live-status.is-playing:hover { color: var(--b-green); text-decoration: underline; }

.b-profile-head__side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 240px; }
.b-wallet { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--b-r); background: rgba(17, 17, 17, .7); border: 1px solid var(--b-line); }
.b-wallet__label { font-size: 12px; color: var(--b-muted); margin-bottom: 4px; }
.b-wallet__sum { font: 600 26px/1 var(--b-display); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- layout ---------- */
.b-profile { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.b-profile__content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.b-profile__servers { align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }

/* ---------- stats ---------- */
.b-profile-stats { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 14px; }
.b-rank-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: linear-gradient(150deg, var(--b-accent-16), var(--b-surface) 65%); border-color: var(--b-accent-16); }
.b-rank-card__img { width: 96px; height: 44px; object-fit: contain; flex: none; }
.b-rank-card__label { font-size: 13px; color: var(--b-muted); }
.b-rank-card__value { font: 600 34px/1.1 var(--b-display); margin-top: 4px; }
.b-big-stat { padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.b-big-stat span { font-size: 13px; color: var(--b-muted); }
.b-big-stat b { font: 600 30px/1 var(--b-display); }

.b-stat-grid { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--b-line); }
.b-stat-grid div { background: var(--b-surface); padding: 16px 20px; }
.b-stat-grid dt { font-size: 12px; color: var(--b-muted); }
.b-stat-grid dd { margin: 4px 0 0; font-size: 20px; font-weight: 700; }

/* ---------- legacy includes (NEO markup inside basement) ---------- */
.b-profile__legacy > .col-md-9, .b-profile__legacy > [class*="col-"] { width: 100%; max-width: none; flex: none; padding: 0; }
.b-profile__legacy .card { margin-bottom: 14px; }

/* settings modal */
.b-settings-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .b-profile-head { grid-template-columns: auto minmax(0, 1fr); }
  .b-profile-head__side { grid-column: 1 / -1; flex-direction: row; min-width: 0; }
  .b-profile-head__side .b-wallet { flex: 1; }
  .b-profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-rank-card { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .b-profile { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .b-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .b-profile-head { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 16px; }
  .b-profile-head__avatar .b-avatar { --size: 76px; }
  .b-profile-head__id h1 { font-size: 24px; }
  .b-profile-head__side { flex-direction: column; }
  .b-profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-big-stat b { font-size: 24px; }
  .b-stat-grid dd { font-size: 17px; }
}

/* устройства */
.b-devices__hint { margin: 6px 20px 0; }
.b-device__icon { width: 40px; height: 40px; border-radius: var(--b-r-sm); background: var(--b-raised); display: grid; place-items: center; color: var(--b-muted); flex: none; }
.b-device.is-current .b-device__icon { color: var(--b-accent); background: var(--b-accent-8); }
.b-device .b-row__end { flex-direction: row; align-items: center; gap: 10px; }
@media (max-width: 640px) {
  .b-device { flex-wrap: wrap; }
  .b-device .b-row__end { width: 100%; justify-content: space-between; padding-left: 52px; }
}

/* Faceit */
.b-faceit__body { margin-top: 14px; display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 1px; background: var(--b-line); }
.b-faceit__id { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--b-surface); min-width: 0; }
.b-faceit__lvl { width: 44px; height: 44px; flex: none; }
.b-faceit__id b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-faceit__id span { font-size: 12px; }
.b-faceit__id i { font-style: normal; }
.b-faceit__stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--b-line); }
.b-faceit__stats div { background: var(--b-surface); padding: 12px 16px; }
.b-faceit__stats dt { font-size: 12px; color: var(--b-muted); }
.b-faceit__stats dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
@media (max-width: 720px) { .b-faceit__body { grid-template-columns: minmax(0, 1fr); } }
