:root {
  --primary-color: #090121;
  --secondary-color: #3c507f;
  --accent-color: #ecc687;
  --old-blue: #64b9ff;
  --icon-size-mobile: 10px;
  --icon-size: 20px;
  --hud-font-size: 18px;
  --hud-font-size-mobile: 10px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body * {
  box-sizing: border-box;
}

canvas {
  width: 100dvw;
  height: 100dvh;
  position: absolute;
}

#titleStuff {
  text-align: center;
  flex-direction: column;
}

#credits a {
  color: var(--accent-color);
}

#credits div.creditLine {
  margin-bottom: 10px;
}

#progress-details {
  margin-top: 5px;
  color: #fff;
}

#hud-lives {
  display: flex;
  justify-content: space-between;
}

#landscape-warning {
  display: none;
  color: crimson;
  border: 1px solid;
  font-weight: 200;
  box-shadow: 0px 0px 2px 0px #000;
  background: rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 6px 10px;
}

.fade-out {
  opacity: 0;
  transition: 0.5s;
}

#hud-speed-cont {
  height: 75px;
}

#hud-health {
  position: absolute;
  background: crimson;
  height: 10px;
  transition: all 0.3s;
}

#hud-speed {
  position: relative;
  height: 75px;
  background: rgba(255, 255, 255, 0);
}

#hud-speed-inner {
  background: linear-gradient(#ff0000, transparent);
  transition: all 0.3s;
  width: 100%;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
  margin-bottom: 10px;
}

.hud-enemy-row {
  gap: 15px;
}

.hud-distance {
  min-width: 40px;
}

.hud-player {
  grid-template-columns: repeat(1, 1fr);
  display: grid;
  column-gap: 15px;
  grid-template-rows: repeat(3, 1fr);
  align-items: start;
}

.hud-col {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hud-enemy-color {
  border-radius: 20px;
  border: 2px solid #fff;
}

#hud-right {
  right: 25px;
  display: flex;
  flex-direction: column;
}

#hud-left {
  left: 25px;
  display: flex;
  gap: 25px;
}

#enterVR {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

#updateArea {
  padding: 0 0 20px 0;
}

.overlay {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--primary-color);
  height: 100%;
  width: 100%;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  padding: 20px;
  box-shadow: 0 0 0 30px var(--accent-color);
}

.Button3D {
  background: transparent;
}

#pauseMenu {
  display: none;
}

.mainTitle {
  font-size: 120px;
  font-family: playwrite;
  margin: 0;
  color: #fff;
  text-shadow: 3px 2px 0px var(--secondary-color);
}

.subTitle {
  font-size: 30px;
  font-family: playwrite;
  margin: 0 0 20px 0;
  color: #fff;
  text-shadow: 3px 2px 0px var(--secondary-color);
}

.btnNote {
  color: #fff;
}

.smallTitleText {
  font-size: 40px;
}

.letter {
  text-shadow: 0 0 20px #ffffff00;
  transition: all 1s;
  transition-delay: 0.5s;
  cursor: crosshair;
  letter-spacing: 0;
}

.letter:hover {
  text-shadow: 3px 0 25px var(--accent-color);
  transition: all 0s;
}

#loading-progress-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  font-weight: bold;
  position: relative;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

#progress-details {
  margin-top: 5px;
  margin-bottom: 2rem;
  color: #fff;
}

#loading-progress {
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 0 0 2px #fff;
  background: black;
}
#loading-progress::-moz-progress-bar {
  background: var(--accent-color);
}
#loading-progress::-webkit-progress-value {
  background: var(--accent-color);
}
#loading-progress {
  color: var(--accent-color);
}

.inter-font {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: bold;
  font-style: normal;
}

.bmc-btn-container {
  padding: 5px 0 30px;
}

