* {
  box-sizing: border-box;
}

:root {
  --foam: #f5fbff;
  --mist: rgba(216, 238, 246, 0.68);
  --line: rgba(220, 235, 246, 0.16);
  --panel: rgba(2, 7, 13, 0.48);
  --accent: #8fc5e8;
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  margin: 0;
  color: var(--foam);
  background: #111923;
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(38, 52, 66, 0.32), transparent 42%);
}

#page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

#game-card {
  width: min(100%, 1216px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

#game-header {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px 12px 18px;
  text-align: center;
}

#game-title {
  color: var(--foam);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.42em;
  line-height: 1;
  text-indent: 0.42em;
}

#game-subtitle {
  color: var(--mist);
  font-size: 13px;
  font-style: italic;
  line-height: 1.3;
}

#unity-container {
  position: relative;
}

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

#unity-container.unity-mobile {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#unity-canvas {
  display: block;
  width: 100%;
  max-width: 1152px;
  aspect-ratio: 16 / 10;
  height: auto;
  margin: 0 auto;
  border: 1px solid rgba(176, 235, 244, 0.24);
  border-radius: 2px 2px 0 0;
  background: #010a10;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(2, 7, 13, 0.78);
}

#unity-logo {
  width: 154px;
  height: 130px;
  background: url('unity-logo-dark.png') no-repeat center;
}

#unity-progress-bar-empty {
  width: 154px;
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 251, 255, 0.14);
}

#unity-progress-bar-full {
  width: 0%;
  height: 8px;
  border-radius: inherit;
  background: var(--accent);
}

#unity-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 1152px;
  min-height: 48px;
  margin: 0 auto;
  padding: 0 14px 0 16px;
  border: 1px solid rgba(176, 216, 244, 0.22);
  border-top: 0;
  border-radius: 0 0 2px 2px;
  color: rgba(245, 251, 255, 0.86);
  background: rgba(3, 11, 19, 0.88);
}

.unity-mobile #unity-footer {
  display: none;
}

#unity-build-title {
  line-height: 1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

#unity-fullscreen-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(190, 220, 242, 0.24);
  border-radius: 3px;
  cursor: pointer;
  background:
    rgba(255, 255, 255, 0.08)
    url('fullscreen-button.png')
    no-repeat center / 18px 18px;
}

#unity-fullscreen-button:hover {
  background-color: rgba(255, 255, 255, 0.14);
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 16px;
  z-index: 2;
  width: min(90%, 720px);
  transform: translateX(-50%);
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--foam);
  background: rgba(3, 10, 16, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

#unity-warning div {
  padding: 12px 14px;
}

#unity-warning .error {
  border-left: 4px solid #ff6b4a;
}

#unity-warning .warning {
  border-left: 4px solid #d5b36d;
}

#unity-warning .info {
  border-left: 4px solid var(--accent);
}

@media (max-width: 760px) {
  #page-shell {
    padding: 12px;
  }

  #game-card {
    padding: 8px;
  }

  #game-header {
    padding: 4px 8px 12px;
  }

  #game-title {
    font-size: 17px;
    letter-spacing: 0.28em;
    text-indent: 0.28em;
  }

  #game-subtitle {
    font-size: 12px;
  }
}

@media (max-height: 860px) and (min-width: 900px) {
  #page-shell {
    align-items: start;
  }
}
