:root {
  --bg: #060908;
  --panel: rgba(8, 17, 18, 0.9);
  --panel-soft: rgba(15, 24, 23, 0.82);
  --panel-warm: rgba(37, 26, 14, 0.86);
  --line: rgba(216, 155, 55, 0.26);
  --line-cool: rgba(92, 216, 220, 0.18);
  --text: #e9edf0;
  --muted: #8e989c;
  --gold: #f0a020;
  --gold-2: #ffbf3c;
  --green: #28d35c;
  --red: #ff443f;
  --cyan: #31d9e2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(1, 6, 7, 0.15), rgba(1, 6, 7, 0.86)),
    radial-gradient(circle at 22% 28%, rgba(240, 160, 32, 0.18), transparent 32%),
    url("./assets/black-mesa-backdrop.png") center / cover fixed,
    var(--bg);
  font-family: Bahnschrift, "Segoe UI", Tahoma, sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: overlay;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.shell {
  width: min(1780px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 14px 0 28px;
}

.topbar,
.controls,
.board-panel,
.detail-panel,
.section-panel,
.compact-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(9, 16, 17, 0.96), rgba(5, 11, 12, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto minmax(245px, 0.42fr);
  gap: 26px;
  align-items: stretch;
  min-height: 76px;
  border-radius: 5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.lambda-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 5px solid #cf6729;
  border-radius: 50%;
  color: #cf6729;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 43px;
  font-weight: 800;
  line-height: 1;
}

.brand strong {
  display: block;
  color: #f4f4f0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: clamp(22px, 2.1vw, 36px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border-inline: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
  display: grid;
  place-items: center;
  min-width: 120px;
  padding: 0 24px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: #c7d1d3;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.tab.is-active {
  color: #ffbb33;
  background: linear-gradient(180deg, rgba(133, 79, 24, 0.52), rgba(79, 49, 20, 0.45));
}

.server-card {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 0 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #cfd7d8;
  font-size: 17px;
}

.server-card small {
  color: var(--muted);
}

.telegram-link {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 4px;
  padding: 7px 10px;
  border: 1px solid rgba(49, 217, 226, 0.34);
  border-radius: 4px;
  color: #dffcff;
  background: rgba(18, 96, 116, 0.22);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.telegram-link span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #061213;
  background: var(--cyan);
  font-size: 10px;
  letter-spacing: 0;
}

.telegram-link:hover,
.telegram-link:focus {
  outline: none;
  border-color: rgba(49, 217, 226, 0.72);
  color: #ffffff;
  background: rgba(18, 122, 148, 0.35);
}

.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
  background: #14c64c;
  box-shadow: 0 0 18px rgba(20, 198, 76, 0.9);
}

.status-dot.is-empty {
  background: #f0a020;
  box-shadow: 0 0 18px rgba(240, 160, 32, 0.78);
}

.status-dot.is-offline {
  background: #ff443f;
  box-shadow: 0 0 18px rgba(255, 68, 63, 0.7);
}

.controls {
  display: grid;
  grid-template-columns: 210px 220px minmax(280px, 420px) 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 24px;
  border-radius: 5px;
}

.select-wrap,
.search-wrap {
  display: flex;
  align-items: center;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: rgba(6, 14, 16, 0.8);
  color: #cbd5d8;
}

.control-icon,
.search-wrap span {
  display: grid;
  place-items: center;
  width: 48px;
  color: var(--muted);
  font-size: 22px;
}

select,
input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #d7dee1;
  font-size: 17px;
  font-weight: 600;
}

select {
  appearance: none;
  padding-right: 20px;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 18px center / 8px 8px no-repeat;
}

input::placeholder {
  color: #7b8588;
}

.updated {
  margin: 0;
  justify-self: end;
  color: #a9b2b5;
  font-size: 16px;
  font-weight: 600;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 18px;
  margin-top: 18px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 6px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 6px 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-head h1 {
  margin: 0;
  color: #ffac24;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  text-transform: uppercase;
}

.section-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #aeb8ba;
  font-size: 18px;
  font-weight: 600;
}

