/* Lobby multiplayer — painel tático com estado conectado e cartões de sala. */
#lobby {
  padding: clamp(20px, 3vw, 42px) clamp(20px, 4.5vw, 74px) 24px;
  overflow: auto;
  background:
    linear-gradient(
      90deg,
      rgba(8, 14, 11, 0.96) 0%,
      rgba(10, 17, 13, 0.88) 39%,
      rgba(11, 19, 14, 0.63) 72%,
      rgba(9, 16, 12, 0.38) 100%
    ),
    linear-gradient(0deg, rgba(6, 11, 8, 0.86), transparent 55%),
    radial-gradient(ellipse at 83% 46%, rgba(164, 192, 114, 0.14), transparent 45%);
}
#lobby > header {
  min-height: 50px;
  gap: 18px;
  border-bottom: 1px solid #d0d2d41e;
  padding-bottom: 15px;
}
#lobby .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
#lobby .brand b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #ffc92870;
  color: #ffc928;
  font:
    800 22px 'Barlow Condensed',
    Impact,
    sans-serif;
  letter-spacing: -2px;
}
#lobby .brand span {
  font:
    800 9px Barlow,
    Arial,
    sans-serif;
  letter-spacing: 2.5px;
  margin: 0;
  color: #d6d8d9;
}
#openArsenalGallery {
  margin-left: auto;
  padding: 10px 13px;
  font-size: 9px;
}
#networkState {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 178px;
  padding: 10px 13px;
  border: 1px solid #797c7f52;
  background: rgba(16, 27, 20, 0.74);
  color: #c2c4c6;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
}
#networkState i {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #c5a05d;
  box-shadow: 0 0 10px #c5a05d66;
  margin: 0;
}
#networkState[data-state='online'] {
  border-color: #88909566;
  color: #d6d9dc;
}
#networkState[data-state='online'] i {
  background: #ffc928;
  box-shadow: 0 0 12px #ffc92899;
}
#networkState[data-state='offline'] {
  border-color: #b5575d77;
  color: #ffb3b6;
}
#networkState[data-state='offline'] i {
  background: #f06b70;
  box-shadow: 0 0 10px #f06b7088;
}
#lobby main {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  grid-template-rows: auto auto auto auto;
  column-gap: clamp(28px, 6vw, 94px);
  row-gap: 0;
  width: min(1200px, 100%);
  margin: clamp(48px, 8vh, 92px) auto 0;
  align-content: start;
}
#lobby main > .eyebrow,
#lobby main > h1,
#lobby main > .intro,
#lobby main > .chips {
  grid-column: 1;
}
#lobby main > .eyebrow {
  grid-row: 1;
  align-self: end;
  font-size: 9px;
  color: #b5b7b8;
  letter-spacing: 2.5px;
}
#lobby main > h1 {
  grid-row: 2;
  font-size: clamp(50px, 6.1vw, 86px);
  line-height: 0.91;
  letter-spacing: -0.04em;
  margin: 17px 0 13px;
  text-shadow: 0 4px 25px #0007;
}
#lobby main > .intro {
  grid-row: 3;
  max-width: 490px;
  margin: 0;
  color: #bdbebf;
  font-size: 14px;
  line-height: 1.65;
}
#lobby main > .chips {
  grid-row: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 23px 0 0;
}
#lobby .chips span {
  padding: 8px 9px;
  border: 1px solid #a2a4a629;
  background: #14151575;
  color: #abadaf;
  font-size: 8px;
  letter-spacing: 1px;
}
#lobby main > form {
  grid-column: 2;
  grid-row: 1 / span 4;
  align-self: start;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: clamp(18px, 2.2vw, 30px);
  border: 1px solid #969a9c52;
  background: linear-gradient(145deg, rgba(14, 24, 18, 0.88), rgba(13, 22, 17, 0.72));
  box-shadow: 0 20px 70px #0004;
  backdrop-filter: blur(12px);
}
#lobby .profile-bar {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 21px;
  padding: 0 0 17px;
  border-bottom: 1px solid #a0a3a52a;
}
#profileSummary {
  flex: 1;
  min-width: 160px;
  color: #e1e2e3;
  font-size: 12px;
  font-weight: 700;
}
#lobby .profile-bar button {
  padding: 9px 11px;
  background: #212324;
  border-color: #6a6c6e9c;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
