

#app {
  width: 100vw;
  height: 100vh;
  position: static;
  overflow: hidden;
}

#map {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: - env(safe-area-inset-left, 0);
  /* right: env(safe-area-inset-right, 0); */
  /* bottom: env(safe-area-inset-bottom, 0); */
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: visible;
}


html, body {
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: 'Ubuntu', sans-serif;
}


  .leaflet-control-zoom {
    display: none !important;
    /* display: inline-block !important; */
    position: relative;
  }


@media (max-width: 1200px) {

  /* .leaflet-control-zoom {
    display: none !important;
  } */

}



.edit-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 20px;
  width: 320px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
}

.profile-id {
  font-size: 10px;
  color: #666;
}

.profile-name {
  font-size: 10vw;
  
  /* margin: 5px 0 0px; */
  width: 10vw;
}

.edit-popup .profile-name {
  
  font-style: italic;
  font-weight: bold;
  margin: 5px 0 0px;
  color: #00aaff72;
  width: 100%;
}

.feature-row,
.iso-group {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  justify-content: start;
}

.feature-btn {
  width: 10vw;
  height: 10vw;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.feature-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}



.avatar-preview {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 300 / 570;
  cursor: pointer;
}

.mission-textarea {
  width: 100%;
  height: 80px;
  margin-top: 12px;
  padding: 6px;
  font-family: 'Ubuntu';
}

.save-btn {
  margin-top: 16px;
  width: 100%;
  padding: 10px;
  font-weight: bold;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.save-btn:hover {
  background: #000;
}



#title {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: opacity 0.5s ease;
  pointer-events: none;

}

/* #bottomMenu {
  position: fixed;
  bottom: 0;
  left: 50%;
  height: 10%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0);
  border-radius: 10px 10px 0 0;
  z-index: 1000;
  gap: auto;
} */

#bottomMenu {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 0;
  border-radius: 0 10px 10px 0;
  z-index: 1000;
  gap: 12px;
}



#bottomMenu img {
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: transform 0.2s ease;
}



#bottomMenu img:hover {
  transform: scale(1.111) translate(0, -20%);
}


#bottomMenu img.selected {
  transform: scale(1.111) translate(0, -20%);
}



#map-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 900;
  background: hsl(0, 0%, 100%);
  mix-blend-mode: saturation;
  opacity: 1;
  display: none;
  transition: clip-path 0.4s ease;
}

.active {
  transform: scale(1.2);
  height: 60px !important;
}

.slidePanel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;

  max-height: 20vh;
  min-height: 10vh;

  background: rgba(255, 255, 255, 0.373);
  padding: 12px 16px 6px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
}


.slidePanel .profile-name {
  font-size: 2vh;
  font-weight: thin;
  
}


.overlay {
  position: fixed;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  width: 80vw;
  max-width: 500px;
  background-color: rgba(255, 255, 255, 0.823);
  z-index: 1100;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
  display: none;
  /* stays hidden until activated */
}

#customTopLeftControls {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  
  /* z-index: 1100; */
}

#customTopLeftControls .circle-icon {
  width: 28px;
  height: 28px;
}


#tileToggleBtn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #333;
  background: #fff;
  padding: 2px;
  cursor: pointer;
 transition: transform 0.3s, background 0.3s;
}


.circle-icon {
  
  border-radius: 50%;
  background: #ffffff79;
  border: 1px solid #333;
  font-weight: bold;
  color: #696969;
  font-family: 'Ubuntu', sans-serif;
  font-size: 16px;
  cursor: pointer;
  z-index: 1100;
  transition: background 0.3s ease;

 
}

.circle-icon:hover {
  background: #ddd;
}


.activePanel {
  display: block !important;
}


.closeBtn {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 14px;
  padding: 4px 4px 0 0;
  font: 16px/14px Tahoma, Verdana, sans-serif;
  color: #707070;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 14px;
}


.closeBtn:hover {
  transform: scale(1.2);
  color: #b4b4b4;
}


#mouseCoordinates {
  position: absolute;
  pointer-events: none;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  display: none;
}


