html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #e8f4ff;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  pointer-events: none;
}

.room-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--hv-chat-h, 200px);
  display: grid;
  place-items: center;
  /* Symmetric L/R padding so the room panel stays viewport-centered
     (HUD insets were pushing it to the right). */
  padding:
    calc(var(--hv-hud-top-inset, 92px) + clamp(6px, 1.2vh, 12px))
    clamp(8px, 1.5vw, 14px)
    clamp(6px, 1.2vh, 12px)
    clamp(8px, 1.5vw, 14px);
  box-sizing: border-box;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
}

.container {
  --hv-room-panel-max-h: min(550px, calc(var(--hv-room-available-h, 600px) - var(--hv-hud-top-inset, 92px) - 24px));
  --hv-room-panel-max-w: min(900px, 100%);
  --hv-room-cyan: rgba(0, 255, 255, 0.55);
  --hv-room-magenta: rgba(255, 0, 170, 0.55);
  pointer-events: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(6px, 0.9vh, 10px);
  padding: clamp(10px, 1.4vh, 14px);
  overflow: hidden;
  box-sizing: border-box;
  width: min(var(--hv-room-panel-max-w), 100%);
  max-width: 100%;
  height: min(var(--hv-room-panel-max-h), 100%);
  max-height: 100%;
  min-height: 0;
  flex: 0 1 auto;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, transparent 24%),
    linear-gradient(225deg, rgba(255, 0, 170, 0.06) 0%, transparent 40%),
    linear-gradient(135deg, rgba(8, 14, 28, 0.94) 0%, rgba(4, 8, 18, 0.97) 100%);
  border: 1px solid rgba(0, 255, 255, 0.22);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow:
    0 0 0 1px rgba(255, 0, 128, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 32px rgba(0, 255, 255, 0.1);
}

.hv-room-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hv-room-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(0, 255, 255, 0.8);
  border-style: solid;
  filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.5));
}

.hv-room-corner-tl {
  top: 5px;
  left: 5px;
  border-width: 2px 0 0 2px;
}

.hv-room-corner-tr {
  top: 5px;
  right: 5px;
  border-width: 2px 2px 0 0;
}

.hv-room-corner-bl {
  bottom: 5px;
  left: 5px;
  border-width: 0 0 2px 2px;
}

.hv-room-corner-br {
  bottom: 5px;
  right: 5px;
  border-width: 0 2px 2px 0;
}

.hv-room-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.025) 2px,
    rgba(0, 255, 255, 0.025) 4px
  );
  opacity: 0.45;
  animation: hvRoomScan 7s linear infinite;
}

@keyframes hvRoomScan {
  from { transform: translateY(0); }
  to { transform: translateY(10px); }
}

.hv-room-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.14);
}

.hv-room-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.45), transparent);
}

.hv-room-tag {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid rgba(255, 0, 128, 0.45);
  background: rgba(255, 0, 128, 0.1);
  color: #ff6eb4;
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: 0 0 10px rgba(255, 0, 128, 0.35);
}

.container > h1,
.hv-room-head > h1 {
  flex: 1;
  min-width: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(12px, 1.6vw, 17px);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0;
  padding: 0;
  border: none;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dffcff;
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.22);
}

.container > .header-btns,
.hv-room-head > .header-btns {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  position: static;
  z-index: 1;
  gap: 6px;
  align-items: center;
}

.container .button,
.container .hv-room-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid rgba(0, 255, 255, 0.38);
  border-radius: 0;
  color: #e0ffff;
  background: linear-gradient(135deg, rgba(0, 36, 52, 0.96), rgba(28, 0, 44, 0.96));
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  box-shadow:
    0 0 10px rgba(0, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.container .button:focus,
.container .hv-room-btn:focus {
  outline: none;
}

.container .button:hover:not(:disabled),
.container .hv-room-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 56, 72, 0.98), rgba(56, 0, 72, 0.98));
  border-color: rgba(255, 0, 180, 0.55);
  box-shadow:
    0 0 16px rgba(0, 255, 255, 0.32),
    0 0 8px rgba(255, 0, 128, 0.22);
}

.container .button:active:not(:disabled),
.container .hv-room-btn:active:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 24, 36, 0.98), rgba(16, 0, 28, 0.98));
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}

.container .button:disabled,
.container .hv-room-btn:disabled {
  background: rgba(24, 28, 36, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.32);
  box-shadow: none;
  cursor: default;
}

.container .button.green,
.container .hv-room-btn--start {
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(135deg, rgba(0, 48, 36, 0.96), rgba(0, 32, 52, 0.96));
  color: #a7f3d0;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.2);
}

