:root {
  color-scheme: dark;
  --bg: #10151f;
  --panel: #172031;
  --panel-2: #111a29;
  --field: #194a3b;
  --text: #edf4ff;
  --muted: #9fb0c7;
  --blue: #45a3ff;
  --red: #ff5c6c;
  --gold: #ffd166;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body.hub-active {
  background: #08111d;
}

body.hub-active::before,
body.hub-active::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.hub-active::before {
  z-index: -2;
  background: #08111d;
}

body.hub-active::after {
  z-index: -1;
  background: radial-gradient(circle at 50% 18%, rgba(55, 232, 255, 0.12), transparent 36%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: #ecf3ff;
  color: #111827;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: #ffffff;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 11px 12px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 52px);
}

h2 {
  font-size: 22px;
}

.app-shell {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 22px 0 28px;
}

.app-shell.hub-mode {
  min-height: 100vh;
  width: 100vw;
  padding: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.app-shell.login-mode {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panel {
  background: rgba(23, 32, 49, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 16px;
}

.hub-mode .hero {
  display: none;
}

.game-mode .hero {
  display: none;
}

.app-shell.game-mode {
  width: min(1120px, calc(100vw - 16px));
  padding: 8px 0 14px;
}

.app-shell.game-mode .game-view {
  margin-top: 0;
}

.app-shell.game-mode #gameCanvas {
  max-height: calc(100vh - 138px);
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: center;
  min-height: min(680px, calc(100vh - 120px));
}

.login-copy {
  max-width: 620px;
}

.login-copy h2 {
  max-width: 520px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
}

.login-copy p {
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.trust-list span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 11px;
  font-size: 13px;
}

.login-card {
  padding: 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
}

.login-card input,
.login-card button {
  width: 100%;
}

.login-card button {
  margin-top: 10px;
}

.login-card .fineprint {
  margin-bottom: 0;
}

.fineprint {
  color: var(--muted);
  line-height: 1.45;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.ghost-button,
.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.ghost-button:hover,
.secondary-button:hover {
  background: rgba(255, 255, 255, 0.13);
}

.lobby-layout {
  display: block;
  width: min(100vw, calc(100vh * 1.8713));
  aspect-ratio: 1716 / 917;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: url("assets/lobby-background.png") center center / contain no-repeat;
}

.hub-title {
  position: absolute;
  left: 29.6%;
  top: 3.7%;
  width: 42.2%;
  height: 12.2%;
  display: grid;
  place-items: center;
  padding-top: 0;
}

.hub-title h2 {
  color: #06232c;
  font-size: clamp(18px, 3.25vw, 48px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 18px rgba(124, 244, 255, 0.85);
}

.hub-mode .panel {
  min-height: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.hub-mode .profile-panel {
  position: absolute;
  left: 9.5%;
  top: 29%;
  width: 17.3%;
  height: 56.8%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-mode .matches-panel {
  position: absolute;
  left: 77.2%;
  top: 28.3%;
  width: 17.4%;
  height: 58.5%;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-mode .leaderboard-panel {
  position: absolute;
  left: 32.3%;
  top: 70.6%;
  width: 19.2%;
  height: 15.2%;
  padding: 0;
}

.hub-mode .history-panel {
  position: absolute;
  left: 54.7%;
  top: 70.6%;
  width: 19.2%;
  height: 15.2%;
  padding: 0;
}

.panel-tab {
  align-self: center;
  margin: -3px 0 2px;
  border-radius: 6px;
  background: rgba(18, 15, 12, 0.82);
  border: 1px solid rgba(255, 226, 152, 0.28);
  color: #fff4c7;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hub-mode .panel-tab {
  display: none;
}

.garage-window {
  flex: 0 0 31%;
  border: 1px solid rgba(129, 241, 255, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(100, 225, 255, 0.15), rgba(100, 225, 255, 0.02)),
    rgba(4, 12, 20, 0.42);
  box-shadow: inset 0 0 22px rgba(124, 244, 255, 0.1);
}

.hub-mode .garage-window {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.account-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(8, 14, 26, 0.75);
  padding: 8px;
}

.hub-mode .account-card,
.hub-mode .stats-grid div {
  background: rgba(5, 11, 20, 0.34);
  border-color: rgba(133, 230, 255, 0.08);
}

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

.account-card strong {
  display: block;
  color: #fff2bd;
  font-size: 17px;
}

.hub-mode .panel h2 {
  color: #d9fbff;
  font-size: clamp(13px, 1.25vw, 19px);
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(64, 232, 255, 0.75);
}

.panel-heading {
  position: absolute;
  left: 62%;
  top: -9.8%;
  width: 31%;
  height: 8.4%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.panel-title-row h2 {
  text-align: left;
  color: #ffe7a8;
  text-shadow: 0 0 8px rgba(255, 208, 102, 0.55);
}

.compact-button {
  padding: 0;
  width: 100%;
  height: 100%;
  font-size: clamp(10px, 1.1vw, 16px);
  background: rgba(99, 218, 255, 0.28);
  border-color: rgba(163, 238, 255, 0.45);
  pointer-events: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 0;
}

.stats-grid div,
.match-row,
.leaderboard-row,
.history-row {
  background: rgba(15, 28, 43, 0.5);
  border: 1px solid rgba(133, 230, 255, 0.1);
  border-radius: 4px;
}

.stats-grid div {
  padding: 8px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.stats-grid strong {
  font-size: 18px;
}

.wide-stat {
  grid-column: 1 / -1;
}

.create-form {
  margin-top: 0;
}

.button-row {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.hub-mode .create-form {
  border-bottom: 1px solid rgba(117, 218, 255, 0.08);
  padding: 7% 0 5%;
}

.hub-mode .create-form label,
.hub-mode .fineprint {
  color: rgba(210, 232, 244, 0.74);
  font-size: 11px;
}

.hub-mode input {
  background: rgba(5, 11, 20, 0.46);
  border-color: rgba(137, 233, 255, 0.15);
  padding: 8px 9px;
}

.hub-mode button {
  padding: 7px 9px;
}

.match-list,
.leaderboard,
.history-list {
  display: grid;
  gap: 7px;
  margin-top: 0;
  min-height: 0;
  overflow: auto;
}

.hub-mode .match-list {
  flex: 1;
}

.hub-mode .leaderboard,
.hub-mode .history-list {
  height: 100%;
  max-height: 100%;
}

.match-row,
.leaderboard-row,
.history-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.hub-mode .leaderboard-row,
.hub-mode .history-row {
  grid-template-columns: auto 1fr auto;
  min-height: 20px;
  padding: 4px 6px;
  font-size: clamp(9px, 0.75vw, 12px);
}

.hub-mode .match-row {
  padding: 9px;
  font-size: 12px;
}

.hub-mode .muted {
  color: rgba(190, 222, 238, 0.68);
}

.leaderboard-row,
.history-row {
  grid-template-columns: auto 1fr auto;
}

.muted {
  color: var(--muted);
}

.hub-mode .match-list > .muted,
.hub-mode .history-list > .muted {
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(133, 230, 255, 0.08);
  border-radius: 4px;
  background: rgba(5, 11, 20, 0.34);
}

.game-view {
  margin-top: 10px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.player-card,
.match-card,
.controls {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 14px 18px;
}

.player-card .label {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.player-card strong {
  font-size: 42px;
  line-height: 1;
}

.player-card.blue {
  border-color: rgba(69, 163, 255, 0.42);
}

.player-card.red {
  border-color: rgba(255, 92, 108, 0.42);
}

.match-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title button"
    "timer button";
  gap: 2px 18px;
  align-items: center;
  min-width: 330px;
  padding: 12px 14px;
}

#matchTitle {
  grid-area: title;
}

.timer {
  grid-area: timer;
  color: var(--gold);
  font-size: 24px;
  font-weight: 700;
}

#backToLobbyButton {
  grid-area: button;
}

.arena-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #0b111b;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

#gameCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 190px);
  background: var(--field);
}

.boost-meter {
  position: absolute;
  bottom: 14px;
  width: min(210px, 34vw);
  padding: 10px 11px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 13, 22, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
}

.boost-blue {
  left: 14px;
}

.boost-red {
  right: 14px;
}

.boost-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--muted);
}

.boost-topline strong {
  color: var(--text);
}

.boost-track {
  overflow: hidden;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.36);
}

.boost-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transition: width 90ms linear;
}

.boost-blue .boost-fill {
  background: linear-gradient(90deg, #45a3ff, #80d8ff);
  box-shadow: 0 0 18px rgba(69, 163, 255, 0.64);
}

.boost-red .boost-fill {
  background: linear-gradient(90deg, #ff5c6c, #ffad7a);
  box-shadow: 0 0 18px rgba(255, 92, 108, 0.64);
}

.message,
.toast {
  border-radius: 8px;
  background: rgba(8, 13, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text);
  padding: 12px 18px;
  font-weight: 700;
  text-align: center;
}

.message {
  position: absolute;
  inset: auto 50% 22px auto;
  transform: translateX(50%);
  min-width: 220px;
}

.waiting-message {
  bottom: 22px;
}

.result-banner {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  min-width: min(360px, calc(100% - 36px));
  padding: 18px 28px 20px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(7, 12, 22, 0.9)),
    rgba(8, 13, 22, 0.92);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 28px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  animation: resultBannerIn 260ms ease-out;
}

.result-banner::before {
  content: "";
  position: absolute;
  inset: -70px -110px;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 62%);
  pointer-events: none;
}

.result-banner span,
.result-banner small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.result-banner strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--text);
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 22px currentColor;
}

.result-banner small {
  letter-spacing: 0.04em;
  text-transform: none;
}

.result-banner.blue-win {
  border-color: rgba(69, 163, 255, 0.72);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 38px rgba(69, 163, 255, 0.24),
    inset 0 0 28px rgba(69, 163, 255, 0.08);
}

.result-banner.red-win {
  border-color: rgba(255, 92, 108, 0.72);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 38px rgba(255, 92, 108, 0.24),
    inset 0 0 28px rgba(255, 92, 108, 0.08);
}

.result-banner.draw {
  border-color: rgba(255, 209, 102, 0.72);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 38px rgba(255, 209, 102, 0.2),
    inset 0 0 28px rgba(255, 209, 102, 0.08);
}

@keyframes resultBannerIn {
  from {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  z-index: 20;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  color: var(--muted);
}

.controls div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.controls strong {
  color: var(--text);
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell.hub-mode {
    width: min(100vw - 14px, 1180px);
    padding: 10px 0 20px;
    overflow: visible;
  }

  .lobby-layout {
    display: grid;
    width: 100%;
    aspect-ratio: auto;
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
  }

  .hub-title,
  .hub-mode .profile-panel,
  .hub-mode .matches-panel,
  .hub-mode .leaderboard-panel,
  .hub-mode .history-panel {
    position: static;
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }

  .hub-mode .panel {
    background: rgba(10, 17, 29, 0.78);
    border: 1px solid rgba(128, 223, 255, 0.18);
    padding: 12px;
  }

  .panel-heading {
    position: static;
    width: auto;
    height: auto;
    justify-content: end;
  }

  .hub-title {
    min-height: 90px;
  }

  .matches-panel,
  .leaderboard-panel,
  .history-panel {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 14px, 1180px);
    padding-top: 10px;
  }

  .app-shell.login-mode {
    min-height: auto;
  }

  .hero {
    align-items: start;
  }

  .login-page {
    min-height: auto;
  }

  .login-copy h2 {
    font-size: 42px;
  }

  .form-row,
  .topbar {
    grid-template-columns: 1fr;
  }

  .match-card {
    min-width: 0;
  }

  .player-card {
    min-height: 64px;
    padding: 10px 12px;
  }

  .player-card strong {
    font-size: 34px;
  }

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

  .boost-meter {
    bottom: 8px;
    width: min(180px, 42vw);
    padding: 8px;
  }
}

/* Fresh responsive hub */
body.hub-active {
  background: #08111d;
}

body.hub-active::before {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0.28), rgba(5, 10, 18, 0.72)),
    url("assets/lobby-background.png") center center / cover no-repeat;
}

body.hub-active::after {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 22%, rgba(71, 232, 255, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(4, 8, 14, 0.6), transparent 22%, transparent 78%, rgba(4, 8, 14, 0.68));
}

.app-shell.hub-mode {
  display: block;
  width: min(1180px, calc(100vw - 24px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 28px;
  overflow: visible;
}

.app-shell.hub-mode .hero {
  display: none;
}

.lobby-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(300px, 1.25fr) minmax(280px, 1fr);
  grid-template-areas:
    "title title title"
    "profile create matches"
    "leaderboard leaderboard history";
  gap: 14px;
  width: 100%;
  min-height: auto;
  aspect-ratio: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.hub-mode .panel {
  position: static;
  min-height: 0;
  overflow: hidden;
  background: rgba(8, 15, 27, 0.68);
  border: 1px solid rgba(143, 230, 255, 0.18);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  padding: 16px;
}

.hub-title {
  grid-area: title;
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-title h2 {
  color: var(--text);
  font-size: clamp(32px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 0 28px rgba(64, 232, 255, 0.45);
}

.hub-title p:not(.eyebrow) {
  margin: 8px 0 0;
  color: rgba(221, 236, 248, 0.78);
  font-size: 16px;
}

.hub-mode .profile-panel {
  grid-area: profile;
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  margin: 0;
  display: block;
}

.hub-mode .create-panel {
  grid-area: create;
  position: static;
  margin: 0;
}

.hub-mode .matches-panel {
  grid-area: matches;
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-mode .leaderboard-panel {
  grid-area: leaderboard;
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  margin: 0;
}

.hub-mode .history-panel {
  grid-area: history;
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  margin: 0;
}

.hub-mode .panel h2 {
  color: var(--text);
  font-size: 22px;
  text-align: left;
  text-transform: none;
  text-shadow: none;
}

.hub-mode .hub-title h2 {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 0.95;
  text-shadow: 0 0 28px rgba(64, 232, 255, 0.45);
}

.panel-heading {
  position: static;
  width: auto;
  height: auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
}

.compact-button {
  width: auto;
  height: auto;
  padding: 8px 12px;
  font-size: 14px;
  flex: 0 0 auto;
}

.hub-mode .account-card,
.hub-mode .stats-grid div,
.match-row,
.leaderboard-row,
.history-row,
.hub-mode .match-list > .muted,
.hub-mode .history-list > .muted {
  background: rgba(2, 8, 17, 0.46);
  border: 1px solid rgba(141, 229, 255, 0.12);
  border-radius: 8px;
}

.stats-grid {
  gap: 10px;
  margin-top: 14px;
}

.stats-grid div {
  padding: 12px;
}

.stats-grid span {
  font-size: 12px;
}

.stats-grid strong {
  font-size: 22px;
}

.hub-mode .create-form {
  margin-top: 14px;
  border-bottom: 0;
  padding: 0;
}

.hub-mode .create-form label,
.hub-mode .fineprint {
  color: var(--muted);
  font-size: 13px;
}

.hub-mode input {
  background: rgba(2, 8, 17, 0.52);
  border-color: rgba(143, 230, 255, 0.18);
  padding: 11px 12px;
}

.hub-mode button {
  padding: 10px 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.match-list,
.leaderboard,
.history-list {
  gap: 9px;
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
}

.hub-mode .match-list {
  flex: 1;
}

.hub-mode .leaderboard,
.hub-mode .history-list {
  height: auto;
  max-height: 320px;
}

.match-row,
.leaderboard-row,
.history-row,
.hub-mode .leaderboard-row,
.hub-mode .history-row,
.hub-mode .match-row {
  min-height: auto;
  padding: 11px;
  font-size: 14px;
}

.leaderboard-row,
.history-row,
.hub-mode .leaderboard-row,
.hub-mode .history-row {
  grid-template-columns: auto 1fr auto;
}

.hub-mode .muted {
  color: rgba(204, 222, 238, 0.72);
}

@media (max-width: 980px) {
  .lobby-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "title title"
      "profile create"
      "matches matches"
      "leaderboard history";
  }
}

@media (max-width: 680px) {
  .app-shell.hub-mode {
    width: min(100vw - 14px, 1180px);
    padding: 10px 0 20px;
  }

  .lobby-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "profile"
      "create"
      "matches"
      "leaderboard"
      "history";
  }

  .hub-title {
    align-items: stretch;
    flex-direction: column;
  }

  .hub-title h2 {
    font-size: 42px;
  }
}
