:root {
  --color-primary: #327a81;
  --color-primary-dark: #2b686e;
  --color-primary-light: #daeff1;
  --color-row: #edf7f8;
  --color-surface: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: transparent;
  color: var(--color-primary-dark);
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

.header {
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 1.5em;
  padding: 1rem;
  text-align: center;
  text-transform: uppercase;
}

img {
  border-radius: 50%;
  height: 60px;
  width: 60px;
  max-width: 100%;
}

.table-users {
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  width: min(100%, 1100px);
  max-width: calc(100% - 1rem);
  margin: 0.3rem auto;
  overflow: hidden;
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

table td,
table th {
  color: var(--color-primary-dark);
  padding: 10px 12px;
  font-family: inherit;
  width: auto;
}

table td {
  text-align: center;
  vertical-align: middle;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}

table td:last-child {
  font-size: 0.95em;
  line-height: 1.4;
}

table th {
  background-color: var(--color-primary-light);
  font-weight: 300;
}

table th:hover {
  cursor: pointer;
}

table tr:nth-child(2n) {
  background-color: var(--color-surface);
}

table tr:nth-child(2n + 1) {
  background-color: var(--color-row);
}

table a {
  color: #398b93;
  text-decoration: none;
  overflow-wrap: normal;
  word-break: normal;
}

table td:nth-child(2) a {
  display: inline-block;
  white-space: nowrap;
}

table a:hover {
  color: #398b93;
  text-decoration: underline;
}

@media (min-width: 768px) {
  table td,
  table th {
    padding: 9px 8px;
  }

  table td:nth-child(1),
  table th:nth-child(1),
  table td:nth-child(2),
  table th:nth-child(2) {
    font-size: 0.92rem;
  }

  table td:nth-child(1),
  table td:nth-child(2),
  table td:nth-child(3),
  table td:nth-child(5),
  table th:nth-child(3),
  table th:nth-child(5) {
    white-space: nowrap;
  }

  table td:nth-child(3),
  table th:nth-child(3) {
    width: 5.5rem;
  }

  table td:nth-child(5),
  table th:nth-child(5) {
    width: 4.5rem;
  }
}

@media (max-width: 767px) {
  .table-users {
    max-width: calc(100% - 0.75rem);
    margin: 0.35rem auto;
  }

  .header {
    font-size: 1.2rem;
    padding: 0.9rem 1rem;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    padding: 0.35rem 0.5rem 0.45rem;
    border-top: 1px solid rgba(50, 122, 129, 0.14);
  }

  table td,
  table th {
    padding: 0.8rem 0.9rem;
  }

  table td {
    text-align: left;
    border-bottom: 1px solid rgba(50, 122, 129, 0.12);
    overflow-wrap: anywhere;
  }

  table a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  table td:nth-child(2) a {
    white-space: normal;
  }

  table td:last-child {
    border-bottom: 0;
    font-size: 1rem;
    line-height: 1.45;
  }

  table td::before {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  table td:nth-child(1)::before {
    content: "Name";
  }

  table td:nth-child(2)::before {
    content: "Address";
  }

  table td:nth-child(3)::before {
    content: "Players";
  }

  table td:nth-child(4)::before {
    content: "Map";
  }

  table td:nth-child(5)::before {
    content: "Game";
  }
}

@media (max-width: 479px) {
  .header {
    font-size: 1.1rem;
  }

  table td,
  table th {
    padding: 0.75rem 0.8rem;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 767px) {
  table td,
  table th {
    padding: 0.95rem 1rem;
  }

  table a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
