@font-face {
  font-family: "MinecraftiaRegular";
  src: url("fonts/Minecraftia-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Mojang";
  src: url("fonts/mojang.otf") format("truetype");
}

body {
  margin: 0;
  overflow: hidden;
}
canvas {
  display: block;
}

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

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

.loading-overlay {
  background-color: rgb(239, 46, 59);
  color: white;
  font-family: "Mojang", sans-serif;
  text-shadow: 2px 2px 4px #000000;
}

/* .overlay {
  background: url("textures/panorama_overlay.png") no-repeat center;
  background-size: cover;
  
} */

.MainLOGO {
  background-image: url("./Assets/Logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
  height: clamp(10vh, 20vh, 50vh);
  width: clamp(615px, 65vw, 745px);
}

.splashtext {
  font-family: "MinecraftiaRegular", sans-serif;
  color: #ffcc00;
  line-height: 1.2;
  font-size: clamp(2vh, 2vw, 3vh);
  text-shadow: 2px 2px 4px #000000;
  transform: rotate(-20deg);
  max-width: 80%;
  min-width: 200px;
  margin: 0 auto;
  position: absolute;
  bottom: 10px;
  right: -15%;
  animation: splashAnimation 1s infinite;
}

@keyframes splashAnimation {
  0%,
  100% {
    transform: scale(1) rotate(-15deg);
  }
  50% {
    transform: scale(1.1) rotate(-15deg);
  }
}

.mc-btn {
  display: grid;
  grid-template-columns: 18px auto 18px;
  grid-template-rows: 18px auto 18px;
  width: 300px;
  height: 50px;
  image-rendering: pixelated;
}

.mc-btn {
  background-image: url(./Assets/button.png);
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  width: 200px;
  height: 20px;
  font-family: "MinecraftiaRegular", sans-serif;
  transform: scale(2.3);
  position: relative;
  filter: brightness(125%);
  cursor: pointer;
}

.n-mc-btn {
  background-image: url(./Assets/button.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  image-rendering: pixelated;
  position: relative;
  filter: brightness(125%);
  font-family: "MinecraftiaRegular", sans-serif;
  cursor: pointer;
}

.n-mc-btn p {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin-top: 5px;
  font-size: 16px;
  color: white;
  text-shadow: 1px 1px 2px black;
  pointer-events: none;
}

.n-mc-btn:hover {
  background-image: url(./Assets/button_highlighted.png);
}

.mc-btn p,
.mc-btn-md p {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin-top: 3px;
  font-size: 7px;
  color: white;
  text-shadow: 1px 1px 2px black;
  pointer-events: none;
}

.mc-btn-md p {
  margin-top: 5px;
  font-size: 16px;
}

.mc-btn:hover {
  background-image: url(./Assets/button_highlighted.png);
}

.mc-btn-sm {
  background-image: url(./Assets/button_sm.png);
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  background-size: 100% 100%;
  position: relative;
  filter: brightness(125%);
  font-family: "MinecraftiaRegular", sans-serif;
  cursor: pointer;
}

.mc-btn-md {
  background-image: url(./Assets/button_md.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  image-rendering: pixelated;
  position: relative;
  filter: brightness(125%);
  font-family: "MinecraftiaRegular", sans-serif;
  cursor: pointer;
}

.mc-btn-md:hover {
  background-image: url(./Assets/button_highlighted_md.png);
}

.mc-btn-sm:hover {
  background-image: url(./Assets/button_highlighted_sm.png);
}

.Icon-Resume {
  background: url("Assets/info.png") no-repeat center;
  background-size: contain;
  width: 24px;
  height: 24px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
}

.Icon-GitHub {
  background: url("Assets/github-ico.png") no-repeat center;
  background-size: contain;
  width: 32px;
  height: 32px;
  display: block;

  margin-left: auto;
  margin-right: auto;
  margin-top: 5px;
}

.Icon-GitHub-down,
.Icon-Resume-down {
  margin-left: 50px;
}
.Icon-GitHub-down p {
  margin-left: 15px;
  margin-top: 5px;
}

.Icon-Resume-down p {
  margin-left: 20px;
  margin-top: 5px;
}

@media (max-width: 400px) {
  .n-mc-btn p {
    margin-top: 0;
  }

  .mc-btn-md p {
    margin-top: 0 !important;
  }

  .splashtext {
    font-size: clamp(1.5vh, 3vw, 2.5vh);
    right: -20%;
    bottom: 40px;
  }

  .Icon-GitHub-down,
  .Icon-Resume-down {
    margin-left: 25px;
  }
}

.tooltip {
  font-family: "MinecraftiaRegular", sans-serif;
  font-size: 16px;
  background-color: #100210d1;
  border: 4px solid #100210;
  border-radius: 6px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s;
  color: gold;
  z-index: 1000;
  width: fit-content;
  max-width: 300px;
  height: auto;
  padding: 8px;
}

.tooltip-box {
  font-family: "MinecraftiaRegular", sans-serif;
  font-size: 16px;
  background-color: #100210d1;
  border: 4px solid #100210;
  border-radius: 6px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s;
  color: gold;
  z-index: 1000;
  height: auto;
  backdrop-filter: blur(10px);
}

.nofocus:focus {
  outline: none;
  box-shadow: none;
}

.custom-box {
  background-color: #c8c8c8;
  border-radius: 6px;
  border-left: 5px solid #fff;
  border-top: 5px solid #fff;
  border-right: 5px solid #7f7f7f;
  border-bottom: 5px solid #7f7f7f;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.667);
}

.cus-box {
  border-left: 3px solid #fff;
  border-top: 3px solid #fff;
  border-right: 3px solid #7f7f7f;
  border-bottom: 3px solid #7f7f7f;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.667);
}

.box-rev {
  border-radius: 0;
  border-top: 5px solid #7f7f7f;
  border-left: 5px solid #7f7f7f;
  border-right: 5px solid #fff;
  border-bottom: 5px solid #fff;
  box-shadow: 2px 2px 5px rgb(0, 0, 0);
}

.char-Box {
  width: 200px;
  height: 300px;
  background-color: black;
  border-top: 4px solid #7f7f7f;
  border-left: 4px solid #7f7f7f;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.307);
}

.char-Box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.slot {
  width: 100%;
  background-color: #8b8b8b;
  border-top: 4px solid #414141;
  border-left: 4px solid #414141;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.307);
}

.slot-inv {
  display: inline-block;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
}

.small-slot {
  border-top: 2px solid #414141;
  border-left: 2px solid #414141;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.307);

  display: inline-block;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;

  cursor: not-allowed;
}

.small-h-slot {
  height: 24px;
  max-height: 24px;
  min-height: 24px;
}

.slot-btn {
  border-left: 4px solid #fff;
  border-top: 4px solid #fff;
  border-right: 4px solid #7f7f7f;
  border-bottom: 4px solid #7f7f7f;
}

.slot:hover {
  background-color: #a0a0a0;
  cursor: pointer;
}

.slot-btn:hover {
  background-color: #707070;
  cursor: pointer;
}

.slot-btn:active {
  border-top: 4px solid #414141;
  border-left: 4px solid #414141;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
}

.slot-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  margin-left: 1px;
  image-rendering: pixelated;
}

.slot-image-small {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin-top: -10px;
  image-rendering: pixelated;
  cursor: not-allowed;
}

.mc-xp-container {
  width: 100%;
  height: 10px;
  position: relative;
  image-rendering: pixelated;
  animation: xpContainerFadeIn 0.3s ease-in forwards;
}

.MC-pb-container-1,
.MC-pb-container-2 {
  animation: pbContainerFadeIn 0.5s ease-in forwards;
}

@keyframes pbContainerFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

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

.mc-xp-bg {
  background: url("textures/experience_bar_background.png") no-repeat;
  background-size: 100% 100%;
  width: 100%;
  height: 10px;
  position: relative;
  image-rendering: pixelated;
}

.mc-xp-fill {
  background: url("textures/experience_bar_progress.png") no-repeat;
  background-size: 100% 100%;
  width: 100%;
  height: 10px;
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  clip-path: inset(0 calc(100% - var(--progress, 0%)) 0 0);
  transition: clip-path 0.6s ease-out;
  animation: xpFillAnimation 0.6s ease-out forwards;
}

.mc-xp-level {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  color: #80ff00;
  text-shadow: 1px 1px 0 #000;
  font-size: 12px;
  font-weight: bold;
  pointer-events: none;
  min-width: 24px; /* Ensure enough space for 2+ digits */
  text-align: center;
  white-space: nowrap;
}

.mc-lang-label {
  font-size: 14px;
  font-weight: bold;
  color: ghostwhite;
  text-shadow: 1px 1px 0 #000;
}

@keyframes xpFillAnimation {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  60% {
    clip-path: inset(0 calc(100% - (var(--progress, 0%) + 6%)) 0 0);
  }
  70% {
    clip-path: inset(0 calc(100% - (var(--progress, 0%) + 3%)) 0 0);
  }
  80% {
    clip-path: inset(0 calc(100% - (var(--progress, 0%) + 1%)) 0 0);
  }
  100% {
    clip-path: inset(0 calc(100% - var(--progress, 0%)) 0 0);
  }
}

/* PICKUP ANIMATION */
.item-pickup {
  animation: pickup-anim 120ms ease-out forwards;
}

@keyframes pickup-anim {
  0% {
    transform: scale(1) translateY(0px);
  }
  100% {
    transform: scale(1.15) translateY(-4px);
  }
}

/* DROP ANIMATION */
.item-drop {
  animation: drop-anim 120ms ease-out forwards;
}

@keyframes drop-anim {
  0% {
    transform: scale(1.15) translateY(-4px);
  }
  100% {
    transform: scale(1) translateY(0px);
  }
}

/* Smooth transitions when item is moved */
.slot img {
  transition: transform 120ms ease-out;
}

.hint-sidebar {
  min-width: 300px;
  max-width: 420px;
  width: fit-content;
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%) translateX(-110%);
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1080 !important;
  transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}

@media screen and (max-width: 576px) {
  .hint-sidebar {
    max-width: 100vw;
  }
}

.sidebar-in {
  transition: transform 1s ease-in-out;
  animation: slideIn 1s forwards;
}

.sidebar-out {
  transition: transform 1s ease-in-out;
  animation: slideOut 1s forwards;
}

.btn-hint {
  border-left: 4px solid #fff;
  border-top: 4px solid #fff;
  border-right: 4px solid #7f7f7f;
  border-bottom: 4px solid #7f7f7f;
  background-color: #8b8b8b;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.307);
}

@keyframes slideIn {
  from {
    transform: translateY(-50%) translateX(-110%) translateZ(0);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) translateX(0) translateZ(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateY(-50%) translateX(0) translateZ(0);
    opacity: 1;
  }
  to {
    transform: translateY(-50%) translateX(-110%) translateZ(0);
    opacity: 0;
  }
}

/* Override existing .sidebar-in/.sidebar-out to enable smoother timing and GPU hints */
.sidebar-in {
  will-change: transform, opacity;
  animation: slideIn 420ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  pointer-events: auto;
}

.sidebar-out {
  will-change: transform, opacity;
  animation: slideOut 320ms cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  pointer-events: none;
}

.hint-icon {
  width: 48px;
  height: 48px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  padding: 4px;
  margin-left: 1px;
}

.hint-box-container {
  gap: 8px;
  padding: 8px;
  border-bottom: 2px solid gray;
  cursor: help;
}

/* Remove bottom border if it's the last hint-box-container */
.hint-box-container:last-child,
.hint-box-container:last-of-type {
  border-bottom: none;
}

.hint-text {
  max-width: 420px;
  font-family: "MinecraftiaRegular", sans-serif;
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px black;
  color: white;
}

.hint-text-title {
  font-family: "MinecraftiaRegular", sans-serif;
  font-size: 1rem;
  font-weight: bold;
  text-shadow: 1px 1px 2px black;
  color: royalblue;
}

.hint-text-desc b {
  color: gold;
}

.hint-content {
  max-height: 80vh;
  padding-right: 8px;
  box-sizing: border-box;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: default;
}
.hint-content::-webkit-scrollbar {
  display: none;
}

.mobileoverlay {
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  will-change: backdrop-filter;
  pointer-events: none;
}

#WarningOverlay {
  z-index: 1080;
  inset: 0;
  position: absolute;
  pointer-events: auto;
}

.staticBG {
  background-image: url(./Assets/StaticBG.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.mc-toast-top {
  position: fixed;
  top: 20px;
  right: 20px;
}

.mc-toast {
  width: 400px;
  height: auto;
  transform: translateX(450px);

  display: flex;
  align-items: center;
  gap: 10px;

  border-style: solid;
  border-width: 10px;
  border-image-source: url("Assets/MC_Toast.png");
  border-image-slice: 3 fill;
  border-image-repeat: stretch;

  background: transparent;
  box-sizing: border-box;
  padding: 15px 10px;
  image-rendering: pixelated;

  font-family: "MinecraftiaRegular", sans-serif;
  will-change: transform, opacity;
}

.mc-toast-in {
  animation: mcSlideIn 0.5s ease-in forwards;
}

.mc-toast-out {
  animation: mcSlideOut 0.5s ease-out forwards;
}

.mc-toast-icon {
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  background: url("Assets/Gprofile.gif") no-repeat center;
  background-size: contain;
  image-rendering: pixelated;
}

.mc-toast-title {
  color: #ffd800;
  font-size: 14px;
  line-height: 1.2;
  margin-top: 6px;
  margin-bottom: 2px;
  position: relative;
}

.mc-toast-desc {
  color: #ffffff;
  font-size: 14px;
  width: 100%;
}

.mc-toast-progress-bar {
  margin-top: 6px;
  width: 300px;
}

@keyframes mcSlideIn {
  0% {
    transform: translateX(450px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes mcSlideOut {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(450px);
  }
}

.invBG {
  border-style: solid;
  border-width: 24px;
  border-image-source: url("./Assets/map.png");
  border-image-slice: 12 fill;
  border-image-repeat: round;
  background: transparent;
  box-sizing: border-box;
  image-rendering: pixelated;
}

.hint-text-slots {
  font-size: 0.8rem;
  color: #ffffffbe;
}

.counterimg {
  position: absolute;
  bottom: 0;
  left: 5px;
}

@keyframes counterBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.counterimg:hover {
  animation: counterBounce 1.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.counterimg img {
  width: 100%;
  height: auto;
}

.textfield-MC {
  font-family: "MinecraftiaRegular", sans-serif;
  padding-bottom: 0;
  box-sizing: border-box;
  line-height: normal;
  border-radius: 0;
  background-color: #c2ac88;
  border-left: 4px solid #7f7f7f;
  border-top: 4px solid #7f7f7f;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  text-transform: capitalize;
}

.textfield-MC:focus {
  outline: none;
  box-shadow: none;
  background-color: #c2ac88;
  filter: brightness(110%);
  border-left: 4px solid #414141;
  border-top: 4px solid #414141;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
}

.textfield-MC::placeholder,
.textfield-MC::-webkit-input-placeholder,
.textfield-MC:-ms-input-placeholder,
.textfield-MC::-ms-input-placeholder {
  color: gray;
}

.textfield-MC-INVALID {
  background-color: #ffcccc;
  animation: invalidFlash 0.5s ease-in-out infinite;
}

@keyframes invalidFlash {
  0% {
    background-color: #ffcccc;
  }
  40% {
    background-color: #ffebeb;
  }
  60% {
    background-color: #ffffff;
  }
  100% {
    background-color: #ffcccc;
  }
}

.textfield-MC:autofill {
  box-shadow: 0 0 0px 1000px #c2ac88 inset !important;
  -webkit-text-fill-color: black !important;
  transition: background-color 5000s ease-in-out 0s;
}

.MCinfo {
  display: none;
}

.MCinfo-in {
  display: block;
  animation: infoFadeIn 0.5s ease-in forwards;
}

@keyframes infoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.MCinfo-out {
  display: block;
  animation: infoFadeOut 0.5s ease-out forwards;
}

@keyframes infoFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.mapbox {
  border-style: solid;
  border-width: 24px;
  border-image-source: url("./Assets/map.png");
  border-image-slice: 10 fill;
  border-image-repeat: round;
  background: transparent;
  box-sizing: border-box;
  image-rendering: pixelated;
}

@media screen and (max-width: 576px) {
  .mapbox {
    background: #c2ac88;
    border-radius: 0;
  }
}

.modal-backdrop {
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  will-change: backdrop-filter, background-color, transform;
}

.slot-selected {
  box-sizing: border-box;
  image-rendering: pixelated;
  border-style: solid;
  border-width: 2px;
  border-image-source: url("./Assets/Selected.png");
  border-image-slice: 1 fill;
  border-image-repeat: round;
  background: transparent;
  box-sizing: border-box;
}

.slot-selected img {
  padding: 8px;
}


.mh {
  max-height: 300px;
  min-height: 300px;
  animation: mhAnim 0.5s ease-in-out forwards;
}

@keyframes mhAnim {
  from {
    transform: translateX(0);
    opacity: 0;
  }
  to {
    transform: translateX(10px);
    opacity: 1;
  }
}

.hint-btn{
  transition: opacity 360ms cubic-bezier(0.2,0.9,0.2,1), transform 360ms cubic-bezier(0.2,0.9,0.2,1);
  will-change: opacity, transform;
}