html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 101vh;
    background: #000;
    touch-action: manipulation;
}

/* ================= BACKGROUND ================= */

#bg-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../Build/LoadingScreen_Simple_ver1.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  filter: blur(8px);
  z-index: -1;
}

/* ================= UNITY CONTAINER ================= */

#unity-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #222;
}

.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%;
}

/* ================= LOADING BAR CORE ================= */

#unity-loading-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

/* 🔥 Always visually around 15% from bottom */

/* Portrait */
@media (orientation: portrait) {
  #unity-loading-bar {
    bottom: calc(var(--vh, 1vh) * 15);
  }
}

/* Landscape */
@media (orientation: landscape) {
  #unity-loading-bar {
    bottom: calc(var(--vh, 1vh) * 12);
  }
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: auto;
}

/* ================= LOGO ================= */

#unity-logo {
    width: 0px;
    height: 0px;
    background: url('GameLogo.png') no-repeat center;
    background-size: contain;
}

/* ================= PROGRESS BAR ================= */

#unity-progress-bar-empty {
    width: 512px;
    height: 64px;
    background: url('lgo_Bar1Base.png') no-repeat center;
    background-size: contain;
    position: relative;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('lgo_Bar2DiagonalLines.png') no-repeat center;
    background-size: contain;
    pointer-events: none;
    z-index: 3;
}

#unity-progress-bar-full {
    position: absolute;
    height: 64px;
    width: 0%;
    background: url('lgo_Bar2Bar.png') no-repeat left center;
    z-index: 2;
}

/* ================= WARNING ================= */

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
}

/* ================= FULLSCREEN BUTTON ================= */

#floating-fullscreen-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 0px;
    height: 0px;
    background: url('fullscreen-button.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
    z-index: 100;
    opacity: 0.7;
    transition: opacity 0.3s;
    animation: pulse 2s infinite;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 10px;
    display: none;
}

#floating-fullscreen-button:hover {
    opacity: 1;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    #unity-logo {
        position: absolute;
        left: 50%;
        bottom: 120px;
        transform: translateX(-50%) scale(1.2);
    }

    #unity-progress-bar-empty {
        position: absolute;
        left: 50%;
        bottom: 110px;
        transform: translateX(-50%) scale(0.4);
    }

    #continue-btn {
        position: absolute;
        left: 50%;
        bottom: 20px;
        transform: translateX(-50%);
    }

    #floating-fullscreen-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
}

/* ================= DESKTOP ================= */

@media (min-width: 769px) {

    #unity-loading-bar {
        transform: translateX(-50%) scale(0.5);
    }

    #unity-logo {
        position: absolute;
        left: 50%;
        bottom: -200px;
        transform: translateX(-50%) scale(0.8);
    }

    #unity-progress-bar-empty {
        position: absolute;
        left: 50%;
        bottom: -145px;
        transform: translateX(-50%) scale(1);
    }
}
