*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

.hidden { display: none !important; }

body {
  background: #000;
  color: #fff;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  font-family: system-ui, sans-serif;
}

#loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

#loading-screen p {
  color: rgb(156, 163, 175);
  font-size: 1.125rem;
  font-family: ui-monospace, monospace;
}

#permission-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  z-index: 20;
}

#permission-screen h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

#permission-message {
  text-align: center;
  color: rgb(209, 213, 219);
  margin: 0;
}

#start-btn {
  padding: 0.75rem 1.5rem;
  background: rgb(79, 70, 229);
  border: none;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

#start-btn:hover { background: rgb(99, 102, 241); }

#error-message {
  color: rgb(248, 113, 113);
  text-align: center;
}

#main-view {
  position: fixed;
  inset: 0;
}

#sky {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#main-view > div {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.75rem;
  color: rgb(156, 163, 175);
  font-family: ui-monospace, monospace;
}

#recentre-btn,
#mode-btn {
  position: absolute;
  bottom: 1.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgb(75, 85, 99);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: rgb(209, 213, 219);
  font-family: ui-monospace, monospace;
  cursor: pointer;
}

#recentre-btn { right: 1.5rem; }
#mode-btn { left: 1.5rem; }

#recentre-btn:active,
#mode-btn:active { background: rgba(255, 255, 255, 0.2); }
