@font-face {
  font-family: "TT Autonomous";
  src: url("fonts/TTAutonomous-Bold.woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Fors";
  src: url("fonts/TTFors-Regular.woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Fors";
  src: url("fonts/TTFors-Medium.woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Fors";
  src: url("fonts/TTFors-Demibold.woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Fors";
  src: url("fonts/TTFors-Bold.woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oksana";
  src: url("fonts/OksanaSansNarrowHeavy.woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-modal-bg: rgb(28, 18, 51);
  --color-white: #fff;
  --color-accent: #7f00ff;
  --color-text-secondary: #7361bd;
  --color-winner: #8adf00;
  --color-loser: #ff3535;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

.results-modal .text-accent {
  color: var(--color-text-secondary);
}

.results-modal {
  position: fixed;
  inset: 0;
  font-family: sans-serif;
  line-height: 1.3;
  font-family: "TT Fors", "Fira Sans", "Oksana", "Oksana Sans Narrow",
    sans-serif;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 50;
}

@keyframes showContent {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.results-modal__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--color-modal-bg);
  color: var(--color-white);
  width: 90%;
  max-width: 600px;
  border-radius: 5px;
  animation: showContent 200ms ease forwards;
  zoom: 1.2;
}

.results-modal__inner {
  max-height: 80vh;
  overflow-y: auto;
  padding-bottom: 20px;
}

.results-modal__inner::-webkit-scrollbar {
  width: 2px;
}

.results-modal__inner::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.15);
}

.results-modal__inner::-webkit-scrollbar-thumb {
  background-color: var(--color-accent);
  border-radius: 1px;
}

.results-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: calc(100% + 11px);
  right: 0;
  background-color: transparent;
  color: var(--color-text-secondary);
  font-size: 12px;
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  transition: color 200ms ease;
}

.results-modal__close > svg {
  margin-left: 4px;
}

.results-modal__close:hover {
  color: var(--color-white);
}

.results-modal__title {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  font-family: "TT Autonomous", "Oksana", "Oksana Sans Narrow", "Fira Sans",
    sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
}

.results-modal__top {
  position: relative;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.results-modal__top::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-text-secondary);
  opacity: 0.3;
}

.results-modal__game-buttons {
  display: flex;
  overflow-x: auto;
  padding: 4px 0;
  max-width: 50%;
  margin: -4px 0;
}

.results-modal__game-buttons::-webkit-scrollbar {
  height: 2px;
}

.results-modal__game-buttons::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.15);
}

.results-modal__game-buttons::-webkit-scrollbar-thumb {
  background-color: var(--color-accent);
  border-radius: 1px;
}

.results-modal__game-button {
  background-color: transparent;
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  padding: 4px;
  margin: 0;
  text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
  font-weight: 800;
  box-shadow: 0px 13.1905px 21.9842px rgba(0, 0, 0, 0.09);
  cursor: pointer;
  border: 2px solid var(--color-accent);
  transition: 300ms ease;
  white-space: nowrap;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
}

.results-modal__game-button:hover,
.results-modal__game-button.active {
  background-color: var(--color-accent);
}

.results-modal__game-button:not(:last-child) {
  margin-right: 8px;
}

.results-modal__scores {
  display: flex;
  justify-content: center;
  padding: 10px;
}

.game-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  gap: 20px;
  font-weight: 500;
}

.game-score__scores {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px;
}

.game-score__scores.active {
  display: flex;
}

.game-score__team {
  color: inherit;
  text-decoration: none;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  transition: color 200ms ease;
}

.game-score__team:last-child {
  flex-direction: row-reverse;
}

.game-score__team .name {
  text-decoration: underline;
  color: var(--color-white);
}

.game-score__team.winner .result-letter {
  color: var(--color-winner);
}

.game-score__team.loser .result-letter {
  color: var(--color-loser);
}

.game-score__team-avatar {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  color: transparent;
  object-fit: cover;
}

.game-score__team-name {
  font-weight: 500;
}

.score-winner {
  color: var(--color-winner);
}

.score-loser {
  color: var(--color-loser);
}

.game-score__scores-title {
  font-size: 10px;
  color: var(--color-text-secondary);
}

.game-score__scores-numbers {
  font-size: 15px;
  font-weight: 700;
}

.results-modal__details {
  position: relative;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  padding-top: 0;
}

.results-modal__details::after {
  background: var(--color-text-secondary);
  opacity: 0.3;
  content: "";
  width: 100%;
  height: 1px;
  position: absolute;
  bottom: 0;
  left: 0;
}

.results-modal-detail {
  display: grid;
  grid-template-columns: auto 100px auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 345px;
  background: linear-gradient(
    270deg,
    rgba(51, 35, 86, 0) 0%,
    #332356 49.78%,
    rgba(51, 35, 86, 0) 101.67%
  );
  filter: drop-shadow(0px 8.22304px 13.7051px rgba(0, 0, 0, 0.09));
  padding: 3px 0;
  font-size: 8px;
}

.results-modal-detail__item {
  font-weight: 500;
}

.results-modal-detail__item .text-accent {
  font-weight: 400;
}

.results-modal-detail__item:nth-child(2) {
  text-align: center;
  font-weight: 600;
}

.results-modal-metrics {
  padding: 15px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.results-modal-metrics__toggle {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin-bottom: 15px;
}

.results-modal-metrics__toggle-button {
  flex: 1;
  background-color: transparent;
  color: inherit;
  border: 2px solid var(--color-accent);
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  text-shadow: 0px 1.77663px 1.77663px rgba(0, 0, 0, 0.09);
  padding: 6px 16px;
  cursor: pointer;
  min-width: 120px;
  transition: 300ms ease;
  font-family: "Oksana", "Fira Sans", sans-serif;
  font-weight: 900;
}

.results-modal-metrics__toggle-button.active {
  background-color: var(--color-accent);
}

.results-modal-metrics__toggle-button:not(.active):hover {
  border-color: var(--color-white);
}

.results-modal-metrics__toggle-button:first-child {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.results-modal-metrics__toggle-button:last-child {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  font-size: 12px;
}

.metrics-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  max-width: 240px;
  font-size: 15px;
  display: none;
}

.metrics-list.active {
  display: grid;
}

.metrics-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}

.metrics-list__item > p {
  min-width: 40px;
}

.metrics-list__item > p:nth-child(3) {
  text-align: right;
}

.metrics-list__item > p:nth-child(2) {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 400;
}

@media screen and (max-width: 576px) {
  .results-modal__top {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .results-modal__game-buttons {
    max-width: 100%;
  }
}

@media screen and (max-width: 450px) {
  .game-score {
    gap: 16px;
    align-items: center;
  }

  .game-score__team,
  .game-score__team:last-child {
    flex-direction: column;
    gap: 4px;
  }
}

.wrap-tournament-result {
  overflow-x: auto;
}

@media (min-width: 1200px) {
  .results-modal__content {
    zoom: 1.5;
  }
}

@media (min-width: 1920px) {
  .results-modal__content {
    zoom: 2;
  }
}

@media (min-width: 2400px) {
  .results-modal__content {
    zoom: 2.2;
  }
}
