body {
  -webkit-user-select: none;
  /* Safari */
  -ms-user-select: none;
  /* IE 10 and IE 11 */
  user-select: none;
  /* Standard syntax */

  -webkit-text-stroke: 3px rgb(24,24,24);
  paint-order: stroke fill;

  display: flex;
  background: rgb(5, 5, 5);
  font-family: 'Rubik';
  margin: 0;
  padding: 0;
}

button {
  touch-action: manipulation;
}

/*
 * Gameplay related
 */
#chatbox {
  width: 24%;
  min-width: 250px;
  height: 30px;
  padding: 6;
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: 'Rubik';
  font-size: 16px;
  background: rgba(10, 10, 10, 0.6);
  border: 0;
  color: white;
  border-radius: 10px;
  border: 2.5px solid rgba(255, 255, 255, 0.11);
  box-sizing: border-box;
  transition: border-color 0.5s ease-out;
  caret-color: white;
}

#chatbox:focus {
  /* border: 2px solid rgba(255,255,255,0.25); */
  /* border: 2px solid rgba(255,255,255,0.2); */
  box-shadow: none;
  outline: none;
}

#chatlist {
  width: 24%;
  min-width: 250px;
  left: 12px;
  bottom: 58px;
  background: rgba(10, 10, 10, 0.6);
  border-radius: 10px;
}

.chat-completions {
  position: absolute;
  left: 12px;
  bottom: 50px;
  width: 24%;
  min-width: 250px;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  z-index: 10;
  box-sizing: border-box;
  pointer-events: auto;
  background: rgba(10, 10, 10, 0.85);
  border-radius: 8px;
}

.chat-completion-item {
  flex-shrink: 0;
  border-radius: 8px;
  /* padding: 4px 10px; */
  padding: 4px 8px;
  color: rgba(150, 150, 150, 1);
  font-family: 'Rubik';
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
  /* border: 1.5px solid rgba(255, 255, 255, 0.06); */
  transition: border-color 0.08s ease-out, background 0.05s ease-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-completion-item:hover {
  background: rgba(50, 50, 50, 0.85);
}

.chat-completion-item.selected {
  /* border-color: rgba(255, 255, 255, 0.45); */
  background: rgba(35, 35, 35, 0.95);
  color: white;
}

.chat-message {
  min-width: calc(100% - 12px);
  margin: 0;
  padding: 4;
  padding-left: 6;
  padding-right: 60px;
  box-sizing: border-box;
  font-size: 15px;
  /*background: rgba(10, 10, 10, 0.6);*/
  text-wrap: wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  user-select: text;
}

.chat-message:hover {
  background: rgba(255, 255, 255, 0.03);
}

.chat-emoji {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.2em;
  margin: 0 0.05em;
}

.chat-message-container {
  position: relative;
  min-height: 24px;
}

.chat-timestamp {
  position: absolute;
  top: 2px;
  right: 6px;
  font-size: 11px;
  color: rgba(150, 150, 150, 0.8);
  font-family: 'Rubik';
  white-space: nowrap;
}

.chat-message-actions {
  position: absolute;
  top: 3px;
  right: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease-out;
}

.chat-message-container:hover .chat-message-actions,
.chat-message-container.menu-open .chat-message-actions {
  opacity: 1;
  pointer-events: auto;
}

.chat-message-container.has-actions:hover .chat-timestamp,
.chat-message-container.has-actions.menu-open .chat-timestamp {
  opacity: 0;
}

.chat-menu {
  position: fixed;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  /* padding: 4px; */
  box-sizing: border-box;
  background: rgba(27, 27, 27, 0.92);
  border: 2px solid rgba(79, 79, 79, 0.7);
  border-radius: 10px;
  font-family: 'Rubik';
  pointer-events: auto;
}

.chat-menu-item {
  padding: 4px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: white;
  font-family: 'Rubik';
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: background 0.05s ease-out;
}

.chat-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-menu-item.danger {
  color: rgb(255, 54, 91);
}

.chat-menu-item.danger:hover {
  background: rgba(255, 80, 80, 0.18);
}

/* Chat message color classes */
.chat-red {
  color: var(--chat-red);
}

.chat-blue {
  color: var(--chat-blue);
}

.chat-green {
  color: var(--chat-green);
}

.chat-yellow {
  color: var(--chat-yellow);
}

.chat-purple {
  color: var(--chat-purple);
}

.chat-bold {
  font-weight: bold;
}

.chat-italic {
  font-style: italic;
}

.chat-plus-size {
  font-size: 1.2em;
}

/*
 * UI related
*/

#particles-js {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: -1;
}

