:root {
  color-scheme: dark;
  --bg: #080604;
  --panel: #15100b;
  --panel-2: #21170d;
  --text: #f2d18a;
  --muted: #9f7c48;
  --dim: #5f472a;
  --line: #6d3d18;
  --hot: #ff9f2e;
  --red: #d34a24;
  --green: #8ec46a;
  --shadow: rgba(255, 119, 20, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 184, 78, 0.035), rgba(255, 184, 78, 0.035) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 50% 12%, rgba(142, 70, 18, 0.24), transparent 42%),
    linear-gradient(180deg, #0f0a06 0%, var(--bg) 48%, #030201 100%);
  color: var(--text);
}

.shell {
  width: min(980px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 24px 0;
}

.scoreboard {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 154, 54, 0.08), transparent 18%),
    linear-gradient(90deg, rgba(255, 127, 36, 0.08), transparent 22%, transparent 78%, rgba(255, 127, 36, 0.06)),
    var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 173, 67, 0.08), 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 42px var(--shadow);
  overflow: hidden;
}

.titlebar {
  padding: 14px 18px 0;
  color: var(--hot);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.scoreboard__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px 18px;
}

h1 {
  margin: 0;
  color: #ffd58d;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255, 136, 38, 0.22);
  overflow-wrap: anywhere;
}

p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.meter {
  min-width: 126px;
  text-align: right;
  color: var(--hot);
  font-weight: 800;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 0.88;
}

.meter small {
  color: var(--dim);
  font-size: 0.36em;
  margin-left: 2px;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), var(--hot), var(--line), transparent);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: rgba(109, 61, 24, 0.35);
}

.info-grid div {
  min-width: 0;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.16);
}

.info-grid dt,
.info-grid dd {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-grid dt {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
}

.info-grid dd {
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(109, 61, 24, 0.55);
  text-align: right;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  color: var(--hot);
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

th:nth-child(2),
td:nth-child(2) {
  text-align: left;
  width: 48%;
}

.rank {
  width: 54px;
  color: var(--dim);
}

tbody tr:nth-child(odd) {
  background: rgba(255, 161, 54, 0.035);
}

tbody tr.leader {
  background: linear-gradient(90deg, rgba(211, 74, 36, 0.22), rgba(255, 159, 46, 0.06));
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 38px 16px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
  text-transform: uppercase;
}

.online {
  color: var(--green);
}

.offline {
  color: var(--red);
}

@media (max-width: 620px) {
  .titlebar {
    font-size: 12px;
  }

  .scoreboard__header {
    flex-direction: column;
    gap: 12px;
    padding: 18px 14px 14px;
  }

  .meter {
    min-width: 0;
    text-align: left;
    font-size: 40px;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 13px;
  }

  th:nth-child(4),
  td:nth-child(4),
  th:nth-child(5),
  td:nth-child(5) {
    display: none;
  }

  footer {
    flex-direction: column;
    gap: 6px;
  }
}
