html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 
    position: fixed; 
    background-color: #000;
    font-family: Trebuchet MS, sans-serif; 
}

button:hover:not(.static), a:hover:not(.static) {cursor:pointer;}

/** ANIMATIONS **/
@keyframes bounce {
  from, to { transform: scale(1, 1); }
  25% { transform: scale(0.9, 1.1); }
  50% { transform: scale(1.1, 0.9); }
  75% { transform: scale(0.95, 1.05); }
}
@keyframes bounce-s {
  from, to { transform: scale(1, 1); }
  25% { transform: scale(0.975, 1.025); }
  50% { transform: scale(1.025, 0.95); }
  75% { transform: scale(0.985, 1.01); }
}
@keyframes hover {
  from, to {transform: translateY(0); }
  25% {transform: translateY(0.1rem)}
  50% {transform: translateY(0.25rem)}
  75% {transform: translateY(0.1rem)}
}
@keyframes slideUp {
  from {
    opacity: 0;
    bottom: -2rem;
  }
  to {
    opacity: 1;
    bottom: 1rem;
  }
}
@keyframes slideDown {
  from {
    opacity: 1;
    bottom:1rem;
  }
  to {
    opacity: 0;
    bottom: -2rem;
  }
}
.flip {
  transform: rotate(180deg);
  transition:.2s;
}
.bounce {
  animation: bounce-s 0.4s linear forwards;
}
.slideUp {
  animation: slideUp 0.2s linear forwards;
}
.slideDown {
  animation: slideDown 0.2s linear forwards;
}

p {
  margin: .5rem 0;
}
.mb-tx {
  display: block;
  margin-bottom:.5rem;
}

#logo {
  cursor: pointer;
  aspect-ratio: 1;
  width: 100%;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #05203d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
  z-index: 999;
}
.loading-icon {
  color: white;
  display: flex;
  flex-flow: column;
  align-items: center;
  grid-gap: 1rem;
}
.loading-icon > img {
  animation: bounce linear infinite 1s;
  height: 10vh;
}

.glass-button {
  display: block;
  color: #fff;
  text-align: center;
  text-decoration: none;
  padding: .75rem 1rem;
  outline: 2px solid #ffdea0;
  border: 0;
  border-radius: 1rem;
  font-size: inherit;
  font-weight: 600;
  font-family: inherit;
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.54) 100%);
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.45) 100%);
  text-shadow: #000000d4 0 0 4px;
  transition: .1s;
  background-color: #053363;
}
.glass-button:hover:not(.static) {
  background-color: #175b91;
  animation: bounce 0.3s linear forwards;
}
.glass-bg {
  color: #fff;
  padding: .75rem 1rem;
  outline: 1px solid #00000030;
  border: 1px solid #ffffff6e;
  font-size: inherit;
  font-weight: 600;
  font-family: inherit;
  /* background: linear-gradient(0deg,rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.54) 100%);
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.21) 50%, rgba(255, 255, 255, 0.62) 100%); */
  text-shadow: #000000d4 0 0 4px;
}
.glass-bg-frost {
  text-shadow: #000000d4 0 0 4px;
  color: white;
  font-weight: 600;
  border: 1px solid #ffffff6e;
  outline: 1px solid #00000030;
}

/* AUTH */
#auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: url(/images/bg-sparkles-1920.png), linear-gradient(0deg, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.45) 100%);
  background-size: 900px auto;
  background-position: top left;
  background-blend-mode: overlay, normal;  
  background-color: #053363;
  height: 100vh;
  width: 100vw;
}
#auth {
  background-color: #053363;
  outline: 2px solid #ffdea0;
  color: white;
  border-radius: 1rem;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  padding: 1rem;
  text-shadow: #000000d4 0 0 4px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-gap: 1rem;
}
#auth > form {
  display: flex;
  flex-direction: column;
  text-align: center;
  grid-gap: .5rem;
  width: 100%;
}
#auth input {
  border-radius: 1rem;
  padding: 1rem;
  border: none;
  outline: 2px solid #ffdea0;
  background-color: #053363;
  color: white;
  font-size: 14px;
}

