html, body {
  height: 100%;
  margin: 0;
}

#unity-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("WebGLLoadingScreenBG.jpg") center / cover no-repeat #000;
}

#canvas-wrap {
  position: relative;
  line-height: 0;
  overflow: visible;
}

#unity-canvas {
  position: absolute;   /* важно */
  display: block;
}

#corner-ui {
  position: absolute;
  right: 0;             /* у правого края всей зоны wrap */
  bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none; /* чтобы ловили клики только кнопки */
}

#corner-ui > * {
  pointer-events: auto;
}

#unity-fullscreen-button {
  cursor: pointer;
  width: 70px;
  height: 69px;
  background: url('fullscreen-button.jpg') no-repeat center;
  background-size: contain;
}

#unity-loading-bar {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.loading-text {
    font-size: 32px;
    font-weight: bold;
    color: white;
    text-align: center;

    /* Обводка */
    text-shadow:
        -2px -2px 0 #000,
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000,
         0px  0px 10px rgba(0,0,0,0.8);

    font-family: Arial, Helvetica, sans-serif;
}

.spinner {
    position: absolute;

    top: calc(50% + 60px);
    left: calc(50% - 38px);
    transform: translate(-50%, -50%);

    width: 70px;
    height: 70px;

    border: 7px solid rgba(255,255,255,0.25);
    border-top: 7px solid white;
    border-radius: 50%;

    animation: spin 1s linear infinite;

    filter: drop-shadow(0 0 8px black);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
}
