@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  position: relative;
  /* Make body the reference point for absolute positioning */
}

body:after {
  /*cursor: none;*/
  content: "";
  /* This is necessary for the pseudo-element to show */
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  /* Half the size of width and height to perfectly center the image */
  transform: translate(-50%, -50%);
  /* Cnvas size plus the border image's extra pixels */
  width: 684px;
  height: 864px;
  /* Apply the border image to the pseudo-element */
  /* background: url('ramka.png') no-repeat center/contain; */
  /* Place the border image above the canvas */
  z-index: 1;
}

/* Styles for all devices */
html,
body {
  margin: 0;
  padding: 0;
  background-color: #1a1a1a;
  /* Set the background color */
}

/* Styles for mobile devices */
@media only screen and (max-width: 768px) {

  html,
  body {
    height: 100vh;
    /* Full height of the viewport */
    display: flex;
    justify-content: center;
    /* Center horizontally */
    overflow: hidden;
    /* Hide scrollbar if the game canvas is bigger than the viewport */
  }



  .hidden {
    cursor: none;
    /* Hide the cursor when over the canvas */

  }

  canvas {
    z-index: 2;
    cursor: none;
    /* Hide the cursor when over the canvas */
    display: block;
    width: 100%;
    /* Occupy full width of the parent container */
    height: 100%;
    /* Occupy full height of the parent container */
    max-width: 100vw;
    /* Set maximum width to the viewport width */
    max-height: 100vh;
    /* Set maximum height to the viewport height */
    object-fit: contain;
    /* Fit the canvas content within the container */

  }
}

/* Styles for desktop devices */
@media only screen and (min-width: 769px) {

  html,
  body {
    height: 100vh;
    /* Full height of the viewport */
    display: flex;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    overflow: hidden;
    /* Hide scrollbar if the game canvas is bigger than the viewport */
  }

  canvas {
    cursor: none;
    /* Hide the cursor when over the canvas */
    display: block;
    width: 100%;
    /* Occupy full width of the parent container */
    height: 100%;
    /* Occupy full height of the parent container */
    max-width: 100vw;
    /* Set maximum width to the viewport width */
    max-height: 100vh;
    /* Set maximum height to the viewport height */
    object-fit: contain;
    /* Fit the canvas content within the container */
  }
}

#changelog-popup {
  font-family: 'Press Start 2P', cursive;
  /* Use 'Press Start 2P' and fall back to 'cursive' if the font isn't available */
  transform: translate(var(--tx, 0px), var(--ty, 0px));
}

.close-btn {
  cursor: pointer;
  padding: 2px 0px;

  color: #e99f17;
}

.popup-window {
  position: fixed;
  top: 10%;
  right: 2%;
  width: 300px;
  min-height: 200px;
  background-color: #f9f9f9;
  border: 2px solid #3a3a3a;
  border-radius: 5px;
  box-shadow: 2px 3px 0px rgba(0, 0, 0, 0.377);
  z-index: 1000;
  overflow: auto;
  background-color: #1f1f1f;
  padding-right: 3px;
  /* Added padding to the right side */
}


.popup-header {
  padding: 10px 10px;
  margin-right: -3px;
  font-size: 8px;
  color: #bdbdbd;
  background-color: #383838;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
}



.popup-content {
  font-family: Arial, Helvetica, sans-serif;
  padding: 10px;
  font-size: 10px;
  color: #9b9b9b;
  background-color: #1f1f1f;
  overflow-y: auto;
  max-height: 600px;
}

/* Styling the scrollbar */
.popup-content::-webkit-scrollbar {
  width: 4px;
}

.popup-content::-webkit-scrollbar-track {
  border-radius: 10px;
  margin: 4px 0px;
  /* Adjusted to only top and bottom */
}

.popup-content::-webkit-scrollbar-thumb {
  background-color: #383838;
  border-radius: 2px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background-color: #bdbdbd;
}

@keyframes exitAnimation {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.4) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
  }
}

#changelog-popup.closing {
  animation: exitAnimation 0.5s forwards;
}

/* CONSOLE CSS */

@keyframes slideDown {
  from {
    top: -150px;
    /* Start above the top of the viewport */
  }

  to {
    top: 0;
    /* End at the top edge of the viewport */
  }
}

#gameConsole {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  outline: none;
  margin: 0;
  padding: 11px;
  box-sizing: border-box;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  line-height: 2;
  resize: none;
  overflow-y: auto;
  text-decoration: none;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  animation-name: slideDown;
  background-image: url('assets/matrix.gif');
  background-repeat: repeat;
  background-size: 400px 200px;
}

#gameConsole span {
  text-decoration: none;
  /* Specifically ensures that span elements inside the console also have no text decoration */
}

#gameConsole.hide-scrollbar {
  -ms-overflow-style: none;
  /* for Internet Explorer, Edge */
  scrollbar-width: none;
  /* for Firefox */
}

#gameConsole.hide-scrollbar::-webkit-scrollbar {
  display: none;
  /* for Chrome, Safari, and Opera */
}

#gameConsole.show-scrollbar-on-hover::-webkit-scrollbar {
  display: block;
}

#gameConsole.show-scrollbar-on-hover {
  -ms-overflow-style: auto;
  scrollbar-width: auto;
}