/* DarkStar Status Page Custom Layer */
@font-face {
  font-family: 'MegaSans';
  src: url('/custom/fonts/MegaSans-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'MegaSans';
  src: url('/custom/fonts/MegaSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'MegaSans';
  src: url('/custom/fonts/MegaSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'MegaSans';
  src: url('/custom/fonts/MegaSans-Bold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'MegaSans';
  src: url('/custom/fonts/MegaSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --nodata: #2b313d;
}
html.ds-light {
  --nodata: #dce3ec;
}

body, button, input {
  font-family: 'MegaSans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Wider container so desktop rows never truncate or wrap awkwardly */
.wrap {
  max-width: 1020px !important;
}

/* Keep top status badge & RU/EN switcher aligned on the right of the header */
.top {
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 16px !important;
}
.top > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
  align-items: flex-start !important;
}
.top > div:first-child > div:first-child {
  flex: none;
  margin-top: 2px;
}
#title {
  letter-spacing: -0.01em;
}
#subtitle {
  max-width: 590px;
  line-height: 1.45;
}
.top > div:last-child {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* RU / EN language switcher pill */
.ds-lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.ds-lang-btn {
  border: none;
  background: transparent;
  color: var(--tx2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ds-lang-btn:hover {
  color: var(--tx);
}
.ds-lang-btn.active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--tx);
}
html.ds-light .ds-lang-btn.active {
  background: rgba(15, 23, 42, 0.09);
}

/* Wider label column so long location names never truncate on desktop */
.label {
  width: 260px !important;
}

/* Prevent right-side meta column (ping / 30d / 2/2 nodes) from wrapping onto 2 lines */
.wrap svg + div {
  width: 180px !important;
  flex: none !important;
  white-space: nowrap;
}
.wrap svg + div .s {
  white-space: nowrap;
}

/* Crisp SVG Gaming pill badge (replaces low-contrast gamepad emoji) */
.ds-game-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  vertical-align: middle;
  flex: none;
}
html.ds-light .ds-game-badge {
  color: #334155;
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}
.ds-game-badge svg {
  width: 13px;
  height: 13px;
  flex: none;
  stroke: currentColor;
  fill: none;
}

/* Ensure .name allows badge without clipping */
.name {
  min-width: 0;
}
.name > span:last-child {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.ds-srv-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tablet wrap for header */
@media (max-width: 780px) {
  .top {
    flex-wrap: wrap !important;
  }
  .label {
    width: 220px !important;
  }
  .wrap svg + div {
    width: 155px !important;
  }
}

/* Mobile polish: fix orphaned 3rd KPI card & responsive rows */
@media (max-width: 560px) {
  .stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .stats > div:last-child {
    grid-column: 1 / -1;
  }
  .label {
    width: auto !important;
    flex: 1 1 auto !important;
  }
  .wrap svg + div {
    width: auto !important;
    white-space: normal;
  }
  .wrap svg + div .s {
    white-space: nowrap;
  }
}

/* Wider desktop container & label so Великобритания [Игровой] never truncates */
.wrap {
  max-width: 1050px !important;
}
.label {
  width: 290px !important;
}

@media (max-width: 780px) {
  .label {
    width: 240px !important;
  }
}

/* Crisp 3-row mobile card grid (name+chevron / uptime+meta / bars) */
@media (max-width: 560px) {
  .ds-row-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px 10px !important;
  }
  .ds-row-head > .label {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: auto !important;
  }
  .ds-row-head > svg + div + div {
    grid-column: 2 !important;
    grid-row: 1 !important;
    order: unset !important;
    margin-left: 0 !important;
  }
  .ds-row-head > svg + div {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: auto !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 8px !important;
    text-align: left !important;
  }
  .ds-row-head > svg {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    order: unset !important;
    width: 100% !important;
    height: 24px !important;
  }
}