#joystick-container {
  position: absolute;
  bottom: 4rem;
  left: 1rem;
  width: 110px;
  height: 110px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  z-index: 1;
  display: none;
  touch-action: none;
}

#joystick-knob {
    position: absolute;
    top: 35px;
    left: 35px;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    touch-action: none;
}

/* BACKGROUNDS */
.bg-frost {
  color: white;
  font-weight: 600;
  border: 1px solid #00000040;
  outline: 2px solid #ffdea0;
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.45) 100%);
  background-color: #053363;
}

.bg-glass-sparkle {
  background: url(/images/bg-sparkles-1920.png), linear-gradient(0deg,rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.45) 100%);
  background-size: 900px auto;
  background-position: top left;
  background-blend-mode: overlay, normal;  
  background-color: #053363;
}

.bg-dark {
  background-color:#05203d;
}
.bg-dark-trans {
  background-color: #05203ded;
}

/* OUTLINES */
.outline-gold {
  outline:2px solid #ffdea0;
}

.static {
  cursor:default;
}
.disabled {
  background: #00000070;
}

#gameCanvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; 
    height: -webkit-fill-available;
    image-rendering: -webkit-optimize-contrast; 
    image-rendering: crisp-edges;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  height: 3rem;
  position: fixed;
}

ul li {
  height: 100%;
  width: max-content;
}

ul li a, ul li button, #chatBoxInput > input {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  grid-gap: .5rem;
  color: #fff;
  text-align: center;
  padding: 0 1rem;
  text-decoration: none;
  border: none;
  font-size: inherit;
  font-weight: 600;
  font-family: inherit;
  /* background: linear-gradient(0deg,rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 100%);
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.21) 50%, rgba(255, 255, 255, 0.62) 100%); */
  transition: .1s;
}

ul li a:hover:not(.static), ul li button:hover, button:hover, #chatBoxSend > button:hover  {
  background-color: #ffffff47;
  transition: .1s;
}

.top-nav, .bottom-nav, .top-nav-dropdown, .glass-button, .stat-nav, #modal-content {
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.side-nav {
  position: fixed;
  left: 50%;
  top: 7.5rem;
  top: calc(7.5rem + constant(safe-area-inset-top));
  top: calc(7.5rem + env(safe-area-inset-top));
  display: flex;
  flex-flow: row;
  height: auto;
  grid-gap: 1rem;
  transform: translateX(-50%);
}
.side-nav li {
  border-radius: 1rem;
  width: 100%;
}
.side-nav button {
  width: 7rem;
  padding: .75rem;
}
#editRoom.on {
  background-color: #be0c0c;
}

.top-nav-wrapper {
  display: flex;
  position: fixed;
  margin-top: calc(constant(safe-area-inset-top) + 1rem);
  margin-top: calc(env(safe-area-inset-top) + 1rem);
  width: 500px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  flex-direction:column;
  grid-gap:2px;
  z-index: 100;
}

.top-nav {
	display: grid;
	width: 100%;
	border-radius: 6rem;
	position: unset;
	grid-template-columns: 1fr 48px 1fr;
}

.top-nav-wrapper::before {
  content: "";
  background-image: url(/images/menu-flourish2.png);
  width: calc(100% + 4.25rem);
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  background-size: 100%;
  overflow: visible;
  z-index: -1;
  background-position: center top;
  background-repeat: no-repeat;
}

