:root {
  --background-body: #161616;
  --background-header: #262624;
  --background-active: #444441;
  --color-light: white;
  --color-primary: #f7f7f6;
  --color-secondary: #a7a6a1;
  --color-tertiary: #e4e4e3;
  --accent-color: #ff7fde;
  --blue-accent: #085fff;
  --font-family-primary: "Sofia Sans Extra Condensed Variable",
    "Sofia Sans Extra Condensed", sans-serif;
  --font-family-secondary: "Source Sans 3 Variable", "Source Sans 3", sans-serif;
  --font-family-table-header: "Inter Tight Variable", "Inter Tight", sans-serif;
  --font-weight-bold: 850;
  --font-weight-medium: 650;
  --font-weight-normal: 600;
}

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

h1,
h2,
h3,
p,
ul,
li,
a {
  margin: 0;
  padding: 0;
}

ul,
li,
a {
  color: currentColor;
  text-decoration: none;
  list-style: none;
}

img,
svg {
  display: block;
  pointer-events: none;
}

body {
  margin: 56px auto;
  padding: 0;
  background-color: var(--background-body);
  max-inline-size: 1320px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar,
.popup::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.scroll-lock {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.header_top {
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-primary);
  block-size: 240px;
}

.header_top_main {
  display: flex;
  block-size: 100%;
}

.header_logo_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  inline-size: 240px;
}

.header_logo {
  object-fit: contain;
  opacity: 0;
  transition: all 0.3s;
  inline-size: 128px;
  block-size: 128px;
}

.header_top_right {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  overflow: hidden;
  color: var(--color-primary);
  line-height: 64.8px;
  background: var(--background-header-from-js);
  inline-size: 100%;
}

.header_title {
  font-weight: var(--font-weight-bold);
  font-size: 96px;
  text-transform: uppercase;
}

.header_subtitle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  font-weight: var(--font-weight-bold);
  font-size: 26px;
}

.header_points {
  font-size: 48px;
}

.header_logo_transparent {
  position: absolute;
  right: -150px;
  bottom: -40px;
  z-index: 1;
  object-fit: contain;
  opacity: 0;
  transition: all 0.3s;
  inline-size: 300px;
  block-size: 300px;
}

.header_running_line {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  color: var(--background-header);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  text-transform: uppercase;
  background-color: var(--color-primary);
  min-block-size: 20px;
  white-space: nowrap;
}

.header_buttons {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-block-start: 32px;
}

.header_button {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  border-radius: 2px;
  padding: 8px;
  background: var(--background-header);
  transition: all 0.5s;
  cursor: pointer;
  inline-size: 100%;
}

.header_button:hover {
  background: var(--button-background);
}

.header_button-is_active {
  background: var(--button-background);
  cursor: default;
}

.header_button img {
  object-fit: contain;
  opacity: 0;
  inline-size: 40px;
  block-size: 40px;
}

.main {
  display: flex;
  justify-content: space-between;
  margin-block-start: 24px;
  font-family: var(--font-family-primary);
}

.players_list {
  text-transform: uppercase;
  inline-size: 66%;
}

.position_title {
  padding-block-end: 16px;
  color: var(--color-tertiary);
  font-size: 20px;
  line-height: 20px;
}

.position_title:not(:first-child) {
  margin-block-start: 24px;
}

.position_container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.player_item {
  overflow: hidden;
  background-color: var(--background-header);
  transition: all 0.3s;
  cursor: pointer;
  inline-size: 200px;
}

.player_item:hover {
  opacity: 0.72;
}

.player_photo_wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: end;
  overflow: hidden;
  block-size: 204px;
}

.player_photo {
  position: relative;
  z-index: 2;
  object-fit: contain;
  object-position: bottom;
  opacity: 0;
  inline-size: 100%;
  block-size: 100%;
}

.players_list_pl .player_photo {
  inline-size: 90%;
  block-size: 90%;
}

.players_list_laLiga .player_photo {
  transform: translateY(10%);
}

.players_list_seriaA .player_photo {
  inline-size: 110%;
}

