:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #142c51;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html,
body,
#unity-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background: #142c51;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #142c51;
  outline: none;
}

#groomer-loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(7vh, 44px) max(24px, env(safe-area-inset-right)) max(7vh, env(safe-area-inset-bottom));
  background-color: #142c51;
  background-image: url("groomer-loading.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
  transition: opacity 300ms ease;
}

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

#groomer-loading-copy {
  position: absolute;
  top: max(4vh, env(safe-area-inset-top));
  left: 50%;
  width: min(900px, 92vw);
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  filter: drop-shadow(0 7px 0 rgba(70, 28, 103, 0.85)) drop-shadow(0 12px 22px rgba(16, 28, 74, 0.58));
}

#groomer-loading-title {
  margin: 0;
  color: #ff82bd;
  font-family: "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
  font-size: clamp(38px, 7.2vw, 100px);
  font-weight: 900;
  letter-spacing: clamp(1px, 0.18vw, 4px);
  line-height: 0.95;
  -webkit-text-stroke: clamp(1px, 0.2vw, 3px) #fff;
  text-shadow: 0 5px 0 #7b347f, 0 9px 0 #49255f;
}

#groomer-loading-status {
  margin-top: clamp(12px, 2vh, 24px);
  color: #ffe04e;
  font-size: clamp(18px, 2.5vw, 34px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 3px 0 #8a3c64;
}

#groomer-loading-panel {
  width: min(560px, 78vw);
  padding: 13px 18px 17px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(49, 30, 94, 0.88), rgba(24, 34, 88, 0.92));
  box-shadow: 0 8px 0 rgba(40, 16, 73, 0.72), 0 18px 42px rgba(12, 20, 66, 0.48);
  backdrop-filter: blur(5px);
}

#groomer-progress-label {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 0 #682d78, 0 0 8px rgba(255, 255, 255, 0.35);
}

#groomer-progress-track {
  width: 100%;
  height: clamp(22px, 3.2vw, 34px);
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 999px;
  background: rgba(23, 27, 78, 0.9);
  box-shadow: inset 0 3px 7px rgba(7, 9, 42, 0.6);
}

#groomer-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #fff36b 0%, #ffc51a 45%, #ff7f32 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.55), 0 0 14px rgba(255, 196, 26, 0.8);
  transition: width 100ms linear;
}

#unity-fullscreen-button {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 12;
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  background: linear-gradient(180deg, #ff73af, #ce3d91);
  box-shadow: 0 5px 0 #752968, 0 9px 20px rgba(26, 20, 72, 0.42);
}

#unity-fullscreen-button.ready {
  display: block;
}

#unity-fullscreen-button:disabled {
  display: none;
  pointer-events: none;
}

#unity-fullscreen-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #752968, 0 5px 12px rgba(26, 20, 72, 0.36);
}

.fullscreen-corners,
.fullscreen-corners::before,
.fullscreen-corners::after {
  position: absolute;
  inset: 10px;
  content: "";
}

.fullscreen-corners {
  border-top: 4px solid #fff;
  border-left: 4px solid #fff;
  border-radius: 3px 0 0;
}

.fullscreen-corners::before {
  inset: -4px -4px auto auto;
  width: 11px;
  height: 11px;
  border-top: 4px solid #fff;
  border-right: 4px solid #fff;
  border-radius: 0 3px 0 0;
}

.fullscreen-corners::after {
  inset: auto -4px -4px auto;
  width: 26px;
  height: 11px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  border-left: 4px solid #fff;
  border-radius: 0 0 3px 3px;
}

#unity-warning {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 40;
  display: none;
  width: min(720px, 90vw);
  transform: translateX(-50%);
  color: #171735;
  font-weight: 700;
  text-align: center;
}

#unity-warning > div {
  margin-bottom: 6px;
  padding: 10px 14px;
  border-radius: 10px;
}

#unity-warning .warning { background: #ffe36d; }
#unity-warning .error { color: #fff; background: #ce365d; }

@media (max-width: 700px) {
  #groomer-loading-copy {
    top: max(3vh, env(safe-area-inset-top));
  }

  #groomer-loading-panel {
    width: min(620px, 88vw);
    padding: 10px 13px 13px;
    border-width: 2px;
    border-radius: 18px;
  }

  #unity-fullscreen-button {
    width: 44px;
    height: 44px;
  }
}