.explored-zone {
  animation: glow 2s ease-in-out infinite alternate;
  animation: pulseBorder 2s infinite alternate;
}

@keyframes glow {
  0% {
    stroke: #00aaff;
  }

  100% {
    stroke: #00ffff;
  }
}



.avatar {
  width: auto;
  height: auto;
}

.avatar.fallback {
  width: 50px;
  height: auto;
  margin-top: -40px;
}

.leaflet-container {
  font-family: 'Ubuntu', sans-serif;
  
}


.leaflet-popup-content {
  text-align: left;
  line-height: 1;

}

.leaflet-popup-content-wrapper {
  width: 100%;
  background: url(...) no-repeat center center / cover !important;
  /* pointer-events: none;
  cursor: default; */
}


.leaflet-popup-tip {
  background: transparent !important;
  width: 11px !important;
  height: 17px !important;
}


.profile-id {

  top: 6px;
  font-size: 8px;
  color: #666;

  font-family: 'Ubuntu';
}




.profile-name.z-0 {
  text-align: left;
  font-size: 2vh;
  font-weight: bold;
  font: 'ubuntu';
  line-height: 0.8;
  color: #000;
  text-shadow: 1px 1px 0 #ffffff76, -1px -1px 0 #ffffff76, 1px -1px 0 #ffffff76, -1px 1px 0 #ffffff76;
  white-space: wrap;
  text-overflow: clip;
  display: inline-flex;

  overflow: visible;
  margin: 0;
  padding: 0;
}



.profile-buttons-row {
  display: flex;
  justify-content: space-between;
  gap: 2px;

}

.profile-buttons-row a {
  flex: 1;
  text-align: center;

}

.profile-buttons-row button {
  width: 100%;
  padding: 6px;
  font-size: 11px;
  font-weight: bold;
  font: 'ubuntu';
  border-radius: 4px;
  border: none;
  background: #444;
  color: #fff;
  margin-top: 15px;
  /* cursor: none; */

}



.profile-buttons-row button:hover {
  background: #51515189;
  transform: scale(1.05);
}


.contact-btn {
  background-color: #d0d0d0;
}

.contact-btn:hover {
  background-color: #2e4784;
}




.profile-text {
  font-weight: bold;
  font-size: auto;
  text-align: center;
  max-width: 140px;
}

.feature-row {
  display: flex;
  flex-direction: row;
  justify-content: start;
  align-items: center;
  gap: 2px;



}


.feature-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.feature-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.placeholder-slot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4f4f457;
  border: 2px dashed #bbb;
  color: #aaa;
  font-size: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}


.feature-btn:hover {
  transform: scale(1.333);
  color: #ffffff92;
}













.player-main-avatar {
  /* position: relative; */
  max-width: 100%;
  
  /* justify-content: center;
  display: flex; */

  text-align: center;
  margin-top: -10%;
  margin-bottom: -10%;
}

.player-main-avatar img {
  max-width: 100%;
  width: 17vh;
  height: auto;
  object-fit: contain;
  /* aspect-ratio: 400 / 570; */
  border-radius: 6px;
}

/* Default avatar image size */

.player-main-avatar .sprite-anim {
  justify-self: center;
  width: 120px;
  height: auto;
  object-fit: contain;
  aspect-ratio: 300 / 570;
  border-radius: 6px;
}

/* Optional fallback styling */
.player-main-avatar .fallback {
  height: auto;
  width: 4vh;
  left: 10px;
  margin-right: 1vh;
  opacity: 0.0;
  pointer-events: none;
}

/* Spritesheet animation */
.sprite-anim {
  background-repeat: no-repeat;
  background-size: 7440px auto;
  /* 62 frames */
  animation: spriteLoop 2s steps(62) infinite;
}

@keyframes spriteLoop {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -7440px 0;
  }
}

/* .wide-avatar img {

  height: auto;
  max-width: 400px;

} */


/* Override size if using a 'main' image */
/* .player-main-avatar.wide-avatar img {
  max-width: 200px;
} */

/* Optional: widen Leaflet popup if main exists */


