html, body { width: 100%; height: 100vh; height: 100dvh; padding: 0; margin: 0; overflow: hidden; background: #000 }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { position: fixed; top: 0; left: 0 }   /* размеры/поворот задаёт JS resizeCanvas */
#unity-canvas { background: #1F1F20; display: block }
.unity-mobile #unity-canvas { 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 }
/* === Брендированная заставка загрузки (Castle Defense) === */
#unity-logo { display: none }                 /* прячем серый логотип Unity */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #1a0d08;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; transition: opacity .6s ease;
}
#splash-screen.hidden { opacity: 0; pointer-events: none }
#splash-bg {
  position: absolute; inset: 0;
  background: url('splash.jpg') center center / cover no-repeat;
}
#splash-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(26,13,8,0) 38%, rgba(26,13,8,.55) 68%, rgba(26,13,8,.94) 100%);
}
#splash-content {
  position: relative; z-index: 1; width: 100%; max-width: 600px; box-sizing: border-box;
  padding: 0 28px calc(44px + env(safe-area-inset-bottom)); text-align: center;
}
#splash-title {
  margin: 0 0 22px; font-family: 'Trebuchet MS','Segoe UI',system-ui,Arial,sans-serif;
  font-weight: 800; font-size: clamp(28px, 6vw, 46px); letter-spacing: 1px; line-height: 1.05;
  background: linear-gradient(180deg, #fff3d6, #ffc24a 55%, #ff8a1f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 22px rgba(255,140,40,.35);
}
#splash-bar {
  width: 100%; height: 14px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,200,120,.28);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.4);
}
#splash-bar-full {
  width: 0%; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #8a5a12, #c8941f 45%, #f4cf5a 75%, #ffe9a8);
  box-shadow: 0 0 16px rgba(212,160,23,.9); transition: width .25s ease;
}
#splash-status {
  margin-top: 13px; font-family: 'Segoe UI',system-ui,Arial,sans-serif; font-size: 14px;
  color: #ffeede; opacity: .85; letter-spacing: .4px;
}
