/* =====================================================================================
   [ART]  MENUS AND SCREENS (title, mode select, Bro select, results, death panel)
   Colours are defined once as variables right below. In-game HUD is in render.js.
   ===================================================================================== */

:root {
  --bg: #0b0d12;
  --panel: rgba(14, 17, 26, 0.86);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #f2f4f8;
  --muted: rgba(242, 244, 248, 0.62);
  --accent: #ffb020;
  --accent-2: #ff5a3a;
  --gold: #ffd34d;
  --good: #4ade80;
  --display: 'Bungee', Impact, sans-serif;
  --body: 'Rubik', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  user-select: none;
}

body.in-match { cursor: none; }

#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.hidden { display: none !important; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  background: radial-gradient(ellipse at center, rgba(11, 13, 18, 0.25) 0%, rgba(11, 13, 18, 0.85) 100%);
  padding: 24px 16px;
}

#screen-mode, #screen-select, #screen-results, #screen-multi, #screen-hostjoin, #screen-join, #screen-mp-wait {
  background: rgba(8, 10, 15, 0.72);
  backdrop-filter: blur(6px);
}

/* ---------------------------------------------------------------- title */

.logo {
  text-align: center;
  transform: rotate(-4deg);
  margin-bottom: auto;
  margin-top: 10vh;
  animation: logo-bob 3s ease-in-out infinite;
}

.logo-top, .logo-bottom {
  font-family: var(--display);
  line-height: 0.9;
  background: linear-gradient(180deg, #fff3b0 0%, var(--gold) 40%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 #3a1608) drop-shadow(0 0 2px #3a1608) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
}

.logo-top { font-size: clamp(48px, 9vw, 110px); }
.logo-bottom { font-size: clamp(72px, 15vw, 190px); }

.logo-sub {
  margin-top: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--muted);
}

@keyframes logo-bob {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-8px); }
}

.btn-start {
  margin-bottom: 9vh;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 52px);
  padding: 14px 64px 10px;
  color: #2a1204;
  background: linear-gradient(180deg, var(--gold), var(--accent));
  border: none;
  border-radius: 18px;
  box-shadow: 0 8px 0 #8a4a08, 0 16px 40px rgba(255, 176, 32, 0.35);
  cursor: pointer;
  animation: pulse 1.4s ease-in-out infinite;
}

.btn-start:hover { filter: brightness(1.1); }
.btn-start:active { transform: translateY(6px); box-shadow: 0 2px 0 #8a4a08; }

@keyframes pulse {
  0%, 100% { scale: 1; }
  50% { scale: 1.06; }
}

/* ---------------------------------------------------------------- shared */

.screen-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 28px;
  color: var(--gold);
  text-shadow: 0 4px 0 #3a1608;
}

.btn {
  font-family: var(--body);
  font-weight: 800;
  font-size: 16px;
  padding: 12px 26px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  color: #2a1204;
  background: linear-gradient(180deg, var(--gold), var(--accent));
  box-shadow: 0 4px 0 #8a4a08;
  pointer-events: auto;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a4a08; }

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}

.btn-back { margin-top: 32px; }

.topbar {
  position: absolute;
  top: 16px;
  right: 20px;
  pointer-events: none;
  z-index: 2;
}

.coins {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-weight: 800;
  font-size: 18px;
}

.coin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3b0, var(--gold) 50%, #b8860b);
  box-shadow: 0 0 0 2px #7a5200;
}

/* ---------------------------------------------------------------- mode select */

.mode-cards {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-card {
  position: relative;
  width: min(320px, 90vw);
  padding: 28px 24px;
  text-align: left;
  color: var(--text);
  background: var(--panel);
  border: 2px solid var(--panel-border);
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  font-family: var(--body);
}

.mode-card:not(:disabled):hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.mode-card:disabled { cursor: not-allowed; opacity: 0.55; }

.mode-icon { width: 54px; height: 54px; color: var(--gold); }

.mode-name {
  font-family: var(--display);
  font-size: 24px;
  margin: 12px 0 8px;
}

.mode-desc { color: var(--muted); line-height: 1.4; }

.mode-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

/* ---------------------------------------------------------------- Bro select */

#screen-select { justify-content: flex-start; }
#screen-select .screen-title { margin-bottom: 16px; }

/* The grid and the detail panel each scroll on their own, so nothing can spill
   over the footer (Back button) no matter how many Bros there are. */
.select-layout {
  display: flex;
  gap: 20px;
  width: min(1180px, 100%);
  min-height: 0;
  flex: 1 1 auto;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 132px);
  grid-auto-rows: 164px;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  padding: 6px 8px 6px 4px;
  min-height: 0;
}

