.servers-body {
  background: var(--carbon-black);
  padding-top: 73px;
}

.servers-shell {
  width: 100%;
  overflow: hidden;
}

.servers-header {
  position: relative;
  padding: clamp(12px, 2vw, 22px) 0 var(--space-lg);
  border-bottom: 1px solid var(--glass-border);
  background: var(--carbon-black);
}

.servers-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
  align-items: end;
  gap: clamp(24px, 4vw, 52px);
}

.servers-hero-copy {
  min-width: 0;
}

.servers-kicker {
  display: inline-flex;
  margin-bottom: var(--space-sm);
  color: var(--primary);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.servers-header h1 {
  margin: 0 0 var(--space-sm);
  color: var(--bright-snow);
  font-size: clamp(34px, 5vw, 50px);
  letter-spacing: 0;
}

.servers-header p {
  max-width: 560px;
  color: rgba(242, 242, 247, 0.78);
  font-size: clamp(15px, 1.5vw, 18px);
}

.servers-hero-metrics {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.servers-hero-metric {
  min-width: 128px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
}

.servers-metric-value {
  display: block;
  color: var(--bright-snow);
  font-size: 22px;
  font-weight: var(--fw-bold);
  line-height: 1;
}

.servers-metric-label {
  display: block;
  margin-top: 6px;
  color: rgba(168, 168, 179, 0.78);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.9px;
  line-height: 1;
  text-transform: uppercase;
}

.servers-actions {
  display: grid;
  grid-template-columns: minmax(176px, auto) minmax(206px, auto);
  align-items: center;
  justify-content: end;
  gap: 12px;
}

.servers-quick-play,
.servers-avatar-action,
.servers-refresh-action,
.server-join-btn {
  position: relative;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: var(--fs-body-md);
  font-weight: var(--fw-bold);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform var(--motion-sm) var(--ease-standard),
    box-shadow var(--motion-sm) var(--ease-standard),
    background var(--motion-sm) var(--ease-standard),
    border-color var(--motion-sm) var(--ease-standard),
    color var(--motion-sm) var(--ease-standard);
}

.servers-quick-play:focus-visible,
.servers-avatar-action:focus-visible,
.servers-refresh-action:focus-visible,
.server-join-btn:focus-visible {
  outline: 2px solid rgba(79, 124, 255, 0.78);
  outline-offset: 3px;
}

.servers-action-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  transition:
    color var(--motion-sm) var(--ease-standard),
    transform var(--motion-sm) var(--ease-standard),
    box-shadow var(--motion-sm) var(--ease-standard);
}

.servers-action-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.servers-action-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.servers-action-label,
.servers-action-sub {
  display: block;
  min-width: 0;
}

.servers-action-sub {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.servers-quick-play {
  min-height: 56px;
  min-width: 206px;
  gap: 10px;
  padding: 0 24px;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--text-dark);
  box-shadow: var(--shadow-soft);
}

.servers-avatar-action {
  min-height: 56px;
  min-width: 176px;
  gap: 10px;
  padding: 0 18px;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 214, 128, 0.22);
  color: var(--bright-snow);
  box-shadow: var(--shadow-soft);
}

.servers-avatar-action .servers-action-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  padding: 5px;
  border-radius: 50%;
  color: #ffe19a;
  background: rgba(255, 214, 128, 0.12);
}

.servers-refresh-action {
  min-height: 36px;
  gap: 7px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.095);
  color: rgba(242, 242, 247, 0.9);
  font-size: var(--fs-body-sm);
}

.servers-refresh-action .servers-action-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  color: rgba(168, 168, 179, 0.9);
}

.servers-quick-play:hover,
.servers-avatar-action:hover,
.servers-refresh-action:hover,
.server-join-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.servers-quick-play:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

.servers-avatar-action:hover {
  border-color: rgba(255, 214, 128, 0.38);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-soft);
}

.servers-avatar-action:hover .servers-action-icon {
  color: #fff0bf;
  transform: scale(1.04);
}

.servers-refresh-action:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--bright-snow);
  box-shadow: var(--shadow-soft);
}

.servers-refresh-action.is-loading,
.servers-refresh-action.is-cooling-down {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--glass-border);
  color: var(--text-light);
}

.servers-refresh-action.is-loading {
  cursor: progress;
}

.servers-refresh-action.is-cooling-down {
  cursor: pointer;
}

.servers-list-section {
  padding: clamp(24px, 4vw, 40px) 0 clamp(54px, 7vw, 84px);
}

.servers-list-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 18px;
}

.servers-list-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.servers-list-top h2 {
  display: block;
  color: var(--bright-snow);
  font-size: clamp(22px, 2.8vw, 30px);
}

.servers-list-top h2::after {
  display: none;
}

.servers-updated {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(168, 168, 179, 0.82);
  font-size: var(--fs-body-sm);
  white-space: nowrap;
}

.servers-list {
  display: grid;
  gap: 12px;
}

.servers-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.servers-pagination[hidden] {
  display: none;
}

.servers-pagination button {
  min-width: 36px;
  min-height: 36px;
  padding: var(--space-xs) var(--space-md);
  background: var(--carbon-mid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--bright-snow);
  transition:
    background var(--motion-sm) var(--ease-standard),
    color var(--motion-sm) var(--ease-standard),
    transform var(--motion-sm) var(--ease-standard),
    border-color var(--motion-sm) var(--ease-standard);
}

.servers-pagination button:hover,
.servers-pagination .active-page {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-dark);
  transform: translateY(-1px);
}

.servers-pagination .pagination-dots {
  display: inline-flex;
  align-items: center;
  color: var(--text-light);
  opacity: 0.72;
}