.player_totalPoints_wrapper {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  opacity: 0.26;
  color: var(--color-light);
  font-weight: 800;
  font-size: 75px;
  line-height: 0.9;
  letter-spacing: -1px;
  inline-size: 100%;
  block-size: 100%;
}

.player_totalPoints_wrapper div {
  display: flex;
  flex-direction: column;
  gap: 1.5%;
}

.point-div-2,
.point-div-4 {
  transform: translateY(-17%);
}

.player_running_line {
  display: flex;
  gap: 8px;
  color: var(--background-header);
  font-weight: var(--font-weight-normal);
  background-color: var(--accent-color);
}

.player_name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8px;
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  font-size: 20px;
  line-height: 20px;
  background-color: var(--blue-accent);
  block-size: 56px;
}

.main_standings {
  font-family: var(--font-family-table-header);
  inline-size: 32%;
}

.main_standings div {
  display: grid;
  grid-template-columns: 16px 1fr 62px;
  padding: 0 16px 0 8px;
}

.standings_header {
  color: var(--color-secondary);
  font-weight: 400;
  font-size: 12px;
  line-height: 24px;
}

.standings_team {
  color: var(--color-primary);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  background: var(--background-header);
}

.standings_team:not(:last-child) {
  margin-block-end: 2px;
}

.standings_team_is-active {
  background: var(--background-active);
}

.standings_header p,
.standings_team p {
  margin: 0 4px;
  padding: 12px 0;
}

.main_standings div p:first-child {
  color: var(--color-secondary);
  text-align: center;
}

.main_standings div p:last-child {
  text-align: center;
}

.standings_team p:first-child {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  overflow-y: auto;
  background-color: var(--background-body);
  transition: visibility 0.5s, opacity 0.5s;
  pointer-events: none;
  user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup_is-opened {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.popup-content {
  position: absolute;
  left: 50%;
  box-sizing: border-box;
  padding-block-start: 56px;
  transform: translateX(-50%);
  inline-size: 100%;
  max-block-size: 100%;
  max-inline-size: 1320px;
}

.close {
  position: absolute;
  top: 8px;
  left: 0;
  padding: 12px;
  cursor: pointer;
}

.close svg {
  fill: var(--color-secondary);
  transition: all 0.3s;
  transform: rotate(180deg);
  inline-size: 16px;
  block-size: 16px;
}

.close:hover svg {
  opacity: 0.72;
}

.popup_header {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-block-end: 32px;
  color: var(--color-primary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  block-size: 240px;
}

.popup_header_right {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-inline-start: 240px;
  padding-inline-end: 40px;
  overflow: hidden;
  background-color: var(--background-team-right);
  min-block-size: 220px;
}

.popup_player_team_big {
  position: absolute;
  right: -150px;
  bottom: -40px;
  object-fit: contain;
  opacity: 0;
  transition: all 0.1s;
  inline-size: 300px;
  block-size: 300px;
}

.popup_player_photo_wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  inline-size: 270px;
  block-size: 100%;
}

.popup_player_photo {
  object-fit: contain;
  object-position: bottom;
  opacity: 0;
  transition: all 0.1s;
  max-inline-size: 100%;
  block-size: 100%;
}

.popup_header_pl .popup_player_photo,
.popup_header_seriaA .popup_player_photo {
  block-size: 90%;
}

.popup_header_laLiga .popup_player_photo {
  transform: translateY(10%);
}

.popup_player_points_title {
  font-size: 48px;
  line-height: 64.8px;
}

.popup_running_line {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 20px;
  overflow: hidden;
  color: var(--background-header);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  background: var(--color-primary);
}

.popup_footer {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 270px;
  block-size: 220px;
  inline-size: 100%;
}

.popup_player_team_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--background-team-left);
  min-inline-size: 240px;
  block-size: 100%;
}

.popup_player_team {
  object-fit: contain;
  opacity: 0;
  transition: all 0.1s;
  inline-size: 128px;
  block-size: 128px;
}

.popup_player_name {
  font-size: 48px;
}

.popup_player_lastName {
  font-size: 96px;
  line-height: 96px;
  white-space: nowrap;
}

.popup_main {
  display: flex;
  justify-content: space-between;
}

.popup_left {
  inline-size: 66%;
}

