html,
body {
  margin: 0px auto;
  user-select: none;
  background-color: black;
  font-family: Rubik;
  height: 100%;
  padding: 0;
  touch-action: none; /* Prevent default touch actions */
}

canvas {
  display: block;
  margin: 0 auto;
}

@font-face {
  font-family: Rubik;
  src: url("../fonts/Rubik-Regular.ttf");
}

@font-face {
  font-family: Luckiest;
  src: url("../fonts/LuckiestSoftieProExtraBold-Regular.ttf");
}

#nav-bar {
  width: 100%;
  height: 50px;
  background-color: white;
  box-shadow: 0px 5px 5px black;
}

#nav-bar a {
  display: inline-block;
  text-decoration: none;
  color: black;
  height: 100%;
  font-size: 32px;
  margin-right: 50px;
  margin-top: 5px;
}

#nav-bar a:hover {
  color: rgb(0, 238, 255);
  text-shadow: 0px 2px 2px black, 0px 2px 2px black, 0px 2px 2px black;
  border-bottom: 2px solid orange;
}

#ca-bar {
  padding-top: 20px;
  padding-bottom: 15px;
  width: 100%;
  height: 25px;
  background-color: rgba(255, 255, 255, 0.61);
  user-select: text;
}

#ca-bar a {
  text-decoration: none;
  color: black;
}

#welcome-wrapper {
  margin-top: 10%;
  padding-top: 10px;
  width: 100%;
  background-color: white;
  padding-bottom: 10px;
}

#welcome-wrapper h3 {
  color: rgb(58, 58, 58);
}

#welcome-wrapper button {
  border: none;
  font-size: 32px;
  background-color: greenyellow;
  border-radius: 25px;
  padding-left: 50px;
  padding-right: 50px;
  color: white;
  text-shadow: 0px 2px 2px black, 0px 2px 2px black, 0px 0px 2px black;
  font-weight: bolder;
  box-shadow: 0px 2px 5px black;
  margin-bottom: 25px;
}

#welcome-wrapper button:hover {
  background-color: green;
  cursor: pointer;
}

#about {
  width: 100%;
  margin-top: 150px;
  bottom: 0px;
  background-color: white;
}

#about table {
  margin: 0px auto;
}

#about h2 {
  margin: 0px auto;
  margin-top: 25px;
}

#about p {
  display: block;
}

#roadmap {
  width: 100%;
  margin-top: 150px;
  bottom: 0px;
  background-color: white;
}

#roadmap table {
  margin: 0px auto;
}

#roadmap h2 {
  margin: 0px auto;
  margin-top: 25px;
}

#roadmap p {
  display: block;
}

#debug-panel {
  display: none;
  position: absolute;
  left: 5px;
  top: 0px;
  color: rgb(182, 182, 182);
  text-align: left;
  line-height: 8px;
  padding-right: 5px;
  font-size: 5px;
}

#game-ui {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  font-family: Rubik;
}

#gamepad-container {
  pointer-events: none;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
}

#gamepad {
  position: absolute;
  width: 10vw;
  height: 10vw;
  top: 0px;
  left: 0px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  border: 2vw solid rgb(170, 170, 170);
  pointer-events: none;
}

.gamepad-distance-dot {
  position: absolute;
  width: 5vw;
  height: 5vw;
  top: 0px;
  left: 0px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  display: none;

  -webkit-transition: opacity 0.1s linear;
  -moz-transition: opacity 0.1s linear;
  -o-transition: opacity 0.1s linear;
  -ms-transition: opacity 0.1s linear;
  transition: opacity 0.1s linear;
}

#split-mass-bttn {
  display: none; /* disabled by default, re-enabled if device has TOUCH */
  position: absolute;
  width: 10vw;
  height: 10vw;
  right: 5vw;
  bottom: 7.5vh;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  border: 2vw solid rgb(170, 170, 170);
  pointer-events: all;
}

.split-mass-bttn-icon {
  width: 70%;
  height: 70%;
  background-image: url("../img/icon_split.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: 15%;
  margin-top: 15%;
}

#eject-mass-bttn {
  display: none; /* disabled by default, re-enabled if device has TOUCH */
  position: absolute;
  width: 10vw;
  height: 10vw;
  right: 20vw;
  bottom: 7.5vh;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  border: 2vw solid rgb(170, 170, 170);
  pointer-events: all;
}

.eject-mass-bttn-icon {
  width: 70%;
  height: 70%;
  background-image: url("../img/icon_eject.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: 15%;
  margin-top: 15%;
}

#chat-bttn {
  display: none; /* disabled by default, re-enabled if device has TOUCH */
  position: absolute;
  width: 10vw;
  height: 10vw;
  right: 12.5vw;
  bottom: 14vh;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  border: 2vw solid rgb(170, 170, 170);
  pointer-events: all;
}

