:root {
  --scrollbar-color: #0000001f;
  --scrollbar-hover: #1c1c1c3f;
}
* {
  margin: 0;
  padding: 0;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;

  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-color) transparent;
}

/* Chrome, Safari, Edge */
*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}

html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  touch-action: none;
}
body {
  background: radial-gradient(circle at center, #004d6a 0%, #032836 100%);

  /* height: 99vh; */
}
.master-wrapper {
  position: absolute;
  left: 0px;
  top: 0px;
  height: 100%;
  width: 100vw;
  overflow: hidden;
}
h1 {
  color: #27532c;
}
#canvas3d {
  display: block;
  box-sizing: border-box;
  position: absolute;
  z-index: 22;
  left: 0;
  top: 0;
}
.all-ui-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  box-sizing: border-box;
  pointer-events: none;
  /* transition: opacity 0.1s ease-in-out; */
}
.inner-wrapper {
  width: 85%;
  margin: auto;
  /* border: 2px solid yellow; */
  position: relative;
  height: 92vh;
  margin-top: 4vh;
  z-index: 222;
  box-sizing: border-box;
}
.ui {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 210;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  box-sizing: border-box;
  pointer-events: none;
}
.mid {
  width: 75%;

  display: flex;
  justify-content: space-between;
  transform: translateY(80px);
  margin-bottom: 90px;
}

#hint {
  position: fixed;
  bottom: 10px;
  right: 10px;
  color: orange;
  width: 50vw;
  display: inline-block;
  text-align: right;
  font-size: small;
  display: none;
}

.sdgs {
  color: #4d392d;
  color: #a66842;
  color: #7c08c4;
}
.panel {
  box-sizing: border-box;
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 222;
  display: flex;
  justify-content: right;
  align-items: center;
  /* padding: 50px;
    padding-bottom: 40px; */
}

.main-panel {
  bottom: 0;
  flex-direction: column;
  align-items: end;
  gap: 5px;
  box-sizing: border-box;
  /* border: 10px solid red; */
}
.material-shop {
  color: rgb(255, 255, 255);

  padding: 10px;
  height: 100%;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  border-radius: 10px;
  pointer-events: all;
  font-size: 0.6em;
  font-weight: bold;
  /* -webkit-text-stroke: 0.04em #ffffff; */
  color: #ffd014;
  background-color: #a3d98b33;
  backdrop-filter: blur(30px);
  border: 1px solid #a3d98b;
  overflow: hidden;
}
.building-shop {
  padding: 10px;
  height: 100%;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  border-radius: 5px;
  pointer-events: all;

  font-size: 0.6em;
  font-weight: bold;
  /* -webkit-text-stroke: 0.04em #ffffff; */
  color: #ffd014;
  backdrop-filter: blur(30px);
  background-color: #a3d98b33;
  border: 1px solid #a3d98b;
}
.btn-cont {
  display: flex;
  justify-content: left;
  flex-wrap: wrap;
  gap: 5px;
}
.panel-title {
  margin-bottom: 10px;
  user-select: none;
}

.inventory-panel {
  z-index: 1;
  top: 70px;
  padding-left: 0;
  padding-right: 0;
}
.inventory-panel div {
  width: 90%;
  max-width: 400px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: right;
  background-color: #34549900;
  color: white;
}

.building-btn-material-entry {
  color: white;
}

.inventory-num {
  text-wrap: nowrap;
  padding: 8px 10px;
  background-color: #9dc48d1a;
  margin: 2px;
  font-size: 0.5em;
  border-radius: 10px;
  color: #ffd014;

  -webkit-text-stroke: 0.02em #ac6110;

  user-select: none;
  border: 1px solid #a3d98b;
  backdrop-filter: blur(30px);
}

.building-btn {
  padding: 8px 8px;
  background-color: #ffd0141a;

  border: none;
  border-radius: 4px;
  font-size: normal;
  cursor: pointer;
  pointer-events: all;
  display: flex;
  justify-content: center;
  align-items: start;
  flex-direction: column;
  gap: 8px;
  user-select: none;

  color: white;
  border-radius: 4px;
  border: 0.5px solid #ffd014;

  transition: transform 0.1s ease;
}

.building-btn:active {
  transform: scale(0.9);
}
.material-btn {
  cursor: pointer;
  pointer-events: all;

  user-select: none;
  padding: 8px;

  background-color: #ffd0141a;
  color: #ffd014;
  border-radius: 4px;
  border: 0.5px solid #ffd014;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;

  transition: transform 0.1s ease;
}