/* Default preview size */
#mainPreview {
  width: fit-content;
  height: auto;
  object-fit: contain;
  /* aspect-ratio: 300 / 570; */
  border-radius: 6px;
}


/* Optional: widen edit popup when main exists */
/* .popup-wrapper.popup-wide {
  max-width: 800px;
} */


.mission-text.z-3 {
  font-size: 1vh;
  font-weight: bold;
  white-space: wrap;
  margin: -10% 0 4px;
  color: #8a8a8a;
  /* text-shadow: 1px 1px 3px #fff, -1px -1px 3px #fff, 1px -1px 3px #fff, -1px 1px 3px #fff; */
  /* background: linear-gradient(90deg, #ffffff 0%, #fffffff0 50%, #ffffff60 100%); */
  box-decoration-break: slice;
}


.locationBtn.selected {
  background-color: rgba(100, 100, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 0 0 2px #668cff inset;
  transform: scale(1.1);
}





.icon-md {
  width: 60px;
  height: auto;
}

.icon-sm {

  height: 70px;
  width: auto;
}


.icon-sm:hover {
  transform: scale(1.2);
  transition: ease;
}

.icon-md:hover {
  transform: scaleX(-1);
  transition: none;
}

.playerBtn {
  width: 50px;
  height: auto;
  /* transition: transform 0.2s ease; */
  object-fit: contain;
}

.icon-sm.selected,
.playerBtn.selected {
  background-color: #ebebeb60;
  transform: scaleX(-1);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3);

  outline: 0px solid #ffffff8e;
  outline-offset: -2px;
  border-radius: 10px;
}


.player-ping-container {
  position: relative;
  width: 20px;
  height: 20px;
  /* pointer-events: none; */
}

.player-ping {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.358);
  border: 20px solid transparent;
  animation: pingAnim 1.5s ease-out infinite;
  z-index: 0;
  /* pointer-events: none; */
}













.interactive-marker {
  transition: transform 0.2s ease;
}

.interactive-marker:hover {
  transform: scale(1.2);
}



#searchAvatarRow.player-row {
  gap: 4px;
  padding: 4px 0;
  max-height: 100%;
}
#searchAvatarRow .playerBtn {
  height: fit-content;
  max-height: 100px;
  width: auto;
  
}




@media (max-width: 500px) {
  .profile-body {
    flex-direction: column;
  }
}








@keyframes pingAnim {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    color: #9d9d9d85;
    /* border: #2f2f2f69; */
    opacity: 0.77;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.2);
    color: #47646e5d;
    opacity: 0;
  }
}



@keyframes pulseBorder {
  0% {
    stroke: #ffffff;
    stroke-width: 11;
    fill-opacity: 0.2;
  }

  100% {
    stroke: #5a5a5a;
    stroke-width: 0;
    fill-opacity: 0.44;
  }
}



.player-icon-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.229);
  border: 1px dotted rgba(255, 255, 255, 0.214);
  color: rgba(44, 91, 50, 0);
  font-weight: bold;
  font-size: 0;
  height: 5px;
  width: 5px;
  border-radius: 50%;
  transition: all 0.25s ease;
  z-index: 2;
  pointer-events: auto;
}


.player-icon-pill:hover,
.player-icon-pill.zoomed-in {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0);
  border: 1px dotted rgba(187, 110, 110, 0.079);
  pointer-events: none;
}

.player-icon-pill:hover .pill-name,
.player-icon-pill.zoomed-in .pill-name {
  display: block;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1;
  transition: font-size 0.2s ease;
  font-size: 9px;
}



.player-icon-pill:hover .pill-char.short {
  opacity: 0;
}

.player-icon-pill:hover .pill-char.full {
  opacity: 1;
}

.player-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 8px;
  padding: 6px 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
}


#playerAvatarRow {
  width: 100vw;
  max-height: fit-content;
}

.playerBtn {
  width: 48px;
  height: auto;
  max-height: 100px;
  object-fit: contain;
}



.animated-text::after {
  content: '...';
  animation: dots 1.5s infinite;
  display: inline-block;
  margin-left: 4px;
  font-weight: bold;
}