.chat-bttn-icon {
  width: 70%;
  height: 70%;
  background-image: url("../img/icon_chat.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: 15%;
  margin-top: 15%;
}

#chat-options-popup {
  position: absolute;
  width: 35vw;
  height: 15pvw;
  background-color: rgb(29, 29, 29);
  color: white;
  right: 2vw;
  bottom: 25vh;
  text-align: center;
  border-radius: 25px;
  box-shadow: 0px 0px 10px black;
  -webkit-transition: 0.2s all ease-in-out;
  -moz-transition: 0.2s all ease-in-out;
  -o-transition: 0.2s all ease-in-out;
  -ms-transition: 0.2s all ease-in-out;
  transition: 0.2s all ease-in-out;
  transform: scale(0);
  transform-origin: bottom;
  z-index: 1;
}

.chat-option {
  padding: 5px;
  border: 5px solid rgb(43, 43, 43);
  background-color: rgb(29, 29, 29);
  z-index: 2;
}

#chat-options-popup-indicator {
  position: absolute;
  width: 5vw;
  height: 5vw;
  background-color: white;
  transform: rotate(45deg);
  z-index: -1;
  bottom: -8px;
  left: calc(50% - 2.5vw);
  background-color: rgb(43, 43, 43);
}

#game-over {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  text-align: center;
  opacity: 0;
  -webkit-transition: all 0.5s linear;
  -moz-transition: all 0.5s linear;
  -o-transition: all 0.5s linear;
  -ms-transition: all 0.5s linear;
  transition: all 0.5s linear;
  font-family: Luckiest;
}

#game-over-container {
  margin-top: calc(50vh - 15vh);
}

#game-over-container h1 {
  font-size: 5vw;
  color: white;
  text-shadow: 0px 0px 10px black;
  border-bottom: 2px solid black;
  width: 50%;
  margin: 0px auto;
}

#game-over-container h2 {
  font-size: 3vw;
  color: white;
  text-shadow: 0px 0px 4px black, 0px 0px 4px black, 0px 0px 4px black;
  width: 50%;
  margin: 0px auto;
}

#game-over-container button {
  font-size: 5vw;
  color: white;
  text-shadow: 0px 0px 2.5px black, 0px 0px 2.5px black, 0px 0px 2.5px black;
  background: rgb(154, 0, 255);
  background: linear-gradient(
    0deg,
    rgba(154, 0, 255, 1) 0%,
    rgba(231, 0, 255, 1) 100%
  );
  box-shadow: 0px 5px 10px black;
  border: none;
  border-radius: 50px !important;
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 5px;
  padding-bottom: 5px;
  margin-top: calc(50% - 38%);
  cursor: pointer;
  font-family: Luckiest;
}

#game-over-container button:hover {
  background-color: rgb(9, 255, 0);
}

#claim-bttn-gameover {
  display: block;
  margin: 0px auto;
  font-size: 1vw !important;
  vertical-align: middle;
  font-family: Luckiest;
}

#claim-bttn-gameover img {
  width: 18%;
  height: Auto;
  margin-left: 5px;
  vertical-align: middle;
}

.claim-bttn-gameover-disabled {
  color: gray !important;
  font-style: italic;
  border: 1px solid rgb(187, 30, 30) !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.claim-bttn-gameover-disabled:hover {
  background-color: rgba(187, 30, 30, 0.5) !important;
  cursor: not-allowed !important;
}

.claim-bttn-gameover {
  color: white !important;
  border: 1px solid rgb(187, 150, 30) !important;
  background-color: rgba(213, 226, 21, 0.5) !important;
}

.claim-bttn-gameover:hover {
  background-color: rgba(213, 226, 21, 0.75) !important;
  cursor: pointer !important;
}

#leaderboard-container {
  position: absolute;
  right: 5px;
  top: 90px;
  font-family: Luckiest;
  color: rgb(228, 228, 228);
  width: 15vw;
  border-radius: 10px;
  transform-origin: top right;
}

#leaderboard {
  padding-top: 5px;
  background-color: rgba(0, 0, 0, 0.75);
}

#leaderboard p {
  font-size: 80%;
  margin: 10px;
  display: block;

  margin-top: 0px;
  margin-bottom: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  text-align: left;
  text-overflow: none;
  font-family: Luckiest;
}

#claim-bttn {
  display: block;
  width: 80%;
  margin: 0px auto;
  font-size: 100%;
  border-radius: 50px;
  border: none;
  margin-top: 15px;
  vertical-align: middle;
  padding: 0.5vw;
  background-color: rgba(255, 255, 255, 0.5);
  color: white;
  font-family: Luckiest;
}

#claim-bttn img {
  float: left;
  width: 18%;
  height: Auto;
  margin-left: 5px;
  margin-right: -30px;
}

.leaderboard-rank {
  float: left;
  width: 25px;
  text-align: center;
  margin-left: -5px;
}

.leaderboard-name {
  margin-left: 5px;
}

.leaderboard-score {
  float: right;
  color: rgb(228, 228, 228);
}

