.root {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.topRight {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  z-index: var(--z-hud);
  gap: 8px;
  align-items: flex-end;
  justify-content: center;
  flex-direction: column;
}

.topRightRow {
  display: flex;
  gap: 8px;
  align-items: stretch;
  justify-content: center;
}

.leaderBoard {
  position: absolute;
  top: 24px;
  left: 24px;
  padding: 16px;
  border: 1px solid var(--control-border);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: var(--z-hud);
  font-size: var(--text-size-small);
}

.leaderBoardItem {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.damageFlasher {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-color: var(--tomato-10);
  opacity: 0;
  z-index: var(--z-screen-effect);
}

.damageFlasherDead {
  opacity: 0.2;
}

.key {
  display: flex;
  border: 1px solid var(--control-border);
  width: 48px;
  height: 48px;
  font-size: 24px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: bold;
  position: relative;
  background-color: transparent;
  color: var(--gray-10);
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 1px 2px var(--control-border);
}

.key:focus-visible {
  outline: none;
}

.keyBg {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: var(--gray-10);
  opacity: 0;
  transition: all 0.2s;
  outline: none;
}

.keyBgPressed {
  opacity: 0.5;
}

.key:hover {
  color: var(--gray-12);
}

.key:hover .keyBg {
  opacity: 0.3;
}

.arrowKeysOverlay {
  position: absolute;
  bottom: 24px;
  right: 24px;
}

.joystickOverlay {
  position: absolute;
  bottom: 24px;
  right: 24px;
}

.joystickOverlay [data-testid="joystick-base"] {
  background-color: transparent !important;
  border: 1px solid var(--control-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.joystickOverlay button {
  opacity: 0.5;
}

.joystickDuoOverlay {
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 48px 24px 32px;
  left: 0;
  bottom: 0;
  justify-content: space-between;
}

.joystickX [data-testid="joystick-base"] {
  height: 10px !important;
}

.joystickY [data-testid="joystick-base"] {
  width: 10px !important;
}

.keyboardControlsOverlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-hud);
}

.weaponControlsOverlay {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.weaponControlsOverlayMiddle {
  left: 50%;
  transform: translateX(-50%);
}

.weaponRow {
  display: flex;
  gap: 8px;
  align-items: center;
}

.weaponControlsOverlayMiddle .weaponRow {
  flex-direction: column;
}

.ammos {
  display: flex;
  gap: 4px;
  align-items: center;
}

.rocket {
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rocketUsed, .rocketRefilling {
  border-style: dotted;
}

.rocketProgress {
  opacity: 0.5;
  height: 100%;
}

.chats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  pointer-events: none;
  overflow: auto;
  align-items: flex-end;
  width: min(45vw, 500px);
  z-index: var(--z-chats);
  margin-left: auto;
}

.chats::-webkit-scrollbar {
  display: none;
}

.chatInput {
  font-size: var(--text-size-small);
}

@media screen and (max-width: 1024px) {
  .chatInput {
    width: 150px;
  }
}

.chatMessage {
  color: var(--gray-12);
  border-radius: 8px;
  padding: 8px;
  font-size: var(--text-size-small);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.chatMessageBg {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  transition: all 0.2s;
  z-index: -1;
}

.chatMessageAuthor {
  font-weight: bold;
  color: var(--gray-12);
}