html,
body {
  background-color: #000;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
  font-family: Georgia, "Times New Roman", serif;
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  touch-action: none;
}

.messageStyle {
  position: absolute;
  overflow: hidden;
  background: rgba(16, 20, 27, 0.42);
  color: white;
  user-select: none;
  outline: none;
  cursor: default;
  resize: none;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.killFeedDiv {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  overflow: hidden;
  background: transparent;
  margin: 0;
  padding: 0;
  text-align: left;
}

.killFeedMessage {
  position: relative;
  display: block;
  background: rgba(0, 0, 0, 0);
  color: rgba(102, 255, 102, 1);
  font-size: 12px;
  line-height: 1.2;
  margin: 0;
  padding: 0;
  transition: opacity 0.2s linear;
}

.chatFeedDiv {
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 10;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  min-height: calc((1em * 5) + (0.28em * 4));
  overflow: hidden;
  background: transparent;
  margin: 0;
  padding: 0;
  text-align: left;
  pointer-events: none;
}

.chatFeedMessage {
  position: relative;
  display: block;
  background: rgba(0, 0, 0, 0);
  color: rgba(218, 226, 235, 0.86);
  font-size: 12px;
  line-height: 1.28;
  margin: 0;
  padding: 0;
}

.leaderboardDiv {
  position: absolute;
  top: 50px;
  right: 14px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  overflow: hidden;
  background: transparent;
  margin: 0;
  padding: 0;
  text-align: right;
  pointer-events: none;
}

.leaderboardTitle {
  display: block;
  margin: 0 0 3px 0;
  padding: 0;
  color: rgba(218, 222, 229, 0.72);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboardMessage {
  display: block;
  margin: 0;
  padding: 0;
  color: rgba(218, 222, 229, 0.72);
  font-size: 13px;
  line-height: 1.2;
}

.gameChatButton,
.gameMenuButton {
  position: fixed;
  top: 10px;
  left: auto;
  z-index: 35;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 20, 27, 0.18);
  color: rgba(243, 247, 252, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.gameChatButton {
  right: 86px;
}

.gameMenuButton {
  right: 14px;
}

.chatComposer {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 38;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(460px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(210, 225, 245, 0.18);
  border-radius: 16px;
  background: rgba(14, 19, 26, 0.72);
  backdrop-filter: blur(12px);
}

.chatComposerInput {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(215, 228, 243, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #edf5fd;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  outline: none;
}

.chatComposerInput::placeholder {
  color: rgba(225, 234, 244, 0.46);
}

.chatComposerSend {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(53, 78, 110, 0.96), rgba(20, 31, 48, 0.98));
  color: #eef6ff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.gameMenuOverlay {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 13, 18, 0.22);
}

.gameMenuPanel {
  width: min(360px, calc(100vw - 28px));
  padding: 22px 20px 20px;
  border-radius: 22px;
  border: 1px solid rgba(210, 225, 245, 0.24);
  background: rgba(18, 24, 33, 0.9);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.gameMenuTitle {
  margin: 0 0 14px;
  color: #f2f7fc;
  font-size: 28px;
  font-weight: normal;
}

.gameMenuActionButton,
.gameMenuExitButton {
  width: 100%;
  padding: 13px 18px;
  border-radius: 999px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.gameMenuActionButton {
  margin-top: 8px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(53, 78, 110, 0.96), rgba(20, 31, 48, 0.98));
  color: #eef6ff;
}

.gameMenuLabel {
  display: block;
  margin-bottom: 8px;
  color: rgba(233, 240, 248, 0.86);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.gameMenuSlider {
  width: 100%;
  margin: 0;
}

.gameMenuValue {
  margin-top: 8px;
  margin-bottom: 18px;
  color: rgba(205, 220, 237, 0.78);
  font-size: 14px;
}

.gameMenuToggleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: rgba(233, 240, 248, 0.86);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.gameMenuToggleText {
  flex: 1 1 auto;
}

.gameMenuCheckbox {
  width: 18px;
  height: 18px;
  accent-color: #7da7d7;
  cursor: pointer;
}

.gameMenuExitButton {
  border: 1px solid rgba(255, 202, 202, 0.28);
  background: linear-gradient(180deg, rgba(120, 45, 45, 0.96), rgba(63, 18, 18, 0.98));
  color: #fff0f0;
}

#divRespawnMenu {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.btnRespawn {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  padding: 12px 26px;
  width: auto;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 185, 110, 0.95), rgba(193, 87, 33, 0.95));
  color: #fff8ec;
  font-size: 17px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.respawnCountdown {
  position: fixed;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  z-index: 41;
  color: rgba(255, 245, 232, 0.95);
  font-size: clamp(54px, 10vw, 110px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

#divTitleScreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  z-index: 20;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.cloudsvideo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.titleOverlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(7, 12, 18, 0.08), rgba(7, 12, 18, 0.72));
}

.warhawkarena {
  position: fixed;
  top: 6%;
  left: 50%;
  display: block;
  margin-left: 0;
  margin-right: 0;
  width: auto;
  height: auto;
  object-fit: contain;
  max-height: 70%;
  max-width: 94vw;
  z-index: 2;
  opacity: 0;
  filter: blur(18px);
  transform: translateX(-50%) translateY(42px) scale(0.94);
  animation: titleReveal 1.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s forwards;
}

.titleBottomPanel {
  position: fixed;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 40px));
  z-index: 3;
}

.loadingCopy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #eef3f8;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loadingLabel {
  opacity: 0.9;
}

.loadingPercent {
  color: #9ed0ff;
}

.loadingTrack {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(7, 12, 18, 0.6);
  border: 1px solid rgba(196, 220, 255, 0.3);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.loadingFill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #98c9ff 0%, #f6fcff 45%, #7dbaff 100%);
  box-shadow: 0 0 18px rgba(130, 189, 255, 0.75);
  transition: width 0.2s ease;
}

.titleActionPanel {
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateX(-50%) translateY(18px);
}

.titleActionPanel.is-visible {
  animation: playButtonReveal 0.65s ease forwards;
}

.primaryActionButton {
  min-width: 210px;
  padding: 15px 28px;
  border: 1px solid rgba(205, 224, 255, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(32, 54, 79, 0.94), rgba(16, 26, 42, 0.96));
  color: #edf6ff;
  font-size: 20px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.primaryActionButton:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(42, 70, 101, 0.96), rgba(19, 31, 50, 0.98));
}

body.is-portrait .warhawkarena,
#divTitleScreen.is-portrait .warhawkarena {
  top: 8%;
  max-width: 96vw;
  max-height: 44%;
}

