html, body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    touch-action: none;
}

.fullscreen {
    background: #242424;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

#loading-overlay {
    font-size: 20px;
    z-index: 2;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('LoadingBackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#three-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    position: relative;
}

#planet-prerender {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#progress-bar-container {
    position: absolute;
    bottom: 10%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

#progress-bar {
    border-radius: 6px;
    width: 90%;
    max-width: 300px;
    height: 30px;
    background: #181818;
    padding: 0px;
    box-shadow: 0 0 12px #56E5FE44;
}

#progress-bar-fill {
    border-radius: 6px;
    width: 0%;
    height: 100%;
    background: #56E5FE;
    box-shadow: 0 0 10px #56E5FEaa;
    transition: width 0.2s ease;
}

/* Адаптивные стили */
@media (orientation: portrait) {
    #progress-bar-container {
        bottom: 8%;
    }
    
    #progress-bar {
        width: 80%;
        max-width: 250px;
    }
    
    #planet-prerender {
        max-width: 70%;
        max-height: 70%;
    }
}

@media (orientation: landscape) {
    #progress-bar-container {
        bottom: 10%;
    }
}

@media (max-height: 400px) {
    #progress-bar {
        height: 20px;
    }
    
    #progress-bar-container {
        bottom: 5%;
    }
    
    #planet-prerender {
        max-width: 60%;
        max-height: 60%;
    }
}
