@font-face {
  font-family: "Lilita One";
  src: url("LilitaOne-Regular.ttf") format("truetype");
  font-display: block;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a110b;
  font-family: "Lilita One", sans-serif;
  color: #fff6e6;
}

#unity-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  background: #1a110b;
  outline: none;
}

#loading {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #55c8f4 0%, #88daf7 58%, #d8f3fc 100%);
  transition: opacity 0.45s ease;
}

#loading::before,
#loading::after {
  content: "";
  position: absolute;
  left: -8%;
  width: 116%;
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

#loading::before {
  bottom: -6%;
  height: 30%;
  background: #f4cf69;
  transform: rotate(-3deg);
}

#loading::after {
  bottom: -16%;
  height: 40%;
  background: #ee9e31;
  transform: rotate(4deg);
}

#loading-logo {
  position: relative;
  z-index: 1;
  width: min(58vw, 720px);
  height: auto;
  margin-top: -7vh;
  filter: drop-shadow(0 7px 0 rgba(91, 48, 16, 0.22));
  user-select: none;
  -webkit-user-drag: none;
}

#play-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 3vh;
  padding: 18px 34px;
  border: 3px solid #080d17;
  border-radius: 999px;
  background: linear-gradient(#ffe36b, #ffbd28);
  box-shadow: 0 6px 0 #080d17;
  color: #3a2414;
  font: inherit;
  font-size: clamp(19px, 2.1vw, 28px);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

#play-button::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

#play-button:hover {
  transform: translateY(-1px);
}

#play-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #080d17;
}

#play-button:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.9);
  outline-offset: 5px;
}

#loading-bar {
  position: relative;
  z-index: 1;
  display: none;
  width: min(48vw, 420px);
  height: 22px;
  margin-top: 28px;
  overflow: hidden;
  border: 4px solid #080d17;
  border-radius: 999px;
  background: #6b3d1c;
  box-shadow: 0 4px 0 #080d17;
}

#loading-fill {
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: #ffcc33;
  transition: width 0.25s ease;
}

#loading-text {
  position: relative;
  z-index: 1;
  display: none;
  margin-top: 14px;
  color: #fff6e6;
  font-size: clamp(16px, 2vw, 24px);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 #080d17;
}

#loading.is-loading #play-button {
  display: none;
}

#loading.is-loading #loading-bar,
#loading.is-loading #loading-text {
  display: block;
}

#loading.done {
  opacity: 0;
  pointer-events: none;
}

#message {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-50%);
}

#message .msg {
  padding: 10px 18px;
  border: 3px solid #080d17;
  border-radius: 14px;
  background: #ffcc33;
  color: #080d17;
  font-size: 18px;
}

#message .msg.error {
  background: #ff6152;
  color: #fff6e6;
}

@media (max-width: 640px) {
  #loading-logo {
    width: 82vw;
    margin-top: -4vh;
  }

  #play-button {
    padding: 14px 22px;
    font-size: 18px;
  }
}