#lobby .profile-bar button:hover {
  background: #313335;
  border-color: #ffc928;
}
#roomBrowser h2,
#waitingRoom h2 {
  font:
    700 22px 'Barlow Condensed',
    Impact,
    sans-serif;
  letter-spacing: 0.6px;
  margin: 0 0 13px;
}
#roomBrowser h2:before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 17px;
  margin: 0 10px 0 0;
  vertical-align: -2px;
  background: #ffc928;
}
#roomList {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  color: #c4c6c8;
}
.room-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 190px;
  align-content: center;
  padding: 22px;
  border: 1px dashed #81838569;
  background: radial-gradient(ellipse at center, #2d2e2f77, rgba(13, 22, 17, 0.2) 70%);
  text-align: center;
}
.room-empty-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-bottom: 3px;
  border: 1px solid #8d959b5c;
  border-radius: 50%;
  color: #ffc928;
  font-size: 26px;
}
.room-empty strong {
  color: #ffc928;
  font:
    700 17px 'Barlow Condensed',
    Impact,
    sans-serif;
  letter-spacing: 0.7px;
}
.room-empty small {
  max-width: 270px;
  color: #aeb0b1;
  font-size: 11px;
  line-height: 1.5;
}
.room-empty-error {
  min-height: 130px;
  border-color: #a64e5366;
  color: #ffb5b8;
  font-size: 12px;
}
.match-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 72px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid #76797b55;
  background: linear-gradient(105deg, rgba(31, 45, 34, 0.89), rgba(19, 30, 23, 0.78));
  transition:
    transform 0.16s,
    border-color 0.16s,
    background 0.16s;
}
.match-card:hover {
  transform: translateY(-1px);
  border-color: #969ca0;
  background: linear-gradient(105deg, rgba(38, 55, 40, 0.94), rgba(20, 32, 24, 0.88));
}
.match-card[data-status='waiting'] {
  border-left: 2px solid #ffc928;
}
.match-card[data-status='playing'] {
  border-left: 2px solid #e1ae61;
}
.match-card[data-status='full'] {
  border-left: 2px solid #768075;
  opacity: 0.76;
}
.room-state {
  min-width: 75px;
  padding: 6px 7px;
  border: 1px solid #7c808366;
  color: #ffd95e;
  background: #2e303150;
  text-align: center;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.8px;
}
.match-card[data-status='playing'] .room-state {
  border-color: #c18f4d77;
  color: #f0c27d;
  background: #553b1f45;
}
.match-card[data-status='full'] .room-state {
  border-color: #69736c;
  color: #a7afa8;
  background: #2d2d2d;
}
.match-card-info {
  min-width: 0;
}
.match-card strong {
  display: block;
  overflow: hidden;
  color: #eceded;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-card small {
  display: block;
  margin-top: 5px;
  color: #abadaf;
  font-size: 10px;
  line-height: 1.4;
}
.match-card button {
  min-width: 118px;
  padding: 10px 11px;
  border: 1px solid #74787b;
  background: #2a2c2d;
  color: #dcdee0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.match-card button:hover:not(:disabled) {
  border-color: #ffc928;
  background: #3a3c3e;
  color: #ffd95e;
}
.match-card[data-status='waiting'] button {
  border-color: #8a9196;
  color: #ffd95e;
}
.match-card[data-status='playing'] button {
  border-color: #bd9559;
  color: #f0cd91;
}
.match-card button:disabled {
  border-color: #5a5b5c;
  background: #292a2a;
  color: #9ca49c;
  opacity: 0.8;
}
#newRoom {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #ffd95e;
  background: linear-gradient(105deg, #ffc928, #ffc928);
  color: #1b1c1d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  box-shadow: 0 6px 22px #ffc92820;
  transition:
    filter 0.16s,
    transform 0.16s;
}
#newRoom:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
#status {
  min-height: 17px;
  margin: 12px 0 0;
  color: #aaacae;
  font-size: 10px;
  letter-spacing: 0.3px;
}
#lobby footer {
  position: static;
  display: flex;
  gap: 15px;
  margin: clamp(35px, 7vh, 72px) auto 0;
  width: min(1200px, 100%);
  padding-top: 14px;
  border-top-color: #9c9fa135;
  color: #8e9091;
}
#lobby footer > span {
  font-size: 8px;
  letter-spacing: 1.5px;
}
#lobby footer > div {
  display: flex;
  gap: 0;
}
#lobby footer button {
  padding: 5px 12px;
  border-right: 1px solid #898b8c4d;
  font-size: 8px;
  letter-spacing: 1.4px;
}
#lobby footer button:last-child {
  border-right: 0;
}
#lobby footer button:hover {
  color: #ffc928;
}
#lobby.in-room main {
  margin-top: clamp(28px, 5vh, 54px);
}
#lobby.in-room main > form {
  grid-column: 1/-1;
  grid-row: 1;
  width: min(920px, 100%);
  margin: 0 auto;
}
#lobby.in-room main > form #roomSettings {
  max-width: none;
}
#waitingInfo {
  margin: 0 0 15px;
  color: #ffc928;
  font-size: 11px;
}
#hostActions {
  margin: 12px 0;
}
#hostActions .primary {
  min-height: 48px;
}
#roomSettings {
  max-width: none;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid #9c9fa135;
}
#matchSettings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 15px;
  align-items: end;
}
#matchSettings > .mode-label,
#matchSettings > #mapInfo,
#matchSettings > #roomInfo {
  grid-column: 1/-1;
}
#matchSettings select,
#roomName {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #777a7d80;
  background: #1a1c1d;
  color: #e6e7e8;
}
#roomName:focus-visible,
#matchSettings select:focus-visible {
  outline: 2px solid #ffc928;
  outline-offset: 2px;
}
#roomSettings > #leaveRoom {
  min-width: 190px;
}
.roster-grid {
  gap: 14px;
}
.team-column {
  border-radius: 2px;
  backdrop-filter: blur(6px);
}
.player-slot {
  padding: 0 8px;
}
#cancelRoomChoice {
  padding: 11px 14px;
  background: transparent;
  border-color: #686a6b;
  color: #bcbdbe;
  font-size: 9px;
  letter-spacing: 1px;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #ffd95e;
  outline-offset: 3px;
}
@media (max-width: 900px) {
  #lobby main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    width: min(680px, 100%);
    margin-top: 44px;
  }
  #lobby main > .eyebrow,
  #lobby main > h1,
  #lobby main > .intro,
  #lobby main > .chips,
  #lobby main > form {
    grid-column: 1;
    grid-row: auto;
  }
  #lobby main > form {
    margin-top: 22px;
  }
  #lobby main > h1 {
    font-size: clamp(54px, 10vw, 82px);
  }
  #lobby footer {
    margin-top: 35px;
  }
}
@media (max-width: 600px) {
  #lobby {
    padding: 17px 16px 24px;
  }
  #lobby > header {
    gap: 8px;
    min-height: 42px;
    padding-bottom: 12px;
  }
  #lobby .brand {
    gap: 7px;
  }
  #lobby .brand b {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }
  #lobby .brand span {
    max-width: 94px;
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  #openArsenalGallery {
    margin-left: auto;
    padding: 8px 7px;
    font-size: 7px;
    letter-spacing: 0.3px;
  }
  #networkState {
    min-width: 0;
    padding: 8px;
    gap: 6px;
    font-size: 0;
    letter-spacing: 0;
  }
  #networkState i {
    width: 7px;
    height: 7px;
  }
  #lobby main {
    margin-top: 36px;
  }
  #lobby main > h1 {
    font-size: clamp(49px, 14vw, 72px);
    margin: 13px 0;
  }
  #lobby main > .intro {
    font-size: 12px;
  }
  #lobby .chips {
    gap: 5px;
    margin-top: 16px;
  }
  #lobby .chips span {
    padding: 6px;
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  #lobby main > form {
    margin-top: 17px;
    padding: 15px;
  }
  #lobby .profile-bar {
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 13px;
  }
  #profileSummary {
    min-width: 100%;
    font-size: 11px;
  }
  #lobby .profile-bar button {
    flex: 1;
  }
  #roomBrowser h2,
  #waitingRoom h2 {
    font-size: 20px;
  }
  .match-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }
  .room-state {
    grid-column: 1;
    grid-row: 1;
    min-width: 69px;
    font-size: 6px;
  }
  .match-card-info {
    grid-column: 2;
    grid-row: 1;
  }
  .match-card button {
    grid-column: 1/-1;
    width: 100%;
    min-height: 37px;
  }
  .room-empty {
    min-height: 160px;
  }
  #matchSettings {
    grid-template-columns: minmax(0, 1fr);
  }
  #matchSettings > * {
    grid-column: 1 !important;
  }
  .roster-grid {
    grid-template-columns: 1fr;
  }
  .team-column {
    padding: 12px;
  }
  #lobby footer {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 25px;
  }
  #lobby footer > div {
    align-self: flex-end;
  }
}
@media (max-height: 760px) and (min-width: 901px) {
  #lobby main {
    margin-top: 34px;
  }
  #lobby footer {
    margin-top: 30px;
  }
  #lobby main > h1 {
    font-size: clamp(48px, 5.2vw, 72px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .match-card,
  #newRoom,
  .match-card button {
    transition: none;
  }
}

#lobby.start-menu-open > header,
#lobby.start-menu-open > main,
#lobby.start-menu-open > .map-label,
#lobby.start-menu-open > footer {
  visibility: hidden;
}
