#CharacterCreatorID {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 50vw;
  padding: 1vh;
  text-align: center;
}

.CharacterCreator {
  background-color: #16161694;
  color: #fff;
  border: 8px solid rgba(0, 0, 0, 0.781);
  border-radius: 20px;
  box-shadow: inset 2px 2px 0 #ffffff;
  font-size: clamp(0.8rem, 1vw, 1.5rem);
}

#CharacterCreatorID fieldset {
  padding: 1vh;
  margin: 0.5vw;
  border: 1px solid #ffffff;
  background-color: #00000073;
  border-radius: 4px;
  font-size: clamp(0.8rem, 1vw, 1.5rem);
}

#CharacterCreatorID .NameInput input {
  width: clamp(20vw, 30vw, 40vw);
  height: clamp(2vh, 4vh, 6vh);
  padding: 0.5vh 1vw;
  font-size: clamp(0.8rem, 1vw, 1.5rem);
  font-family: 'press_start_2pregular', monospace;
  color: #ffffff;
  background-color: #16161694;
  border-radius: 8px;
  -webkit-box-shadow:inset 0px 0px 0px 2px #51aa98;
  -moz-box-shadow:inset 0px 0px 0px 2px #51aa98;
  box-shadow:inset 0px 0px 0px 2px #51aa98;
  border: 2px solid rgba(48, 82, 43, 0.9);
  outline: none;
  transition: all 0.2s ease-in-out;
  text-align: center;
}

#CharacterCreatorID .focused {
  filter: drop-shadow(0px 0px 11px #fff700);
}

#CharacterCreatorID .NameInput input::placeholder {
  color: #ffffff;
  opacity: 0.7;
  font-size: clamp(0.7rem, 0.9vw, 1.2rem);
}

#CharacterCreatorID .NameInput input:invalid {
  -webkit-box-shadow:inset 0px 0px 0px 2px #aa5151;
  -moz-box-shadow:inset 0px 0px 0px 2px #aa5151;
  box-shadow:inset 0px 0px 0px 2px #aa5151;
  border: 2px solid rgba(70, 11, 11, 0.9);
}

#CharacterCreatorID .NameInput input:focus {
  border-color: #ffd000;
  box-shadow: inset 0 0 6px rgba(255, 255, 0, 0.8);
  background-color: rgba(22, 22, 22, 0.9);
}

#CharacterCreatorID .NameInput input:hover {
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.7);
  border: none;
  filter: brightness(1.1);
}

@media (max-width: 600px) {
  #CharacterCreatorID .NameInput input {
      width: 80%;
  }
}

#CharacterCreatorID fieldset > * {
  margin-top: 0.5vh;
  margin-bottom: 0.5vh;
}

#CharacterCreatorID fieldset [type=radio] { 
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  #CharacterCreatorID fieldset [type=radio] + img {
    cursor: pointer;
    width: clamp(6vw, 8vw, 10vw); /* Use clamp for responsive width */
    height: clamp(6vh, 8vh, 10vh); /* Use clamp for responsive height */
    image-rendering: crisp-edges;
    filter: brightness(40%);
    user-drag: none;
    -webkit-user-drag: none;
  }

  #CharacterCreatorID fieldset [type=radio]:checked + img {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -webkit-box-shadow:inset 0px 0px 0px 20px #51aa98;
    -moz-box-shadow:inset 0px 0px 0px 20px #51aa98;
    box-shadow:inset 0px 0px 0px 20px #51aa98;
    border: 2px solid rgba(48, 82, 43, 0.9);
    border-radius: 10px;
    filter: brightness(100%);
  }

  .SkinColorSlider, .EyeColorSlider, .HairColorSlider {
    width: clamp(20vw, 25vw, 30vw); /* Use clamp for responsive width */
    height: clamp(1vh, 2vh, 3vh); /* Use clamp for responsive height */
    border: 2px solid #ffffff;
    border-radius: 5px;
    outline: none;  
    -webkit-appearance: none;
    appearance: none;
}