.popup_buttons {
  display: flex;
  box-sizing: border-box;
  margin-block-end: 4px;
  overflow-x: auto;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-accent) var(--background-header);
}

.popup_buttons::-webkit-scrollbar {
  height: 8px;
}

.popup_buttons::-webkit-scrollbar-track {
  height: 8px;
  border-radius: 0;
  background: var(--background-header);
}

.popup_buttons::-webkit-scrollbar-thumb {
  height: auto;
  border-radius: 1px;
  background: var(--blue-accent);
}

.popup_buttons button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  padding: 0;
  color: var(--color-secondary);
  font-family: var(--font-family-primary);
  font-size: 14px;
  line-height: 1;
  background: transparent;
}

.popup_button_wrapper {
  padding: 8px;
  background-color: var(--background-header);
}

.popup_button_img_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 2px;
  transition: all 0.5s;
  cursor: pointer;
  inline-size: 40px;
  block-size: 40px;
}

.popup_buttons img {
  object-fit: contain;
  transition: all 0.3s;
  inline-size: 24px;
  block-size: 24px;
}

.popup_buttons .popup_button_img_wrapper:hover img {
  opacity: 0.72;
}

.active .popup_button_img_wrapper {
  background-color: var(--blue-accent);
  cursor: default;
}

.active .popup_button_img_wrapper:hover img {
  opacity: 1;
}

.disabled .popup_button_img_wrapper {
  cursor: default;
}

.disabled img {
  filter: grayscale(100%) brightness(110%);
}

.disabled:hover .popup_button_img_wrapper img {
  opacity: 1;
}

.tour_result_wrapper {
  margin: 16px 0 24px;
  inline-size: 100%;
}

.tour_result_wrapper::before {
  content: "";
  display: block;
  border-block-start: 1px solid #444441;
  padding: 8px 0;
  inline-size: 100%;
  block-size: 1px;
}

.tour_result {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto) 1fr;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  color: white;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 24px;
  background-color: var(--background-header);
}

.tour_result p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour_result p:first-child {
  text-align: end;
}

.loser {
  color: var(--color-secondary);
  font-weight: var(--font-weight-medium);
}

.tour_result img {
  object-fit: contain;
  opacity: 0;
  inline-size: 40px;
  block-size: 40px;
}

.tour_score {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 56px;
  height: 40px;
  margin: 4px 8px;
  color: var(--color-primary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
  font-size: 20px;
  line-height: 27px;
  letter-spacing: 1px;
  background-color: var(--background-body);
}

.tour_statistics,
.general_statistics {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--color-secondary);
  font-family: var(--font-family-secondary);
  font-weight: var(--font-weight-medium);
  font-size: 14px;
  line-height: 24px;
}

.general_statistics {
  padding-block-end: 32px;
}

.tour_statistics p,
.general_statistics p {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  column-gap: 8px;
  padding: 8px 16px;
  background-color: var(--background-header);
  min-block-size: 40px;
}

.statistics_points,
.statistics_total_points span {
  white-space: nowrap;
}

.statistics_points,
.statistics_total_points {
  color: var(--color-primary);
  font-size: 16px;
}