.container .button.green:hover:not(:disabled),
.container .hv-room-btn--start:hover:not(:disabled) {
  border-color: rgba(110, 231, 183, 0.75);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
}

.container .button.red,
.container .hv-room-btn--action.red {
  border-color: rgba(248, 113, 113, 0.55);
  background: linear-gradient(135deg, rgba(52, 0, 16, 0.96), rgba(32, 0, 32, 0.96));
  color: #fecaca;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

.container .button.red:hover:not(:disabled),
.container .hv-room-btn--action.red:hover:not(:disabled) {
  border-color: rgba(252, 165, 165, 0.75);
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.35);
}

.container .hv-room-btn--ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 20, 0.85);
  color: rgba(200, 220, 240, 0.85);
}

.container input {
  color: #e8f4ff;
  background: rgba(4, 10, 18, 0.96);
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: 2px;
  padding: 0 10px;
  box-sizing: border-box;
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.container input:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 0.55);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.18);
}

.container select {
  border: 1px solid rgba(0, 255, 255, 0.28);
  background: rgba(4, 10, 18, 0.96);
  border-radius: 2px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: #e8f4ff;
  padding: 2px 8px;
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 0 8px rgba(0, 255, 255, 0.04);
}

.container select:hover:not(:disabled) {
  border-color: rgba(0, 255, 255, 0.5);
}

.container > .teams {
  position: relative;
  z-index: 1;
  margin-left: -3px;
  margin-right: -3px;
  display: flex;
  flex: 1 1 0;
  justify-content: center;
  align-items: stretch;
  min-height: 72px;
  overflow: hidden;
}

.container > .teams > * {
  margin-left: 3px;
  margin-right: 3px;
}

.container > .teams > .tools {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: clamp(52px, 7vw, 80px);
  flex-shrink: 0;
}

.container > .teams > .tools .button,
.container > .teams > .tools .hv-room-btn {
  font-size: clamp(9px, 1.2vw, 10px);
  padding: clamp(3px, 0.5vh, 6px) 4px;
  letter-spacing: 0.08em;
}

.container > .teams > .tools > :not(:last-child) {
  margin-bottom: 6px;
}

.container > .teams > .spacer {
  flex: 1 1 0;
  max-width: 83px;
  margin: 0;
}

.container > .teams .player-list-view {
  min-width: 0;
  flex: 1 1 0;
  width: auto;
  max-width: 240px;
  display: flex;
  flex-flow: column;
  min-height: 0;
}

.container > .teams .player-list-view > :not(:last-child) {
  margin-bottom: 6px;
}

.container > .teams .player-list-view .buttons {
  display: flex;
  justify-content: center;
  flex-flow: row nowrap;
  gap: 4px;
}

.container > .teams .player-list-view .buttons button.join-btn {
  min-width: 0;
  flex: 1;
  font-size: clamp(10px, 1.4vw, 12px);
  letter-spacing: 0.08em;
}

.container > .teams .player-list-view .list {
  flex: 1 1 0;
  min-height: 40px;
  max-height: none;
  background:
    linear-gradient(180deg, rgba(0, 8, 16, 0.85), rgba(4, 10, 18, 0.92));
  border: 1px solid rgba(0, 255, 255, 0.12);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 255, 0.55) rgba(0, 255, 255, 0.06);
}

.container > .teams .player-list-view .list::-webkit-scrollbar {
  width: 6px;
}

.container > .teams .player-list-view .list::-webkit-scrollbar-track {
  margin: 8px 2px;
  background: rgba(0, 18, 28, 0.6);
  border-radius: 999px;
}

.container > .teams .player-list-view .list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.75), rgba(255, 0, 128, 0.55));
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.28);
}

.container > .teams .player-list-view.t-red .buttons button.join-btn {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
  background: linear-gradient(135deg, rgba(48, 8, 12, 0.96), rgba(24, 0, 32, 0.96));
}

.container > .teams .player-list-view.t-red .list {
  border-color: rgba(248, 113, 113, 0.28);
  box-shadow: inset 0 0 16px rgba(248, 113, 113, 0.06);
}

.container > .teams .player-list-view.t-red button.reset-btn {
  margin-left: 0;
  min-width: 28px;
  padding: 6px 8px;
}

.container > .teams .player-list-view.t-red button.reset-btn:before {
  content: "\25b6";
}

.container > .teams .player-list-view.t-blue .buttons {
  flex-direction: row-reverse;
}

.container > .teams .player-list-view.t-blue .buttons button.join-btn {
  border-color: rgba(96, 165, 250, 0.55);
  color: #93c5fd;
  background: linear-gradient(135deg, rgba(8, 16, 48, 0.96), rgba(0, 24, 40, 0.96));
}

