* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #f2f5fb;
}

#game {
  display: block;
  position: fixed;
  inset: 0;
  outline: none;
}

.panel-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 24, 0.55);
}

.panel-wrap[hidden], form[hidden] { display: none; }

.panel {
  min-width: 300px;
  max-width: 90vw;
  padding: 28px 32px;
  border-radius: 12px;
  background: #1b2233;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  font-size: 18px;
}

h1 { margin: 0; font-size: 36px; letter-spacing: 1px; }
.sub { margin: 0 0 8px; color: #9fb0d0; }
label { text-align: left; font-size: 14px; color: #9fb0d0; }

input {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #3a4560;
  background: #0f1422;
  color: inherit;
}

button {
  font: inherit;
  font-weight: 600;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #e6194b;
  color: #fff;
  cursor: pointer;
}
button:hover { filter: brightness(1.1); }

.hint { margin: 6px 0 0; font-size: 13px; color: #8090ad; }
code { color: #cfd8ea; }

/* ---- Fighter customization ---- */

.look {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
  text-align: left;
}

#preview {
  flex: none;
  width: 96px;
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(#2b2f6b, #6a4b8f 60%, #c9768e);
}

.pickers { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 14px; color: #9fb0d0; }

.swatches, .chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 260px; }

.swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #1b2233, 0 0 0 4px #fff; }

.chip {
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  background: #0f1422;
  border: 1px solid #3a4560;
}
.chip[aria-pressed="true"] { background: #f2f5fb; color: #1b2233; border-color: #f2f5fb; }

button.play { margin-top: 4px; }

/* ---- Sound toggles (bottom-left, above the room label) ---- */

#sound-ctl {
  position: fixed;
  left: 12px;
  bottom: 40px;
  display: flex;
  gap: 6px;
}
#sound-ctl[hidden] { display: none; }
#sound-ctl button {
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
#sound-ctl button.off { opacity: 0.45; text-decoration: line-through; }

@media (max-width: 420px) {
  .look { flex-direction: column; }
  .panel { padding: 20px 16px; }
}
