* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  /* чтобы не прыгал скролл на мобилках */
  overscroll-behavior: none;
  touch-action: manipulation;
}

#game-container {
  width: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  position: relative;
  overflow: hidden;
}

#game-container canvas {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0 !important;
}

#phaser-loading-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 99999;
}

#phaser-loading-screen img {
  width: clamp(133px, 20vmin, 280px);
  height: clamp(133px, 20vmin, 280px);
  animation: loading-spin 5s linear infinite;
}

@keyframes loading-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

#rotate-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  z-index: 99999;
  text-align: center;
  padding: 24px;
  pointer-events: auto;
  font-family: "Calibri", system-ui, "Segoe UI", Roboto, Arial;
}

#rotate-box {
  max-width: 420px;
}

#rotate-title {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
}

#rotate-text {
  margin: 10px 0 0;
  opacity: 0.85;
}

#auth-error-overlay {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vmin, 44px);
  padding: 24px;
  background-color: #000;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 100000;
  text-align: center;
  pointer-events: auto;
}

#auth-error-overlay.is-visible {
  display: flex;
}

#auth-error-logo {
  width: clamp(220px, 34vmin, 420px);
  height: auto;
  user-select: none;
  pointer-events: none;
}

#auth-error-text {
  margin: 0;
  max-width: 720px;
  color: #e53935;
  font-family: "Calibri", system-ui, "Segoe UI", Roboto, Arial;
  font-weight: bold;
  font-size: 14px;
  line-height: 1.25;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

#auth-error-textblock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 720px;
}

#auth-error-detail {
  margin: 0;
  /* Причина и дата блокировки приходят двумя строками. */
  white-space: pre-line;
  color: #e53935;
  font-family: "Calibri", system-ui, "Segoe UI", Roboto, Arial;
  font-size: 14px;
  line-height: 1.3;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.auth-error-btn {
  position: relative;
  display: inline-block;
  border: none;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  background: transparent;
  transition: transform 0.06s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-error-btn:active {
  transform: translateY(1px);
}

.auth-error-btn-img {
  display: block;
  width: 187px;
  height: auto;
  transition: filter 0.08s ease;
}

.auth-error-btn:hover .auth-error-btn-img,
.auth-error-btn:active .auth-error-btn-img {
  filter: brightness(0.6);
}

.auth-error-btn-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  color: #2a1409;
  font-family: "Calibri", system-ui, "Segoe UI", Roboto, Arial;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.3px;
}