.top-nav-dropdown, .level-dropdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 1rem;
  height: 0;
  width: 26.5rem;
  padding: 1rem;
  flex-flow: column;
  align-items: center;
  position: fixed;
  top: 1rem;
  top: calc(1rem + constant(safe-area-inset-top));
  top: calc(1rem + env(safe-area-inset-top));
  left: 50%;
  z-index: -1;
  border-radius: 0 0 1rem 1rem;
  overflow: hidden;
  opacity: 0;
  transition: .2s;
  transform: translateX(-50%);
  z-index: 2;
}
.top-nav-dropdown {
  z-index: 70;
}
.top-nav-dropdown > a, .level-dropdown > a {
  display: flex;
  flex-flow: column;
  align-items: center;
  aspect-ratio: 1;
  justify-content: center;
  grid-gap: .75rem;
  color: #fff;
  border-radius: 1rem;
  text-align: left;
  padding: 0;
  text-decoration: none;
  font-size: inherit;
  font-weight: 600;
  font-family: inherit;
  text-shadow: #000000d4 0 0 4px;
  transition: .1s;
  background: url(/images/bg-sparkles-1920.png);
  background-color: #053363;
  background-size: 900px auto;
  background-position: top left;
  background-blend-mode: overlay;
  outline: 2px solid #ffdea0;
}
.top-nav-dropdown > a:hover, .level-dropdown > a:hover {
  background-color: #ffdea0;
  transform: scale(1.1);
  transition: .1s;
  color: #175b91;
  text-shadow: none;
}
.top-nav-dropdown > a:hover > i {
  animation: bounce 0.3s linear forwards;
}

.top-nav-dropdown i {
  font-size: 150%;
}

.level-dropdown {
  left: 50%;
  top: 1rem;
  top: calc(1rem + constant(safe-area-inset-top));
  top: calc(1rem + env(safe-area-inset-top));
  width: 22rem;
  transform: translateX(-50%);
  border-radius: 0 0 1rem 1rem;
  padding: 1rem;
  z-index: 2;
  opacity: 0;
  height: 0;
  color: white;
}

#menu-button {width: 14rem;border-bottom-left-radius: 1rem;}
#menu-button > a > i {
  height: 35px;
  width: 35px;
  outline: 2px solid #ffdea0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #00000040;
}
#account-button {width: 14rem;border-bottom-right-radius: 1rem;}

.user-headshot {
  height: 35px;
  width: auto;
  border-radius: 50%;
  outline: 2px solid #ffdea0;
}

.top-nav > li {
  border-top: 0;
  outline: 0;
  height: inherit;
}

.top-nav-dropdown:hover, .top-nav-dropdown.hovered, .level-dropdown:hover, .level-dropdown.hovered {
  padding-top:4rem;
  opacity: 1;
  height:auto;
  transition:.2s;
}
.level-dropdown:hover, .level-dropdown.hovered {
  padding-top:6.5rem;
}
.dropdown-icon {
  position: absolute;
  right: .5rem;
}
.location-icon {
  position:absolute;
  left:1rem;
}

.stat-nav {
  display: grid;
  grid-template-columns: 7rem 1fr 7rem;
  position: unset;
  border-radius: 0 0 1rem 1rem;
  width: 28rem;
  max-width: calc(100% - 1.5rem);
  height: 2.25rem;
}
.stat-nav > li {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-gap: .25rem;
  width: 100%;
  text-shadow: #000000d4 0 0 4px;
  color: white;
  font-weight: 600;
}
.stat-nav > li:first-child {
  border-bottom-left-radius: 1rem;
}
.stat-nav > li:last-child {
  border-bottom-right-radius: 1rem;
}
.stat-nav > li > img {
  height: 1.35rem;
}

#stat-level {
  border: 2px solid #ffdea0;
  border-bottom-width: 0;
  border-top-width: 0;
  cursor: pointer;
  min-height: 30px;
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.45) 100%);
  display: flex;
  justify-content: left;
  align-items: center;
}
#stat-level:hover {
  background-color: #00000030;
}
.stat-level-progress {
  background-color: #26a226;
  min-height: 35px;
  border-width: 0 1px 0 0;
  outline: 0;
  height: 100%;
}
#stat-level:hover .stat-level-progress {
  background-color: #099309;
}
#stat-level-num {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-weight: 600;
}

.bottom-nav {
  display: flex;
  width: 28rem;
  left: 50%;
  bottom: 1rem;
  border-radius: 6rem;
  transform: translateX(-50%);
  overflow: hidden;
}
.bottom-nav > li:first-child {
  border-top-left-radius: 1rem;
}
.bottom-nav > *:last-child {
  border-top-right-radius: 1rem;
}

