* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0f14;
  color: #f3f7fb;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(62, 142, 65, 0.16), transparent 36rem),
    #0b0f14;
}
button { font: inherit; }
.page {
  width: min(1050px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 36px;
}
.hero { margin-bottom: 28px; }
.eyebrow {
  margin: 0 0 8px;
  color: #65d46e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}
.subtitle { margin: 14px 0 0; color: #9aa7b4; font-size: 1.05rem; }
.server-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.server-card {
  overflow: hidden;
  border: 1px solid #26313c;
  border-radius: 18px;
  background: rgba(18, 24, 31, 0.94);
}
.server-summary {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.server-summary:hover { background: rgba(255,255,255,.025); }
.server-icon-wrap { position: relative; width: 64px; height: 64px; }
.server-icon {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg,#416f3c,#273c25);
  color: #e7f4e4;
  font-weight: 900;
}
.status-dot {
  position: absolute; right: -3px; bottom: -3px;
  width: 17px; height: 17px;
  border: 3px solid #12181f; border-radius: 50%;
  background: #697887;
}
.server-main { min-width: 0; }
.server-title-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.server-name { margin:0; font-size:1.18rem; }
.status-label {
  padding:4px 8px; border-radius:999px;
  background:#27313b; color:#b7c2cd;
  font-size:.72rem; font-weight:800; text-transform:uppercase;
}
.server-motd {
  overflow:hidden;
  margin:5px 0 0;
  color:#c4ced8;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.88rem;
}
.player-count { min-width:70px; text-align:right; }
.player-count strong { font-size:1.65rem; }
.player-count .max-count,.player-count small { color:#82909d; }
.player-count small { display:block; margin-top:2px; }
.server-card.online .status-dot { background:#4dde68; box-shadow:0 0 0 4px rgba(77,222,104,.12); }
.server-card.online .status-label { background:rgba(77,222,104,.11); color:#7ff192; }
.server-card.offline .status-dot { background:#f45e5e; }
.server-card.offline .status-label { background:rgba(244,94,94,.11); color:#ff8585; }
.details { padding:0 20px 20px; border-top:1px solid #26313c; }
.details-row {
  display:flex; justify-content:space-between; gap:16px;
  padding:14px 0; color:#98a6b3; font-size:.9rem;
}
.details-row + .details-row { border-top:1px solid #202a34; }
.details-row strong { color:#e4ebf1; }
.players-section h3 { margin:14px 0 10px; font-size:.92rem; }
.player-list { display:flex; flex-wrap:wrap; gap:10px; }
.player {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:1px solid #2d3945;
  border-radius:10px;
  background:#171e26;
  color:#dce5ed;
  font-size:.86rem;
}
.player-avatar {
  width:28px;
  height:28px;
  border-radius:5px;
  background:#26313c;
  image-rendering:pixelated;
  flex:none;
}
.empty { color:#82909d; font-size:.88rem; }
.footer {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  margin-top:22px; color:#778592; font-size:.82rem;
}
#refreshButton {
  min-height:42px; padding:0 15px; border:1px solid #2f3b46;
  border-radius:10px; background:#151c23; color:#eaf1f6; cursor:pointer;
}
#refreshButton:hover { background:#1c252e; }
#refreshButton:disabled { opacity:.55; cursor:wait; }
@media (max-width:760px) {
  .page { width:min(100% - 22px,650px); padding-top:38px; }
  .server-grid { grid-template-columns:1fr; }
  .server-summary { grid-template-columns:auto minmax(0,1fr); }
  .player-count { grid-column:2; text-align:left; }
}
