:root {
  color-scheme: dark;
  --bg: #121317;
  --panel: #20242b;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f2ea;
  --muted: #bfc3c9;
  --red: #f05b55;
  --blue: #4aa7ff;
  --gold: #f0c86a;
  --floor: #282d34;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(240, 91, 85, 0.18), transparent 28%, transparent 72%, rgba(74, 167, 255, 0.16)),
    radial-gradient(circle at center top, rgba(240, 200, 106, 0.14), transparent 34%),
    #121317;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.shell {
  width: min(1120px, 100vw);
  height: min(760px, 100dvh);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 14px;
}

.scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.player-card,
.round,
.help {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 36, 43, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
}

.player-card {
  min-width: 0;
  padding: 10px 12px;
}

.player-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.player-card strong {
  display: block;
  margin: 2px 0 8px;
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1;
}

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

.blue {
  text-align: right;
}

.blue strong {
  color: var(--blue);
}

.health {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.health i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 160ms ease;
}

.round {
  width: min(270px, 31vw);
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  color: var(--gold);
  font-weight: 800;
  text-align: center;
}

#arena {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--floor);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.38);
}

.help {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--muted);
  font-size: 14px;
}

.help b {
  color: var(--text);
}

button {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #171717;
  font-weight: 800;
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .shell {
    min-height: 100dvh;
    height: auto;
  }

  .scoreboard {
    grid-template-columns: 1fr 1fr;
  }

  .round {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 42px;
  }

  #arena {
    min-height: 430px;
  }

  .help {
    grid-template-columns: 1fr;
  }
}