#chatBoxInput {
  flex-grow:1;
}
#chatBoxInput > input {
  background-color: #05203d;
  color: #fff;
  text-shadow: none;
  width: 100%;
  padding: 0;
  font-weight: normal;
}
#chatBoxSend > button {
  width: 7rem;
  background-color: transparent;
  text-shadow: #000000d4 0 0 4px;
}

.debug-nav {
  left: 0;
  bottom: 4rem;
  display: flex;
  flex-flow: column;
  height: auto;
  grid-gap: .5rem;
}
.debug-nav li {
  border-radius: 0 1rem 1rem 0;
}
.debug-nav button {
  width:100%;
  padding: 1rem;
}

#logo > a {
  font-size: 150%;
  border: 2px solid #ffdea0;
  height: calc(100% - 4px);
  border-radius: 50%;
  background: linear-gradient(0deg,rgba(255, 170, 242, 0.49) 0%, rgba(18, 0, 69, 0.61) 50%, rgba(0, 59, 151, 0.56) 50%, rgb(205, 178, 255) 100%);
  transition:.1s;
}
#logo > a:hover {
  animation: bounce 0.3s linear forwards;
  background-color: #fff;
  box-shadow: rgb(255, 241, 131) 0px 0px 14px;
  transition:.1s;
}
#logo img {
  height: 2.5rem;
  width: 2.5rem;
}

#modal-wrapper {
  width: 100vw;
  height: 100vh;
  background-color: #000000bf;
  position: fixed;
  left: 0;
  top: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
#modal {
  max-width: 100vw;
  max-height: calc(100vh - 6rem);
  min-width: 32rem;
  margin: 1rem auto;
  transition:.2s;
  display:none;
  flex-flow: column;
  justify-content: center;
  opacity:0;
  margin-top:-10vh;
}
#modal-header {
  font-weight: 600;
  color: white;
  padding: .5rem;
  display: flex;
  align-items: center;
  grid-gap: .5rem;
  justify-content: space-between;
  border-radius: 1rem 1rem 0 0;
  padding-top: calc(.5rem + constant(safe-area-inset-top));
  padding-top: calc(.5rem + env(safe-area-inset-top));
}
#modal-title {
  font-size: 1.3rem;
  text-shadow: #000000d4 0 0 4px;
}
#modal-title > div > span {
  margin-left:1rem;
}
#modal-content {
  background-color: #05203ded;
  padding: 1rem;
  border-radius: 0 0 1rem 1rem;
  overflow-y: auto;
  outline: 2px solid #ffdea0;
}
#modal-content.avatar {
	width: 650px;
}

#modal-close {
  padding: .75rem;
}
#worldmodal {
  display:none;
  opacity:0;
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16rem;
	transform: translateX(-50%) translateY(-50%);
	color: #fff;
	text-align: center;
	padding: .75rem 1rem;
	outline: 2px solid #ffdea0;
	border: 0;
	border-radius: 1rem;
	font-size: inherit;
	font-weight: 600;
	font-family: inherit;
	text-shadow: #000000d4 0 0 4px;
	transition: .1s;
	background-color: #053363;
}
#worldmodal-content {
  display: flex;
  flex-direction: column;
}
.worldmodal-btns {
  display: flex;
  flex-direction: row;
  grid-gap: 1rem;
  justify-content: center;
  align-items: center;
  padding-top: 1rem;
}
.worldmodal-btns > button {
  flex-grow: 1;
}

#contextMenu {
  position: absolute;
  left: 50%;
  top: 6.75rem;
  transform: translateX(-50%);
  border-radius: 0 0 1rem 1rem;
  width: 24rem;
  padding: .5rem;
  border: 0;
  display: none;
  flex-direction: column;
  z-index: 1;
  max-width: calc(100vw - 1.25rem);
  margin-left: -2px;
  grid-gap:1rem;
}

