:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  touch-action: none;
}

.stage {
  position: relative;
  display: grid;
  width: 100vw;
  height: 100vh;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 55%, rgba(38, 56, 78, 0.24), transparent 34%),
    radial-gradient(circle at 22% 18%, rgba(89, 112, 135, 0.18), transparent 24%),
    #000;
}

#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  cursor: grab;
}

.scene:active {
  cursor: grabbing;
}

.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.fallback {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  max-width: min(520px, calc(100vw - 32px));
  padding: 18px 22px;
  color: #f6f8ff;
  line-height: 1.45;
  text-align: center;
  background: rgba(14, 18, 24, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  transform: translate(-50%, -50%);
}

.lightbox {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(12px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 1180px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 24px 90px rgba(0, 0, 0, 0.85),
    0 0 90px rgba(119, 186, 255, 0.28);
}

.lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 720px) {
  .lightbox {
    padding: 18px;
  }
}