.class-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  color: var(--text);
  background: var(--panel);
  border: 2px solid var(--panel-border);
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--body);
  transition: transform 0.12s, border-color 0.12s;
}

.class-card:not(.soon):hover, .class-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  outline: none;
}

.class-card .portrait { width: 112px; height: 118px; }

.class-name { font-weight: 800; font-size: 15px; margin-top: 4px; text-align: center; }

.class-card.locked .class-name { color: var(--muted); }

.lock {
  position: absolute;
  top: 46px;
  left: 10px;
  right: 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lock-icon {
  width: 22px;
  height: 18px;
  border-radius: 4px;
  background: var(--gold);
  position: relative;
  margin-top: 10px;
}

.lock-icon::before {
  content: '';
  position: absolute;
  left: 4px;
  top: -11px;
  width: 10px;
  height: 12px;
  border: 3px solid var(--gold);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.class-card.soon {
  cursor: default;
  justify-content: center;
  opacity: 0.45;
  border-style: dashed;
}

.soon-mark { font-family: var(--display); font-size: 64px; color: var(--muted); }

.class-detail {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
}

.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail-name { font-family: var(--display); font-size: 30px; }
.variant-name { font-family: var(--body); font-size: 18px; color: var(--muted); }
.detail-tag { color: var(--muted); margin-top: 4px; }
.detail-lock { color: var(--gold); font-weight: 700; max-width: 45%; text-align: right; font-size: 14px; }

.stats { display: flex; gap: 10px; margin: 18px 0; }

.stats > div {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

.stats b { font-size: 20px; }
.stats span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.moves { display: flex; flex-direction: column; gap: 12px; }

.move {
  display: flex;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.key {
  flex: 0 0 auto;
  min-width: 64px;
  height: 34px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #111;
  background: #e8ecf4;
  border-radius: 8px;
  box-shadow: 0 3px 0 #8d94a5;
}

.key.ult { background: var(--gold); box-shadow: 0 3px 0 #a07800; }

.move-name { font-weight: 800; font-size: 16px; }

.ult-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--gold);
  color: #111;
  vertical-align: middle;
}

.move-desc { color: var(--muted); font-size: 14px; margin: 3px 0 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chips span {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.variants { display: flex; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.variants-label { font-size: 12px; color: var(--muted); margin-right: 6px; text-transform: uppercase; letter-spacing: 0.06em; }

.variant {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.variant.on { background: var(--accent); color: #111; }
.variant.off { opacity: 0.3; }

.detail-msg { height: 20px; margin-top: 10px; color: var(--accent-2); font-weight: 700; opacity: 0; }
.detail-msg.show { animation: msg 2.2s ease forwards; }

@keyframes msg {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

.select-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  width: min(1180px, 100%);
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.hint { color: var(--muted); font-size: 14px; }
.hint.controls { margin-left: auto; }

/* ---------------------------------------------------------------- results & death */

.results-card {
  width: min(520px, 100%);
  padding: 32px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
}

.results-place {
  font-family: var(--display);
  font-size: 110px;
  line-height: 1;
  color: var(--text);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.5);
}

.results-place.win {
  background: linear-gradient(180deg, #fff3b0, var(--gold), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 #3a1608);
}

.results-title { font-family: var(--display); font-size: 22px; margin: 8px 0 24px; }

.results-stats { display: flex; gap: 12px; }

.results-stats > div {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

.results-stats b { font-size: 26px; }
.results-stats span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.unlock-banner {
  margin-top: 18px;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  color: #111;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  animation: pulse 1.2s ease-in-out infinite;
}

.results-skill { margin-top: 18px; color: var(--muted); font-size: 14px; }

.results-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

.death-panel {
  position: absolute;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  padding: 22px 32px;
  text-align: center;
  pointer-events: auto;
  cursor: default;
  background: var(--panel);
  border: 1px solid rgba(255, 90, 58, 0.5);
  border-radius: 20px;
  animation: rise 0.3s ease-out;
}

body.in-match .death-panel { cursor: default; }

.death-title { font-family: var(--display); font-size: 28px; color: var(--accent-2); }
.death-place { font-family: var(--display); font-size: 56px; line-height: 1.1; }
.death-by { color: var(--muted); margin-bottom: 16px; }
.death-buttons { display: flex; gap: 10px; justify-content: center; }

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 900px) {
  .select-layout { flex-direction: column; max-height: none; overflow-y: auto; }
  .class-grid { grid-template-columns: repeat(auto-fill, 150px); justify-content: center; }
  .screen { justify-content: flex-start; overflow-y: auto; }
}

/* ---------------------------------------------------------------- dev mode */

.dev-u { cursor: pointer; }
body.dev .dev-u { color: #4ade80; }

.dev-notice {
  height: 22px;
  margin: -16px 0 10px;
  font-weight: 700;
  color: #4ade80;
  opacity: 0;
}

.dev-notice.show { animation: msg 3s ease forwards; }

.dev-panel {
  position: absolute;
  top: 90px;
  right: 16px;
  width: 260px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  pointer-events: auto;
  cursor: default;
  background: rgba(6, 20, 12, 0.88);
  border: 1px solid rgba(74, 222, 128, 0.5);
  border-radius: 12px;
}

.dev-panel.collapsed > :not(.dev-title) { display: none; }
.dev-title { font-family: var(--display); color: #4ade80; }
.dev-title span { font-family: var(--body); font-size: 11px; color: var(--muted); }
.dev-panel label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dev-slider input { flex: 1; }
.dev-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.dev-buttons button {
  font: 600 12px var(--body);
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #06140c;
  background: #4ade80;
}

/* ---------------------------------------------------------------- passive + update log */

.passive {
  margin: -6px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  background: rgba(224, 49, 59, 0.12);
  border: 1px solid rgba(224, 49, 59, 0.35);
}

.passive-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  color: #fff;
  background: #e0313b;
  vertical-align: middle;
}

.btn-log {
  position: absolute;
  left: 20px;
  top: 16px;
  pointer-events: auto;
}

.btn-log .new-badge {
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-2);
  animation: pulse 1.2s ease-in-out infinite;
}

.log-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 8px 28px 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
}

.log-entry { padding: 18px 0; border-bottom: 1px solid var(--panel-border); }
.log-entry:last-child { border-bottom: none; }
.log-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.log-version { font-family: var(--display); font-size: 22px; color: var(--gold); }
.log-title { font-weight: 800; font-size: 18px; }
.log-date { margin-left: auto; color: var(--muted); font-size: 13px; }
.log-entry.unseen .log-version::after {
  content: 'NEW';
  margin-left: 8px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-2);
  vertical-align: middle;
}
.log-entry h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.log-entry ul { margin: 0; padding-left: 20px; line-height: 1.5; }
.log-entry li { margin: 2px 0; }

.form-block {
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(178, 107, 255, 0.08);
  border: 1px solid rgba(178, 107, 255, 0.35);
}
.form-title { font-family: var(--display); font-size: 18px; color: #d8b4fe; margin-bottom: 10px; }
.form-title span { font-family: var(--body); font-size: 12px; color: var(--muted); margin-left: 6px; }

/* ---------------------------------------------------------------- variant list */

.variants-label { margin-top: 18px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.variant-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.vrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  font-size: 14px;
  flex-wrap: wrap;
}

.vrow.open { cursor: pointer; }
.vrow.open:hover { border-color: rgba(255, 255, 255, 0.2); }
.vrow.on { border-color: var(--accent); background: rgba(255, 176, 32, 0.1); }
.vrow.off b { color: var(--muted); }

.vkey {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
  color: #111;
  background: #e8ecf4;
}

.vrow.off .vkey { opacity: 0.4; }
.v-ok { margin-left: auto; color: var(--good); font-size: 12px; font-weight: 700; }
.v-lock { margin-left: auto; color: var(--gold); font-size: 12px; font-weight: 700; text-align: right; }
.v-need { color: var(--muted); font-size: 12px; }

.v-buy {
  margin-left: auto;
  font: 800 12px var(--body);
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #2a1204;
  background: linear-gradient(180deg, var(--gold), var(--accent));
}

.v-buy:disabled { cursor: not-allowed; opacity: 0.45; }

/* ---------------------------------------------------------------- OG badge */

.og-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  font-family: var(--display);
  font-size: 12px;
  line-height: 1;
  padding: 4px 6px 3px;
  border-radius: 6px;
  color: #2a1204;
  background: #ff8a1f;
  box-shadow: 0 2px 0 #8a4a08;
  pointer-events: none;
}

.og-tag {
  font-family: var(--display);
  font-size: 10px;
  padding: 2px 5px 1px;
  border-radius: 5px;
  color: #2a1204;
  background: #ff8a1f;
}

/* Long unlock texts on locked cards: cut to 3 lines (the detail panel shows it all). */
.class-card .lock { top: 34px; font-size: 11px; }
.class-card .lock-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------------------------------------------------------- multiplayer (host / join, lobby menu) */

.mp-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -12px 0 24px;
  color: var(--muted);
  font-weight: 700;
}

.mp-name-row input, .join-code {
  font-family: var(--body);
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  outline: none;
}

.mp-name-row input { width: 200px; padding: 10px 14px; font-size: 16px; }
.mp-name-row input:focus, .join-code:focus { border-color: var(--accent); }

.join-form { display: flex; gap: 12px; align-items: center; }

.join-code {
  width: 240px;
  padding: 12px 16px;
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: 0.25em;
  text-align: center;
  text-transform: uppercase;
}

.mp-status { min-height: 22px; margin-top: 18px; font-weight: 700; color: var(--muted); text-align: center; }
.mp-status.bad { color: var(--accent-2); }

.mp-spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold);
  animation: mp-spin 0.8s linear infinite;
}

.mp-wait-text { margin-top: 20px; font-family: var(--display); font-size: 22px; }

@keyframes mp-spin { to { transform: rotate(360deg); } }

.mp-menu, .mp-results {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: auto;
  cursor: default;
  background: rgba(8, 10, 15, 0.55);
  backdrop-filter: blur(3px);
  overflow-y: auto;
}

.mp-menu-card {
  width: min(760px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 22px 26px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  animation: mp-pop 0.18s ease-out;
}

@keyframes mp-pop { from { opacity: 0; transform: scale(0.96); } }

.mp-menu-head { display: flex; align-items: center; justify-content: space-between; }
.mp-menu-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--gold); }
.mp-menu-head h3 small { font-family: var(--body); font-size: 14px; color: var(--muted); }

.mp-close {
  font-family: var(--body);
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.mp-code-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 18px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 211, 77, 0.08);
  border: 2px dashed rgba(255, 211, 77, 0.4);
}

.mp-code-box > span { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; }
.mp-code { font-family: var(--display); font-size: 40px; letter-spacing: 0.2em; color: var(--gold); flex: 1; user-select: all; }
.mp-copy { padding: 8px 16px; font-size: 14px; }

.mp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.mp-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }

.mp-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.mp-players li, .mp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.mp-players li.me, .mp-row.me { background: rgba(74, 222, 128, 0.12); }
.mp-players li.cpu { opacity: 0.65; }

.mp-who { display: flex; flex-direction: column; flex: 1; min-width: 0; text-align: left; }
.mp-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-who small { color: var(--muted); font-size: 12px; }

.mp-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 4px 8px; border-radius: 999px; background: var(--gold); color: #2a1204; }
.mp-tag.you { background: var(--good); }
.mp-tag.cpu { background: rgba(255, 255, 255, 0.15); color: var(--text); }

.mp-kick {
  font-family: var(--body);
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 90, 58, 0.75);
}