#chat-bubble {
  left: 0px;
  top: 0px;
  position: absolute;
  width: 372px;
  height: 204px;
  text-align: center;
  font-weight: bolder;
  background-image: url("../img/bubble.png");
  background-size: 100% 100%;
  will-change: transform, opacity, margin-top;
  -webkit-transition: opacity 0.1s ease-in-out, margin-top 0.2s ease-in-out;
  -moz-transition: opacity 0.1s ease-in-out, margin-top 0.2s ease-in-out;
  -o-transition: opacity 0.1s ease-in-out, margin-top 0.2s ease-in-out;
  -ms-transition: opacity 0.1s ease-in-out, margin-top 0.2s ease-in-out;
  transition: opacity 0.1s ease-in-out, margin-top 0.2s ease-in-out;
}
#chat-bubble p {
  font-family: Luckiest;
  font-size: 350%;
  margin-top: 40px;
}

.chat-bubble-hidden {
  opacity: 0;
  margin-top: 150px;
}

.chat-bubble-display {
  opacity: 1;
  margin-top: 0px;
}

#round-info {
  position: absolute;
  width: 100%;
  text-align: center;
  color: white;
  top: 90px;
  font-family: Luckiest;
}

#round-info h1 {
  font-size: 3vh;
  margin-top: 0px;
}

#round-info span {
  display: block;
  font-size: 40%;
  color: rgb(209, 209, 209);
  margin-top: -10px;
}

.blur {
  filter: blur(8px);
}

body > canvas {
  transition: filter 0.5s ease;
  filter: none;
}

#winnerOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: rgba(0, 0, 0, 0.5); */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#winnerOverlayContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0px;
  color: #fff;
  padding-top: 20px;
  padding-bottom: 40px;
  width: 100vw; /* Ensures it takes the full viewport width */
  box-sizing: border-box; /* Includes padding in the width calculation */
  background: linear-gradient(
    45deg,
    color(display-p3 0.7373 0.2392 0.9647),
    color(display-p3 0.3843 0.1647 1)
  );
  opacity: 0; /* Start with opacity 0 for fade-in effect */
  animation: fadeInBackground 0.6s ease forwards;
}

@keyframes fadeInBackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.winnersTitle {
  margin-bottom: 15px;
}

#winnerOtherRow {
  display: flex;
  flex-direction: row;
  gap: 200px;
  margin-top: -100px;
}

.winnerFirst {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0); /* Animates in */
  transition: transform 0.5s cubic-bezier(0.25, 1.5, 0.5, 1);
}

.winnerFirst .winnerThumb {
  width: 180px;
  height: 180px;
}

.winnerThumb {
  border-radius: 500px;
  border: 10px solid white;
  margin-top: -40px;
  z-index: 3100;
}

.winnerSecond {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0); /* Animates in */
  transition: transform 0.5s cubic-bezier(0.25, 1.5, 0.5, 1);
}

.winnerSecond .winnerThumb {
  width: 84px;
  height: 84px;
}

.winnerThird {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0); /* Animates in */
  transition: transform 0.5s cubic-bezier(0.25, 1.5, 0.5, 1);
}

.winnerThird .winnerThumb {
  width: 84px;
  height: 84px;
}

.winnerMedal {
  margin-top: -20px;
  transform: scale(1.2);
  z-index: 3200;
}

#winnerOtherRow .winnerMedal {
  margin-top: -15px;
}

.crownGold,
.crownSilver,
.crownBronze {
  margin: -10px;
  z-index: 3000;
  width: 125px;
  height: 125px;
  transform: scale(0.5) scaleY(1.2);
}

.starburst {
  position: absolute;
  scale: 4;
  opacity: 0; /* Animated fade-in */
  animation: fadeIn 1s ease-in-out forwards, rotate 30s linear infinite;
}

.scaleToNormal {
  transform: scale(1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.2;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#landing {
  -webkit-transition: all 0.5s ease-in-out;
}

#landing-svg-container {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: translateY(70vh) scale(2.5);
}

#landing-frontpage {
  position: relative;
  display: block;
  z-index: 7777;
  text-align: center;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.363);
  backdrop-filter: blur(10px);
}

#loading-spinner {
  width: 80px;
  height: auto;
  animation: spin 0.25s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
    opacity: 0.7;
  }
  100% {
    transform: rotate(360deg);
    opacity: 0.4;
  }
}

@keyframes bounceInOut {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slideInFromRight {
  0% {
    padding-left: 10px;
    opacity: 0;
  }
  100% {
    padding-left: 0;
    opacity: 1;
  }
}

#tips {
  margin-left: 25vw;
  margin-right: 25vw;
}

#tips span {
  font-style: italic;
  font-size: 2vh;
  color: white;
  text-shadow: 0px 0px 10px black, 0px 0px 10px black, 0px 0px 10px black;
  animation: slideInFromRight 0.25s ease-in-out;
}

#tips .tip-left {
  text-decoration: none !important;
}

#coin-pickup-texts-holder {
  width: 100%;
  height: 100%;
  position: absolute;
  pointer-events: none;
}

#coin-pickup-texts-holder p {
  position: absolute;
  font-size: 2vh;
  color: white;
  animation: go-up-and-disappear 0.5s linear;
  transform-origin: top;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
}

@keyframes go-up-and-disappear {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px);
    opacity: 0;
  }
}