.section-head > strong {
  flex: 0 0 auto;
  color: #f1c45b;
  font-size: 22px;
  text-transform: uppercase;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.summary-card,
.player-card,
.weapon-card,
.map-card,
.compact-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(8, 17, 18, 0.78);
}

.summary-card {
  min-height: 118px;
  padding: 18px;
}

.summary-card span,
.summary-card small,
.player-card dt,
.weapon-card dt,
.map-card dt {
  display: block;
  color: #8f9a9d;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin: 8px 0;
  color: #f1f5f5;
  font-size: 28px;
  line-height: 1.05;
}

.summary-card.gold strong {
  color: #ffba35;
}

.summary-card.green strong {
  color: #38e46d;
}

.player-directory,
.weapon-board,
.map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.player-card,
.weapon-card,
.map-card {
  padding: 14px;
}

.player-card {
  cursor: pointer;
}

.player-card:hover,
.player-card:focus,
.player-card.is-selected {
  outline: none;
  border-color: rgba(255, 171, 40, 0.72);
  background: linear-gradient(135deg, rgba(65, 43, 13, 0.76), rgba(8, 17, 18, 0.86));
}

.player-card header,
.weapon-card header {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.player-card h2,
.weapon-card h2 {
  overflow: hidden;
  margin: 0;
  color: #f3f7f7;
  font-size: 21px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-card p,
.weapon-card p,
.map-card p {
  margin: 5px 0 0;
  color: #97a2a5;
  font-size: 15px;
  font-weight: 700;
}

.card-rank {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 12px;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.card-rank span {
  display: block;
  color: #ffbd39;
  font-size: 17px;
  font-weight: 800;
}

.card-rank strong {
  display: block;
  margin-top: 3px;
  color: #f0f4f5;
  font-size: 18px;
}

.player-card dl,
.weapon-card dl,
.map-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.player-card dd,
.weapon-card dd,
.map-card dd {
  overflow: hidden;
  margin: 3px 0 0;
  color: #e9eeee;
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weapon-card header .weapon-svg {
  width: 118px;
  height: 36px;
  flex-basis: 118px;
}

.weapon-meter {
  height: 8px;
  margin: 16px 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
}

.weapon-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8e12, #f0b832);
  box-shadow: 0 0 12px rgba(255, 150, 18, 0.35);
}

.compact-panel {
  margin-top: 14px;
  padding: 14px;
}

.compact-panel h2 {
  margin: 0 0 12px;
  color: #ff9e18;
  font-size: 21px;
}

.master-row {
  display: grid;
  grid-template-columns: 44px 60px minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #dce4e5;
  font-size: 17px;
  font-weight: 800;
}

.master-row:first-of-type {
  border-top: 0;
}

.master-row em {
  color: #ffbd39;
  font-style: normal;
}

.map-grid {
  margin-top: 18px;
}

.map-card header {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.map-card header span {
  color: #9aa5a8;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.map-card header strong {
  color: #ffb334;
  font-size: 25px;
  line-height: 1;
}

.map-card header small {
  color: #d4dcde;
  font-size: 15px;
  font-weight: 700;
}

.map-card p {
  min-height: 44px;
  margin: 14px 0;
}

.empty-card {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #9fa9ac;
  background: rgba(8, 17, 18, 0.78);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.board-panel,
.detail-panel {
  overflow: hidden;
  border-radius: 6px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}

th:nth-child(1),
td:nth-child(1) {
  width: 5%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 8%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 20%;
}

th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5) {
  width: 8%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 6%;
}

th:nth-child(7),
td:nth-child(7) {
  width: 10%;
}

th:nth-child(8),
td:nth-child(8) {
  width: 19%;
}

th:nth-child(9),
td:nth-child(9) {
  width: 6%;
}

th:nth-child(10),
td:nth-child(10) {
  width: 10%;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  white-space: nowrap;
}

th {
  height: 61px;
  color: #c7d3d5;
  background: rgba(10, 20, 22, 0.92);
  font-size: 17px;
  font-weight: 700;
}

td {
  height: 70px;
  color: #dde4e5;
  font-size: 20px;
  font-weight: 600;
}

tbody tr {
  background: rgba(8, 18, 19, 0.7);
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

tbody tr:nth-child(odd) {
  background: rgba(13, 24, 24, 0.75);
}

tbody tr:hover,
tbody tr:focus {
  outline: none;
  background: rgba(58, 42, 18, 0.83);
}

tbody tr.is-selected {
  background: linear-gradient(90deg, rgba(92, 63, 18, 0.9), rgba(27, 31, 24, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 181, 43, 0.58);
}

.place {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #dfe7e9;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-weight: 700;
}

tbody tr:nth-child(-n + 3) .place,
tr.is-selected .place {
  border-color: rgba(255, 165, 27, 0.85);
  color: #ffc241;
  background: rgba(255, 160, 32, 0.1);
}

.xp,
.player-name {
  color: #f0f4f5;
}

.player-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-cell,
.weapon-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.weapon-cell {
  gap: 8px;
}

.weapon-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flag {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 20px;
  line-height: 1;
  flex: 0 0 28px;
}

.flag img {
  display: block;
  width: 28px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.38);
}

.flag-unknown {
  width: 28px;
  height: 20px;
  border: 1px solid rgba(207, 216, 218, 0.35);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: #9aa5a8;
  font-size: 12px;
  font-weight: 900;
}

.flag-fallback {
  display: none;
}

.flag-unknown .flag-fallback {
  display: grid;
  place-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 177, 42, 0.65);
  border-radius: 4px;
  background:
    radial-gradient(circle at 55% 35%, rgba(255, 210, 89, 0.5), transparent 35%),
    linear-gradient(135deg, rgba(255, 159, 29, 0.16), rgba(26, 38, 34, 0.8));
  color: #ffc04d;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.steam-avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateZ(0);
}

.avatar-fallback {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.avatar.lambda {
  font-size: 30px;
}

.avatar.science,
.avatar.guard {
  color: #cfd8da;
}

.avatar.skull {
  color: #d9e2e3;
  font-size: 22px;
}

.avatar.xen {
  color: #89e587;
}

.online-chip {
  padding: 1px 6px 2px;
  border: 1px solid rgba(37, 214, 85, 0.4);
  border-radius: 3px;
  color: #52f078;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.good {
  color: var(--green);
}

.bad {
  color: var(--red);
}

.meter {
  display: inline-block;
  width: 70px;
  height: 7px;
  margin-right: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  vertical-align: 2px;
}

.meter i,
.progress-track i,
.weapon-row i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8e12, #f0b832);
  box-shadow: 0 0 12px rgba(255, 150, 18, 0.35);
}

.weapon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 66px;
  width: 66px;
  height: 26px;
  overflow: visible;
  filter:
    drop-shadow(0 3px 5px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 8px rgba(206, 222, 220, 0.08));
}

.weapon-svg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.96;
  filter: brightness(1.18) contrast(1.08);
}

.weapon-cell .weapon-svg {
  flex-basis: 64px;
  width: 64px;
  height: 24px;
}

.weapon-row .weapon-svg {
  flex-basis: 68px;
  width: 68px;
  height: 24px;
}

.rank-badge {
  --rank-accent: #f0ad2f;
  --rank-accent-2: #8f541b;
  --rank-glow: rgba(240, 173, 47, 0.36);
  display: inline-grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  width: 82px;
  height: 52px;
  color: var(--rank-accent);
  vertical-align: middle;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.48));
}

