/* Main lobby screen styles. */
.lobby-screen {
  padding: 14px 20px 28px;
  background:
    radial-gradient(circle at 82% 24%, rgba(80, 200, 255, 0.2), transparent 28%),
    radial-gradient(circle at 18% 38%, rgba(80, 200, 255, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(2, 8, 16, 0.36), rgba(2, 7, 13, 0.88));
}

.lobby-shell {
  width: min(1040px, 100%);
  gap: 14px;
}

.lobby-hero {
  position: relative;
  justify-items: center;
  gap: 0;
  padding: 0 0 4px;
  text-align: center;
}

.lobby-tech-line {
  width: min(760px, 88%);
  height: 22px;
  opacity: 0.8;
  background:
    linear-gradient(90deg, transparent, rgba(80, 200, 255, 0.7) 14%, transparent 14.5%, transparent 21%, rgba(80, 200, 255, 0.55) 21.5%, rgba(80, 200, 255, 0.55) 28%, transparent 28.5%, transparent 72%, rgba(80, 200, 255, 0.55) 72.5%, rgba(80, 200, 255, 0.55) 79%, transparent 79.5%, transparent 85.5%, rgba(80, 200, 255, 0.7) 86%, transparent);
  clip-path: polygon(0 55%, 10% 55%, 13% 0, 23% 0, 25% 35%, 75% 35%, 77% 0, 87% 0, 90% 55%, 100% 55%, 100% 70%, 68% 70%, 66% 100%, 34% 100%, 32% 70%, 0 70%);
}

.lobby-logo-frame {
  position: relative;
  width: min(100%, 1080px);
  height: clamp(150px, 23vh, 220px);
  overflow: hidden;
  filter: drop-shadow(0 0 26px rgba(80, 200, 255, 0.28));
  user-select: none;
}

.lobby-logo-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 61%;
  bottom: 5px;
  width: min(34%, 380px);
  height: clamp(34px, 4.7vh, 46px);
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent 0%, #02070d 8%, #02070d 92%, transparent 100%),
    radial-gradient(circle at 50% 50%, rgba(43, 178, 246, 0.2), transparent 70%);
  box-shadow:
    0 0 14px rgba(67, 204, 255, 0.18),
    inset 0 0 10px rgba(119, 220, 255, 0.08);
  pointer-events: none;
}

.lobby-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
}

