/* ---------- PLAYER PAGE ---------- */

.player-page-shell {
  --profile-stage-page-background:
    radial-gradient(circle at 50% 8%, rgba(255, 198, 160, 0.14), transparent 18%),
    linear-gradient(180deg, #21135b 0%, #37216b 36%, #6f3b8e 58%, #3f2b7f 76%, #1f1d62 100%);
  --profile-stage-page-overlay:
    radial-gradient(circle at 50% 6%, rgba(255, 197, 176, 0.24), transparent 20%),
    radial-gradient(circle at 18% 18%, rgba(123, 246, 255, 0.1), transparent 16%),
    radial-gradient(circle at 86% 12%, rgba(255, 121, 183, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%);
  --profile-stage-background:
    linear-gradient(180deg, #1f1458 0%, #352168 9%, #754194 27%, #452f82 54%, #23235f 100%);
  --profile-stage-floor-fade:
    linear-gradient(180deg, rgba(58, 48, 141, 0) 0%, #322f84 34%, #28256f 68%, #1d1b5b 100%);
}

.player-stage--custom-bg {
  background-image:
    linear-gradient(180deg, rgba(31, 20, 88, 0.72) 0%, rgba(53, 33, 104, 0.66) 18%, rgba(117, 65, 148, 0.58) 54%, rgba(69, 47, 130, 0.66) 74%, rgba(35, 35, 95, 0.72) 100%),
    var(--player-stage-bg-image);
  background-size: cover, contain;
  background-position: center, top center;
  background-repeat: no-repeat, no-repeat;
  background-color: rgb(7, 6, 20);
}

.player-stage__controls {
  position: relative;
}

.player-stage__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-stage__title {
  width: min(620px, 92vw);
  margin: 0 auto;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.42));
}

.player-stage__back,
.player-stage__portal {
  color: #fff8ff;
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  background: rgba(10, 10, 18, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--profile-radius-sm, 12px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.player-stage__portal {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 214, 189, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 220, 187, 0.14), rgba(16, 11, 40, 0.84) 38%, rgba(8, 7, 24, 0.96)),
    rgba(9, 8, 22, 0.92);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.16),
    0 0 16px rgba(255, 121, 183, 0.14);
}

.player-stage__portal::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(153, 255, 255, 0.72), transparent);
  opacity: 0.75;
}

.player-stage__back:hover,
.player-stage__portal:hover,
.player-stage__back.gamepad-selected,
.player-stage__portal.gamepad-selected {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.38);
}



.player-panel--favorite {
  min-height: 0;
}

.player-panel--gallery {
  min-height: 0;
}

.player-hero-card {
  grid-template-columns: repeat(var(--profile-hero-child-columns, 100), minmax(0, 1fr));
  grid-template-rows: repeat(var(--profile-hero-child-rows, 100), minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}

.player-hero-card__social-action {
  display: grid;
  gap: 8px;
  align-content: start;
}

.player-hero-card__friend-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 214, 189, 0.22);
  border-radius: var(--profile-radius-pill, 999px);
  background:
    linear-gradient(180deg, rgba(255, 214, 189, 0.14), rgba(255, 121, 183, 0.12)),
    rgba(255, 255, 255, 0.04);
  color: #fff8ff;
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.player-hero-card__friend-action:hover,
.player-hero-card__friend-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 189, 0.36);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 214, 189, 0.12) inset;
}

.player-hero-card__friend-action:disabled,
.player-hero-card__friend-action--linked {
  cursor: default;
  opacity: 0.72;
  box-shadow: none;
}

.player-hero-card__friend-action:disabled:hover,
.player-hero-card__friend-action:disabled:focus-visible,
.player-hero-card__friend-action--linked:hover,
.player-hero-card__friend-action--linked:focus-visible {
  transform: none;
  border-color: rgba(255, 214, 189, 0.22);
}

