* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05080f;
  font-family: "Segoe UI", "Malgun Gothic", "Pretendard", -apple-system, sans-serif;
}

#unity-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #05080f;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#unity-container.unity-mobile {
  width: 100%;
  height: 100%;
}

#unity-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  background: #05080f;
}

#unity-canvas.unity-mobile {
  max-width: 100%;
  max-height: 100%;
}

/* ---- 로딩 화면 (디지털트윈 / 스마트물류 컨셉) ---- */
#unity-loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #0b1626 0%, #05080f 70%);
  background-image:
    linear-gradient(rgba(0, 224, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 224, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, #0b1626 0%, #05080f 70%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  opacity: 1;
  transition: opacity 180ms ease-out, visibility 0s linear 180ms;
}

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

#unity-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
}

#unity-logo-title {
  color: #e8f6ff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
}

#unity-logo-subtitle {
  color: #00e0ff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 8px;
  margin-top: 8px;
}

#unity-progress-bar-empty {
  width: 320px;
  max-width: 60vw;
  height: 6px;
  background: rgba(0, 224, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00e0ff, #4dfff0);
  box-shadow: 0 0 10px rgba(0, 224, 255, 0.8);
}

#unity-progress-percent {
  margin-top: 12px;
  color: #6fd8ff;
  font-size: 12px;
  letter-spacing: 2px;
}

#unity-warning {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#unity-warning > div {
  border-radius: 6px;
  margin: 4px 0;
}

/* ---- 하단 컨트롤 (전체화면 버튼) ---- */
#unity-footer {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 5;
}

#unity-fullscreen-button {
  width: 34px;
  height: 34px;
  cursor: pointer;
  background-color: rgba(5, 10, 20, 0.55);
  border: 1px solid rgba(0, 224, 255, 0.4);
  border-radius: 6px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e0ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
  transition: background-color 0.15s ease;
}

#unity-fullscreen-button:hover {
  background-color: rgba(0, 224, 255, 0.15);
}
