* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    180deg,
    #64beff -50%,
    #6e96ff 69.71%,
    #2a65ff 150%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', system-ui;
  font-weight: 400;
  font-style: normal;
  overflow: hidden;
  touch-action: manipulation;
}

* {
  touch-action: manipulation;
}

body {
  align-items: flex-start;
  padding-top: 150px;
}

.game-container {
  position: relative;
  width: 240px;
  height: 208px;
  background: url(/images/map.png) no-repeat no-repeat;
  transform: scale(3);
  image-rendering: pixelated;
}

.player-info {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1em;
  /* display: flex; */
  gap: 0.5em;
  align-items: flex-end;
  height: 100vh;
  width: 100vw;
}

.player-controller {
  position: absolute;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  bottom: 100px;
  right: 0;
}

.controller-menu {
  width: 100%;
}

.player-controller > .top,
.player-controller > .bottom {
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-controller > .middle {
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controller-button {
  height: 40px !important;
}

.settings-modal {
  position: absolute;
  z-index: 1000;
  background-color: black;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  height: 100vh;
  width: 100vw;
}

.settings-header {
  height: 10vh;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.settings-header button {
  width: 50px;
  margin-right: 40px;
}

.settings-modal-body {
  height: 90vh;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.player-name {
  color: white;
  display: flex;
  align-items: center;
  justify-content: start;
  margin-bottom: 0.5rem;
}

.close-settings {
  color: black;
}

.player-color-container {
  margin-top: 1rem;
  width: 100%;
  color: black;
}

label {
  display: block;
  font-weight: bold;
}

input[type='text'],
button {
  font-family: inherit;
  font-weight: bold;
  font-size: 18px;
  height: 44px;
  border-radius: 4px;
  outline: 0;
}

input[type='text'] {
  outline: 0;
  padding-left: 0.5em;
  border: 3px solid #222034;
  width: 100%;
  text-transform: uppercase;
}
input[type='text']:focus {
  border-color: #59ff5a;
}

button {
  width: 100%;
  padding-left: 0.5em;
  padding-right: 0.5em;
  background: #59ff5a;
  border: 0;
  border-bottom: 2px solid #1e830b;
  cursor: pointer;
}
button:active {
  position: relative;
  top: 1px;
}

/* Characters */
.grid-cell {
  position: absolute;
  width: 24px;
  height: 24px;
}
.Character {
  transition: transform 0.4s;
}
.Character.you {
  z-index: 1;
}
.Character.you .Character_you-arrow {
  display: block;
}
.Character_you-arrow {
  display: none;
  position: absolute;
  top: -18px;
  left: 5px;
  width: 7px;
  height: 5px;
  background: url(/images/arrow.png) no-repeat no-repeat;
}
.Character_sprite {
  overflow: hidden;
  top: -3px;
  background: url(/images/dog-sprites.png);
}
.Character[data-direction='right'] .Character_sprite {
  background-position-x: 24px;
}
.Character[data-color='red'] .Character_sprite {
  background-position-y: -24px;
}
.Character[data-color='orange'] .Character_sprite {
  background-position-y: -48px;
}
.Character[data-color='yellow'] .Character_sprite {
  background-position-y: -72px;
}
.Character[data-color='green'] .Character_sprite {
  background-position-y: -96px;
}
.Character[data-color='purple'] .Character_sprite {
  background-position-y: -120px;
}
.Character[data-color='simon'] .Character_sprite {
  background-position-y: -144px;
}
.Character[data-color='base'] .Character_sprite {
  background-position-y: -168px;
}

.character-select,
.random-button {
  width: 75px; /* Adjust the size of the button */
  height: 75px; /* Ensure the height matches the width for a perfect circle */
  background-size: contain; /* Ensure the image covers the entire button */
  background-position: center; /* Center the image within the button */
  background-repeat: no-repeat;
  border-radius: 50%; /* Make the button circular */
  border: none; /* Remove the default border */
  cursor: pointer; /* Change the cursor to a pointer when hovering */
  outline: none; /* Remove the default outline when focused */
  display: inline-block; /* Keep the button inline */
  background-color: transparent !important;
  image-rendering: pixelated;
  margin: 0;
  padding: 0;
}

.menu-text-container {
  margin-top: 24px;
}

.menu-text-container p {
  color: white;
}

.random-button {
  background-image: url(/images/random.png);
}

.character-select[data-color='0'] {
  background-image: url(/images/000_blue.png);
}
.character-select[data-color='1'] {
  background-image: url(/images/001_red.png);
}
.character-select[data-color='2'] {
  background-image: url(/images/002_orange.png);
}
.character-select[data-color='3'] {
  background-image: url(/images/003_yellow.png);
}
.character-select[data-color='4'] {
  background-image: url(/images/004_green.png);
}
.character-select[data-color='5'] {
  background-image: url(/images/005_purple.png);
}
.character-select[data-color='6'] {
  background-image: url(/images/006_brown.png);
}

/* .Character_shadow {
   background: url(/images/shadow.png) no-repeat no-repeat; 
} */

.Character_name-container {
  position: absolute;
  top: -12px;
  left: -5px;
  font-size: 5px;
  padding: 1px 2px 1px;
  border-radius: 3px;
  background: #333;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
}
.Character_coins {
  margin-left: 1px;
  color: gold;
}

/* Coins */
.Coin_sprite {
  background: url(/images/coin.png) no-repeat no-repeat;
  animation: coinFloat 0.8s linear infinite alternate-reverse;
}
@keyframes coinFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(5px);
  }
}
.Coin_shadow {
  background: url(/images/coin-shadow.png) no-repeat no-repeat;
}

.menu-btn {
  width: fit-content;
  height: fit-content;
  border-radius: 5px;
  font-size: 12px;
  padding: 4px 12px !important;
  background-color: rgb(80, 80, 234);
  line-height: 1 !important;
  color: white;
}

#arrow-left,
#arrow-right {
  transform: rotate(-90deg);
  -webkit-transform: rotate(-90deg);
  -moz-transform: rotate(-90deg);
}

@media only screen and (min-width: 600px) {
  body {
    align-items: center;
    padding: 0px;
  }

  html {
    align-items: center;
  }

  .controller-menu {
    display: flex;
    justify-content: flex-end;
    padding-right: 25px;
    margin-bottom: 75px;
  }

  .player-controller {
    justify-content: flex-end;
    align-items: flex-end;
    padding-right: 50px;
  }
}
@media only screen and (max-width: 600px) {
  .game-container {
    transform: scale(1.75);
  }

  .settings-header {
    height: 20vh;
  }
  .settings-header button {
    margin-top: 80px;
  }

  .settings-modal-body {
    height: 80vh;
  }

  .settings-modal {
    margin-top: -150px;
  }
}

.menu-button {
  color: black;
}
