html,
body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#unity-container {
    position: absolute;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
}

#unity-container.unity-desktop {
    left: 0;
    top: 0;
    transform: none;
}

#unity-container.unity-mobile {
    position: fixed;
    width: 100%;
    height: 100%;
}

#unity-canvas {
    background: #231F20;
    width: 100% !important;
    height: 100% !important;
}

.unity-mobile #unity-canvas {
    width: 100%;
    height: 100%;
}

/* Portrait mode - 16:9 game at top, rotation prompt below */
@media screen and (max-aspect-ratio: 1/1) {
    #unity-container {
        width: 100vw;
        height: calc(100vw * 9 / 16);
        /* 16:9 aspect ratio */
        top: 0;
        left: 0;
        transform: none;
    }

    #unity-canvas {
        width: 100vw !important;
        height: calc(100vw * 9 / 16) !important;
    }

    #rotation-prompt {
        display: flex;
        position: absolute;
        top: calc(100vw * 9 / 16);
        left: 0;
        width: 100vw;
        height: calc(100vh - (100vw * 9 / 16));
        background: #231F20;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: white;
        font-family: Arial, sans-serif;
        text-align: center;
    }

    #rotation-icon {
        font-size: 48px;
        margin-bottom: 15px;
        animation: rotate 2s infinite linear;
    }

    #rotation-text {
        font-size: 20px;
        margin-bottom: 8px;
    }

    #rotation-subtext {
        font-size: 14px;
        opacity: 0.8;
    }

    /* Hide fullscreen button in portrait mode */
    #custom-fullscreen-button {
        display: none !important;
    }
}

/* Landscape mode - hide rotation prompt */
@media screen and (min-aspect-ratio: 1/1) {
    #rotation-prompt {
        display: none;
    }

    #unity-container {
        width: 100vw;
        height: 100vh;
        top: 0;
        left: 0;
        transform: none;
    }

    #unity-canvas {
        width: 100vw !important;
        height: 100vh !important;
    }

    /* Hide fullscreen button completely */
    #custom-fullscreen-button {
        display: none !important;
    }
}

/* Rotation animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    z-index: 1000;
}

#unity-logo {
    width: 154px;
    height: 130px;
    background: url('unity-logo-dark.png') no-repeat center;
}

#unity-progress-bar-empty {
    width: 141px;
    height: 18px;
    margin-top: 10px;
    margin-left: 6.5px;
    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;
}

/* Hide the footer completely */
#unity-footer {
    display: none !important;
}

.unity-mobile #unity-footer {
    display: none;
}

#unity-logo-title-footer {
    float: left;
    width: 102px;
    height: 38px;
    background: url('unity-logo-title-footer.png') no-repeat center;
}

#unity-build-title {
    float: right;
    margin-right: 10px;
    line-height: 38px;
    font-family: arial;
    font-size: 18px;
}

/* Hide fullscreen button completely */
#custom-fullscreen-button {
    display: none !important;
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translate(-50%);
    background: white;
    padding: 10px;
    display: none;
}