.w-100 {
  font-weight: 100 !important;
}

.w-200 {
  font-weight: 200 !important;
}

.w-300 {
  font-weight: 300 !important;
}

.w-400 {
  font-weight: 400 !important;
}

.w-500 {
  font-weight: 500 !important;
}

.w-600 {
  font-weight: 600 !important;
}

h1 {
  font-family: 'Rubik';
  font-size: 44px;
  margin: 0;
  padding: 0;
}

h2 {
  font-family: 'Rubik';
  font-size: 40px;
  margin: 0;
  padding: 0;
}

h3 {
  font-family: 'Rubik';
  font-size: 30px;
  margin: 0;
  padding: 0;
}

h4 {
  font-family: 'Rubik';
  font-size: 26px;
  margin: 0;
  padding: 0;
}

h5 {
  font-family: 'Rubik';
  font-size: 22px;
  margin: 0;
  padding: 0;
}

h6 {
  font-family: 'Rubik';
  font-size: 18px;
  margin: 0;
  padding: 0;
}

:root {
  --top-bar-height: 74px;
  --top-bar-color: #ffffff;
  /* Chat message color variables */
  --chat-red: #ff365b;
  --chat-blue: #294bf8;
  --chat-green: #52f86e;
  --chat-yellow: #fad345;
  --chat-purple: #ab25ff;
  --chat-pink: #ff3686;
  --chat-lava: #c53811;
  --chat-dark-red: #cc1b1b;
  --chat-orange: #fd9729;
  --chat-happy-blue: #45affa;
  --chat-cyan: #45fcff;
  --chat-gray: #515151;
  --chat-brown: #90503d;
}

/* width */
::-webkit-scrollbar {
  /* width: 10px; */
  width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  /*background: #111;*/
  /* background: transparent; */
  background: rgba(10, 10, 10, 0.6);
}

/* Handle */
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #222;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #444;
}

#ui {
  position: absolute;
  width: 100%;
  height: 100%;
}

#ui-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(13, 13, 13, 0.5);
  z-index: 0;
  pointer-events: none;
}

.topbar {
  width: 100%;
  height: 100px;
  background: rgb(0, 0, 0, 0.9);
  position: absolute;
  top: 0;
}

.tclr-white {
  color: white;
}

input {
  width: auto;
}

input::after {
  transition: left 0.1s linear;
}

.skip-btn-bounce {
  transition:
    opacity 0.2s,
    background-color 0.2s,
    transform 0.25s cubic-bezier(.68, -0.55, .27, 1.55);
  will-change: transform;
}

.skip-btn-bounce:not(:disabled):hover {
  transform: translateY(-3px);
}

