@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap");

html,
body {
  -ms-touch-action: none;
  background: #171717;
  padding: 0;
  border: 0;
  margin: 0;
  height: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  font-family: Verdana, sans-serif;
}

#chat-widget-container {
  bottom: 0% !important;
}

.floating-span {
  position: fixed;
  bottom: 11%;
  right: 2%;
  background-color: #d1151b;
  color: white;
  border-radius: 5px;
  padding: 3px 1px;
  font-size: larger;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: inline-block;
  writing-mode: tb-rl;
  font-weight: bold;
}

.floating-span2 {
  background: #0a8a16;
}

.floating-span,
.floating-span2 {
  display: none;
}

.egret-player {
  margin: auto;
  width: 100%;
  height: 100%;
}

.egret-player {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 9 / 16; /* Forces portrait aspect */
  margin: 0 auto;
  background: #000;
}

.egret-player canvas {
  /* width: 100%;
  height: 100%; */
}

@media screen and (min-width: 1024px) {
  .egret-player {
    margin: 0 auto;
    height: 100%;
  }
}

#early-loader,
#game-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #111 0%, #000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Poppins", sans-serif;
  z-index: 99999;
}

#loader-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  animation: glowLogo 2s ease-in-out infinite alternate;
}

#game-loader {
  display: none;

  #loader-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: glowLogo 1s ease-in-out infinite alternate;
  }
}

@keyframes glowLogo {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

.loader-text {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: #fdfbf4;
  text-align: center;
}

.loader-text::after {
  content: "..";
  animation: dots 2.5s steps(3, end) infinite;
}

@keyframes dots {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  /* 100% {
          content: "...";
        } */
}

.loader-bar {
  width: 88px;
  height: 10px;
  background: #222;
  border-radius: 8px;
  margin-top: 10px;
  overflow: hidden;
  box-shadow:
    0 0 5px #000,
    inset 0 0 5px #333;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00ff99, #ffcc00);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.loader-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  transform: skewX(-20deg);
  animation: shine 2s infinite linear;
}

@keyframes shine {
  0% {
    left: -30%;
  }
  100% {
    left: 100%;
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-container {
  background: #000;
  padding: 20px 25px;
  border-radius: 10px;
  text-align: center;
  width: 320px;
  max-width: 75%;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
  animation: fadeInPopup 0.3s ease-out;

  h2 {
    text-align: left;
    font-size: large;
  }
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.popup-text,
.hint-text {
  font-size: medium;
  color: #ccc;
  margin: 10px 0;
  text-align: left;
}

.login-input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 5px;
  color: #fff;
}

.password-field {
  display: flex;
  align-items: center;
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: pointer;
  color: #bbb;
}

.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.popup-btn {
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.popup-btn.login {
  background: linear-gradient(to right, #ff00ff, #cc00cc);
  color: #fff;
}

.popup-btn.continue {
  background: #444;
  color: #fff;
}

.popup-btn.cancel {
  background: #222;
  color: #fff;
}

.forgot-link,
.register-link {
  color: #ff00ff;
  text-decoration: none;
  font-size: 12px;
}

.highlight {
  color: #ff00ff;
}

.fade-in {
  animation: fadeInPopup 0.3s forwards;
}

.fade-out {
  animation: fadeOutPopup 0.2s forwards;
}

@keyframes fadeInPopup {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOutPopup {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Win Manager */
/* win.css */
/* #win-display {
  font-family: "Impact", sans-serif;
  font-size: 48px;
  color: gold;
  background-size: contain;
  background-repeat: no-repeat;
  text-align: center;
  padding: 40px 20px;
  border-radius: 12px;
  animation: fadeInOut 2.5s ease-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  10% {
    opacity: 1;
    transform: scale(1.1);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  90% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
} */
