/* CSS styles for the Flight Simulator */

/* Global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    touch-action: none;
    background-color: #000;
}

/* Loading screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-container {
    text-align: center;
    color: white;
}

.loading-container h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 300px;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    animation: progress-animation 2s ease-in-out forwards;
}

@keyframes progress-animation {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* Game container */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* HUD */
#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

#hud div {
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

/* Mobile controls */
#mobile-controls {
    position: absolute;
    bottom: 100px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

#throttle-control {
    width: 60px;
}

.control-label {
    color: white;
    text-align: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.slider-container {
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slider {
    -webkit-appearance: none;
    width: 150px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    outline: none;
    border-radius: 10px;
    transform: rotate(-90deg);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

#direction-control {
    width: 150px;
    height: 150px;
}

.joystick-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#joystick-base {
    width: 120px;
    height: 120px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#joystick-handle {
    width: 50px;
    height: 50px;
    background-color: #4CAF50;
    border-radius: 50%;
    position: absolute;
    cursor: pointer;
}

/* Desktop instructions */
.instructions {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.instructions h3 {
    margin-bottom: 5px;
}

.instructions p {
    margin: 3px 0;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    #desktop-instructions {
        display: none;
    }
    
    #hud {
        font-size: 1rem;
    }
}

@media (min-width: 769px) {
    #mobile-controls {
        display: none;
    }
}