.rank-badge::before {
  position: absolute;
  content: "";
  inset: 8px 17px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rank-glow), transparent 68%);
  opacity: 0.88;
}

.rank-badge::after {
  position: absolute;
  bottom: 5px;
  width: 36px;
  height: 6px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--rank-accent), transparent);
  opacity: 0.66;
}

.rank-wing {
  position: absolute;
  top: 18px;
  width: 42px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 54%),
    linear-gradient(90deg, var(--rank-accent), var(--rank-accent-2));
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.22);
}

.rank-wing-left {
  left: 2px;
  clip-path: polygon(0 28%, 100% 0, 82% 100%, 0 76%);
}

.rank-wing-right {
  right: 2px;
  clip-path: polygon(0 0, 100% 28%, 100% 76%, 18% 100%);
}

.rank-badge b {
  z-index: 1;
  display: grid;
  place-items: center;
  position: relative;
  width: 38px;
  height: 38px;
  border: 2px solid var(--rank-accent);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 36%),
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.14), transparent 36%),
    #091211;
  color: #f4fbf7;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.88);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.52),
    0 0 18px var(--rank-glow),
    inset 0 -12px 18px rgba(0, 0, 0, 0.42);
}

.rank-badge b::before {
  position: absolute;
  content: "";
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
}