#contextMenuGrid button {
  width: 100%;
}
#contextMenuDetails {
  display: flex;
  flex-direction: row;
  grid-gap: .5rem;
  align-items: center;
  justify-content: space-between;
}
#contextMenuClose {
  width: auto;
}
#moveBtn, .btn-blue {
  background-color: #0767e3;
  border-color: #7cc2ff;
}
#moveBtn:hover, .btn-blue:hover {
  background-color: #7cc2ff;
}
#deleteBtn, .btn-red {
  background-color: #bc0000;
  border-color: #ff7f7f;
}
#deleteBtn:hover, .btn-red:hover {
  background-color: #ff7f7f;
}
#rotateLeftBtn, #rotateRightBtn, .btn-green {
  background-color: #0c840c;
  border-color: #91df66;
}
#rotateLeftBtn:hover, #rotateRightBtn:hover, .btn-green:hover {
  background-color: #91df66;
}

#coordsDisplay {
  font-size: 14px;
  text-align: center;
  position: absolute;
  left: 1rem;
  top: 2.5rem;
  color: #ffffffa3;
}

#contextMenuGrid {
  display: flex;
  grid-gap: .5rem;
  flex-grow: 1;
}
#contextMenuGrid span {
  margin: auto;
  font-size: 14px;
}

#contextMenuName {
  margin-left: .5rem;
  flex-grow: 1;
}

#menu-wrapper {
  display:none;
}

#chatlog {
	position: fixed;
	bottom: -4rem;
	left: 50%;
	transform: translateX(-50%);
	width: 22rem;
	height: 270px;
	word-wrap: anywhere;
	max-width: 100vw;
	text-shadow: none;
	font-weight: normal;
	padding: 1rem 1rem 3.5rem 1rem;
	border-radius: 1rem;
	opacity: 0;
	display: none;
	background-image: url(/images/chatlog-scroll.png);
	background-position: center center;
	background-size: 100% 100%;
}
#chatlogToggle i {
  transition:.2s;
}
#chatlog-text {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ffffff6e transparent;
  scroll-behavior: smooth;
  width: 100%;
  color: #523004;
}
#chatlog-tabs {
  display: flex;
  grid-gap: .5rem;
}
#chatlog-tabs > button {
  flex-grow:1;
}
#chatlog-tabs > button.active {
  background: #05203d;
}
#chatlog-tabs > button.active:hover {
  animation: none;
  cursor: default;
}
#chatlog-wrapper {
  display: grid;
  grid-gap: .5rem;
  grid-template-rows: auto 220px;
}
#chatlog-users {
  display: flex;
  flex-direction: column;
  grid-gap: .5rem;
}
#chatlog-users > div {
	display: grid;
	grid-template-columns: 50px 1fr 120px;
	grid-gap: .5rem;
	align-items: center;
}
#chatlog-users img {
  height: 50px;
  border-radius: 50%;
  outline: 2px solid #05203d;
  background-color: #758fa9;
}
#chatlog-users span {
  color: #523004;
}
#chatlog-users button {
	padding: .75rem;
}

/* PROFILE */
#profile, #avatar-editor-wrapper {
  display: flex;
  height: 400px;
}
#profile-avatar, #avatar-editor-avatar {
  background-position: center center;
  background-size: auto 110%;
  display: block;
  height: 100%;
  width: 100%;
  position: relative;
}
#profile-details, #avatar-editor-content {
  display:flex;
  flex-direction: column;
  flex-grow: 1;
  grid-gap: 1rem;
  color: white;
  max-height:400px;
}