.bmc-btn-container .bmc-btn {
  font-size: 16px;
  border-radius: 3px;
  height: auto;
  padding: 5px 24px;
  text-shadow: 0px 0px 1px #555;
  display: flex;
  justify-content: center;
}

.bmc-btn-container .bmc-btn-text {
  width: auto;
}

.xr-button-overlay {
  bottom: 30px !important;
  right: 30px !important;
  display: none !important;
}

.xr-button-overlay.ready {
  display: block !important;
}

#mobile-start,
.mobile-fire {
  display: none;
}

.mobile-fire img {
  width: 40px;
  height: 40px;
}

#mobile-start button {
  padding: 6px 10px;
  background: none;
  border-radius: 3px;
  border: 2px solid #fff;
  color: #fff;
  margin: 20px auto;
}

#mobile-start button:disabled {
  opacity: 0.5;
}

.mobile-fire {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  width: 75px;
  height: 75px;
  z-index: 6;
  border: 2px solid #fff;
  border-radius: 75px;
  color: #fff;
  align-items: center;
  justify-content: center;
}

.mobile-fire:active {
  background: rgba(255, 255, 255, 0.4);
}

.hud {
  font-size: var(--hud-font-size);
}

.hud img {
  width: var(--icon-size);
  height: var(--icon-size);
}

.hud-enemy-color {
  width: var(--hud-font-size);
  height: var(--hud-font-size);
}

#mainMenuTabs {
  display: none;
  flex: 1;
  height: 100%;
  color: #fff;
  width: 100%;
  max-width: 800px;
  padding: 50px 0;
}

button#infoBtn {
  background: none;
  border: none;
  width: 50px;
  position: absolute;
  bottom: 15px;
  left: 15px;
}

.tabPage {
  max-height: 100%;
}

.tabsContent {
  max-height: calc(100% - 12px);
  padding: 12px;
  overflow: auto;
}

.tabBtn {
  background: none;
  border: 2px solid #fff;
  border-bottom: none;
  color: #fff;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  opacity: 0.5;
}

.tabBtn.selected {
  opacity: 1;
}

#loading-progress-percent {
  font-size: 10px;
  color: #333;
  position: absolute;
  top: 50%;
  transform: translate(0, -50%);
}

@media (max-width: 767px) {
  .xr-button-overlay {
    display: none !important;
  }
  .mainTitle {
    font-size: 60px;
  }
  .subTitle {
    font-size: 20px;
    margin: 0;
  }
  #updateArea {
    margin-top: 15px;
    padding: 0;
  }
  #mainMenu {
    font-size: 12px;
  }
  #start-instructions {
    display: none;
  }
  #mobile-start {
    display: block;
  }
  #mobile-start button {
    font-size: 40px;
  }
  #credits {
    overflow: auto;
  }

  .mobile-fire.canShow {
    display: flex;
  }
}

@media (orientation: landscape) and (max-width: 767px) {
  #mainMenu.overlay {
    display: flex;
    flex-direction: row-reverse;
  }
  #titleStuff {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
  }
  .mainTitle {
    font-size: 60px;
  }
  #mobile-start button {
    font-size: 20px;
  }
  .bmc-btn-container .bmc-btn {
    font-size: 12px;
    padding: 3px 24px;
    min-width: max-content;
  }
  #mainMenuTabs {
    max-width: 450px;
    padding: 10px 0;
  }
}

.xr-button-overlay .babylonVRicon,
.xr-button-overlay .babylonVRicon:active,
.xr-button-overlay .babylonVRicon:hover {
  background-color: rgba(255, 255, 255, 0);
  background-image: URL("/meta_quest_3.png");
  cursor: pointer;
  transform: scale(1.4);
}

.xr-button-overlay .babylonVRicon:hover {
  transform: scale(2) translate(-6px, -6px);
}

@keyframes signal {
  0% {
    left: -20px;
  }

  50% {
    left: 0px;
  }

  100% {
    left: -20px;
  }
}

