.server-home-overview-hidden {
  display: none !important;
}

.server-details-embedded {
  display: block;
}

.server-details-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.server-details-loading,
.server-details-error {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 22, 37, 0.88);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 36px;
  text-align: center;
}

.server-details-error h2,
.server-details-error p {
  margin: 0;
}

.server-details-error p {
  color: var(--muted);
}

.server-details-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid rgba(96, 165, 250, 0.2);
  border-top-color: var(--blue);
  animation: server-detail-spin 0.8s linear infinite;
}

@keyframes server-detail-spin {
  to { transform: rotate(360deg); }
}

.server-hero-detail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(10, 22, 37, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.server-hero-banner {
  position: relative;
  min-height: 300px;
  overflow: hidden;
}

.server-hero-banner img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.server-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 8, 15, 0.08), rgba(3, 8, 15, 0.9)),
    linear-gradient(90deg, rgba(3, 8, 15, 0.58), transparent 65%);
}

.server-hero-banner .sc-game-tag {
  left: 22px;
  top: 20px;
  right: auto;
  bottom: auto;
}

.server-hero-banner .sc-badge-top {
  right: 22px;
  top: 20px;
}

.server-hero-content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 24px;
}

.server-hero-content h2 {
  margin: 5px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.server-hero-content p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.server-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.server-hero-actions .btn-action,
.server-hero-actions .btn-copy-ip {
  min-height: 42px;
  text-decoration: none;
}

.server-summary-strip {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(4, 12, 22, 0.55);
}

.server-summary-strip > div {
  min-width: 0;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.server-summary-strip > div:last-child {
  border-right: 0;
}

.server-summary-strip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.server-summary-strip strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-detail-section {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 22, 37, 0.9);
}

.server-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.server-detail-heading.compact {
  margin-bottom: 8px;
}

.server-detail-heading h3 {
  margin: 5px 0 0;
  font-size: 24px;
}

.server-detail-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

.server-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.server-config-item {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(111, 148, 191, 0.16);
  border-radius: 14px;
  background: rgba(5, 15, 27, 0.7);
}

.server-config-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.server-config-item strong {
  display: block;
  color: var(--blue);
  font-size: 21px;
  overflow-wrap: anywhere;
}

.online-player-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.online-player-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid rgba(111, 148, 191, 0.16);
  border-radius: 13px;
  background: rgba(5, 15, 27, 0.68);
}

.online-player-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: rgba(37, 99, 235, 0.2);
  color: var(--blue);
  font-weight: 900;
}

.online-player-card strong,
.online-player-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-player-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.online-player-level {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.empty-ranking {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed rgba(111, 148, 191, 0.22);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.leaderboard-panel {
  min-width: 0;
}

.leaderboard-note {
  min-height: 42px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.leaderboard-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(111, 148, 191, 0.14);
  border-radius: 14px;
}

.leaderboard-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(111, 148, 191, 0.12);
  text-align: left;
}

.leaderboard-table th {
  color: var(--muted);
  background: rgba(4, 12, 22, 0.7);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.leaderboard-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.08);
}

.rank-number {
  width: 40px;
  color: var(--muted);
  font-weight: 900;
}

.rank-number.top-1 { color: #facc15; }
.rank-number.top-2 { color: #cbd5e1; }
.rank-number.top-3 { color: #fb923c; }

.rank-name {
  max-width: 220px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.rank-level {
  color: var(--gold);
  font-weight: 900;
}

.rank-time {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .server-config-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .online-player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leaderboard-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 720px) {
  .server-hero-banner,
  .server-hero-banner img {
    min-height: 220px;
    height: 220px;
  }

  .server-hero-content {
    align-items: stretch;
    flex-direction: column;
    padding: 22px 18px 18px;
  }

  .server-hero-actions {
    justify-content: stretch;
  }

  .server-hero-actions > * {
    flex: 1;
    justify-content: center;
  }

  .server-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .server-summary-strip > div {
    border-bottom: 1px solid var(--line);
  }

  .server-summary-strip > div:nth-child(2n) {
    border-right: 0;
  }

  .server-summary-strip > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .server-detail-section {
    padding: 19px 16px;
  }

  .server-detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .server-detail-heading p {
    text-align: left;
  }

  .server-config-grid,
  .online-player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .server-details-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-config-grid,
  .online-player-grid {
    grid-template-columns: 1fr;
  }

  .server-summary-strip {
    grid-template-columns: 1fr;
  }

  .server-summary-strip > div,
  .server-summary-strip > div:nth-child(2n),
  .server-summary-strip > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .server-summary-strip > div:last-child {
    border-bottom: 0;
  }
}
