html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed; /* Block all scrolling */
    touch-action: none; /* Disable all zoom gestures */
}

#unity-container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    overflow: hidden;
}

#unity-canvas {
    background: #FFFFFF;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

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

#unity-loading-bar {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    z-index: 10;
}

#floating-fullscreen-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: url('fullscreen-button.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
    z-index: 100;
    opacity: 0.7;
    transition: opacity 0.3s;
}

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

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px; /* Space between logo and progress bar */
    width: auto;
}

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

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

.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; /* Allows clicks to pass through */
    z-index: 2; /* Appears above progress bar */
}

#unity-progress-bar-full {
    position: absolute;
    height: 64px;
    background: url('lgo_Bar2Bar.png') no-repeat left center;
    clip-path: inset(0 0 0 0); 
    animation: fakeLoading 1s ease-out forwards; 
    z-index: 1;
}

#continue-btn {
    padding: 12px 24px;
    background: #ff6600;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: bold;
    margin-top: 20px;
}
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

@keyframes fakeLoading {
    0% { width: 0%; }
    80% { width: 90%; } 
    100% { width: 100%; }
}
@media (max-width: 768px) {
    #unity-container.unity-mobile {
        align-items: flex-start; /* Changed from center to start */
        padding-top: 0;
    }

    #unity-logo {
        width: 120px;
        height: 120px;
        position: absolute;
        left: 50%;
        bottom: 120px;
        transform: translateX(-50%) scale(1.2);
        margin-top: 0; /* Ensure no top margin */
    }

    #unity-progress-bar-empty {
        position: absolute;
        width: 512px;
        height: 64px;
        left: 50%;
        bottom: 60px;
        transform: translateX(-50%) scale(0.5);
    }

    #continue-btn {
        position: absolute;
        left: 50%;
        bottom: 20px; 
        transform: translateX(-50%);
       
    }
    #floating-fullscreen-button {
      width: 40px;
      height: 40px;
      bottom: 15px;
      right: 15px;
    }
}
/* Desktop - Bottom Centered (Matches Mobile) */
@media (min-width: 769px) {
    #unity-loading-bar {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        transform: scale(0.5);
    }

    #unity-logo {
        width: 384px;
        height: 384px;
        position: absolute;
        left: 50%;
        bottom: -200px;
        transform: translateX(-50%) scale(0.8);
        background: url('GameLogo.png') no-repeat center;
        background-size: contain;
    }

    #unity-progress-bar-empty {
        width: 512px;
        height: 64px;
        position: absolute;
        left: 50%;
        bottom: -250px;
        transform: translateX(-50%) scale(1.25);
        background: url('lgo_Bar1Base.png') no-repeat center;
        background-size: contain;
    }
}
#floating-fullscreen-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    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; /* Start hidden */
}

#floating-fullscreen-button:hover {
    opacity: 1;
}
@media (max-width: 768px) {
    #floating-fullscreen-button {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
}