.lobby-logo-version {
  position: absolute;
  z-index: 2;
  left: 61%;
  bottom: 12px;
  transform: translateX(-50%);
  color: #9beeff;
  font-size: clamp(0.82rem, 1.8vw, 1.35rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 0 10px rgba(104, 220, 255, 0.86),
    0 0 28px rgba(26, 139, 224, 0.5);
  pointer-events: none;
}

.lobby-hero h1 {
  max-width: 980px;
  color: #f6fbff;
  font-size: clamp(2.8rem, 6.7vw, 5.25rem);
  letter-spacing: 0;
  line-height: 0.88;
  text-shadow:
    0 2px 0 #7f99aa,
    0 7px 18px rgba(80, 200, 255, 0.36),
    0 0 38px rgba(182, 238, 255, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #d9f4ff 24%, #7d9fb2 45%, #f8fdff 58%, #a9c9db 78%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lobby-hero .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
}

.lobby-kicker {
  color: #69d8ff;
  font-size: clamp(1.05rem, 2.5vw, 1.65rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(80, 200, 255, 0.65);
}

.lobby-mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lobby-mode:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.lobby-mode-quick {
  border-color: rgba(242, 190, 76, 0.42);
  background:
    linear-gradient(90deg, rgba(55, 39, 12, 0.88), rgba(18, 23, 29, 0.82)),
    radial-gradient(circle at 16% 50%, rgba(255, 194, 62, 0.15), transparent 42%);
}

.lobby-mode-quick.is-active {
  border-color: rgba(255, 207, 96, 0.95);
  box-shadow: 0 0 30px rgba(255, 190, 56, 0.25), inset 0 0 24px rgba(255, 195, 70, 0.1);
}

.lobby-mode {
  position: relative;
  justify-content: start;
  min-height: 68px;
  padding: 11px 18px;
  border-color: rgba(80, 200, 255, 0.36);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(8, 41, 64, 0.9), rgba(7, 23, 36, 0.78)),
    radial-gradient(circle at 15% 50%, rgba(80, 200, 255, 0.18), transparent 42%);
  box-shadow: inset 0 0 0 1px rgba(126, 229, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.28);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.lobby-mode::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(80, 200, 255, 0.2);
  pointer-events: none;
  clip-path: inherit;
}

.lobby-mode.is-active {
  border-color: rgba(70, 220, 255, 0.96);
  background:
    linear-gradient(90deg, rgba(8, 62, 91, 0.98), rgba(7, 28, 42, 0.88)),
    radial-gradient(circle at 18% 50%, rgba(80, 220, 255, 0.34), transparent 44%);
  box-shadow: 0 0 30px rgba(42, 210, 255, 0.34), inset 0 0 24px rgba(42, 210, 255, 0.12);
}

.lobby-mode-online {
  border-color: rgba(97, 168, 204, 0.34);
  background:
    linear-gradient(90deg, rgba(21, 37, 52, 0.84), rgba(8, 17, 28, 0.78)),
    radial-gradient(circle at 16% 50%, rgba(160, 200, 230, 0.12), transparent 42%);
}

.lobby-mode-online.is-active {
  border-color: rgba(120, 225, 255, 0.9);
}

.lobby-mode-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(128, 226, 255, 0.56);
  background: rgba(3, 18, 31, 0.72);
  color: #8eeaff;
  font-size: 2rem;
  text-shadow: 0 0 18px rgba(80, 220, 255, 0.82);
  clip-path: polygon(50% 0, 92% 24%, 92% 76%, 50% 100%, 8% 76%, 8% 24%);
}

.lobby-mode-copy {
  display: grid;
  gap: 2px;
}

.lobby-mode strong {
  margin: 0;
  color: #f4fbff;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  text-shadow: 0 0 16px rgba(180, 242, 255, 0.28);
}

.lobby-mode-label {
  color: #9bc1d3;
  letter-spacing: 0.04em;
}

.lobby-battle-panel,
.lobby-online-panel {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(80, 200, 255, 0.5);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(4, 19, 32, 0.94), rgba(9, 22, 35, 0.86)),
    radial-gradient(circle at 52% 43%, rgba(80, 200, 255, 0.18), transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(185, 242, 255, 0.06), 0 20px 55px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.lobby-battle-panel::before,
.lobby-online-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(80, 200, 255, 0.14);
  pointer-events: none;
}

.lobby-battle-panel > *,
.lobby-online-panel > * {
  position: relative;
  z-index: 1;
}

.lobby-battle-panel > .lobby-difficulty {
  width: min(520px, 100%);
  margin: 0 auto 10px;
  padding: 8px;
  border: 1px solid rgba(255, 105, 89, 0.62);
  background: linear-gradient(90deg, rgba(68, 20, 18, 0.86), rgba(17, 15, 21, 0.78));
  box-shadow: 0 0 24px rgba(255, 83, 70, 0.2), inset 0 0 18px rgba(255, 90, 70, 0.08);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.lobby-battle-panel > .lobby-difficulty > span {
  text-align: center;
  color: #ffbeb5;
}

.lobby-loadout-grid {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
}

.lobby-vs-mark {
  align-self: center;
  justify-self: center;
  color: #f5fbff;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.75), 0 0 34px rgba(80, 200, 255, 0.84);
}

.lobby-card {
  padding: 16px;
  grid-template-rows: auto minmax(132px, 1fr) auto auto;
  gap: 10px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(5, 24, 39, 0.9), rgba(2, 8, 15, 0.94)),
    radial-gradient(circle at 50% 42%, rgba(80, 200, 255, 0.16), transparent 46%);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.lobby-card::before {
  width: 3px;
}

.lobby-card-human {
  box-shadow: 0 0 26px rgba(80, 200, 255, 0.18), inset 0 0 24px rgba(80, 200, 255, 0.08);
}

.lobby-card-bot {
  background:
    linear-gradient(180deg, rgba(32, 12, 14, 0.9), rgba(2, 8, 15, 0.94)),
    radial-gradient(circle at 50% 42%, rgba(255, 75, 67, 0.16), transparent 46%);
  box-shadow: 0 0 26px rgba(255, 75, 67, 0.18), inset 0 0 24px rgba(255, 75, 67, 0.08);
}

.lobby-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.lobby-card h2 {
  color: var(--lobby-accent, var(--blue-soft));
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  text-shadow: 0 0 22px var(--lobby-accent-glow, rgba(80, 200, 255, 0.44));
}

.lobby-ship-portrait {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  overflow: hidden;
}

.lobby-ship-portrait::before {
  content: "";
  position: absolute;
  width: min(240px, 78%);
  aspect-ratio: 1;
  border: 1px solid var(--lobby-accent, var(--blue));
  border-radius: 50%;
  opacity: 0.48;
  box-shadow: 0 0 36px var(--lobby-accent-glow, rgba(80, 200, 255, 0.4));
}

.lobby-ship-portrait::after {
  content: "";
  position: absolute;
  width: min(280px, 86%);
  aspect-ratio: 1;
  border: 1px dashed var(--lobby-accent, var(--blue));
  border-radius: 50%;
  opacity: 0.22;
}

.lobby-ship-picture {
  position: relative;
  display: grid;
  place-items: center;
  width: min(230px, 82%);
  height: 132px;
  aspect-ratio: 230 / 132;
}

.lobby-ship-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 22px var(--lobby-accent-glow, rgba(80, 200, 255, 0.42)));
}