.material-btn:active {
  transform: scale(0.9);
}
.building-btn-title {
  font-size: 0.9em;
}
.building-btn-materials-cont {
  /* border: 1px solid red; */
  display: flex;
  justify-content: start;
  gap: 5px;
  font-size: 0.65em;
  color: #a3d98b;
  -webkit-text-stroke: 0.02em #a3d98b;
  margin-top: 2px;
}

.disabled-btn {
  opacity: 0.5;
  pointer-events: none;
}

.building-btn-income {
  font-size: 0.8em;
  color: #a3d98b;
  font-weight: bold;

  font-size: 0.6em;
}
.building-btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: 5px;
}
#materials-btn-cont {
  flex-wrap: nowrap;
  display: flex;
  justify-content: stretch;
}

.all-ui-hidden {
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Floating X Logo Buttonasdaaddsaasd */
.x-logo-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  /* background-color: #000000; */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  pointer-events: all;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.x-logo-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  background-color: #1a1a1a;
}

.x-logo-float img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.header {
  width: 100%;
  height: 40px;
  /* position: absolute; */
  left: 0;
  top: 0;
  /* border: 1px solid red; */
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  z-index: 11;
  align-items: start;
}

.nav {
  display: flex;
  justify-content: space-evenly;
  /* border: 1px solid blue; */
  height: 32px;
  gap: 10px;
  pointer-events: all;
}

.logo {
  /* border: 1px solid red; */
  /* Empty ruleset - can be removed if not needed */
}
.logo > img {
  width: 36px;
  aspect-ratio: 1;
}
.marketplace-btn {
  border-radius: 8px;
  height: auto;
  border: none;
  background-color: #ffd014;
  color: #ac6110;
  /* -webkit-text-stroke: 0.04em #ffffff; */
  padding-left: 10px;
  padding-right: 10px;
  font-size: 0.55em;
  cursor: pointer;
}
.continue-btn {
  margin-top: 5px;

  border-radius: 8px;
  height: auto;
  border: none;
  background-color: #ffd014;
  color: #ac6110;

  padding: 18px 22px;
  cursor: pointer;
  display: none; /* Initially hidden */
}
.wallet-btn {
  border-radius: 8px;
  border: 2px solid #ffd014;

  background-color: transparent;
  color: #ffd014;
  /* -webkit-text-stroke: 0.04em #ffffff; */
  padding-left: 10px;
  padding-right: 10px;
  font-size: 0.55em;
  cursor: pointer;
}

.referral-btn {
  border-radius: 8px;
  border: 2px solid #ffd014;
  background-color: transparent;
  color: #ffd014;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 0.55em;
  cursor: pointer;
  display: none; /* Initially hidden, shown when user is logged in */
}

/* Close button styles */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #484848;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.close-btn:hover {
  background: #ff3742;
  transform: scale(1.1);
}

.close-btn:active {
  transform: scale(0.95);
}

.logout-btn {
  border-radius: 8px;
  border: 2px solid #ff6b6b;
  background-color: transparent;
  color: #ff6b6b;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 0.55em;
  cursor: pointer;
  display: none; /* Initially hidden, shown when user clicks user button */
  margin-left: 5px;
}
.sep {
  width: 2px;
  background-color: #ffd0141a;
  height: 100%;
}
.user-btn {
  background-color: transparent;
  border: none;
  height: 100%;
  cursor: pointer;
  transform: scale(1.2);
}
.tutorial-panel {
  width: 350px;
  border: 2px solid #ffd014;
  background-color: #a4632b;
  backdrop-filter: blur(30px);
  border-radius: 15px;
  position: absolute;
  right: 50%;
  bottom: 50%;
  transform: translate(50%, 50%);
  z-index: 444;
  padding: 30px;
  color: #ffd014;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s;
}
.tutorial-message {
  color: white;
  font-size: 0.7em;
  pointer-events: all;
}
.tutorial-action-btn {
  padding: 12px 18px;
  pointer-events: all;
  cursor: pointer;
  border-radius: 8px;
  border: 2px solid #ffd014;
  color: #a4632b;
  background-color: #ffd014;
}

.tutorial-skip-btn {
  border: 2px solid #ffd014;

  background-color: transparent;
  color: #ffd014;

  padding: 12px 18px;
  pointer-events: all;
  cursor: pointer;
  border-radius: 8px;
}