.bmc-btn-container .bmc-btn:hover {
  background: #4686bb;
}

@font-face {
  font-family: playwrite;
  src: url(font/Playwrite_HR/PlaywriteHR-VariableFont_wght.ttf);
}

@font-face {
  font-family: electron;
  src: url(font/electron-pulse-font/ElectronPulse.ttf);
}

@font-face {
  font-family: cosmic-alien;
  src: url(font/cosmic-alien-font/CosmicAlien.ttf);
}

@font-face {
  font-family: roboto;
  src: url(font/Roboto/roboto.png);
}

.powerup-title {
  color: #fff;
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.powerup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: #fff;
  font-size: 11px;
}

.powerup-icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.powerup-name {
  flex: 1;
  font-weight: 500;
}

.powerup-timer {
  color: #ffff00;
  font-weight: bold;
  min-width: 30px;
  text-align: right;
}

#hud-speed-boost {
  border-left: 3px solid #ffff00;
  padding-left: 8px;
}

#hud-damage-boost {
  border-left: 3px solid #ff4444;
  padding-left: 8px;
}

#mode-selector-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem auto;
  width: 100%;
  max-width: 600px;
}

#mode-selector-container h3 {
  color: #00ffff;
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.mode-grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mode-btn {
  flex: 1;
  padding: 1rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
  border: 2px solid;
  min-width: 150px;
}

.mode-btn[data-type="singleplayer"],
.mode-btn[data-match="quick"] {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.2) 0%,
    rgba(118, 75, 162, 0.2) 100%
  );
  border-color: #667eea;
}

.mode-btn[data-type="coop"],
.mode-btn[data-match="create"] {
  background: linear-gradient(
    135deg,
    rgba(240, 147, 251, 0.2) 0%,
    rgba(245, 87, 108, 0.2) 100%
  );
  border-color: #f093fb;
}

.mode-btn[data-type="ffa"],
.mode-btn[data-match="join"] {
  background: linear-gradient(
    135deg,
    rgba(79, 172, 254, 0.2) 0%,
    rgba(0, 242, 254, 0.2) 100%
  );
  border-color: #4facfe;
}

.mode-btn[data-mode="multiplayer-join"] {
  background: linear-gradient(
    135deg,
    rgba(250, 112, 154, 0.2) 0%,
    rgba(254, 225, 64, 0.2) 100%
  );
  border-color: #fa709a;
}

.mode-btn.tier2-back {
  background: linear-gradient(
    135deg,
    rgba(250, 112, 154, 0.2) 0%,
    rgba(254, 225, 64, 0.2) 100%
  );
  border-color: #fa709a;
  min-width: 100%;
}

.mode-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
}

.mode-btn.selected {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  transform: scale(1.05);
}

.mode-btn-title {
  font-size: 1.2rem;
}

.mode-btn-desc {
  font-size: 0.65rem;
  font-weight: normal;
  opacity: 0.8;
}

.mode-input-container {
  display: none;
  margin-top: 1rem;
  text-align: center;
}

.mode-input-container label {
  display: block;
  color: #00ffff;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.mode-input-container input {
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 2px solid #00ffff;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  text-align: center;
  width: 150px;
  margin-right: 0.5rem;
}

.mode-input-container button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 2px solid #00ff00;
  background: rgba(0, 255, 0, 0.2);
  color: white;
  cursor: pointer;
}

#selected-mode-display {
  min-width: 100%;
  color: #fff;
}

#game-controls {
  display: none;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
  justify-content: center;
}

#game-controls-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

#game-controls button {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 8px;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-weight: bold;
  flex: 1;
}

#game-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#game-controls button:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

@media (max-width: 767px) {
  #mode-selector-container {
    margin: 1rem auto;
    padding: 0 1rem;
  }

  #game-controls {
    flex-direction: column;
  }

  #game-controls button {
    font-size: 1.5rem;
    padding: 1.5rem;
  }
}