.server-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(136px, 170px) 128px;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  min-height: 84px;
  padding: 16px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--motion-sm) var(--ease-standard),
    border-color var(--motion-sm) var(--ease-standard),
    background var(--motion-sm) var(--ease-standard),
    box-shadow var(--motion-sm) var(--ease-standard);
}

.server-row:hover {
  transform: translateY(-1px);
  background: rgba(20, 20, 28, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
}

.server-main {
  min-width: 0;
  padding-left: 4px;
}

.server-name-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.server-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #57f29a;
  box-shadow: none;
}

.server-status-dot.full {
  background: #ffbd5a;
  box-shadow: none;
}

.server-name {
  min-width: 0;
  color: var(--bright-snow);
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: var(--fw-bold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px solid rgba(87, 242, 154, 0.22);
  border-radius: 999px;
  background: rgba(87, 242, 154, 0.085);
  color: #9ff7c1;
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.9px;
  line-height: 1;
  text-transform: uppercase;
}

.server-row.is-full .server-status-pill {
  border-color: rgba(255, 189, 90, 0.28);
  background: rgba(255, 189, 90, 0.11);
  color: #ffd28a;
}

.server-members {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: 12px;
  min-width: 0;
}

.server-members-label {
  color: rgba(168, 168, 179, 0.72);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.server-members-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.server-member-avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  background: var(--carbon-mid);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
  transition:
    transform var(--motion-sm) var(--ease-standard),
    border-color var(--motion-sm) var(--ease-standard),
    box-shadow var(--motion-sm) var(--ease-standard);
}

.server-member-avatar:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(79, 124, 255, 0.42);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

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

.server-member-avatar.guest {
  opacity: 0.74;
}

.server-member.empty {
  color: rgba(168, 168, 179, 0.68);
  font-size: var(--fs-body-sm);
  font-style: italic;
}

.server-players {
  display: grid;
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.server-players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.server-players-label {
  color: rgba(168, 168, 179, 0.78);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.server-players-value {
  color: var(--bright-snow);
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 1;
}

.server-capacity {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.095);
}

.server-capacity-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.server-row.is-full .server-capacity-fill {
  background: #ffbd5a;
}

.server-join-btn {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--text-dark);
  box-shadow: var(--shadow-soft);
}

.server-join-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

.server-join-btn.full {
  background: rgba(255, 189, 90, 0.13);
  border: 1px solid rgba(255, 189, 90, 0.32);
  color: #ffd28a;
  box-shadow: none;
  cursor: not-allowed;
}

.server-join-btn.full:hover {
  transform: none;
  box-shadow: none;
}

.servers-empty[hidden] {
  display: none;
}

.servers-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--carbon-mid);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.servers-empty-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 146, 60, 0.10);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 10px;
  color: #fb923c;
}

.servers-empty-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.servers-empty-copy {
  flex: 1;
  min-width: 0;
}

.servers-empty h3 {
  margin: 0 0 4px;
  color: var(--bright-snow);
  font-size: 15px;
  font-weight: var(--fw-bold);
}

.servers-empty p {
  color: #fb923c;
  font-size: 13px;
  margin: 0;
  opacity: 0.85;
}

.servers-empty-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  background: var(--bright-snow);
  border-radius: var(--radius-sm);
  color: #0d0f14;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-bold);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--motion-sm) var(--ease-standard),
    opacity var(--motion-sm) var(--ease-standard);
}

.servers-empty-cta:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

@media (min-width: 1500px) {
  .servers-header-inner {
    grid-template-columns: minmax(0, 1fr) minmax(430px, auto);
  }

  .servers-list {
    gap: 14px;
  }
}

@media (max-width: 980px) {
  .servers-header-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .servers-actions {
    width: 100%;
    grid-template-columns: minmax(176px, auto) minmax(206px, 1fr);
    justify-content: start;
  }

  .server-row {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .server-players {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 720px) {
  .servers-header {
    padding-top: 18px;
  }

  .servers-hero-metric {
    flex: 1 1 140px;
  }

  .servers-actions {
    grid-template-columns: 1fr 1fr;
  }

  .servers-quick-play {
    grid-column: auto;
    order: 0;
  }

  .servers-avatar-action,
  .servers-quick-play {
    width: 100%;
  }

  .servers-list-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-row {
    grid-template-columns: minmax(0, 1fr) minmax(104px, 32vw);
    align-items: start;
    gap: 14px;
    padding: 15px;
  }

  .server-players {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .server-join-btn {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-height: 50px;
  }

  .server-main {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .servers-header .container,
  .servers-list-section .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .servers-actions {
    grid-template-columns: 1fr;
  }

  .servers-avatar-action,
  .servers-quick-play {
    min-width: 0;
    width: 100%;
  }

  .servers-list-meta {
    width: 100%;
    justify-content: space-between;
  }

  .servers-refresh-action {
    min-height: 34px;
  }

  .server-name-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .server-status-dot {
    margin-top: 6px;
  }

  .server-name {
    flex: 1 1 calc(100% - 24px);
  }

  .server-status-pill {
    margin-left: 19px;
  }

  .server-members {
    align-items: center;
    flex-direction: row;
    gap: var(--space-xs);
  }

  .server-players-head {
    align-items: baseline;
  }
}

@media (max-width: 768px) {
  .servers-body {
    padding-top: 61px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .servers-quick-play,
  .servers-avatar-action,
  .servers-refresh-action,
  .server-row,
  .server-join-btn,
  .server-member-avatar,
  .servers-pagination button {
    transition-duration: 1ms;
  }

}