/* AVATAR EDITOR */
#avatar-editor {
  display: grid;
  grid-template-rows: 40px 20px 1fr;
  grid-gap: 1rem;
  min-height: 480px;
}
#avatar-editor-items {
	display: grid;
	grid-template-columns: 1fr;
  align-content: flex-start;
	background-color: #05203d;
	border-radius: 0 1rem 1rem 0;
	outline: 2px solid #ffdea0;
	height: 100%;
  overflow-y: auto;
}
#avatar-items-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  grid-gap: .5rem;
  padding: .5rem;
}
.item-card {
	display: flex;
	flex-direction: column;
	grid-gap: .5rem;
	padding: .5rem;
	align-items: center;
	outline: 2px solid transparent;
	border-radius: 1rem;
	background: linear-gradient(0deg,rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
	background-color: #05203d;
	font-weight: 600;
	transition: .2s;
}
.item-card > div > img, .item-card > img {
  width: 100%;
}
.item-card > span {
  word-wrap: break-word;
  text-align:center;
  font-size:90%;
  flex-grow: 1;
}
.item-card:hover {
  outline-color:#ffdea0;
  cursor:pointer;
  transition:.2s;
}
.item-card.equipped {
  outline-color: #ffdea0;
  background-color: #ffdea09e;
  font-weight: 600;
  color: #000000ad;
}
#avatar-editor-avatar-wrapper {
  display: flex;
  flex-direction: column;
  grid-gap: 1rem;
  min-width: 250px;
  max-width: 250px;
	background: linear-gradient(0deg,rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
	background-color: #05203d;
	padding: .5rem;
	border-radius: 1rem 0 0 1rem;
	outline: 2px solid #ffdea0;
}
#avatar-editor-avatar-btns {
  display: flex;
  flex-flow: row;
  grid-gap: 1rem;
}
#avatar-editor-avatar-btns > button {
  flex-grow:1;
}
#avatar-editor-nav {
  display: flex;
  flex-direction: row;
  color: #fff;
  text-align: center;
  outline: 2px solid #ffdea0;
  border: 0;
  border-radius: 1rem 1rem 0 0;
  font-size: inherit;
  font-weight: 600;
  font-family: inherit;
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.54) 100%);
  background: linear-gradient(0deg,rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.45) 100%);
    background-color: rgba(0, 0, 0, 0);
  text-shadow: #000000d4 0 0 4px;
  transition: .1s;
  background-color: #053363;
}
#avatar-editor-nav > a, #avatar-editor-subnav > a {
  width: 100%;
  padding: .5rem .75rem;
  flex-grow: 1;
  align-content: center;
  text-align: center;
  border-right: 1px solid #ffffff20;
  transition:.2s;
}
#avatar-editor-nav > a:last-child {
  border-left:none;
}
#avatar-editor-nav > a:hover, #avatar-editor-nav > a.active {
	text-shadow: none;
	color: #05203dc2;
	border-radius: .75rem .75rem 0 0;
	margin-top: -.5rem;
  margin-bottom: 2px;
	transition: .2s;
	background: linear-gradient(0deg,rgb(209, 181, 131), #ffdea0);
	z-index: 1;
}
#avatar-editor-subnav {
	display: flex;
	flex-direction: row;
	color: white;
	background: linear-gradient(0deg,rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
	background-color: #05203d;
	outline: 2px solid #ffdea0;
  margin-top: -1rem;
	border-radius: 0 0 1rem 1rem;
  overflow-x: auto;
}
#avatar-editor-subnav > a:hover, #avatar-editor-subnav > a.active {
	color: #000000b5;
	transition: .2s;
	background: linear-gradient(0deg,rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.18)),#ffdea0;
}
#avatar-editor-search {
  background-color: #ffdea0;
  border-radius: 6rem;
  padding: .35rem .75rem;
  color: #05203dc2;
  font-weight: 600;
}
#avatar-editor-avatar > .swatch-group {
  display: flex;
  flex-direction: column;
  width: fit-content;
  grid-gap: .25rem;
  position: absolute;
}
.shop-item-swatches, .shop-color-pickers-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-gap: .5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: .15rem;
}
.swatch-group > button, .swatch-group > input, .btn-open-color-modal {
	height: 30px;
	width: 30px;
  padding: 0;
	border-radius: 50%;
	border: 2px solid #05203d;
  outline: 2px solid transparent;
	background: linear-gradient(0deg,rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.45) 100%);
}
.swatch-group > input[type="color"]::-webkit-color-swatch, .swatch-group > input[type="color"]::-moz-color-swatch {
  border-radius: 50%;
  border: 0;
}
.swatch-group > button:hover, .swatch-group > button.active, .swatch-group > input:hover {
  outline: 2px solid #ffdea0;
}
.swatch-group input[type="color"] {
	border: 2px solid transparent;
	background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) border-box;
	background-clip: border-box;
}
.btn-open-color-modal {
  position: absolute;
  bottom: 0;
  right: 0;
  background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) border-box;
}
.shop-item-thumb {
  position: relative;
}
#avatar-editor-eye-colours {
  right: 0;
}
#avatar-editor-hair-colours, #avatar-editor-eye-colours, #avatar-editor-skin-tones {
  position: sticky;
  top: 0;
  background-color: #05203d;
  padding: .5rem;
  display: flex;
  grid-gap: .25rem;
  overflow-x: auto;
  height: 30px;
  align-items: center;
  flex-wrap: nowrap;
  border-bottom: 2px solid #ffdea0;
}
#avatar-editor-items > span {
  padding: .5rem;
  text-align: center;
}
.swatch-group > i {
  color: white;
  font-size: 30px;
  text-align: center;
  text-shadow: #000000d4 0 0 4px;
}