.mp-kick:hover { background: var(--accent-2); }

.mp-settings { display: flex; flex-direction: column; gap: 8px; }

.mp-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.mp-field select {
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  background: #1b1f2a;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 6px 8px;
}

.mp-check { justify-content: flex-start; cursor: pointer; }
.mp-check input { width: 18px; height: 18px; accent-color: var(--accent); }

.mp-stepper { display: flex; align-items: center; gap: 10px; }
.mp-stepper b { min-width: 18px; text-align: center; font-size: 18px; }

.mp-stepper button {
  width: 30px;
  height: 30px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.mp-stepper button:disabled, .mp-field select:disabled { opacity: 0.4; cursor: not-allowed; }

.mp-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

#mp-menu-msg { margin-top: 10px; }

.mp-buttons { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.mp-start { font-size: 18px; padding: 14px 30px; }
.mp-waiting { margin-right: auto; font-weight: 700; }

.mp-results .results-card { width: min(560px, 100%); }
.mp-standings { display: flex; flex-direction: column; gap: 6px; }
.mp-place { font-family: var(--display); font-size: 22px; width: 44px; text-align: left; }
.mp-stat { display: flex; flex-direction: column; align-items: center; width: 56px; }
.mp-stat small { font-size: 11px; color: var(--muted); text-transform: uppercase; }

@media (max-width: 640px) {
  .mp-cols { grid-template-columns: 1fr; }
  .mp-code { font-size: 30px; }
  .join-code { width: 180px; font-size: 28px; }
}

/* [ART] "New update, reload" banner across the top of the screen. */
.update-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border: 2px solid #15161c;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--gold), var(--accent));
  color: #15161c;
  font-family: var(--display);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #15161c;
}

/* [ART] Emote bar (press T in a match): a row of bubbles above the move slots. */
.emote-bar {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 2px solid #15161c;
  border-radius: 14px;
  background: rgba(21, 22, 28, 0.85);
}
.emote-btn {
  position: relative;
  min-width: 52px;
  height: 44px;
  padding: 0 10px;
  border: 2px solid #15161c;
  border-radius: 10px;
  background: #ffffff;
  color: #e0313b;
  font-family: var(--display);
  font-size: 18px;
  cursor: pointer;
}
.emote-btn:hover { background: var(--gold); }
.emote-key {
  position: absolute;
  top: -8px;
  left: -6px;
  padding: 0 4px;
  border-radius: 6px;
  background: #15161c;
  color: #ffffff;
  font-family: var(--body);
  font-size: 11px;
  line-height: 16px;
}

/* [ART] Solo gamemode picker: smaller cards so all of them fit. */
.solo-modes { gap: 14px; max-width: 1100px; }
.solo-modes .mode-card { width: min(250px, 90vw); padding: 18px 18px 16px; }
.solo-modes .mode-icon { width: 40px; height: 40px; }
.solo-modes .mode-name { font-size: 20px; }
.solo-modes .mode-desc { font-size: 13px; }
.solo-modes .mode-card.last { border-color: rgba(255, 176, 32, 0.55); }
.solo-modes .mode-badge { color: #15161c; }
#screen-solo { overflow-y: auto; }

/* [ART] League badge + XP bar. */
.league-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 2px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel);
  font-family: var(--body);
}
.league-strip > b { color: var(--muted); font-weight: 600; }
.league-badge {
  padding: 4px 12px;
  border: 2px solid #15161c;
  border-radius: 999px;
  background: var(--lc);
  color: #15161c;
  font-family: var(--display);
  font-size: 15px;
  white-space: nowrap;
}
.league-info { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.league-info small { color: var(--muted); font-size: 12px; }
.league-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.league-bar i { display: block; height: 100%; border-radius: 4px; }

.results-mode { font-family: var(--display); color: var(--muted); font-size: 14px; letter-spacing: 1px; }
.results-league { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0; font-family: var(--body); }
.results-league > b { font-family: var(--display); font-size: 20px; }
.results-league > b.up { color: #4ade80; }
.results-league > b.down { color: #ff6a5a; }
.unlock-banner.down { background: linear-gradient(180deg, #ff8a7a, #e0313b); }