@keyframes bookIconRotate {
  0%, 100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes bookIconJump {
  0%, 50%, 100% {
    transform: translateY(0) scale(1, 0.9);
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  25%, 75% {
    transform: translateY(-10px) scale(1, 1);
    animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53);
  }
}

.book-nav-btn-wiggle,
.book-nav-btn-icon {
  display: flex;
  transform-origin: center center;
  will-change: transform;
}

.book-nav-btn-icon {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.book-nav-btn:hover .book-nav-btn-icon,
.book-nav-btn-selected .book-nav-btn-icon {
  opacity: 1;
}

.book-nav-btn:hover .book-nav-btn-icon {
  animation: bookIconJump 0.77s infinite;
}

.book-nav-btn:hover .book-nav-btn-wiggle {
  animation: bookIconRotate 0.77s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.x-nav-btn-icon {
  display: flex;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.x-nav-btn:hover .x-nav-btn-icon {
  opacity: 1;
}

.changelog-md {
  color: white;
  font-weight: 300;
  line-height: 1.55;
  user-select: text;
  -webkit-user-select: text;
}

.changelog-section {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 10px 14px;
}

.changelog-md h1 {
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 0.3rem;
  color: var(--update-title);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.changelog-body {
  padding-left: 0.75rem;
}

.changelog-md h2 {
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0.7rem 0 0.2rem;
}

.changelog-md h3 {
  font-size: 1.02rem;
  font-weight: 300;
  margin: 0.5rem 0 0.15rem;
}

.changelog-md p {
  margin: 0.2rem 0;
}

.changelog-md ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0.2rem 0;
}

.changelog-md ul ul {
  list-style: circle;
}

.changelog-md strong {
  font-weight: 400;
}

.changelog-md img:not(.chat-emoji) {
  max-width: min(100%, 800px);
  max-height: 800px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  margin: 0.35rem 0;
}

.changelog-md a {
  color: rgb(120, 160, 255);
  text-decoration: underline;
}

.popup-container {
  position: absolute;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  transition: scale 180ms ease, opacity 180ms ease;
  background: 0;
}

@keyframes playfulJump {

  0%,
  70%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  73% {
    transform: translateY(-8px) rotate(0deg)
  }

  77% {
    transform: translateY(-8px) rotate(-12deg);
  }

  80% {
    transform: translateY(-8px) rotate(12deg);
  }

  83% {
    transform: translateY(-8px) rotate(-12deg);
  }

  85% {
    transform: translateY(-8px) rotate(12deg);
  }

  88% {
    transform: translateY(-8px) rotate(-12deg);
  }

  91% {
    transform: translateY(-8px) rotate(12deg);
  }

  94% {
    transform: translateY(-8px) rotate(-12deg);
  }
}

@keyframes playfulPopup {
  0%, 70% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  75% {
    opacity: 1;
    transform: translateX(-50%) translateY(0px);
  }
  95% {
    opacity: 1;
    transform: translateX(-50%) translateY(0px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

@keyframes welcomeSplashPromptPulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes welcomeSplashEnter {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(1.5vh);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes createRoomDimIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

*:focus-visible {
  outline-color: rgb(60, 60, 60);
  outline-width: 4px;
}

.classic-font {
  font-family: 'Russo One', Verdana, Arial, Helvetica, sans-serif;
}

.rubik-font {
  font-family: 'Rubik', sans-serif;
}

[data-editor-ui] {
  -webkit-text-stroke: 0;
  paint-order: normal;
  font-family: 'Russo One', Verdana, Arial, Helvetica, sans-serif;
  color: rgb(226, 226, 226);
}

[data-editor-ui] input,
[data-editor-ui] select,
[data-editor-ui] textarea,
[data-editor-ui] button {
  -webkit-text-stroke: 0;
  paint-order: normal;
}

[data-editor-ui] input,
[data-editor-ui] select,
[data-editor-ui] textarea {
  caret-color: rgb(240, 240, 240);
}

[data-editor-ui] input::placeholder,
[data-editor-ui] textarea::placeholder {
  color: rgb(140, 140, 140);
}

[data-editor-ui] option {
  background-color: rgb(36, 36, 36);
  color: rgb(236, 236, 236);
}

[data-editor-ui] .border-white\/10 {
  border-color: rgb(58, 58, 58);
}

[data-editor-ui] .border-white\/15 {
  border-color: rgb(70, 70, 70);
}

.editor-color-picker.react-colorful {
  width: 100%;
  height: 132px;
  gap: 6px;
}

.material-editor .editor-color-picker.react-colorful {
  height: 188px;
}

.editor-color-picker .react-colorful__saturation {
  border-radius: 3px;
  border-bottom: none;
}

.editor-color-picker .react-colorful__hue,
.editor-color-picker .react-colorful__alpha {
  height: 10px;
  border-radius: 3px;
}

.editor-color-picker .react-colorful__last-control {
  border-radius: 3px;
}

.editor-color-picker .react-colorful__pointer {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.editor-color-picker .react-colorful__hue-pointer,
.editor-color-picker .react-colorful__alpha-pointer {
  width: 6px;
  height: 12px;
  border-radius: 1px;
}

.editor-color-picker .react-colorful__interactive:focus .react-colorful__pointer {
  transform: translate(-50%, -50%) scale(1.15);
}

.settings-container > * {
  border-radius: 0px;
  border-bottom: 1px solid rgba(50, 50, 50, 0.4);
}