.container > .teams .player-list-view.t-blue .list {
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: inset 0 0 16px rgba(96, 165, 250, 0.06);
}

.container > .teams .player-list-view.t-blue button.reset-btn {
  margin-right: 0;
  min-width: 28px;
  padding: 6px 8px;
}

.container > .teams .player-list-view.t-blue button.reset-btn:before {
  content: "\25c0";
}

.container > .teams .player-list-view:not(.t-red):not(.t-blue) .buttons button.join-btn {
  border-color: rgba(0, 255, 255, 0.35);
  color: #bae6fd;
}

.rec-btn:before {
  content: "\25c9";
  color: rgba(160, 180, 200, 0.8);
  padding-right: 5px;
}

.rec-btn.active:before {
  color: #f87171;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.75);
}

.rec-btn.active {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.35);
}

.hv-room-link-wrap {
  position: relative;
  display: inline-flex;
}

.link-btn:before {
  content: "\26D3";
  color: rgba(255, 110, 184, 0.9);
  padding-right: 5px;
}

.link-btn:hover:not(:disabled) {
  border-color: rgba(255, 110, 184, 0.55);
  box-shadow: 0 0 12px rgba(255, 110, 184, 0.25);
}

.hv-room-settings-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 50%;
  clip-path: none;
  flex-shrink: 0;
}

.hv-room-settings-btn::before {
  content: "\2699";
  color: rgba(0, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1;
}

.hv-room-settings-btn:hover:not(:disabled) {
  border-color: rgba(0, 255, 255, 0.62);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.28);
}

.hv-room-quit-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 50%;
  clip-path: none;
  flex-shrink: 0;
  border-color: rgba(255, 80, 80, 0.55);
}

.hv-room-quit-btn::before {
  content: "\23FB";
  color: rgba(254, 202, 202, 0.95);
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
}

.hv-room-quit-btn:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
  background: rgba(127, 29, 29, 0.35);
}

.hv-room-quit-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hv-link-copied-badge {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  padding: 5px 10px;
  border: 1px solid rgba(255, 110, 184, 0.45);
  background: rgba(12, 8, 18, 0.96);
  color: #ffb8dc;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 0 14px rgba(255, 110, 184, 0.2);
}

.hv-link-copied-badge.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.start-btn:before {
  content: "\25b6";
  padding-right: 4px;
}

.stop-btn:before {
  content: "\25a0";
  padding-right: 4px;
  position: relative;
  top: -2px;
  font-size: 14px;
}

.pause-btn:before {
  content: "\275A \275A";
  padding-right: 4px;
  font-size: 12px;
}

.lock-btn:before {
  content: "\1F513";
  padding-right: 3px;
  font-size: 12px;
}

.lock-btn.locked:before {
  content: "\1F512";
}

.container > .settings {
  position: relative;
  z-index: 1;
  width: min(320px, 100%);
  align-self: center;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 255, 255, 0.12);
  background: rgba(0, 8, 16, 0.45);
}

.container > .settings > div {
  line-height: clamp(20px, 2.2vh, 24px);
  margin-bottom: clamp(3px, 0.4vh, 6px);
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
}

.container > .settings > div:last-child {
  margin-bottom: 0;
}

.container > .settings > div > .lbl {
  flex: 0 0 90px;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.container > .settings > div > .val {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  color: #e8f4ff;
}

.container > .settings > div > .val.custom {
  color: #fde68a;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.25);
}

.container > .settings > div > select {
  width: 100px;
}

.container > .settings .hv-room-btn--pick {
  font-size: 9px;
  padding: 5px 10px;
}

.container > .controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: center;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.container > .controls > * {
  margin: 0;
}

.player-list-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  line-height: 20px;
  vertical-align: middle;
  padding: 4px 6px;
  margin: 2px 4px;
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(12px, 1.8vw, 15px);
  font-weight: 600;
  white-space: nowrap;
  border-left: 2px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.player-list-item.admin .p-name {
  color: #fde68a;
  text-shadow: 0 0 8px rgba(253, 230, 138, 0.2);
}

.player-list-item .flagico {
  margin-right: 4px;
  position: relative;
  top: 1px;
}

.player-list-item .p-captain-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 16px;
  margin-right: 0;
  padding: 0 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f5d76e 0%, #d4a017 55%, #b8860b 100%);
  color: #2a1d00;
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  box-shadow: 0 0 8px rgba(245, 215, 110, 0.45);
  flex-shrink: 0;
}

.player-list-item .p-captain-gap {
  flex-shrink: 0;
}

.player-list-item .p-rank {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.25));
}

.player-list-item .p-name {
  min-width: 10px;
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  color: #e8f4ff;
}

.player-list-item .p-line {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  white-space: nowrap;
}

