/* 3OT · player.css
   Player profile (/player/…): season averages and the game log.
*/

.pp {
  --pp-panel: #151922;
  --pp-panel2: #0f131a;
  --pp-line: #252c38;
  --pp-line2: #313a49;
  --pp-text: #f5f7fb;
  --pp-muted: #8f9bad;
  --pp-green: #35d66f;
  --pp-red: #ff475f;
  --pp-orange: #ff7a1a;
  --pp-orange2: #ffb11a;
  display: grid;
  gap: 16px;
  min-width: 0;
  container-type: inline-size;
  container-name: pp;
}

.pp-back {
  justify-self: start;
  font-size: 13px;
  color: var(--pp-orange2);
  text-decoration: none;
}

/* Header */
.pp-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0;
  overflow: hidden;
  border-left: 0;
}

.pp-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 15px;
  background: linear-gradient(180deg,var(--team-a),var(--team-b));
}

.pp-hero > * {
  position: relative;
}

.pp-hero .pp-avatar-lg {
  margin-left: 8px;
}

.pp-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--team-b);
  background: linear-gradient(135deg,var(--team-a),#0d1118);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
}

.pp-avatar-lg {
  width: 84px;
  height: 84px;
  font-size: 28px;
}

.pp-hero h1 {
  margin: 0 0 6px;
  line-height: 1.05;
}

.pp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
  font-size: 14px;
  color: #c9d3e2;
}

.pp-meta span + span::before {
  content: "·";
  margin-right: 12px;
  color: var(--pp-muted);
}

.pp-team {
  font-weight: 700;
  color: var(--pp-text);
}

.pp-bio {
  margin: 6px 0 0;
  font-size: 13px;
}

.pp-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,71,95,.5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.pp-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pp-red);
  box-shadow: 0 0 0 0 rgba(255,71,95,.6);
  animation: pp-pulse 1.6s infinite;
}

@keyframes pp-pulse {
  70% { box-shadow: 0 0 0 8px rgba(255,71,95,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,71,95,0); }
}

/* Section headings */
.pp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.pp-head h2 {
  margin: 0;
  font-size: 18px;
}

.pp-head span {
  font-size: 13px;
  color: var(--pp-muted);
}

/* Season averages */
.pp-season {
  margin: 0;
}

.pp-big {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pp-big div {
  display: grid;
  justify-items: center;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid var(--pp-line);
  background: var(--pp-panel2);
}

.pp-big strong {
  font-family: var(--score-font);
  font-size: 40px;
  line-height: 1;
}

.pp-big span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--pp-muted);
}

.pp-avgs {
  display: grid;
  grid-template-columns: repeat(9,minmax(0,1fr));
  gap: 8px;
  margin: 0;
}

.pp-avgs div {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--pp-panel2);
}

.pp-avgs dt {
  order: 2;
  font-size: 11px;
  color: var(--pp-muted);
}

.pp-avgs dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.pp-last5 {
  margin: 12px 0 0;
  font-size: 13px;
  color: #c9d3e2;
}

.pp-last5 b {
  margin-right: 6px;
  color: var(--pp-orange2);
}

/* Game log */
.pp-log {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.pp-log .pp-head {
  margin-bottom: 0;
}

.pp-empty {
  margin: 0;
}

.pp-game {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--pp-line);
  background: #0d1016;
}

.pp-game.is-more {
  display: none;
}

.pp-game.is-live {
  border-color: rgba(255,71,95,.45);
}

.pp-game-top {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pp-line);
}

.pp-game-main {
  min-width: 0;
}

.pp-game-who {
  margin: 0;
  font-size: 14px;
  color: var(--pp-muted);
}

.pp-game-who b {
  font-weight: 600;
  color: #dfe6f1;
}

.pp-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  margin: 2px 0 0;
}

.pp-headline strong {
  font-family: var(--score-font);
  font-size: 34px;
  line-height: 1;
}

.pp-headline em {
  margin-right: 10px;
  font-style: normal;
  font-size: 15px;
  color: var(--pp-muted);
}

.pp-game-score {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.pp-opp {
  position: relative;
  padding: 3px 9px 3px 13px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--pp-line2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pp-opp::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg,var(--opp-a),var(--opp-b));
}

.pp-result {
  font-family: var(--score-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.pp-result.is-w { color: var(--pp-green); }
.pp-result.is-l { color: var(--pp-red); }
.pp-result.is-live { color: #fff; }

.pp-game-score small {
  font-size: 12px;
  color: var(--pp-muted);
}

/* Reactions */
.pp-react {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.pp-react-totals {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
  font-size: 18px;
}

.pp-react-totals span {
  line-height: 1;
}

.pp-react-totals b {
  margin-left: 6px;
  font-size: 14px;
  color: #dfe6f1;
}

.pp-react-totals em {
  font-size: 13px;
  font-style: normal;
  color: var(--pp-muted);
}

.pp-react-pick {
  position: relative;
}

.pp-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--pp-line2);
  color: #dfe6f1;
  font-size: 16px;
  text-decoration: none;
}

.pp-react-btn span {
  font-size: 13px;
  font-weight: 600;
}

.pp-react-btn:hover,
.pp-react-btn.has-mine {
  border-color: var(--pp-orange);
}

.pp-react-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6,36px);
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--pp-line2);
  background: #1b2130;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}

.pp-react-menu[hidden] {
  display: none;
}

.pp-react-menu a {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}

.pp-react-menu a:hover {
  background: rgba(255,255,255,.08);
  transform: scale(1.12);
}

.pp-react-menu a.is-mine {
  background: rgba(255,122,26,.22);
}

.pp-room {
  font-size: 13px;
  color: var(--pp-orange2);
  text-decoration: none;
  white-space: nowrap;
}

/* Box score grid */
.pp-statgrid {
  display: grid;
  grid-template-columns: repeat(9,minmax(0,1fr));
  gap: 10px 6px;
  margin: 0;
}

.pp-statgrid div {
  display: grid;
  min-width: 0;
}

.pp-statgrid dd {
  margin: 0;
  font-family: var(--score-font);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.pp-statgrid dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--pp-muted);
}

.pp-statgrid .is-up dd { color: var(--pp-green); }
.pp-statgrid .is-down dd { color: var(--pp-red); }

.pp-more {
  justify-self: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--pp-line2);
  color: #dfe6f1;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pp-more:hover {
  border-color: var(--pp-orange);
}

@container pp (max-width: 720px) {
  .pp-avgs { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .pp-statgrid { grid-template-columns: repeat(6,minmax(0,1fr)); }
}

@container pp (max-width: 520px) {
  .pp-hero { grid-template-columns: auto minmax(0,1fr); gap: 14px; }
  .pp-hero .pp-avatar-lg { width: 64px; height: 64px; font-size: 22px; }
  .pp-live { grid-column: 1 / -1; justify-self: start; }
  .pp-big strong { font-size: 32px; }
  .pp-game { padding: 12px; }
  .pp-game-top { grid-template-columns: auto minmax(0,1fr); }
  .pp-game-score { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
  .pp-headline strong { font-size: 28px; }
  .pp-statgrid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .pp-statgrid dd { font-size: 19px; }
}