.rank-badge b span {
  position: relative;
  z-index: 1;
}

.rank-badge em {
  position: absolute;
  right: 7px;
  bottom: 2px;
  z-index: 2;
  min-width: 20px;
  padding: 2px 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: #0b1212;
  color: var(--rank-accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.rank-marks {
  position: absolute;
  top: 3px;
  z-index: 2;
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
}

.rank-marks span {
  display: block;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--rank-accent);
  box-shadow: 0 0 7px var(--rank-glow);
  transform: rotate(45deg);
}

.rank-badge.frame-bar b {
  border-radius: 50%;
}

.rank-badge.frame-knife .rank-wing-left {
  clip-path: polygon(0 50%, 88% 7%, 100% 50%, 88% 93%);
}

.rank-badge.frame-knife .rank-wing-right {
  clip-path: polygon(12% 7%, 100% 50%, 12% 93%, 0 50%);
}

.rank-badge.frame-knife b {
  clip-path: polygon(50% 0, 92% 24%, 78% 100%, 22% 100%, 8% 24%);
}

.rank-badge.frame-chevron .rank-wing-left {
  clip-path: polygon(0 0, 100% 25%, 84% 100%, 0 70%);
}

.rank-badge.frame-chevron .rank-wing-right {
  clip-path: polygon(0 25%, 100% 0, 100% 70%, 16% 100%);
}

.rank-badge.frame-chevron b {
  border-radius: 8px;
  transform: rotate(45deg);
}

.rank-badge.frame-chevron b span {
  transform: rotate(-45deg);
}

.rank-badge.frame-shield .rank-wing {
  top: 20px;
  height: 20px;
}

.rank-badge.frame-shield b {
  height: 42px;
  border-radius: 12px 12px 18px 18px;
  clip-path: polygon(50% 0, 96% 20%, 84% 78%, 50% 100%, 16% 78%, 4% 20%);
}

.rank-badge.frame-crown .rank-wing {
  top: 17px;
  height: 21px;
}

.rank-badge.frame-crown b {
  width: 42px;
  height: 42px;
  border-radius: 11px 11px 20px 20px;
}

.rank-badge.frame-crown b::after {
  position: absolute;
  top: -9px;
  left: 7px;
  width: 26px;
  height: 12px;
  content: "";
  background: linear-gradient(180deg, var(--rank-accent), var(--rank-accent-2));
  clip-path: polygon(0 100%, 14% 28%, 32% 100%, 50% 0, 68% 100%, 86% 28%, 100% 100%);
}

.rank-badge.large {
  width: 104px;
  height: 72px;
}

.rank-badge.large .rank-wing {
  top: 26px;
  width: 54px;
  height: 21px;
}

.rank-badge.large b {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.rank-badge.large.frame-shield b,
.rank-badge.large.frame-crown b {
  height: 58px;
}

.rank-badge.large em {
  right: 11px;
  bottom: 5px;
  min-width: 24px;
  font-size: 11px;
}

.rank-badge.large .rank-marks {
  top: 6px;
}

.rank-badge.tiny {
  width: 46px;
  height: 32px;
  transform: translateY(2px);
}

.rank-badge.tiny .rank-wing,
.rank-badge.tiny .rank-marks,
.rank-badge.tiny em,
.rank-badge.tiny::after {
  display: none;
}

.rank-badge.tiny b {
  width: 28px;
  height: 28px;
  border-width: 1px;
  border-radius: 8px;
  font-size: 10px;
}

.empty-row {
  height: 240px;
  color: var(--muted);
  text-align: center;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #aeb7b9;
  font-size: 17px;
}

.page-buttons {
  display: flex;
  gap: 7px;
  align-items: center;
}

.page-buttons button {
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #d9e0e2;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}

.page-buttons button.is-active {
  border-color: rgba(255, 161, 30, 0.86);
  color: #ffb033;
  background: rgba(255, 142, 18, 0.14);
}

.detail-panel {
  padding: 8px;
}

.profile-head {
  display: grid;
  grid-template-columns: 54px 1fr 142px;
  gap: 16px;
  align-items: center;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(12, 22, 23, 0.9), rgba(8, 13, 14, 0.96));
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 160, 25, 0.76);
  border-radius: 5px;
  color: #ffc13d;
  background: rgba(255, 145, 16, 0.12);
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 28px;
  font-weight: 800;
}

.profile-title h1 {
  margin: 0 0 9px;
  color: #ffa31d;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 29px;
  line-height: 1.05;
}

.profile-title {
  min-width: 0;
}

.profile-title p {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  color: #d8e0e1;
  font-size: 18px;
  font-weight: 700;
}

#profileSteam {
  overflow-wrap: anywhere;
}

