:root {
  color-scheme: dark;
  --app-width: 100vw;
  --app-height: 100vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0b0f18;
  font-family: "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  touch-action: none;
  user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: var(--app-width);
  height: var(--app-height);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 196, 77, 0.12), transparent 34%),
    linear-gradient(180deg, #111827 0%, #0a0e16 100%);
}

#game {
  display: block;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  max-width: 100vw;
  max-height: 100vh;
  image-rendering: auto;
  outline: none;
}

#orientation-lock {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 32px;
  background: #10151f;
  color: #ffd36a;
  text-align: center;
  font-size: clamp(22px, 7vw, 42px);
  line-height: 1.35;
  z-index: 10;
}

@media (orientation: portrait) and (max-width: 820px) {
  #orientation-lock {
    display: grid;
  }

  #game {
    opacity: 0;
  }
}