.player-list-item.has-duty-report {
  flex-direction: column;
  align-items: stretch;
  white-space: normal;
  line-height: 1.25;
  padding-top: 5px;
  padding-bottom: 5px;
}

.player-list-item .p-ping-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 30px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.player-list-item .p-duty-ka {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 2px;
  padding-left: 24px;
  font-family: "Orbitron", "Share Tech Mono", "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #8fd8ff;
  text-shadow: 0 0 8px rgba(80, 200, 255, 0.35);
  opacity: 0.92;
}

.player-list-item .p-ignored-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: #ff5a5a;
  filter: drop-shadow(0 0 5px rgba(255, 59, 59, 0.55));
  flex-shrink: 0;
}

.player-list-item .p-ignored-icon-svg {
  display: block;
  width: 14px;
  height: 14px;
}

.player-list-item.is-ignored .p-name {
  color: rgba(232, 244, 255, 0.72);
}

.player-list-item .p-ping {
  min-width: 30px;
  text-align: right;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.player-list-item .p-ping.ping-excellent {
  color: #86efac;
  text-shadow: 0 0 8px rgba(134, 239, 172, 0.55);
}

.player-list-item .p-ping.ping-good {
  color: #16a34a;
  text-shadow: 0 0 6px rgba(22, 163, 74, 0.45);
}

.player-list-item .p-ping.ping-warn {
  color: #fde047;
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.5);
}

.player-list-item .p-ping.ping-bad {
  color: #f87171;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.55);
}

.player-list-item:hover {
  background: rgba(0, 255, 255, 0.06);
  border-left-color: rgba(0, 255, 255, 0.45);
}

.room-view:not(.admin) .admin-only {
  display: none !important;
}

.center {
  justify-content: center;
}

#inputpopup {
  display: none;
  flex-direction: column;
  position: fixed;
  left: calc(50% - 130px);
  top: calc(50% - 48px);
  width: 260px;
  min-height: 88px;
  background:
    linear-gradient(135deg, rgba(8, 14, 28, 0.97) 0%, rgba(4, 8, 18, 0.98) 100%);
  color: #e8f4ff;
  border: 1px solid rgba(0, 255, 255, 0.28);
  padding: 12px;
  pointer-events: auto;
  z-index: 100;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(0, 255, 255, 0.12);
}

.hv-room-popup-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hv-room-popup-frame .hv-room-corner {
  width: 12px;
  height: 12px;
}

#inputpopup > div:not(.hv-room-popup-frame) {
  position: relative;
  z-index: 1;
}

#inputpopup label {
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
}

#inputpopup > div:nth-child(2) {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

#inputpopup > div:nth-child(3) {
  display: flex;
  flex-direction: row;
  margin-top: 12px;
  justify-content: space-evenly;
  gap: 8px;
}

#inputpopup input {
  flex-grow: 1;
}

.ctxmenu {
  pointer-events: auto;
}

@media (max-width: 720px) {
  .container {
    --hv-room-panel-max-w: 100%;
    padding: 8px;
  }

  .container > .teams > .tools {
    width: 48px;
  }

  .container > .teams > .spacer {
    display: none;
  }

  .hv-room-head {
    flex-wrap: wrap;
  }

  .hv-room-head > h1 {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-height: 520px) {
  html.hv-room-compact .container,
  .container {
    gap: 4px;
    padding: 6px;
  }

  html.hv-room-compact .hv-room-head > h1,
  .hv-room-head > h1 {
    font-size: 12px;
  }

  html.hv-room-compact .container > .teams,
  .container > .teams {
    min-height: 56px;
  }

  html.hv-room-compact .container > .teams .player-list-view .list,
  .container > .teams .player-list-view .list {
    min-height: 32px;
  }

  html.hv-room-compact .player-list-item,
  .player-list-item {
    padding: 2px 4px;
    margin: 1px;
    font-size: 12px;
    line-height: 18px;
  }

  html.hv-room-compact .player-list-item .p-rank,
  .player-list-item .p-rank {
    width: 15px;
    height: 15px;
    margin-right: 3px;
  }

  html.hv-room-compact .container > .controls .button,
  .container > .controls .button {
    font-size: 9px;
    padding: 4px 8px;
  }
}

@media (max-height: 380px) {
  html.hv-room-tight .container > .teams > .tools .button,
  .container > .teams > .tools .button {
    font-size: 8px;
    padding: 2px 3px;
  }

  html.hv-room-tight .container > .settings > div,
  .container > .settings > div {
    line-height: 16px;
    margin-bottom: 1px;
  }

  html.hv-room-tight .container > .settings > div > .lbl,
  .container > .settings > div > .lbl {
    flex-basis: 72px;
  }
}