.avatar-frame {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  justify-self: end;
  border: 1px solid rgba(255, 157, 22, 0.64);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 179, 38, 0.35), transparent 35%),
    linear-gradient(135deg, rgba(61, 52, 24, 0.78), rgba(5, 12, 13, 0.96));
}

.avatar-frame .avatar {
  flex-basis: 86px;
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  height: 86px;
  min-height: 86px;
  max-height: 86px;
  font-size: 28px;
}

.avatar-frame .avatar.lambda {
  font-size: 64px;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 8px 0;
}

.profile-tab {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 3px;
  background: rgba(9, 17, 17, 0.86);
  color: #c3cdd0;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.profile-tab.is-active {
  border-color: rgba(255, 160, 27, 0.9);
  color: #ffae21;
  background: rgba(255, 138, 18, 0.13);
}

.profile-panel {
  display: none;
  grid-column: 1 / -1;
}

.profile-panel.is-active {
  display: block;
}

.panel-title {
  margin: 8px 0 10px;
  color: #ff9e18;
  font-size: 19px;
  line-height: 1;
}

.rank-progress {
  display: grid;
  grid-template-columns: 92px 1fr 1fr;
  gap: 12px 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 17, 18, 0.78);
}

.rank-progress span {
  display: block;
  color: #a0a9ab;
  font-size: 16px;
  font-weight: 700;
}

.rank-progress strong {
  display: block;
  margin-top: 4px;
  color: #ffbd3d;
  font-size: 18px;
}

.xp-block {
  grid-column: 2 / 4;
}

.progress-track {
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 17, 18, 0.78);
}

.stat-grid article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 8px;
  padding: 13px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-grid article:nth-child(3n) {
  border-right: 0;
}

.stat-grid article:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.stat-grid span {
  grid-row: span 2;
  color: #d7a239;
  font-size: 21px;
}

.stat-grid p {
  margin: 0;
  color: #9fa8aa;
  font-size: 15px;
  font-weight: 700;
}