.lobby-card-bot .lobby-ship-picture img {
  transform: scale(1.02);
}

.lobby-select-field select {
  min-height: 52px;
  border-color: var(--lobby-accent, var(--blue));
  background: rgba(2, 12, 22, 0.82);
  color: #f2fbff;
  font-size: clamp(0.98rem, 1.8vw, 1.35rem);
  font-weight: 900;
}

.lobby-difficulty-field select {
  min-height: 48px;
  font-size: clamp(0.96rem, 1.55vw, 1.18rem);
}

.lobby-edit-button {
  min-height: 50px;
  color: #dff8ff;
  border-color: rgba(120, 225, 255, 0.56);
  background: linear-gradient(180deg, rgba(9, 48, 76, 0.84), rgba(5, 20, 34, 0.9));
  font-size: 1.02rem;
}

.lobby-preset-description {
  color: #cfeeff;
  font-size: 0.88rem;
}

.lobby-preset-category {
  font-size: 0.76rem;
}

.lobby-launch-button {
  width: 100%;
  min-height: 74px;
  margin-top: 10px;
  font-size: clamp(1.85rem, 4.5vw, 3.35rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  clip-path: polygon(32px 0, 100% 0, 100% calc(100% - 32px), calc(100% - 32px) 100%, 0 100%, 0 32px);
  box-shadow: 0 0 36px rgba(80, 220, 255, 0.42), inset 0 0 28px rgba(160, 238, 255, 0.16);
}

.lobby-launch-button::before,
.lobby-launch-button::after {
  content: "›";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(196, 246, 255, 0.7);
  font-size: 0.8em;
}

.lobby-launch-button::before {
  left: 26px;
}

.lobby-launch-button::after {
  right: 26px;
  transform: translateY(-50%) rotate(180deg);
}

.lobby-online-setup {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.lobby-online-card {
  min-height: 100%;
  padding: 28px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
  border: 1px solid rgba(80, 200, 255, 0.56);
  background:
    radial-gradient(circle at 50% 20%, rgba(80, 200, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(6, 34, 54, 0.86), rgba(2, 9, 16, 0.92));
  clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);
}

.lobby-online-card h2 {
  margin: 0;
  color: #dff8ff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(80, 200, 255, 0.46);
}

.lobby-online-card p {
  max-width: 560px;
  margin: 0;
  color: #cfeeff;
  font-weight: 800;
  line-height: 1.35;
}

.lobby-online-status {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(80, 200, 255, 0.38);
  background: rgba(3, 16, 27, 0.78);
  color: #cfeeff;
  font-weight: 800;
  text-align: center;
}

.lobby-active-match-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lobby-active-match-status .ghost-button {
  min-height: 44px;
  margin: 0;
}

.lobby-active-match-status .ghost-button.is-danger {
  border-color: rgba(255, 122, 116, 0.72);
  color: #ffd6d2;
}

.lobby-coming-soon {
  opacity: 0.72;
}

