@font-face {
  font-family: 'game-font-light';
  src: url('../fonts/Gilroy-Light.ttf');
}

@font-face {
  font-family: 'game-font';
  src: url('../fonts/Gilroy-Regular.ttf');
}

@font-face {
  font-family: 'game-font-kind-of-bold';
  src: url('../fonts/Gilroy-Medium.ttf');
}

@font-face {
  font-family: 'game-font-semi-bold';
  src: url('../fonts/Gilroy-SemiBold.ttf');
}

@font-face {
  font-family: 'game-font-bold';
  src: url('../fonts/Gilroy-Bold.ttf');
}

* {
  -webkit-touch-callout: none; /* Disable callout (e.g., save image) on long-press */
  -webkit-user-select: none; /* Prevent text selection */
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'game-font', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  overflow: hidden;
}

body {
  margin: 0;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000000;
  z-index: 990;
}

#game-container:not(.ready)::after {
  content: ' ';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
}

#game-container.offline::after {
  content: ' ';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
}

.offline-toast {
  position: absolute;
  bottom: 5%;
  right: 5%;
  max-width: 100%;
  display: flex;
  padding: 30px;
  box-sizing: border-box;
  padding-left: calc(30px + 8px + 10px);
  border-radius: 5px;
  background-color: #111111;
  color: #FFFFFF;
  font-size: 14px;
  line-height: 16px;
  z-index: 995;
}

.offline-toast.hidden {
  display: none;
}

.offline-toast::before {
  content: ' ';
  position: absolute;
  top: 50%;
  left: 30px;
  transform: translate(0%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #CD201F;
}

.message-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #323232;
  color: white;
  padding: 1em 1.5em;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  
  /* Let it grow wide on small screens */
  max-width: 90vw;
  width: auto;
  min-width: 250px;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1em;

  font-size: 1rem;
  word-break: break-word; /* Avoid overflow */
  flex-wrap: wrap; /* Allow wrapping if needed */
}

.message-toast span {
  flex: 1; /* Take remaining space */
}

.btn-close {
  background: none;
  border: none;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 50px;
  background-color: #000000;
  z-index: 995;
}

.loading-screen .logo-container {
  width: 235px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.loading-screen .logo-container img:nth-of-type(1) {
  width: 20%; 
}

.loading-screen .logo-container img:nth-of-type(2) {
  width: 80%; 
}

.loading-screen .loading-bar-container {
  position: relative;
  width: 430px;
  max-width: 100%;
}

.loading-screen .loading-bar-container img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  border-radius: 10px;
}

.loading-screen .loading-bar-container img:nth-of-type(1) {
  width: 92%;
}
