﻿.postgame-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(12, 11, 14, 0.95);
  line-height: normal;
  overflow-y: auto;
}

.postgame-overlay[hidden] {
  display: none !important;
}

#results .postgame-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

#results.outcome-victory {
  background: rgba(14, 10, 8, 0.94);
}

#results.outcome-victory .postgame-spotlight {
  opacity: 1;
  background: radial-gradient(
    ellipse 58% 75% at 50% 100%,
    rgba(255, 200, 120, 0.14) 0%,
    rgba(255, 150, 50, 0.05) 40%,
    transparent 72%
  );
}

#results.outcome-defeat {
  background: rgba(8, 9, 14, 0.96);
}

#results.outcome-defeat .postgame-spotlight {
  opacity: 1;
  background: radial-gradient(
    ellipse 55% 70% at 50% 100%,
    rgba(70, 80, 110, 0.1) 0%,
    rgba(35, 42, 62, 0.05) 38%,
    transparent 70%
  );
}

#results.outcome-neutral {
  background: rgba(10, 10, 12, 0.95);
}

.postgame-panel {
  position: relative;
  z-index: 1;
  max-height: 100%;
  overflow-y: auto;
}

.results-outcome-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: min(520px, 100%);
  padding: 8px 4px 12px;
}

.postgame-tag {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffc020;
}

.postgame-headline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 8vw, 3.1rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: #f4f0e6;
}

.postgame-headline.victory {
  color: #f4f0e6;
}

.postgame-headline.defeat {
  color: #9a8a98;
}

.postgame-headline.neutral {
  color: #b0aaa0;
}

.postgame-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #8a8478;
  max-width: 30em;
}

.postgame-subtitle .highlight {
  color: #ffc020;
}

#results.outcome-defeat .postgame-subtitle {
  color: #6a6e7a;
}

#results.outcome-defeat .results-stat {
  border-color: #2a3040;
  background: rgba(0, 0, 0, 0.32);
}

#results.outcome-defeat .results-stat-value {
  color: #7a8498;
}

#results.outcome-defeat .results-stat-label,
#results.outcome-defeat .results-detail {
  color: #505868;
}

#results.outcome-defeat .postgame-btn-accent {
  border-color: #5a6478;
  color: #8a94a8;
}

#results.outcome-defeat .postgame-btn-accent:hover {
  border-color: #7a8498;
  color: #a8b0c0;
}

.results-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 480px;
}

.results-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 1px solid #3a3028;
  background: rgba(0, 0, 0, 0.28);
}

.results-stat-value {
  font-size: 1.35rem;
  color: #ffc020;
  letter-spacing: 0.06em;
}

.results-stat-label {
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a6458;
}

.results-detail {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: #6a6458;
}

.postgame-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.postgame-btn {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid #5a5048;
  color: #c8c0b4;
  font-family: "Orbitron", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  cursor: pointer;
}

.postgame-btn:hover {
  border-color: #9a9080;
  color: #f0ece4;
}

.postgame-btn-accent {
  border-color: #ffc020;
  color: #ffc020;
}

.postgame-btn-accent:hover {
  border-color: #ffe080;
  color: #ffe080;
}

.standings-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(640px, 100%);
}

.standings-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 8px 16px;
  align-items: end;
}

.standings-room-meta {
  grid-column: 1 / -1;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a6458;
}

.standings-title {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  font-family: "Orbitron", monospace;
  font-size: clamp(1rem, 2.8vw, 1.45rem);
  font-weight: 400;
  color: #e8e4dc;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.standings-winner-line {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: #8a8478;
  white-space: nowrap;
}

#standings-winner-name {
  color: #ffc020;
}

.standings-table-wrap {
  border-top: 1px solid #2a2420;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.standings-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5a5448;
  border-bottom: 1px solid #2a2420;
  font-weight: 400;
}

.standings-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #1e1a16;
  color: #a8a098;
}

.standings-table tbody tr {
  border-left: 3px solid transparent;
}

.standings-table tbody tr[data-tier="tier-1"] {
  border-left-color: #ffc020;
}

.standings-table tbody tr[data-tier="tier-1"] td {
  color: #e8dcc8;
}

.standings-table tbody tr[data-tier="tier-1"] .place-cell {
  color: #ffc020;
}

.standings-table tbody tr[data-tier="tier-2"] {
  border-left-color: #9932cc;
}

.standings-table tbody tr[data-tier="tier-2"] .place-cell {
  color: #9932cc;
}

.standings-table tbody tr[data-tier="tier-3"] {
  border-left-color: #4a80cc;
}

.standings-table tbody tr[data-tier="tier-3"] .place-cell {
  color: #4a80cc;
}

.standings-table tbody tr[data-tier="tier-top5"] {
  border-left-color: #3dbb3d;
}

.standings-table tbody tr[data-tier="tier-top5"] .place-cell {
  color: #3dbb3d;
}

.standings-table tbody tr[data-tier="tier-rest"] {
  border-left-color: #5a5a5a;
}

.standings-table tbody tr.is-self .name-cell {
  color: #f0ece4;
}

.player-tags {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.player-tag {
  font-size: 0.5rem;
  padding: 2px 5px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  border: 1px solid #3a3428;
  color: #8a8478;
}

.player-tag.tag-victor {
  border-color: #ffc020;
  color: #ffc020;
}

.standings-status {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.standings-status.survived,
.standings-status.eliminated {
  color: #3dbb3d;
}

.standings-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}

.standings-tier-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.standings-tier-label {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a5448;
}

.standings-tier-legend ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.standings-tier-legend li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.58rem;
  color: #6a6458;
  text-transform: lowercase;
}

.tier-swatch {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.tier-swatch.tier-1 {
  background: #ffc020;
}

.tier-swatch.tier-2 {
  background: #9932cc;
}

.tier-swatch.tier-3 {
  background: #4a80cc;
}

.tier-swatch.tier-top5 {
  background: #3dbb3d;
}

.tier-swatch.tier-rest {
  background: #5a5a5a;
}

.standings-footer-meta {
  flex: 1;
  min-width: 12em;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: #5a5448;
  text-transform: lowercase;
}

.standings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.standings-actions .postgame-btn-accent {
  margin-left: 0;
}

@media (max-width: 520px) {
  .results-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .standings-header {
    grid-template-columns: 1fr;
  }

  .standings-title {
    letter-spacing: 0.1em;
  }

  .standings-winner-line {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }

  .standings-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .standings-actions {
    margin-left: 0;
    width: 100%;
  }

  .standings-actions .postgame-btn {
    flex: 1;
    min-width: 8em;
  }
}
