@font-face {
  font-family: "Outfit";
  src: url("Outfit-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #142b14;
  --track: rgba(0, 0, 0, 0.4);
  --fill: #fff6dc;
  --text: #fff6dc;
  --error: #d9483b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#unity-container,
#unity-fullscreen-container {
  position: fixed;
  inset: 0;
  background: var(--bg);
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg);
  outline: none;
}

#loading-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 10;
}

#loading-screen.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loading-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#progress-track {
  position: relative;
  width: min(400px, 100%);
  height: 16px;
  border-radius: 8px;
  background: var(--track);
  overflow: hidden;
}

#progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 8px;
  background: var(--fill);
  transition: width 0.2s ease-out;
}

#progress-percent {
  position: relative;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}

#loading-error {
  position: relative;
  display: none;
  max-width: 400px;
  padding: 16px;
  border-radius: 8px;
  background: var(--error);
  color: var(--text);
  font-size: 16px;
  text-align: center;
}

#loading-screen.has-error #loading-error {
  display: block;
}

#loading-screen.has-error #progress-track,
#loading-screen.has-error #progress-percent {
  display: none;
}

#unity-warning {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  max-width: calc(100% - 32px);
  z-index: 20;
}

#unity-warning > div {
  margin-bottom: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  font-size: 16px;
}

#unity-warning > div.is-error {
  background: var(--error);
}

#diagnostics-icon {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 32px;
  cursor: pointer;
  z-index: 15;
}