.stat-grid strong {
  color: #f2f6f6;
  font-size: 18px;
  line-height: 1.1;
}

.profile-overview,
.login-card,
.progress-focus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.progress-focus {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-overview article,
.login-card article,
.progress-focus article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 17, 18, 0.78);
}

.profile-overview span,
.login-card span,
.progress-focus span {
  display: block;
  color: #9fa8aa;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-overview strong,
.login-card strong,
.progress-focus strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #f2f6f6;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-overview small,
.progress-focus small {
  display: block;
  margin-top: 5px;
  color: #8e999c;
  font-size: 13px;
  font-weight: 700;
}

.weapons-card,
.kills-card,
.progress-card {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 17, 18, 0.78);
}

.weapons-card h2,
.kills-card h2,
.progress-card h2 {
  margin: 0 0 10px;
  color: #ff9e18;
  font-size: 19px;
  line-height: 1;
}

.weapons-card h2 span {
  color: #a5aeb0;
  font-size: 14px;
}

.weapon-row {
  display: grid;
  grid-template-columns: 74px minmax(86px, 1fr) minmax(90px, 185px) 54px 44px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  color: #dce3e4;
  font-size: 16px;
  font-weight: 700;
}

.weapon-row i {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}

.weapon-row strong,
.weapon-row em {
  justify-self: end;
  font-style: normal;
}

.weapon-row em {
  color: #a9b3b5;
}

.kills-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kills-card li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #dce3e4;
  font-size: 16px;
  font-weight: 700;
}

.kills-card li:last-child {
  border-bottom: 0;
}

.kills-card strong {
  color: #ffbc38;
}

.kills-card time {
  color: #9fa8aa;
  font-size: 14px;
}

.rank-timeline {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.rank-timeline article {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(6, 13, 14, 0.68);
}

.rank-timeline article.current {
  border-color: rgba(255, 170, 34, 0.78);
  background: linear-gradient(90deg, rgba(80, 54, 15, 0.9), rgba(9, 17, 18, 0.72));
}

.rank-timeline article.achieved {
  border-color: rgba(138, 169, 128, 0.28);
}

.timeline-level {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 170, 34, 0.55);
  border-radius: 4px;
  color: #ffbd39;
  font-weight: 900;
}

.rank-timeline article > div {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.rank-timeline .rank-badge {
  grid-row: 1 / 4;
}

.rank-timeline strong {
  display: block;
  grid-column: 2;
  color: #f1f5f5;
  font-size: 16px;
}

.rank-timeline small {
  display: block;
  grid-column: 2;
  margin-top: 2px;
  color: #9fa8aa;
  font-weight: 700;
}

.rank-timeline article > div > i {
  display: block;
  grid-column: 2;
  height: 6px;
  margin-top: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
}

.rank-timeline article > div > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8e12, #f0b832);
}

.rank-timeline article > em {
  color: #9fa8aa;
  font-style: normal;
  font-weight: 800;
}

.rank-timeline article.current > em {
  color: #ffbd39;
}

