html, body { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; background: #080b12 }
body { overscroll-behavior: none }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { position: fixed; inset: 0 0 112px; display: flex; align-items: center; justify-content: center; width: 100%; height: auto }
#unity-canvas { background: #25222B; outline: none }
.unity-mobile #unity-canvas { width: min(100vw, calc((100dvh - 112px) * 1.6)); height: auto; max-height: calc(100dvh - 112px); aspect-ratio: 16 / 10; touch-action: none }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-logo-title-footer { float:left; width: 102px; height: 38px; background: url('unity-logo-title-footer.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
#mobile-controls, #mobile-orientation-hint { display: none }
.mobile-game #mobile-controls { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(112px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top: 1px solid #4d5265; background: rgba(8, 11, 18, .94); backdrop-filter: blur(10px); touch-action: none; user-select: none; -webkit-user-select: none }
.mobile-control-help { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); color: #aeb5c6; font: 700 10px/1 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap }
.mobile-key-group { display: grid; gap: 5px; margin-top: 13px }
.mobile-movement { grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(2, 42px) }
.mobile-movement .key-w { grid-column: 2 }
.mobile-movement .key-a { grid-column: 1; grid-row: 2 }
.mobile-movement .key-s { grid-column: 2; grid-row: 2 }
.mobile-movement .key-d { grid-column: 3; grid-row: 2 }
.mobile-actions { grid-template-columns: repeat(2, minmax(48px, 58px)); grid-template-rows: repeat(2, 42px) }
.mobile-key { min-width: 42px; min-height: 42px; padding: 0 8px; border: 1px solid #737b91; border-radius: 10px; background: linear-gradient(#343a49, #1c202b); color: #fff; box-shadow: inset 0 1px rgba(255,255,255,.14), 0 3px 8px rgba(0,0,0,.35); font: 800 13px/1 Arial, sans-serif; touch-action: none }
.mobile-key.is-pressed, .mobile-key:active { transform: translateY(1px); border-color: #f5c64d; background: #715a25; color: #fff4c6 }
.mobile-key.is-armed { border-color: #ffcb3f; background: #9b3f46; box-shadow: 0 0 0 2px rgba(255,203,63,.25) }
.mobile-mode { font-size: 10px }
@media (orientation: portrait) and (max-width: 900px) {
  .mobile-game #mobile-orientation-hint { position: fixed; z-index: 30; top: max(9px, env(safe-area-inset-top)); left: 50%; display: block; transform: translateX(-50%); padding: 7px 11px; border: 1px solid rgba(255,218,119,.55); border-radius: 999px; background: rgba(8,11,18,.82); color: #ffe29a; font: 700 10px/1 Arial, sans-serif; white-space: nowrap; pointer-events: none }
}
@media (orientation: landscape) and (max-height: 520px) {
  #unity-container.unity-mobile { inset-bottom: 82px }
  .unity-mobile #unity-canvas { width: min(100vw, calc((100dvh - 82px) * 1.6)); max-height: calc(100dvh - 82px) }
  .mobile-game #mobile-controls { height: calc(82px + env(safe-area-inset-bottom)); padding-top: 4px }
  .mobile-control-help { display: none }
  .mobile-key-group { margin-top: 0 }
  .mobile-movement { grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(2, 34px) }
  .mobile-actions { grid-template-columns: repeat(4, minmax(42px, 52px)); grid-template-rows: 36px }
  .mobile-key { min-width: 34px; min-height: 34px }
}