.tutorial-scene-2 {
  bottom: 33%;
  right: 0;
  transform: none;
}
.tutorial-scene-3 {
  bottom: 43%;
  right: 0%;
  transform: none;
}
.tutorial-scene-4 {
  bottom: 70%;
  right: 0%;
  transform: none;
}
.tutorial-scene-5 {
  bottom: 25%;

  left: 5%;
  transform: none;
}
.tutorial-scene-6 {
  position: absolute;
  right: 50%;
  bottom: 15%;
  transform: translate(50%, 50%);
}
.hidden-panel {
  display: none !important;
}
.arrow {
  width: 40px;
  aspect-ratio: 1;
  /* border: 1px solid red; */
  display: none;
  position: absolute;
  left: 5%;
  bottom: -30%;
  animation: bob 2s ease-in-out infinite;
}

.arrow-scene-4 {
  left: 0%;
  bottom: 90%;
  animation: bobFlipped 2s ease-in-out infinite;
}
.arrow-scene-6 {
  left: 42%;
  bottom: 90%;
  animation: bobFlipped 2s ease-in-out infinite;
}
.arrow img {
  width: 100%;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes bobFlipped {
  0%,
  100% {
    transform: translateY(0) rotate(180deg);
  }
  50% {
    transform: translateY(-10px) rotate(180deg);
  }
}

.marketplace-wrapper {
  position: absolute;
  bottom: 0;
  height: 100vh;
  width: 100%;
  backdrop-filter: blur(5px);
  background-color: #1f1f1f00;
  /* border: 2px solid red; */
  box-sizing: border-box;
  z-index: 99;
  pointer-events: all;
}
.marketplace-inner-wrapper {
  width: 85%;
  margin: auto;
  height: 100%;
  box-sizing: border-box;
  /* border: 1px solid blue; */
  padding-top: 100px;
  padding-bottom: 80px;
  display: flex;
}
.market-left-side {
  width: 100%;
  /* border: 1px solid red; */
  box-sizing: border-box;
  height: 100%;
}
.market-right-side {
  width: 0;
  /* border: 1px solid rgb(118, 244, 0); */
  box-sizing: border-box;
  height: 100%;
}

.search-input {
  border: 1px solid #a3d98b;
  background-color: #a3d98b1a;
  border-radius: 8px;
  padding: 12px;
  width: 80%;
  outline: none;
  color: white;
}
.search-input::placeholder {
  color: #a3d98b;
  font-style: italic;
  opacity: 1;
  font-size: 0.7em;
  width: 80%;
}
.filter-cont {
  margin-top: 40px;
  width: 80%;

  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-cont button {
  border: 1px solid #a3d98b;
  background-color: #a3d98b12;
  border-radius: 8px;
  color: #a3d98b;
  padding: 8px;
  font-size: 0.5em;
  cursor: pointer;
}

.filter-btn-deselected {
  filter: grayscale(1);
  opacity: 0.7;
}

.item-cont {
  /* border: 1px solid rgb(221, 255, 0); */
  display: flex;
  gap: 16px;
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 20px;

  height: 80%;
  overflow-y: scroll;
  justify-content: baseline;
  align-items: baseline;
}
.item-cont .item {
  width: 20%;
  max-width: 180px;
  min-width: 100px;
  aspect-ratio: 0.8;
  border: 1px solid #a3d98b;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 0.1s;
}
.item-cont .item:active {
  transform: scale(0.95);
}
.item-cont .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-cont .item .rarity {
  position: absolute;
  color: #ffd014;
  font-size: 0.6em;
  top: 10%;
  left: 10%;
  text-shadow: 1px 1px 1px #a4632b;
}

.green {
  color: #00e51b !important;
}

.item-cont .item .details-cont {
  position: absolute;

  font-size: 0.4em;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  backdrop-filter: blur(10px);
  background-color: #00000030;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.item-cont .item .details-cont .name {
  color: #ffd014;
  font-size: 1.5em;
  width: 100%;
  text-align: center;
}
.item-cont .item .details-cont .status {
  color: #cd2e2e;
}
.item-cont .item .details-cont .price {
  color: #a3d98b;
  width: 100%;
  box-sizing: border-box;
  text-align: right;
}

.signup-panel {
  z-index: 300;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-color: #00000066;
  box-shadow: 0 0 40px 210px #00000066;
  /* border: 1px solid green; */
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: all;
}

.signup-panel .box {
  backdrop-filter: blur(30px);
  background-color: #3636361a;
  border: 1px solid #999999;
  border-radius: 10px;
  width: 50%;
  /* height: 50vh; */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 20px;
  box-sizing: border-box;
  font-size: 0.6em;
  color: white;
}
.signup-logo img {
  width: 92px;
  height: 119px;
  margin-top: 24px;
  /* margin-bottom: 25px; */
}
.platform-list {
  flex-direction: column-reverse;
  border: 1px solid #999999;
  border-radius: 14px;
  width: 80%;
  overflow: hidden;
  min-height: fit-content;
  margin-bottom: 10px;
}
/* .platform-list p {
  padding: 10px 20px;
  font-size: 2em !important;
  color: white;
  border-top: 1px solid #999999;
  cursor: pointer;
} */
.platform-list p {
  cursor: pointer;
  border-bottom: 1px solid #999999;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 20px 20px 20px;
  font-size: 16px;
}
.platform-list img {
  display: inline-block;
  width: 32px; /* adjust size */
  height: 32px; /* keep equal width & height */
  border-radius: 50%; /* makes it a circle */
  object-fit: cover; /* ensures the image fits inside circle */
}
.signup-continue-text {
  color: #ffd014;
  margin-top: 10px;
  margin-bottom: 10px;
}
.line-container {
  color: #ffd014;
  margin-top: 30px;
  margin-bottom: 10px;
  display: none; /* Initially hidden */
  align-items: center; /* Vertically center the text and lines */
  justify-content: center; /* Horizontally center the entire container */
  position: relative; /* Needed for positioning pseudo-elements */
  width: 80%; /* Or set a specific width */
}

.line-container span {
  padding: 0 10px; /* Add some spacing around the text */
}

.line-container:before,
.line-container:after {
  content: ""; /* Required for pseudo-elements */
  flex-grow: 1; /* Make the lines expand to fill available space */
  height: 1px; /* Set the height of the line */
  background-color: #ffffff4d; /* Set the color of the line */
}

.line-container:before {
  margin-right: 10px; /* Space between the left line and the text */
}

.line-container:after {
  margin-left: 10px; /* Space between the right line and the text */
}
.username-input {
  border: 1px solid #999999;
  background-color: transparent;
  border-radius: 8px;
  padding: 12px;
  color: #ffd014;
  width: 76%;
  display: none; /* Initially hidden */
}

.signup-text1 {
  font-size: 0.3em;
  color: rgba(255, 255, 255, 0.445);
}
.signup-text2 {
  font-size: 0.2em;
  color: rgba(255, 255, 255, 0.678);
}
@media only screen and (max-width: 700px) {
  .panel {
    justify-content: center;
  }
  .main-panel {
    align-items: center;
    padding: 0;
  }
  .inner-wrapper {
    width: 97%;
    height: 95%;

    margin: auto;
    padding: 0;
    margin-top: 28px;
  }
  .header .logo {
    display: none;
  }
  .header {
    justify-content: center;
  }
  /* .inventory-panel {
        padding-left: 0;
        padding-right: 0;
    } */
  .inventory-panel div {
    justify-content: center;
  }
  .building-shop {
    overflow-y: scroll;
    height: 20vh;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-color) transparent;
  }
  /* Chrome, Safari, Edge */
  .building-shop::-webkit-scrollbar {
    width: 8px;
  }

  .building-shop::-webkit-scrollbar-track {
    background: transparent;
  }

  .building-shop::-webkit-scrollbar-thumb {
    background: var(--scrollbar-color);
    border-radius: 10px;
  }

  .building-shop::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-hover);
  }

  .material-shop {
    overflow-x: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-color) transparent;
  }
  .tutorial-panel {
    width: 80%;
    max-width: none;
  }
  .tutorial-scene-2 {
    bottom: 23%;
  }
  .tutorial-scene-3 {
    bottom: 34%;
    right: 3%;
    transform: none;
  }
  .tutorial-scene-4 {
    bottom: 69%;
    right: 0%;
    transform: none;
  }
  .tutorial-scene-5 {
    bottom: 30%;
  }
  .market-left-side {
    width: 100%;
  }
  .marketplace-inner-wrapper {
    padding-top: 140px;
  }

  .signup-panel .box {
    width: 98%;
  }

  .wallet-btn {
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Copied Popup Styles */
.copied-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  pointer-events: none;
  transition: all 0.3s ease;
}

.copied-popup.hidden-popup {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  visibility: hidden;
}

.copied-popup-content {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid #00ff00;
  border-radius: 8px;
  padding: 12px 24px;
  box-shadow: 0 4px 20px rgba(0, 255, 0, 0.3);
  backdrop-filter: blur(10px);
}

.copied-text {
  color: #00ff00;
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  text-align: center;
  display: block;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}