#shop-basket-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
#shop-currency-stats {
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  margin-left: 1rem;
  grid-gap: .25rem;
  outline: 2px solid #ffdea0;
  border-radius: 3rem;
  padding: .25rem .5rem;
  background: linear-gradient(0deg,rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.36)),#fff0;
}
#shop-currency-stats > img {
  height: 20px;
  width: 20px;
}
.btn-add-basket, .btn-avatar-sell {
  width: 100%;
  padding: .5rem;
  border-radius: .75rem;
}
#shop-basket-items {
  height: 40px;
  overflow-y: auto;
}
#shop-basket-count {
  background-color: #ffdea0;
  color: #05203d;
  aspect-ratio: 1;
  display: inline-flex;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: .35rem;
  font-weight: 600;
}

#avatar-editor-items {
  position: relative; /* Required for absolute positioning of modal */
}

.shop-color-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  
  /* Flexbox centering relative to the visible area */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Optional: adds a dark backdrop overlay across the entire items container */
  background: rgba(0, 0, 0, 0.4); 
  backdrop-filter: blur(2px);
}

.shop-color-modal.d-none {
  display: none !important;
}

#avatar-editor-items:has(.shop-color-modal.active) {
  overflow-y:hidden;
}

.shop-color-modal .shop-modal-content {
	position: sticky;
	top: 50%;
	transform: translateY(-50%);
	width: 90%;
	max-width: 320px;
	padding: .5rem;
	border-radius: 1rem;
	background: rgb(5, 30, 57);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
	text-align: center;
	outline: 2px solid #ffdea0;
}

.shop-color-modal  .btn-close-color-modal {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
}

.shop-color-modal  .shop-modal-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1rem;
}

.sell-item-btns {
  display: flex;
  justify-content: center;
  grid-gap: 1rem;
}
#sell-modal-text > img {
	height: 12px;
}

/* Box Animation Container */
.box-split-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 15px auto;
}

.box-split-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

/* Left Half Split */
#box-half-left {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

/* Right Half Split */
#box-half-right {
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

/* Split Open Keyframe Transforms */
.box-split-container.open #box-half-left {
  transform: translateX(-50px) rotate(-15deg);
  opacity: 0;
}

.box-split-container.open #box-half-right {
  transform: translateX(50px) rotate(15deg);
  opacity: 0;
}

/* Reveal Card Styling */
.reveal-card {
  margin: 0 auto;
  animation: popIn 0.5s ease forwards;
}

/* Set Grid Layout */
.set-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* OVERRIDES */
.hide {
  display:none;
}

.parchment {
  position: absolute;
  display: flex;
  width: 75%;
  bottom: .5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 4rem 4rem 4rem;
  box-shadow: 2px 3px 20px #00000040, 0 0 125px #8f5922 inset;
  background: #fffef0;
  filter: url(#wavy2);
  height: 100%;
  margin-left: -.25rem;
}