:root {
  --page-background: #080e19;
  --page-accent: #43e8ee;
  --page-text: #82a4b5;
  --page-panel: #111f30;
  --page-frame: #385b6f;
  color-scheme: dark;
  background: var(--page-background);
  font-family: Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-background);
}

.game-viewport {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
}

.game-stage {
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
}

#unity-container {
  position: relative;
  background: var(--page-background);
}

#unity-container.unity-mobile {
  width: 100%;
  height: 100%;
}

.about-game-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  color: var(--page-text);
}

.about-game {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  color: var(--page-text);
  line-height: 1.6;
}

.about-game h1,
.about-game h2 {
  color: var(--page-accent);
  line-height: 1.3;
}

.about-game h1 {
  font-size: 24px;
}

.about-game h2 {
  margin-top: 28px;
  font-size: 20px;
}

.boosty-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 6px;
  background: #242b2c;
}

.boosty-link img {
  display: block;
  width: 88px;
  height: auto;
}

.game-links a:focus-visible {
  outline: 2px solid var(--page-accent);
  outline-offset: 3px;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--page-background);
  touch-action: none;
}

#unity-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(260px, 70%);
  transform: translate(-50%, -50%);
  color: var(--page-text);
  text-align: center;
}

#unity-loading[hidden],
#unity-warning[hidden] {
  display: none;
}

#unity-loading-title {
  margin-bottom: 14px;
  color: var(--page-accent);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#unity-progress-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--page-frame);
  background: var(--page-panel);
}

#unity-progress-bar {
  width: 0;
  height: 100%;
  background: var(--page-accent);
  transition: width 80ms linear;
}

#unity-warning {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 12px;
  width: min(680px, calc(100% - 24px));
  transform: translateX(-50%);
}

#unity-warning > div {
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 3px;
  background: #f0c54c;
  color: #080e19;
}

#unity-warning > .error {
  background: #ff455e;
  color: white;
}
