/* =========================================================
   STATUS PAGE
   ========================================================= */

html {
    scroll-snap-type: y proximity;
    scroll-padding-top: 82px;
}

@media (max-width: 700px) {
    html {
        scroll-padding-top: 64px;
    }
}

.status-page {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0;
}


/* =========================================================
   SCREENS
   ========================================================= */

.status-screen {
    min-height: calc(100vh - 82px);
    min-height: calc(100dvh - 82px);

    display: flex;
    flex-direction: column;

    padding: 50px 0 40px;

    box-sizing: border-box;

    scroll-snap-align: start;
}

.status-screen--center {
    justify-content: center;
    padding: 70px 0;
}

.status-screen .server-status {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 40px;
}

@media (max-width: 700px) {
    .status-screen {
        min-height: calc(100vh - 64px);
        min-height: calc(100dvh - 64px);
        padding: 30px 0;
    }

    .status-screen--center {
        padding: 40px 0;
    }
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.status-page__header {
    padding: 0 0 36px;
    border-bottom: 2px solid #111111;
}

.status-page__eyebrow,
.online-players__eyebrow {
    margin-bottom: 14px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #315cff;
}

.status-page__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.status-page__title {
    max-width: 850px;
    margin: 0;
    font-size: clamp(40px, 5.5vw, 76px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.06em;
    color: #111111;
}

.status-page__description {
    max-width: 570px;
    margin: 22px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: #666666;
}

.status-page__updated {
    flex-shrink: 0;
    padding-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999999;
}


/* =========================================================
   SERVER CARDS
   ========================================================= */

.server-status__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-content: start;
}

.server-card {
    display: flex;
    flex-direction: column;

    padding: 28px;

    border: 2px solid #111111;
    background: #ffffff;

    transition: background 0.15s ease;
}

.server-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 28px;
}

/* статус — большая плашка */

.server-card__status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 8px 14px;

    background: #eeeeeb;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #666666;

    transition: background 0.15s ease, color 0.15s ease;
}

.server-card.is-online .server-card__status {
    background: #315cff;
    color: #ffffff;
}

.server-card.is-offline .server-card__status {
    background: #d13c3c;
    color: #ffffff;
}

.server-card__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #999999;
}

.server-card.is-online .server-card__dot,
.server-card.is-offline .server-card__dot {
    background: #ffffff;
}

.server-card__check {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999999;
}


/* название сервера */

.server-card__main {
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 10px 0 28px;
}

.server-card__name {
    margin: 0;
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.055em;
    color: #111111;
}

.server-card__address {
    margin-top: 12px;
    font-family: monospace;
    font-size: 12px;
    color: #777777;
    word-break: break-all;
}


/* игроки */

.server-card__players {
    padding-top: 22px;
    border-top: 2px solid #111111;
}

.server-card__players-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.server-card__players-count strong {
    font-size: clamp(48px, 6vw, 68px);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.06em;
    color: #111111;
}

.server-card__players-total {
    font-size: 18px;
    font-weight: 800;
    color: #999999;
}

.server-card__players-label {
    margin-top: 10px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #777777;
}


/* EMPTY */

.server-status__empty {
    grid-column: 1 / -1;
    padding: 80px 20px;
    text-align: center;
    border: 2px solid #111111;
}

.server-status__empty-title {
    margin-bottom: 8px;
    font-size: 26px;
    font-weight: 900;
    color: #111111;
}

.server-status__empty-text {
    font-size: 12px;
    color: #888888;
}


/* =========================================================
   ONLINE PLAYERS
   ========================================================= */

.online-players {
    border-top: 2px solid #111111;
    padding-top: 50px;
}

.online-players__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.online-players__title {
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.06em;
    color: #111111;
}

.online-players__count {
    font-size: clamp(56px, 9vw, 110px);
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.07em;
    color: #315cff;
}

.online-players__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1px;

    margin-top: 35px;

    border-top: 1px solid #111111;
    border-left: 1px solid #d4d3cf;
}

.online-player {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
    min-height: 64px;
    padding: 10px 13px;

    border-right: 1px solid #d4d3cf;
    border-bottom: 1px solid #d4d3cf;
}

.online-player__avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    overflow: hidden;
}

.online-player__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.online-player__name {
    overflow: hidden;
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111111;
}

.online-player__status {
    margin-top: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #315cff;
}

.online-players__loading {
    grid-column: 1 / -1;
    padding: 35px;
    font-size: 11px;
    color: #999999;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {
    .status-page__heading {
        display: block;
    }

    .status-page__updated {
        margin-top: 16px;
    }

    .server-status__list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .status-page {
        width: calc(100% - 28px);
    }

    .status-page__title {
        font-size: 38px;
    }

    .status-page__description {
        font-size: 13px;
    }

    .server-card {
        padding: 22px;
    }

    .online-players__list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .status-page {
        width: calc(100% - 24px);
    }

    .status-page__title {
        font-size: 34px;
    }

    .server-card__name {
        font-size: 32px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .server-card {
        transition: none;
    }
}