/* Shared theme and base elements. */
:root {
  color-scheme: dark;
  --bg: #101318;
  --panel: #181c23;
  --line: #2c313b;
  --text: #f0f1ec;
  --muted: #989faa;
  --cyan: #9bf5d1;
  --orange: #ffb377;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
button,
select {
  font: inherit;
}
button,
a,
select,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}
header,
main,
footer {
  max-width: 1120px;
  margin: auto;
}
header {
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  font-size: 20px;
}
.brand > span:last-child {
  color: var(--cyan);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--cyan);
  color: var(--bg);
  width: 34px;
  height: 34px;
  margin-right: 12px;
  transform: skew(-7deg);
  font-size: 24px;
}
.tag,
.eyebrow,
.edition,
.number,
.match-info,
.player > span,
.court-footer,
.touch-controls span,
footer {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}
.tag {
  color: var(--muted);
}
.dot,
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-left: 12px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 50px 0 32px;
}
.eyebrow {
  color: var(--cyan);
}
h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -2.5px;
  margin: 14px 0;
}
h1 em {
  color: var(--cyan);
  font-style: normal;
}
.subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}
.edition {
  color: var(--muted);
  text-align: right;
  line-height: 2;
}
.edition b {
  color: var(--text);
  font-size: 9px;
}
.arcade {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 20px 70px #0003;
} /* Scores and match status above the court. */
.scoreboard {
  padding: 20px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.player {
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 16px;
  align-items: center;
  min-width: 150px;
}
.player > span {
  grid-column: 1/-1;
  color: var(--cyan);
}
.player strong {
  font-size: 34px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.player small {
  color: var(--muted);
  font-size: 11px;
}
.player.right {
  text-align: right;
}
.player.right > span {
  color: var(--orange);
}
.match-info {
  text-align: center;
  color: var(--muted);
  line-height: 2;
}
.match-info small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.2px;
}
.live-dot {
  margin: 0 6px 0 0;
} /* Canvas and the setup/pause overlays. */
.court {
  position: relative;
  background: #0c1014;
  margin: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
canvas {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 8/5;
  touch-action: none;
}
.overlay {
  position: absolute;
  inset: 0;
  background: #0c1014dd;
  display: grid;
  place-items: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.overlay[hidden] {
  display: none;
}
.overlay-card {
  width: min(360px, 100%);
  text-align: center;
}
h2 {
  font-size: 38px;
  letter-spacing: -1.5px;
  margin: 12px 0;
}
.overlay-card > p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
  margin: 0 0 24px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
legend {
  font-size: 11px;
  color: var(--muted);
  margin: 0 auto 10px;
}
.mode-picker {
  display: flex;
  gap: 8px;
}
.mode-picker button {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  padding: 12px 6px;
  font-size: 11px;
}
.mode-picker button span {
  display: inline-block;
  margin-left: 5px;
  font-size: 12px;
  font-weight: bold;
  color: var(--text);
}
.mode-picker button[aria-pressed='true'] {
  border-color: var(--cyan);
  background: #9bf5d112;
  color: var(--cyan);
}
.difficulty-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: 7px 10px;
}
.primary {
  background: var(--cyan);
  border: 0;
  border-radius: 5px;
  color: #10231c;
  width: 100%;
  padding: 15px;
  font-size: 11px;
  letter-spacing: 1.4px;
  font-weight: 900;
}
.primary:hover {
  background: #bdfbe2;
}
.primary span {
  float: right;
  font-size: 16px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
  padding: 8px;
}
.court-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 24px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1px;
}
kbd {
  display: inline-block;
  border: 1px solid #444b57;
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 3px 5px;
  font-size: 9px;
  letter-spacing: 0;
  font-family: inherit;
  color: #d7dbe0;
  margin-right: 2px;
}
.control-label {
  margin-left: 4px;
}
.control-divider {
  margin: 0 14px;
  color: #4b5360;
}
#pause {
  border: 0;
  background: none;
  color: var(--text);
  font-size: 11px;
}
#pause kbd {
  margin-left: 8px;
}
.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  margin: 38px 0;
}
.number {
  color: var(--muted);
  font-size: 9px;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 12px 0;
}
.details p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.powerup-guide {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.powerup-guide summary {
  padding: 18px 0;
  cursor: pointer;
  font-size: 12px;
  list-style: none;
}
.powerup-guide summary span {
  float: right;
  color: var(--cyan);
}
#powerup-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-bottom: 20px;
}
#powerup-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
#powerup-list img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.5px;
  padding: 0 0 24px;
}
.muted {
  color: #4b5360;
  margin: 0 5px;
} /* Pointer-specific controls and responsive layouts. */
.touch-controls {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1180px) {
  header,
  main,
  footer {
    margin-left: 24px;
    margin-right: 24px;
  }
}
@media (pointer: coarse) {
  .touch-controls {
    display: flex;
    justify-content: space-between;
    padding: 0 20px 18px;
    gap: 12px;
  }
  .touch-controls > div {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .touch-controls span {
    font-size: 8px;
    color: var(--muted);
  }
  .touch-controls button {
    width: 44px;
    height: 44px;
    background: #242b34;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    touch-action: none;
  }
}
@media (max-width: 640px) {
  header,
  main,
  footer {
    margin-left: 14px;
    margin-right: 14px;
  }
  header {
    padding: 20px 0;
  }
  .tag,
  .edition {
    display: none;
  }
  .intro {
    margin: 30px 0 24px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  h1 {
    letter-spacing: -1.5px;
  }
  .scoreboard {
    padding: 14px 18px;
  }
  .player {
    min-width: 85px;
    gap: 4px 8px;
  }
  .player strong {
    font-size: 26px;
  }
  .player > span {
    font-size: 8px;
  }
  .player small {
    font-size: 9px;
  }
  .match-info {
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .match-info small {
    font-size: 6px;
  }
  .court {
    margin: 0 8px;
  }
  canvas {
    aspect-ratio: 4/5;
    min-height: 400px;
  }
  .overlay {
    padding: 16px;
  }
  h2 {
    font-size: 30px;
  }
  .overlay-card > p {
    font-size: 12px;
    margin-bottom: 16px;
  }
  .court-footer {
    padding: 14px 12px;
  }
  .control-label,
  .control-divider {
    display: none;
  }
  .details {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 28px 4px;
  }
  #powerup-list {
    grid-template-columns: repeat(2, 1fr);
  }
  footer {
    display: block;
    line-height: 2;
  }
  footer > span {
    display: block;
  }
}

.arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}
.arrow.up {
  border-bottom: 8px solid var(--text);
}
.arrow.down {
  border-top: 8px solid var(--text);
}

/* Invite controls for online rooms. */
.room-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 24px 16px;
}
.room-bar > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.room-bar span {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
}
.room-bar strong {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--cyan);
}
.room-bar small {
  font-size: 10px;
  color: var(--muted);
}
.invite {
  display: flex;
  gap: 6px;
  align-items: center;
}
.invite input,
.join-room input {
  background: #101318;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: 9px;
  min-width: 0;
  font: inherit;
  font-size: 11px;
}
.invite input {
  width: 170px;
}
.invite button,
.join-room button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--cyan);
  border-radius: 4px;
  padding: 9px;
  font-size: 11px;
  white-space: nowrap;
}
.join-room {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.join-room input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.online-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 14px 0 0;
}
#connection-error {
  color: var(--orange);
  font-size: 12px;
  line-height: 1.5;
}
.mode-picker button span {
  white-space: nowrap;
}
.difficulty-label[hidden] {
  display: none;
}
.waiting-button {
  opacity: 0.5;
}
@media (max-width: 760px) {
  .room-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 18px 14px;
  }
  .invite {
    width: 100%;
  }
  .invite input {
    flex: 1;
    width: 0;
  }
}
@media (max-width: 640px) {
  .mode-picker button {
    font-size: 9px;
  }
  .mode-picker button span {
    font-size: 11px;
    margin-left: 3px;
  }
  .overlay-card > p {
    margin-bottom: 12px;
  }
  .mode-picker {
    gap: 5px;
  }
}
