@charset "UTF-8";

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

html,
body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  color: #fffbeb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#unity-container {
  position: absolute;
}

#unity-container.unity-desktop {
  left: 50%;
  top: 50%;
  width: min(1280px, calc(100vw - 24px), calc((100dvh - 64px) * 1280 / 750));
  transform: translate(-50%, -50%);
}

#unity-container.unity-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: var(--nro-vw, 100%);
  height: var(--nro-vh, 100%);
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

#unity-canvas {
  display: block;
  background: #000;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}

.unity-desktop #unity-canvas {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1280 / 750;
  border-radius: 10px 10px 0 0;
}

.unity-mobile #unity-canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill;
}

/* Portrait guidance overlay for iOS (real UTF-8 DOM instead of CSS ::after) */
#ios-rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: radial-gradient(circle at 50% 35%, #1e1209 0%, #050507 75%);
  color: #fffbeb;
  padding: max(24px, env(safe-area-inset-top, 0px)) 24px max(24px, env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

#ios-rotate-overlay .rot-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(245, 158, 11, 0.14);
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  animation: nro-rot-nudge 2.2s ease-in-out infinite;
}

@keyframes nro-rot-nudge {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
}

#ios-rotate-overlay .rot-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #fde68a;
}

#ios-device-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#ios-device-badge:empty {
  display: none;
}

#ios-rotate-overlay .rot-sub {
  margin: 0;
  max-width: 320px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #cbd5e1;
}

#ios-rotate-overlay .rot-tip {
  max-width: 330px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  font-size: 12.5px;
  line-height: 1.5;
  color: #fef3c7;
}

#ios-rotate-overlay .rot-home {
  display: inline-block;
  margin-top: 4px;
  padding: 9px 16px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde68a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  body.ios-web #unity-container.unity-mobile {
    visibility: hidden;
  }
  body.ios-web #ios-rotate-overlay {
    display: flex;
  }
}

/* Loading Screen */
#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  text-align: center;
  z-index: 20;
  pointer-events: none;
}

#unity-logo {
  width: 220px;
  height: 140px;
  margin: 0 auto 10px;
  background: url('nrobenz-loading-logo.png') no-repeat center / contain;
}

#unity-progress-bar-empty {
  width: 210px;
  height: 14px;
  margin: 0 auto;
  padding: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.45);
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 60%, #fef08a 100%);
  transition: width 0.12s linear;
}

#loading-pct {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fde68a;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Footer (Desktop only) */
#unity-footer {
  position: relative;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #140c06;
  border-top: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.unity-mobile #unity-footer {
  display: none;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-home-link {
  color: #fde68a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#unity-build-title {
  line-height: 38px;
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
}

#unity-fullscreen-button {
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08) url('fullscreen-button.png') no-repeat center / 22px 22px;
}

#unity-warning {
  position: fixed;
  left: 50%;
  top: max(12px, env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 99995;
  max-width: min(92vw, 480px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  display: none;
}
