
.match-history {
  display: grid;
  gap: 9px;
}


.match-entry {
  --result-color: #79a7ff;
  --result-panel: #14243e;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #26364d;
  border-radius: 10px;
  background: #101824;
}

.match-loss {
  --result-color: var(--orange);
  --result-panel: var(--orange-panel);
}

.match-summary {
  display: grid;
  grid-template-columns: 8.5rem minmax(12rem, 1.6fr) minmax(6.5rem, .8fr) minmax(7rem, 1fr) 42px;
  align-items: center;
  gap: 14px;
  padding: 12px 0 12px 14px;
  min-height: 100px;
  border-inline-start: 4px solid var(--result-color);
  background: var(--result-panel);
  list-style: none;
  cursor: pointer;
}

.match-summary::-webkit-details-marker { display: none; }
.match-summary:focus-visible { outline: 2px solid var(--result-color); outline-offset: -4px; }
.match-summary:hover .match-expand { background: #ffffff14; }
.match-summary > span { min-width: 0; }
.match-result, .match-objective, .match-quick-stats, .match-rival > span { display: grid; gap: 4px; }
.match-result strong { color: var(--result-color); font-size: 16px; }
.match-result > span, .match-objective > span, .match-quick-stats > span, .match-rival small { color: #b7c4d7; font-size: 11px; }
.match-objective strong { font-size: 13px; }
.match-objective .match-sp-change { color: var(--result-color); }
.match-cs, .match-damage { display: grid; gap: 3px; white-space: nowrap; }
.match-cs small { color: #a6b4c9; font-size: 11px; }
.match-damage-track {
  display: block;
  width: 78px;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #080e19;
}
.match-damage-track > span { display: block; height: 100%; background: var(--orange-strong); }
.match-damage-taken .match-damage-track > span { background: var(--blue); }

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

.match-champion { position: relative; display: inline-flex; }
.match-champion .avatar { width: 42px; height: 42px; }
.match-level {
  position: absolute;
  inset: auto -3px -3px auto;
  min-width: 18px;
  border-radius: 9px;
  padding: 2px 4px;
  background: #080e1a;
  color: #fff;
  font-size: 10px;
  text-align: center;
}

.match-quick-stats strong { font-size: 18px; white-space: nowrap; }
.match-quick-stats strong span { color: #8b9db8; }
.match-summoners { display: grid; gap: 3px; }
.match-icon { display: block; width: 32px; height: 32px; border-radius: 5px; background: #080f1b; }
.match-summoners .match-icon { width: 19px; height: 19px; border-radius: 3px; }
.match-icons, .match-summary-items { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.match-summary-items { grid-column: 1 / -1; }
.match-summary-items .match-icon { width: 24px; height: 24px; border-radius: 4px; }
.match-rival, .match-identity { display: flex; align-items: center; gap: 9px; }
.match-rival .avatar { width: 30px; height: 30px; flex: none; }
.match-rival strong { font-size: 12px; overflow-wrap: anywhere; }
.match-expand { align-self: stretch; display: grid; place-items: center; border-radius: 6px 0 0 6px; color: var(--result-color); background: #ffffff09; }
.match-expand svg { transition: transform .15s ease; }
.match-entry[open] .match-expand svg { transform: rotate(180deg); }

.match-tabs {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-block: 1px solid #26364d;
  background: #131d2c;
}
.match-tabs button {
  flex: 1;
  border: 0;
  border-radius: 5px;
  padding: 8px 12px;
  background: transparent;
  color: #b9c8de;
}
.match-tabs button:hover { background: #263650; }
.match-tabs button[aria-selected="true"] { background: #2b4062; color: #fff; }
.match-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
}
.match-detail-heading > span, .match-unavailable { color: #a6b4c9; font-size: 12px; }
.match-unavailable { padding: 5px 16px 16px; }
.match-table-scroll { overflow-x: auto; }
.match-duel-table { width: 100%; min-width: 800px; background: #101824; }
.match-duel-table th, .match-duel-table td { padding: 11px 12px; }
.match-duel-table tbody tr:first-child { background: #172840; }
.match-duel-table tbody tr:last-child { background: var(--orange-panel); }
.match-loss .match-duel-table tbody tr:first-child { background: var(--orange-panel); }
.match-loss .match-duel-table tbody tr:last-child { background: #172840; }
.match-identity small { display: block; margin-top: 3px; }
.match-duel-table .match-icon { width: 26px; height: 26px; }

.match-build-section { border-top: 1px solid #26364d; padding: 12px 16px 16px; }
.match-build-section h3 { margin: 0 0 12px; color: #c9d7ea; font-size: 13px; }
.match-purchases, .match-skill-order { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 0; list-style: none; }
.match-purchases li { display: grid; justify-items: center; gap: 5px; position: relative; padding: 6px 10px; border-radius: 6px; background: #182337; }
.match-purchases li + li { margin-inline-start: 9px; }
.match-purchases li + li::before { content: '›'; position: absolute; inset: 9px auto auto -13px; font-size: 20px; color: #8b9db8; }
.match-purchases li > span:last-child { color: #a6b4c9; font-size: 11px; }
.match-spell-list { display: flex; gap: 7px; margin-bottom: 10px; }
.match-spell { position: relative; }
.match-spell b { position: absolute; inset: auto 0 0 auto; border-radius: 4px 0 4px 0; padding: 1px 4px; background: #080f1b; font-size: 10px; }
.match-skill-order li { display: grid; justify-items: center; min-width: 28px; padding: 3px 5px; border-radius: 4px; background: #1c2b42; }
.match-skill-order small { color: #b7c8df; font-size: 9px; }
.match-skill-order strong { font-size: 12px; }
.match-skill-order .match-ultimate { background: #315ca0; }
.match-rune-groups { display: flex; flex-wrap: wrap; gap: 13px; }
.match-rune-groups > div { display: grid; gap: 7px; padding: 9px 12px; border: 1px solid #25354c; border-radius: 7px; background: #131d2c; }
.match-rune-groups strong { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.match-rune-groups strong .match-icon { width: 20px; height: 20px; background: none; }
.match-rune-groups .match-icon { border-radius: 50%; }

@media (max-width: 740px) {
  .match-summary { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) 34px; gap: 9px; padding-inline-start: 10px; }
  .match-player-summary { grid-template-columns: auto auto minmax(0, 1fr); gap: 5px; }
  .match-summary-items .match-icon { width: 20px; height: 20px; }
  .match-quick-stats > span { font-size: 9px; }
  .match-quick-stats strong { font-size: 14px; }
  .match-objective { grid-row: 2; grid-column: 1; }
  .match-rival { grid-row: 2; grid-column: 2; }
  .match-expand { grid-row: 1 / 3; grid-column: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .match-expand svg { transition: none; }
}
