*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; min-height: 100vh; font-family: 'Bitcount Grid Single', sans-serif; }
body { background: #1b212b; }

/* ── Layout ── */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ── Main panel ── */
.container {
    background: #141a22;
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    text-align: center;
    width: 90%;
    max-width: 460px;
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3rem);
}

.container h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.75rem;
}

/* ── Refresh button ── */
.refresh-wrap {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.9rem;
}
.refresh-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.45);
    font-family: 'Bitcount Grid Single', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.refresh-btn:hover   { color: #fff; border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.1); }
.refresh-btn:disabled { opacity: 0.4; cursor: default; }
.refresh-btn.spinning svg { animation: spin 0.55s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Server cards ── */
.server-cards { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.75rem; }

.server-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.2rem 1.4rem;
    text-align: left;
}

/* card header row */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
}
.card-ip {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.38);
    letter-spacing: 0.03em;
}

/* status badge */
.badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.28rem 0.7rem;
    white-space: nowrap;
}
.badge.loading { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); }

.badge.online  { color: #5edfab; }

.badge.offline { color: #ff8a80; }

.badge.error   { background: rgba(243,156,18,0.22); color: #ffd580; }

/* player count row */
.player-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.player-label {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    font-weight: 700;
}
.player-count {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

/* ── Nav buttons ── */
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}
.nav-button {
    flex: 1 1 100px;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255,255,255,0.45);
    text-decoration: none;
    color: #fff;
    font-family: 'Bitcount Grid Single', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}
.nav-button:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
}

footer { font-size: 0.78rem; color: rgba(255,255,255,0.35); }