html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    height: 100%;
}

canvas {
    display: block;
}

body {
    margin: 0;
    background-color: #000000;
}

#unity-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#unity-canvas {
    width: 100%;
    height: 100%;
    background: #000000;
}

#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#unity-logo {
    text-align: center;
    pointer-events: none;
}

    #unity-logo img {
        max-width: 80%;
        max-height: 80%;
        pointer-events: none;
    }

#unity-progress-bar-empty {
    width: 30%;
    height: 24px;
    margin: 10px 20px 20px 10px;
    text-align: left;
    border: 1px solid white;
    padding: 2px;
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: white;
    transition: width 0.5s ease;
}

.light #unity-progress-bar-empty {
    border-color: black;
}

.light #unity-progress-bar-full {
    background: black;
}

.spinner,
.spinner:after {
    border-radius: 50%;
    width: 5em;
    height: 5em;
}

.spinner {
    margin: 10px;
    font-size: 10px;
    position: relative;
    text-indent: -9999em;
    border-top: 1.1em solid rgba(255, 255, 255, 0.2);
    border-right: 1.1em solid rgba(255, 255, 255, 0.2);
    border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
    border-left: 1.1em solid #ffffff;
    transform: translateZ(0);
    animation: spinner-spin 1.1s infinite linear;
}

@keyframes spinner-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

#unity-container {
  position: fixed;
  display: flex;
  aspect-ratio: 16/9;
  width: min(calc(100vh*(16/9)), 100vw);
  height: auto;
}

#unity-container.unity-mobile {
  width: 100%;
  height: 100%;
}


#unity-canvas {
  background: url(./background.png) no-repeat center center;
  background-size: cover;
}



.spinner {
    border-top: 1.1em solid rgba(255, 211, 37, 0.2);
    border-right: 1.1em solid rgba(255, 211, 37, 0.2);
    border-bottom: 1.1em solid rgba(255, 211, 37, 0.2);
    border-left: 1.1em solid rgba(63, 162, 255, 1);
}

#unity-progress-bar-empty {
    border-color: rgb(255, 255, 255);
    background: rgb(255, 63, 63, 0.2);
    width: 30%;
}

#unity-progress-bar-full {
    background: rgb(255, 255, 255);
}

.light #unity-progress-bar-empty {
    border-color: rgba(255, 211, 37, 0.7);
}

.light #unity-progress-bar-full {
    background: rgba(63, 162, 255, 1);
}



#unity-progress-bar-empty {
    height: 24px;
}


#unity-progress-bar-empty {
    border-radius: 4px;
}

#unity-progress-bar-full {
    border-radius: 2px;
    transition: width 0.5s ease;
}

@font-face {
  font-family: 'RobotoCondensed';
  src: url('./RobotoCondensed-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.unity-progress-bar-text {
  position: relative;
  width: 100%;
  text-align: center;
  line-height: 40px;
  color: white;
  pointer-events: none;
  font-family: 'RobotoCondensed', sans-serif;
  font-weight: bold;
  font-size: 18px;
}



:root {
  --ws-preloader-height: 30px;
}

#preloadOverlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.85);
  height: var(--ws-preloader-height);
  z-index: 9999;
  pointer-events: none;
  display: none; /* изначально скрыта */
}

#preloadOverlay.visible {
  display: block;
}

#preloadBox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  max-width: 100%;
  pointer-events: auto;
}

#preloadText {
  flex-shrink: 0;
  color: #fff;
  font-family: sans-serif;
  font-size: 13px;
}

#preloadProgressWrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

#progressBar {
  flex: 1;
  height: 6px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  transition: width 0.2s ease;
}

#playFullBtn {
  flex-shrink: 0;
  display: none;
  padding: 8px 10px;
  background: #4caf50;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  font-family: sans-serif;
  font-size: 14px;
}

#preloadBox.completed {
  justify-content: center;
}



body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

#unity-container {
  position: fixed;
  display: flex;
  aspect-ratio: 16/9;
  width: min(calc(100vh*(16/9)), 100vw);
  height: auto;
}

#unity-container.unity-mobile {
  width: 100%;
  height: 100%;
}