.tour_statistics .statistics_captain {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.statistics_captain::before {
  content: "C";
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 27px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  color: var(--color-primary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
  font-size: 12px;
  line-height: 12px;
  background-color: var(--blue-accent);
  clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
}

.general_statistics_title {
  margin-block-end: 16px;
  padding: 4px 16px;
  color: var(--color-tertiary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
  font-size: 34px;
  line-height: 34px;
  text-transform: uppercase;
}

.general_statistics_title:not(:first-child) {
  margin-block-start: 24px;
}

.general_statistics_title:first-child {
  display: none;
}

.popup_right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 16px;
  inline-size: 32%;
}

.main_stats {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 109px;
  border-radius: 2px;
  padding: 0 24px;
  overflow: hidden;
  background: var(--background-header);
}

.main_stats_value {
  color: var(--color-primary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
  font-size: 56px;
  line-height: 60px;
}

.main_stats_description {
  color: var(--color-secondary);
  font-size: 12px;
  line-height: 16.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main_stats_img {
  position: absolute;
  right: 0;
  object-fit: contain;
  opacity: 0;
  transform: translateX(30%);
  inline-size: auto;
  block-size: 100px;
}

@media screen and (max-width: 1279px) {
  body {
    margin: 32px 16px;
  }

  .header_top {
    block-size: auto;
  }

  .header_top_main {
    position: relative;
    block-size: 236px;
  }

  .header_logo_wrapper {
    position: absolute;
    top: 52px;
    z-index: 1;
    background: transparent;
    inline-size: 100%;
  }

  .header_title {
    display: none;
  }

  .header_subtitle {
    position: absolute;
    bottom: 8px;
    left: 16px;
    gap: 4px;
  }

  .main {
    flex-direction: column-reverse;
    gap: 24px;
  }

  .players_list {
    inline-size: 100%;
  }

  .main_standings {
    inline-size: 100%;
  }

  .standings_header p {
    padding: 7.5px 0;
  }

  .main_standings .standings_team_is-inactive {
    display: none;
  }

  .popup-content {
    padding: 32px 16px;
  }

  .close {
    top: 84px;
    left: 24px;
    z-index: 1111;
  }

  .close svg {
    fill: var(--color-primary);
  }

  .popup_header {
    margin: 0 0 32px;
    block-size: auto;
  }

  .popup_header_right {
    margin: 0;
    padding: 0 8px;
    block-size: 236px;
    min-block-size: 236px;
  }

  .popup_player_photo_wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    inline-size: 100%;
    block-size: 250px;
  }

  .popup_player_photo {
    object-fit: contain;
    object-position: bottom;
    max-inline-size: 100%;
    block-size: 100%;
  }

  .popup_player_points_title {
    position: absolute;
    bottom: 8px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 26px;
    line-height: 26px;
  }

  .popup_player_points {
    font-size: 48px;
    line-height: 64.8px;
  }

  .popup_footer {
    position: relative;
    gap: 0;
    background-color: var(--background-header);
    block-size: 72px;
  }

  .popup_player_team_wrapper {
    min-inline-size: 72px;
  }

  .popup_player_team {
    inline-size: 48px;
    block-size: 48px;
  }

  .popup_player_name {
    padding: 0 16px;
  }

  .popup_player_firstName {
    color: #a7a6a1;
    font-weight: var(--font-weight-normal);
    font-size: 16px;
    line-height: 18px;
  }

  .popup_player_lastName {
    font-size: 40px;
    line-height: 40px;
  }

  .general_statistics_title:first-child {
    display: inline-block;
  }

  .popup_main {
    flex-direction: column-reverse;
    gap: 24px;
  }

  .popup_left {
    inline-size: 100%;
  }

  .popup_right {
    inline-size: 100%;
  }
}

@media screen and (max-width: 768px) {
  body {
    margin: 0 0 32px;
  }

  .header_subtitle {
    font-size: 24px;
  }

  .header_points {
    font-size: 40px;
  }

  .header_buttons {
    gap: 16px;
    padding: 0 16px;
  }

  .header_button img {
    inline-size: 24px;
    block-size: 24px;
  }

  .main {
    margin: 24px 16px 0;
  }

  .player_item {
    inline-size: calc(50% - 8px);
  }

  .player_totalPoints_wrapper {
    font-size: clamp(2.5rem, -1.1058rem + 19.2308vw, 8.125rem);
  }

  .player_totalPoints_wrapper div {
    gap: 1.5%;
  }

  .main_standings div {
    padding: 0 4px;
  }

  .popup-content {
    padding: 0;
  }

  .close {
    top: 52px;
    left: 8px;
  }

  .popup_player_points_title {
    font-size: 24px;
    line-height: 24px;
  }

  .popup_player_points {
    font-size: 40px;
    line-height: 56px;
  }

  .popup_player_lastName {
    font-size: 34px;
    line-height: 35px;
  }

  .tour_result {
    gap: 4px;
    padding: 8px;
  }

  .tour_result img {
    inline-size: 24px;
    block-size: 24px;
  }

  .tour_score {
    margin: 4px;
  }

  .general_statistics_title {
    font-size: 24px;
    line-height: 24px;
  }

  .main_stats_img {
    transform: translateX(35%);
  }
}