.SkinColorSlider {
  background: linear-gradient(to right, 
      #ffeaea,
      #ffd7ca,
      #ffceb6,
      #92795d,
      #5e523b,
      #413828);
}

.EyeColorSlider {
  background: linear-gradient(to right, 
      #24abe5,
      #52b04a,
      #65d75c,
      #8dc789,
      #8e9b68,
      #c9b48c,
      #e9a649,
      #cbaa7b,
      #a59372,
      #656565);
}


.HairColorSlider {
  background: linear-gradient(to right, 
      #292929,
      #737d92,
      #71520f,
      #ccb524,
      #ee5d3b,
      #b73564,
      #dc50cb,
      #8781e6,
      #678d75);
}

.SkinColorSlider::-webkit-slider-thumb, 
.EyeColorSlider::-webkit-slider-thumb, 
.HairColorSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: clamp(1vw, 2vw, 3vw); /* Use clamp for responsive width */
    height: clamp(1vh, 2vh, 3vh); /* Use clamp for responsive height */
    border: 3px solid #000;
    -webkit-box-shadow:inset 0px 0px 0px 2px #ffffff;
    -moz-box-shadow:inset 0px 0px 0px 2px #ffffff;
    box-shadow: 0px 0px 0px 2px #ffffff;
    border-radius: 5px;
    cursor: pointer;
}

.SkinColorSlider::-moz-range-thumb, 
.EyeColorSlider::-moz-range-thumb, 
.HairColorSlider::-moz-range-thumb {
  width: clamp(1vw, 2vw, 3vw); /* Use clamp for responsive width */
  height: clamp(1vh, 2vh, 3vh); /* Use clamp for responsive height */
  border: 3px solid #000;
  -webkit-box-shadow:inset 0px 0px 0px 2px #ffffff;
  -moz-box-shadow:inset 0px 0px 0px 2px #ffffff;
  box-shadow: 0px 0px 0px 2px #ffffff;
  border-radius: 5px;
  cursor: pointer;
}

.SkinColorSlider::-ms-thumb, .EyeColorSlider::-ms-thumb, .HairColorSlider::-ms-thumb {
  width: clamp(1vw, 2vw, 3vw); /* Use clamp for responsive width */
  height: clamp(1vh, 2vh, 3vh); /* Use clamp for responsive height */
  border: 3px solid #000;
  -webkit-box-shadow:inset 0px 0px 0px 2px #ffffff;
  -moz-box-shadow:inset 0px 0px 0px 2px #ffffff;
  box-shadow: 0px 0px 0px 2px #ffffff;
  border-radius: 5px;
  cursor: pointer;
}

#CharacterCreatorID .CharacterCreatorButton {
    font-family: 'press_start_2pregular';
    color: black;
    background-color: #ffffff;
    font-size: clamp(0.8rem, 1vw, 1.5rem);
    box-shadow: inset 0 -4px 0 0 rgba(0, 0, 0, 0.2);
    transition: 0.1s;
    appearance: none;
    outline: none;
    margin: 0 auto;
    cursor: pointer;
    padding: clamp(0.5vh, 1vh, 1.5vh); /* Use clamp for responsive padding */
    width: clamp(20vw, 30vw, 40vw); /* Use clamp for responsive width */
    height: clamp(3vh, 5vh, 7vh); /* Use clamp for responsive height */
    border-radius: 8px;
    z-index: 60;
    pointer-events: auto;
}

#CharacterCreatorID .CharacterCreatorButton:hover {
  box-shadow: inset 0 -2px 0 0 rgba(0, 0, 0, 0.2);
  filter: brightness(75%);
}

#CharacterCreatorID .CharacterCreatorButton:active {
  box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0px 0px rgba(0, 0, 0, 0.2);
}

#CharacterCreatorID .CharacterCreatorButton:focus {
  outline: 2px dashed #ffd000;
}

.SkinColorSlider:focus, 
.EyeColorSlider:focus, 
.HairColorSlider:focus {
  outline: 1px dashed #ffd000;
}

.SkinColorSlider::-webkit-slider-thumb:hover, 
.EyeColorSlider::-webkit-slider-thumb:hover, 
.HairColorSlider::-webkit-slider-thumb:hover {
    filter: brightness(1.2);
}

#CharacterCreatorID .CharacterCreatorButton:hover {
    transition: all 0.2s ease-in-out;
    transform: scale(1.05);
}

.SkinColorSlider, 
.EyeColorSlider, 
.HairColorSlider {
    transition: background 0.2s ease-in-out;
}

#CharacterCreatorID .dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  border: 2px solid #ccc;
  padding: 20px;
  font-family: 'press_start_2pregular';
  font-size: clamp(0.8rem, 1vw, 1.5rem);
  color: black;
  box-shadow: inset 0 -4px 0 0 rgba(0, 0, 0, 0.2);
  transition: 0.1s;
  text-shadow: 0px 2px rgba(0, 0, 0, 0.2);
  appearance: none;
  outline: none;
  padding: clamp(5px, 10px, 15px); /* Use clamp for responsive padding */
  border-radius: 8px;
  z-index: 1000;
}

#CharacterCreatorID .dialog-content {
  text-align: center;
}

#CharacterCreatorID .dialog-close {
  margin-top: 10px;
  padding: 5px 10px;
  background: #00ff6a80;
  width: clamp(5%, 10%, 15%); /* Use clamp for responsive width */
  color: rgb(0, 0, 0);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  z-index: 999999;
  font-size: clamp(0.8rem, 1vw, 1.5rem);
}

#CharacterCreatorID .dialog-close:hover {
  background: #00ff6a;
}

@media (max-width: 600px) {
  .CharacterCreator {
    font-size: clamp(0.7rem, 0.9vw, 1.2rem);
  }

  #CharacterCreatorID fieldset {
    font-size: clamp(0.7rem, 0.9vw, 1.2rem);
  }

  #CharacterCreatorID .CharacterCreatorButton {
    font-size: clamp(0.7rem, 0.9vw, 1.2rem);
  }

  #CharacterCreatorID .dialog {
    font-size: clamp(0.7rem, 0.9vw, 1.2rem);
  }
}

@media (max-width: 400px) {
  .CharacterCreator {
    font-size: clamp(0.6rem, 0.8vw, 1rem);
  }

  #CharacterCreatorID fieldset {
    font-size: clamp(0.6rem, 0.8vw, 1rem);
  }

  #CharacterCreatorID .CharacterCreatorButton {
    font-size: clamp(0.6rem, 0.8vw, 1rem);
  }

  #CharacterCreatorID .dialog {
    font-size: clamp(0.6rem, 0.8vw, 1rem);
  }
}