html, body, * {
    box-sizing: border-box;
}

* {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

body {
    margin: 0;
    background-color: #15151B;
    color: #ffffff;
    overflow: hidden;
}

canvas {
    position: fixed;
}

/* Canvas styling */
#unity-canvas {
    width: 100%; /* Fill the width of the container */
    height: auto; /* Maintain aspect ratio */
}

.bg {
    position: absolute;
    width: 100%;
    height: 100%;
    display: block;
    background: url('../images/bg.webp') center;
    background-size: cover;
}

#unity-logo {
    width: auto;
    max-width: 100%;
    max-height: 40vh;
    aspect-ratio: 548 / 624;
    /*background: url("../images/logo.webp") no-repeat center;*/
    background-size: contain;
    margin: 0 auto; /* Add this line */
}

#unity-loading-bar {
    position: absolute;
    width: 90vw; /* Take 90% of the screen width */
    max-width: 1300px; /* Prevent it from exceeding its native size */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.unity-progress-bar-empty {
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    aspect-ratio: 667 / 200;
    position: relative;
}

.mask {
    width: 100%;
    height: 100%;
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
    mask-image: url("../images/loading-fill.webp"), radial-gradient(transparent 100%, black);
}

#unity-progress-bar-full {
    width: 100%;
    height: 100%;
    background: url("../images/loading-fill.webp") no-repeat;
    background-size: 100% 100%;
    margin-left: -100%; /* This might need adjustment depending on your fill logic */
}

/* Optional: support for ultra-tall portrait screens */
@media screen and (orientation: portrait) {
    #unity-loading-bar {
        width: 95vw;
        max-width: 900px;
    }
}