@media (max-width: 1360px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tabs {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
  }

  .server-card {
    min-height: 68px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  table {
    min-width: 0;
    table-layout: fixed;
  }

  th:nth-child(5),
  td:nth-child(5),
  th:nth-child(6),
  td:nth-child(6),
  th:nth-child(7),
  td:nth-child(7),
  th:nth-child(9),
  td:nth-child(9) {
    display: none;
  }

  th,
  td {
    padding-inline: 10px;
    font-size: 18px;
  }

  th:nth-child(1),
  td:nth-child(1) {
    width: 8%;
  }

  th:nth-child(2),
  td:nth-child(2) {
    width: 13%;
  }

  th:nth-child(3),
  td:nth-child(3) {
    width: 35%;
  }

  th:nth-child(4),
  td:nth-child(4) {
    width: 12%;
  }

  th:nth-child(8),
  td:nth-child(8) {
    width: 22%;
  }

  th:nth-child(10),
  td:nth-child(10) {
    width: 10%;
  }

  .weapon-cell {
    gap: 8px;
  }

  .rank-badge {
    width: 68px;
    height: 44px;
  }

  .rank-badge .rank-wing {
    top: 16px;
    width: 34px;
    height: 14px;
  }

  .rank-badge b {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .rank-badge em {
    right: 4px;
    bottom: 1px;
    min-width: 18px;
    font-size: 9px;
  }

  .rank-badge.large {
    width: 94px;
    height: 66px;
  }

  .rank-badge.large .rank-wing {
    top: 24px;
    width: 49px;
    height: 19px;
  }

  .rank-badge.large b {
    width: 48px;
    height: 48px;
    font-size: 15px;
  }

  .player-directory,
  .weapon-board,
  .map-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .profile-head,
  .profile-tabs {
    grid-column: 1 / -1;
  }

  .summary-grid,
  .player-directory,
  .weapon-board,
  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-row {
    grid-template-columns: 44px 54px minmax(100px, 1fr) minmax(100px, 1fr);
  }

  .master-row em {
    grid-column: 3 / -1;
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 20px, 680px);
    padding-top: 10px;
  }

  table {
    min-width: 720px;
    table-layout: auto;
  }

  th,
  td {
    padding-inline: 8px;
    font-size: 17px;
  }

  .brand {
    padding: 12px;
  }

  .lambda-mark {
    width: 50px;
    height: 50px;
    font-size: 36px;
  }

  .brand strong {
    font-size: 22px;
  }

  .brand small {
    font-size: 12px;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .updated {
    justify-self: start;
  }

  .rank-layout {
    gap: 12px;
  }

  .section-panel {
    padding: 12px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head p {
    font-size: 16px;
  }

  .summary-grid,
  .player-directory,
  .weapon-board,
  .map-grid {
    grid-template-columns: 1fr;
  }

  .player-card dl,
  .weapon-card dl,
  .map-card dl {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    display: block;
  }

  .profile-head {
    grid-template-columns: 44px 1fr 84px;
    gap: 10px;
    min-height: 118px;
    padding: 12px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .profile-title h1 {
    font-size: 24px;
  }

  .profile-title p {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
  }

  .avatar-frame {
    width: 78px;
    height: 78px;
  }

  .avatar-frame .avatar {
    width: 56px;
    height: 56px;
    font-size: 18px;
  }

  .avatar-frame .avatar.lambda {
    font-size: 42px;
  }

  .profile-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .rank-progress {
    grid-template-columns: 80px 1fr;
  }

  .xp-block {
    grid-column: 1 / -1;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-overview,
  .login-card,
  .progress-focus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid article:nth-child(3n) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  .stat-grid article:nth-child(2n) {
    border-right: 0;
  }

  .stat-grid article:nth-last-child(-n + 3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .stat-grid article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .weapon-row {
    grid-template-columns: 48px minmax(90px, 1fr) 78px 44px;
  }

  .weapon-row em {
    display: none;
  }

  .kills-card li {
    grid-template-columns: 48px 1fr;
  }

  .kills-card time {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .tab {
    min-width: 0;
    min-height: 50px;
  }

  .server-card {
    font-size: 15px;
  }

  .master-row {
    grid-template-columns: 40px 52px minmax(0, 1fr);
  }

  .master-row span:not(.place) {
    grid-column: 3;
  }

  .master-row em {
    grid-column: 3;
    justify-self: start;
  }

  th,
  td {
    padding: 10px;
  }

  .pager {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .profile-overview,
  .login-card,
  .progress-focus {
    grid-template-columns: 1fr;
  }

  .rank-timeline article {
    grid-template-columns: 36px 1fr;
  }

  .rank-timeline em {
    grid-column: 2;
    justify-self: start;
  }

  .stat-grid article,
  .stat-grid article:nth-child(2n),
  .stat-grid article:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .stat-grid article:last-child {
    border-bottom: 0;
  }
}
