:root {
  --ink: #2b2b2b;
  --muted: #6c7580;
  --paper: #f7f8fa;
  --panel: #ffffff;
  --sim-blue: #1098ec;
  --sim-blue-dark: #0878c4;
  --sim-orange: #ff8a00;
  --sim-orange-dark: #ec7200;
  --bar: #3c3c3c;
  --line: rgba(43, 43, 43, 0.14);
  --shadow: 0 16px 36px rgba(28, 55, 78, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding: 6px clamp(8px, 2.6vw, 34px);
  color: white;
  background: linear-gradient(#555, #2d2d2d);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
}

.home-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-chip span:first-child {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #dddddd;
  font-size: 1.35rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links a {
  opacity: 0.86;
}

.nav-links a:hover {
  color: var(--sim-orange);
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
}

.lang-button {
  min-width: 38px;
  height: 30px;
  color: white;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.lang-button.active {
  color: white;
  background: var(--sim-blue);
}

.telegram-link,
.button.primary {
  color: white;
  background: linear-gradient(var(--sim-orange), var(--sim-orange-dark));
  border: 1px solid #ff9f27;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 15px;
  border-radius: 5px;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: center;
  padding: 82px clamp(18px, 6vw, 76px) 44px;
  overflow: hidden;
  color: white;
  background: #0d4da8;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 42, 68, 0.9), rgba(16, 74, 122, 0.68) 48%, rgba(16, 74, 122, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.32), transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sim-orange);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.15rem, 12vw, 8.2rem);
  line-height: 0.9;
  text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.38);
}

#hero-title {
  font-size: clamp(3.15rem, 10vw, 7rem);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

#members-title {
  font-size: clamp(3.15rem, 10vw, 7rem);
}

h2 {
  margin: 0;
  color: var(--sim-blue);
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
}

h3 {
  margin: 0 0 10px;
  color: #1e6098;
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 640px;
  margin: 24px 0 0;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  line-height: 1.55;
}

.tag-card {
  display: inline-grid;
  gap: 3px;
  margin-top: 20px;
  padding: 12px 18px;
  color: var(--ink);
  background: white;
  border: 3px solid var(--sim-blue);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--sim-orange);
}

.tag-card span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tag-card strong {
  font-size: clamp(1.35rem, 4vw, 2.2rem);
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 7px;
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button-icon {
  width: 1.2em;
  height: 1.2em;
  flex: 0 0 auto;
  fill: currentColor;
}

.button:hover,
.telegram-link:hover {
  transform: translateY(-1px);
}

.button.secondary {
  color: white;
  background: linear-gradient(var(--sim-blue), var(--sim-blue-dark));
  border: 1px solid #48b5f4;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #d7dde3;
  border-top: 1px solid white;
  border-bottom: 1px solid #c7d0da;
}

.stats-band div {
  padding: 28px clamp(18px, 4vw, 44px);
  color: var(--ink);
  background: white;
}

.stats-band strong {
  display: block;
  color: var(--sim-orange);
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
}

.stats-band span {
  display: block;
  margin-top: 8px;
  color: var(--sim-blue-dark);
  font-weight: 800;
}

.stats-band .stat-value {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 0;
  color: inherit;
  font-weight: 400;
  vertical-align: top;
}

.stats-band .stat-delta {
  display: inline-block;
  margin-top: 0.14em;
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  font-weight: 400;
  line-height: 1;
}

.stats-band .stat-delta[hidden] {
  display: none;
}

.stats-band .stat-delta.positive {
  color: #188a45;
}

.stats-band .stat-delta.negative {
  color: #c4322d;
}

.section,
.join-section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 7vw, 88px) 0;
}

.section-heading {
  max-width: 690px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow),
.join-section p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 36px;
  margin-bottom: 22px;
  color: white;
  background: linear-gradient(var(--sim-blue), var(--sim-blue-dark));
  border-radius: 5px;
  font-weight: 900;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.event-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.event-strip article {
  min-height: 210px;
  padding: 24px;
  color: white;
  background: linear-gradient(145deg, #3b3b3b, #1f6da8);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.event-mark {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 28px;
  color: white;
  background: linear-gradient(var(--sim-orange), var(--sim-orange-dark));
  border-radius: 7px;
  font-weight: 900;
}

.event-strip h3 {
  color: white;
}

.event-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.join-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 36px;
  padding: 34px;
  color: white;
  background: linear-gradient(135deg, #3a3a3a, #176aa6);
  border: 4px solid var(--sim-orange);
  border-radius: 7px;
  box-shadow: 9px 9px 0 rgba(16, 152, 236, 0.42);
}

.join-section h2 {
  color: white;
}

.join-section .eyebrow,
.join-section p {
  color: rgba(255, 255, 255, 0.85);
}

.members-panel {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 6vw, 72px) 0;
}

.members-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.members-updated {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.members-table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.members-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.members-table th,
.members-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.members-table th {
  padding-block: 10px;
  color: var(--sim-blue-dark);
  background: #f3f8fc;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.members-table tr:last-child td {
  border-bottom: 0;
}

.member-place {
  width: 58px;
  color: var(--muted);
  font-weight: 900;
}

.member-name-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}

.member-name-cell strong,
.member-name-cell span {
  display: block;
}

.member-name-cell strong {
  color: var(--ink);
  font-size: 1rem;
}

.member-name-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.member-name-cell .club-role {
  color: var(--muted);
  font-weight: 500;
}

.member-name-cell .club-role-strong {
  font-weight: 950;
  letter-spacing: 0;
}

.member-name-cell .club-role-silver {
  color: #8a96a6;
}

.member-name-cell .club-role-gold {
  color: #d89016;
}