body.is-portrait .titleBottomPanel,
#divTitleScreen.is-portrait .titleBottomPanel {
  width: min(620px, calc(100vw - 24px));
  bottom: 6%;
}

body.is-portrait .primaryActionButton,
#divTitleScreen.is-portrait .primaryActionButton {
  min-width: 0;
  width: 100%;
  padding: 17px 28px;
  font-size: 22px;
}

@keyframes titleReveal {
  0% {
    opacity: 0;
    filter: blur(18px);
    transform: translateX(-50%) translateY(42px) scale(0.94);
  }
  55% {
    opacity: 0.92;
    filter: blur(4px);
    transform: translateX(-50%) translateY(-6px) scale(1.015);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes playButtonReveal {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.authShell {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 4;
  min-height: 100dvh;
  box-sizing: border-box;
}

.authPanel {
  width: min(520px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(223, 233, 255, 0.26);
  background: linear-gradient(180deg, rgba(10, 17, 29, 0.82), rgba(16, 28, 42, 0.74));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
  box-sizing: border-box;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}

.authHeader {
  margin-bottom: 20px;
}

.authEyebrow {
  margin: 0 0 8px 0;
  color: #8eb7de;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

.authTitle {
  margin: 0;
  color: #f5f8fc;
  font-size: 36px;
  font-weight: normal;
}

.authSubtitle {
  margin: 10px 0 0 0;
  color: rgba(228, 236, 246, 0.8);
  font-size: 16px;
  line-height: 1.4;
}

.authModeBar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.authModeButton {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(177, 200, 229, 0.22);
  background: rgba(20, 30, 45, 0.68);
  color: #dce7f5;
  font-size: 14px;
  cursor: pointer;
}

.authModeButton.is-active {
  background: linear-gradient(180deg, rgba(106, 160, 219, 0.42), rgba(49, 84, 126, 0.55));
  border-color: rgba(187, 223, 255, 0.55);
  color: #f7fbff;
}

.authStatus {
  min-height: 22px;
  margin-bottom: 16px;
  color: #ffd392;
  font-size: 14px;
}

.authStatus.is-success {
  color: #98ffb3;
}

.authStatus.is-error {
  color: #ffad99;
}

.authCard {
  display: grid;
  gap: 10px;
}

.planeSelectCard {
  display: grid;
  gap: 18px;
}

.planeSelectHeader {
  display: grid;
  gap: 4px;
}

.planeSelectTitle {
  font-size: 32px;
}

.planeChoiceGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.planeChoiceButton {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 18px 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(191, 211, 238, 0.24);
  background: rgba(7, 12, 18, 0.5);
  color: #f5f8fc;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.planeChoiceButton:hover {
  transform: translateY(-1px);
  border-color: rgba(151, 201, 255, 0.6);
}

.planeChoiceButton.is-selected {
  border-color: rgba(151, 201, 255, 0.9);
  background: linear-gradient(180deg, rgba(49, 84, 126, 0.45), rgba(16, 28, 42, 0.76));
  box-shadow: 0 0 0 3px rgba(91, 149, 216, 0.18);
}

.planeChoiceImage {
  display: block;
  width: min(100%, 180px);
  height: auto;
  object-fit: contain;
  image-rendering: auto;
}

.planeChoiceName {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.authLabel {
  color: #edf5ff;
  font-size: 15px;
}

.authInput {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(191, 211, 238, 0.24);
  background: rgba(7, 12, 18, 0.45);
  color: #f5f8fc;
  font-size: 18px;
  outline: none;
}

.authInput:focus {
  border-color: rgba(151, 201, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(91, 149, 216, 0.2);
}

.authSubmit {
  margin-top: 8px;
  width: 100%;
}

@media (max-width: 700px) {
  .warhawkarena {
    top: 8%;
    max-width: 92vw;
    max-height: 42%;
  }

  .authPanel {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .authTitle {
    font-size: 28px;
  }

  .authModeBar {
    grid-template-columns: 1fr;
  }

  .planeChoiceGrid {
    grid-template-columns: 1fr;
  }

  .primaryActionButton {
    min-width: 0;
    width: 100%;
  }

  .titleBottomPanel {
    width: calc(100vw - 28px);
    bottom: 5%;
  }
}

@media (max-height: 640px) {
  .authShell {
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .authPanel {
    padding: 18px 16px;
    border-radius: 20px;
    max-height: calc(100dvh - 28px);
  }

  .authHeader {
    margin-bottom: 14px;
  }

  .authTitle {
    font-size: 26px;
  }

  .authSubtitle {
    font-size: 14px;
    margin-top: 6px;
  }

  .authModeBar {
    margin-bottom: 12px;
  }

  .authCard {
    gap: 8px;
  }

  .planeSelectCard {
    gap: 14px;
  }

  .authInput {
    padding: 10px 12px;
    font-size: 16px;
  }

  .primaryActionButton {
    padding: 12px 20px;
    font-size: 17px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .warhawkarena {
    top: 3%;
    max-width: 86vw;
    max-height: 40%;
  }

  .titleBottomPanel {
    bottom: 3%;
    width: min(460px, calc(100vw - 24px));
  }

  .loadingCopy {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .loadingTrack {
    height: 12px;
  }

  .authShell {
    align-items: flex-start;
    padding: 10px 12px;
  }

  .authPanel {
    width: min(540px, calc(100vw - 24px));
    padding: 14px 14px 16px;
    border-radius: 18px;
    max-height: calc(100dvh - 20px);
  }

  .authHeader {
    margin-bottom: 10px;
  }

  .authEyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .authTitle {
    font-size: 22px;
  }

  .authSubtitle {
    font-size: 13px;
    line-height: 1.25;
    margin-top: 4px;
  }

  .authModeBar {
    gap: 6px;
    margin-bottom: 10px;
  }

  .authModeButton {
    padding: 9px 8px;
    font-size: 12px;
  }

  .authStatus {
    min-height: 18px;
    margin-bottom: 10px;
    font-size: 12px;
  }

  .authCard {
    gap: 6px;
  }

  .planeSelectCard {
    gap: 10px;
  }

  .planeSelectTitle {
    font-size: 20px;
  }

  .planeChoiceGrid {
    gap: 10px;
  }

  .planeChoiceButton {
    padding: 12px 10px 10px;
    border-radius: 16px;
  }

  .planeChoiceImage {
    width: min(100%, 130px);
  }

  .planeChoiceName {
    font-size: 15px;
  }

  .authLabel {
    font-size: 13px;
  }

  .authInput {
    padding: 9px 11px;
    font-size: 15px;
    border-radius: 12px;
  }

  .authSubmit {
    margin-top: 4px;
  }
}

@media (max-width: 460px) {
  .warhawkarena {
    top: 7%;
    max-width: 90vw;
    max-height: 36%;
  }
}
