body { padding: 0; margin: 0 }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
#unity-canvas { background: #231F20 }
.unity-mobile #unity-canvas { width: 100%; height: 100% }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#logo { width: 318px; height: 200px; background: url('logo.png') no-repeat center }
#unity-progress-bar-empty { width: 200px; height: 18px; margin-top: 10px; margin-left: 60px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

/* =================================================================
   LANDSCAPE LOCK STYLES (New Additions) 🔄
   ================================================================= */

/* 1. Detect Portrait Orientation on mobile/tablet (up to 1024px wide) */
@media screen and (orientation: portrait) and (max-width: 1024px) {
    /* Apply rotation lock to the main mobile container */
    #unity-container.unity-mobile {
        /* Swap width and height to fit the landscape aspect of the screen */
        width: 100vh; 
        height: 100vw; 
        
        /* Rotate 90 degrees and reposition to stay centered */
        transform: translate(-50%, -50%) rotate(90deg);
        left: 50%;
        top: 50%;
        
        /* This margin adjustment helps fine-tune centering after rotation */
        margin-top: calc((100vh - 100vw) / 2); 
    }
    
    /* 2. Show the rotation message */
    #unity-rotate-message {
        display: flex !important;
        justify-content: center;
        align-items: center;
    }
}

/* 3. Styles for the rotation message HTML element (hidden by default) */
#unity-rotate-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000; /* Black overlay */
    color: white;
    text-align: center;
    font-size: 1.5em;
    z-index: 9999; /* Ensure it covers everything */
    display: none; /* Hidden unless portrait mode is detected */
    padding: 20px;
    box-sizing: border-box;
}