.member-name-cell .club-role-diamond {
  color: #1098ec;
}

.member-name-cell .club-role-mythic {
  color: #b035e6;
}

.member-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding-top: 16px;
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  color: white;
  overflow: hidden;
  background: linear-gradient(var(--sim-blue), var(--sim-blue-dark));
  border-radius: 7px;
  font-weight: 900;
}

.member-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar-fallback {
  background: linear-gradient(var(--sim-blue), var(--sim-blue-dark));
}

.member-avatar-rank {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 30px;
  height: 30px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.72))
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.member-trophies {
  color: var(--sim-orange-dark);
  font-size: 1.08rem;
  font-weight: 900;
}

.member-prestige {
  color: var(--sim-blue-dark);
  font-size: 1rem;
  font-weight: 900;
}

.prestige-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 76px;
  color: var(--sim-blue-dark);
  font-size: 1rem;
  font-weight: 900;
}

.prestige-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.18));
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 86px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: none;
}

.rank-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.22));
}

.rank-badge span,
.rank-badge small {
  display: block;
}

.member-metric-value,
.rank-badge .member-metric-value {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  white-space: nowrap;
}

.member-delta {
  margin-top: 0.08em;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1;
}

.member-delta.positive {
  color: #188a45;
}

.member-delta.negative {
  color: #c4322d;
}

.rank-badge small {
  color: var(--muted);
  font-size: 0.68rem;
}

.rank-bronze {
  color: #9f5a31;
}

.rank-silver {
  color: #7f8a96;
}

.rank-gold {
  color: #c78313;
}

.rank-diamond {
  color: #1178c9;
}

.rank-mythic {
  color: #8a2be2;
}

.rank-legendary {
  color: #db342e;
}

.rank-masters {
  color: #1b1b1b;
}

.rank-pro {
  color: #2d2d2d;
}

.rank-unranked {
  color: #58606a;
}

.members-empty {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(#4b4b4b, #2d2d2d);
  font-size: 0.92rem;
}

.site-footer span:first-child {
  color: white;
  font-weight: 900;
}

@media (max-width: 940px) {
  .topbar {
    position: absolute;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    align-items: center;
    gap: 8px 12px;
    padding: 6px 12px 8px;
  }

  .home-chip {
    grid-area: brand;
  }

  .header-actions {
    grid-area: actions;
    justify-self: end;
  }

  .nav-links {
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
  }

  .nav-links a {
    display: grid;
    place-items: center;
    min-height: 36px;
    padding: 0 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.14);
    text-align: center;
  }

  .nav-links a[aria-current="page"] {
    color: white;
    background: var(--sim-blue);
    border-color: rgba(255, 255, 255, 0.34);
  }

  .hero {
    min-height: 80vh;
    padding: 118px 18px 38px;
  }

}

@media (max-width: 820px) {
  .hero-art {
    object-position: 70% center;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(16, 42, 68, 0.9), rgba(16, 74, 122, 0.54) 64%, rgba(16, 74, 122, 0.24)),
      linear-gradient(0deg, rgba(0, 0, 0, 0.28), transparent 42%);
  }

  .stats-band,
  .rule-grid,
  .split,
  .event-strip,
  .join-section {
    grid-template-columns: 1fr;
  }

  .join-section {
    padding: 26px;
  }

  .join-section .button {
    width: 100%;
  }

  .members-panel-head {
    display: block;
  }

  .members-updated {
    display: block;
    margin-top: 12px;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: 520px;
    padding-top: 112px;
  }

  .hero-art {
    object-position: 76% center;
  }

  .members-panel {
    width: min(100% - 24px, 520px);
    padding: 28px 0 42px;
  }

  .members-panel-head h2 {
    font-size: clamp(1.85rem, 9vw, 2.55rem);
  }

  .members-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .members-table,
  .members-table tbody,
  .members-table tr,
  .members-table td {
    display: block;
    width: 100%;
  }

  .members-table {
    min-width: 0;
  }

  .members-table thead {
    display: none;
  }

  .members-table tr {
    position: relative;
    padding: 10px 12px 12px 58px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: 0 10px 24px rgba(31, 50, 74, 0.08);
  }

  .members-table tr + tr {
    margin-top: 10px;
  }

  .members-table td {
    padding: 0;
    border-bottom: 0;
  }

  .members-table td:first-child {
    position: absolute;
    top: 14px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--sim-blue-dark);
    background: #eef6fb;
    border: 1px solid #d6e7f2;
    border-radius: 50%;
    font-size: 0.82rem;
  }

  .members-table td:nth-child(2) {
    margin-bottom: 10px;
  }

  .member-name-cell {
    gap: 12px;
    align-items: center;
  }

  .member-name-cell strong {
    font-size: 1.05rem;
    overflow-wrap: anywhere;
  }

  .members-table td:not(:first-child)[data-label] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 34px;
    padding: 7px 0;
    border-top: 1px solid rgba(218, 229, 237, 0.82);
  }

  .members-table td:not(:first-child)[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .members-table .member-place::before {
    content: none;
  }

  .members-table td.members-empty {
    position: static;
    width: auto;
    height: auto;
    display: block;
    padding: 18px;
    color: var(--muted);
    background: white;
    border: 0;
    border-radius: 7px;
    text-align: center;
  }

  .rank-badge {
    justify-content: flex-end;
    min-width: 0;
  }

  .prestige-badge {
    justify-content: flex-end;
    min-width: 0;
  }

  .prestige-icon {
    width: 30px;
    height: 30px;
  }

  .member-prestige,
  .member-trophies {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .nav-links {
    font-size: 0.78rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .card,
  .event-strip article {
    padding: 20px;
  }
}