.player-hero-card__friend-action--message {
  border-color: rgba(0, 230, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(0, 230, 255, 0.10), rgba(0, 180, 255, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.player-hero-card__friend-action--message:hover,
.player-hero-card__friend-action--message:focus-visible {
  border-color: rgba(0, 230, 255, 0.48);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(0, 230, 255, 0.14) inset;
}

.player-hero-card__friend-flash {
  min-height: 1.2em;
  margin: 0;
  color: rgba(255, 248, 255, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-hero-card__gesture-rail {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 214, 189, 0.1);
  margin-top: 4px;
}

.player-hero-card__gesture-label {
  margin: 0;
  color: rgba(255, 248, 255, 0.55);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-hero-card__gesture-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-hero-card__gesture-btn {
  padding: 5px 10px;
  background: rgba(255, 214, 189, 0.06);
  border: 1px solid rgba(255, 214, 189, 0.22);
  border-radius: var(--profile-radius-pill, 999px);
  color: rgba(255, 248, 255, 0.88);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease;
}

.player-hero-card__gesture-btn:hover,
.player-hero-card__gesture-btn:focus-visible {
  background: rgba(255, 214, 189, 0.14);
  border-color: rgba(255, 214, 189, 0.44);
}

.player-hero-card__gesture-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.player-hero-card__gesture-flash {
  min-height: 1.2em;
  margin: 0;
  color: rgba(255, 248, 255, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-hero-card__gesture-btn--challenge {
  border-color: rgba(255, 214, 100, 0.3);
}

.player-hero-card__gesture-btn--active {
  background: rgba(255, 214, 100, 0.16);
  border-color: rgba(255, 214, 100, 0.5);
}

.player-hero-card__challenge-picker {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(10, 5, 20, 0.6);
  border: 1px solid rgba(255, 214, 100, 0.3);
  border-radius: var(--profile-radius-md, 16px);
}

.player-hero-card__challenge-picker-label {
  margin: 0;
  color: rgba(255, 248, 255, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.player-hero-card__challenge-games {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-hero-card__challenge-game-btn {
  padding: 6px 14px;
  background: rgba(255, 214, 100, 0.1);
  border: 1px solid rgba(255, 214, 100, 0.4);
  border-radius: var(--profile-radius-pill, 999px);
  color: rgba(255, 248, 255, 0.92);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease;
}

.player-hero-card__challenge-game-btn:hover,
.player-hero-card__challenge-game-btn:focus-visible {
  background: rgba(255, 214, 100, 0.22);
  border-color: rgba(255, 214, 100, 0.7);
}

.player-hero-card__challenge-game-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.player-hero-card__challenge-cancel {
  justify-self: start;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid rgba(255, 214, 189, 0.18);
  border-radius: var(--profile-radius-sm, 12px);
  color: rgba(255, 248, 255, 0.5);
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.player-hero-card__challenge-cancel:hover {
  color: rgba(255, 248, 255, 0.75);
  border-color: rgba(255, 214, 189, 0.35);
}

.player-hero-card {
  grid-template-columns: repeat(var(--profile-hero-child-columns, 100), minmax(0, 1fr));
  grid-template-rows: repeat(var(--profile-hero-child-rows, 100), minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 0;
  padding: 14px;
  min-height: 0;
}

.player-hero-card__child {
  position: absolute;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}

.player-hero-card__portrait-panel,
.player-hero-card__metrics-panel {
  display: grid;
  align-content: center;
  justify-items: center;
}

.player-hero-card__metrics-panel {
  gap: 8px;
}

#playerIdentityPanel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px 18px;
}

#playerRankingsPanel,
#playerFriendsPanel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px 14px 14px;
}

.player-card__rail-grid {
  display: grid;
  gap: 10px;
}

.player-card__rail-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.player-panel,
.player-hero-card {
  color: rgb(var(--profile-panel-text-rgb, 255, 248, 255));
}

.player-panel .player-card-item__title,
.player-panel .player-link__topline,
.player-hero-card .player-hero-card__gesture-label,
.player-hero-card .player-hero-card__challenge-picker-label {
  color: rgba(var(--profile-panel-text-rgb, 255, 215, 185), 0.88);
}

.player-panel .player-card-item__meta,
.player-panel .player-panel__empty,
.player-hero-card .player-hero-card__friend-flash,
.player-hero-card .player-hero-card__gesture-flash {
  color: rgba(var(--profile-panel-text-rgb, 255, 248, 255), 0.72);
}

.player-panel .player-link__url,
.player-panel .player-card-item__value,
.player-panel .player-card-item__link,
.player-panel .player-badge-chip,
.player-panel .player-about-copy,
.player-panel .player-badge-empty,
.player-hero-card .player-hero-card__section-topline,
.player-hero-card .player-hero-card__metrics-stat,
.player-hero-card .player-hero-card__identity-field,
.player-hero-card .player-hero-card__friend-action,
.player-hero-card .player-hero-card__gesture-btn,
.player-hero-card .player-hero-card__challenge-game-btn,
.player-hero-card .player-hero-card__challenge-cancel {
  color: rgb(var(--profile-panel-text-rgb, 255, 248, 255));
}

@media (max-width: 640px) {
  .player-stage__nav {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}
