:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #001f3f;
  font-family: Arial, sans-serif;
}

#unity-container {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100vw;
  max-height: 100vh;
  transform: translate(-50%, -50%);
}

#unity-canvas {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  background: #1a1a1a;
  object-fit: contain;
}

#unity-loading-bar {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  min-width: 250px;
  padding: 20px;
  border-radius: 12px;
  color: #fff;
  background: #001f3f;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  text-align: center;
  transform: translate(-50%, -50%);
}

#unity-logo {
  display: flex;
  width: 200px;
  height: 200px;
  margin: 0 auto 10px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
}

#unity-logo-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#unity-game-name {
  margin-top: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

#unity-company-name {
  margin-bottom: 15px;
  color: #ccc;
  font-size: 14px;
}

#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  margin: 10px auto 0;
  background: url("progress-bar-empty-dark.png") no-repeat center;
}

#unity-progress-bar-full {
  width: 0;
  height: 18px;
  background: url("progress-bar-full-dark.png") no-repeat center;
}

#unity-warning {
  position: absolute;
  top: 5%;
  left: 50%;
  z-index: 9999;
  display: none;
  padding: 10px;
  color: #111;
  background: #fff;
  transform: translateX(-50%);
}

#custom-loading-spinner {
  display: flex;
  margin-top: 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 6px solid rgba(0, 174, 239, 0.2);
  border-top-color: #00aeef;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-text {
  margin-top: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.official-game-link {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 32%;
  z-index: 10000;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  background: rgba(5, 17, 31, 0.92);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.55);
}

.official-game-link:hover,
.official-game-link:focus-visible {
  background: #123a63;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.official-game-link img {
  display: block;
  width: 22px;
  height: 22px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