@keyframes dots {
  0% {
    content: '';
  }

  33% {
    content: '.';
  }

  66% {
    content: '..';
  }

  100% {
    content: '...';
  }
}

#titlecontainer {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  pointer-events: none;
}



.sprite-title {
  
  position: absolute;
  right: 10px;
  transform:  scale(0.45);
  transform-origin: top right;
  pointer-events: none;
  width: 740px;
  height: 544px;
  scale: 0.35;
  background-image: url('/titlespritesheet.png');
  background-repeat: no-repeat;
  background-size: (740*48)px 512px;
  z-index: 1000;
  animation: titleAnim 2.4s steps(48) infinite;
  opacity: 1;
  transition: opacity 0.5s ease;
}


@keyframes titleAnim {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -35520px 0;
  }
}


.world-mask {
  filter: blur(2.2px);
  transition: opacity 0.999s ease;
  background: hsl(0, 0%, 100%);
  mix-blend-mode: saturation;
}









.location-preview {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}



.location-popup {
  font-family: 'Ubuntu', sans-serif;
  text-align: left;
  padding: 12px;
}

.location-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.location-thumbnail {
  width: 100px;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.location-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 260px;
}

.location-popup .profile-name {
  font-size: 20px;
  font-weight: bold;
  color: #000;
  line-height: 1.1;
}

.location-bio {
  font-size: 12px;
  color: #333;
  margin-top: 4px;
}

.location-preview-secondary {
  text-align: center;
  margin: 16px 0 12px;
}

.location-preview-secondary img {
  width: 120%;
  max-width: 300px;
  height: auto;
  max-height: 100%;
  /* object-fit: contain; */
  overflow: visible;
  border-radius: 6px;
  position: relative;
  z-index: -2;
}

.location-play-btn {
  width: 100%;
  background: #ddd;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 8px 0;
  color: #444;
  font-size: 12px;
  cursor: not-allowed;
  opacity: 0.6;
}



/* === USER PANEL DESIGN OVERRIDES === */

/* Compact Login/Create Tabs */
.login-tabs {
  flex: 1 1 auto;
  justify-content: center;
  gap: 2px;
  margin-top: -10px;
  transform: translateY(-80%);
  position: fixed;
}

.login-tabs .tab-btn {
  flex: 1 1 50%;
  padding: 4px 6px;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: none;
  border-radius: 6px 6px 0 0;
  background: #ccc;
  cursor: pointer;
  height: 22px;

}

.tab-btn.activtab {
  flex-grow: 2;
  background: rgb(239, 239, 239);
  height: 22px;
  /* z-index: 2; */
}

.tab-content {
  padding: 0px 0;
  font-size: 11px;
  line-height: 0.7;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;

}

/* Input Styles */

.tab-content input[type="email"],
.tab-content input[type="password"] {
  flex: 1 1 45%;
  max-width: 240px;
  padding: 4px;
  font-size: 10px;
  border: 1px solid #999;
  border-radius: 4px;
}

/* Login Button (Wide but skinny) */
.tab-content button {
  flex: 1 1 80vw;
  max-width: 80vw;
  padding: 4px;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 1px;
  background: #022e00;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;

}

.tab-content button:hover {
  background: #000;
}

/* Text block tweaks */
.tab-content p {
  flex: 1 1 100%;
  margin: 4px 0;
  font-size: 10px;
  text-align: center;
  opacity: 0.75;
}

.coord-row {
  display: flex;
  gap: 4px;
  align-items: center;
  width: 100%;
}

.coord-row input {
  flex: 1;
  max-width: 180px;
}

.coord-row button {
  padding: 4px 8px;
  font-size: 11px;
  background: #555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}






/* @media screen and (orientation: portrait) {
  .leaflet-popup-content-wrapper {
    max-width: 90vw;
  }
  .player-main-avatar img {
    width: 40vw;
    height: auto;
  }
}

@media screen and (orientation: landscape) {
  .leaflet-popup-content-wrapper {
    max-width: 60vw;
  }
} */
