body { 
    margin: 0; 
    overflow: hidden; 
    background-color: #87CEEB; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

#canvas-container { width: 100vw; height: 100vh; display: block; }

#ui-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; display: flex; flex-direction: column;
    justify-content: space-between; z-index: 10;
}

#underwater-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 40, 100, 0.6); backdrop-filter: blur(5px);
    display: none; pointer-events: none; z-index: 5; transition: opacity 0.2s;
}

#hud-top {
    display: flex; justify-content: space-between; padding: 20px;
    color: white; text-shadow: 2px 2px 0px #000; font-size: 24px; font-weight: bold;
}

#hud-bottom {
    padding: 20px; text-align: center; color: yellow;
    text-shadow: 2px 2px 0px #000; font-size: 18px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}

/* NEW METER STYLES */
#meter-container {
    width: 300px;
    margin-bottom: 5px;
}

#flight-label {
    font-size: 14px; font-weight: bold; color: white;
    text-shadow: 1px 1px 0 #000; margin-bottom: 3px; text-align: left;
}

#flight-bar-bg {
    width: 100%; height: 20px;
    background: rgba(0,0,0,0.6);
    border: 2px solid white;
    border-radius: 10px;
    overflow: hidden;
}

#flight-bar-fill {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, #ffcc00, #ff6600);
    width: 100%;
    transition: width 0.1s linear;
}
/* END NEW STYLES */

.tutorial { background: rgba(0,0,0,0.5); padding: 10px 20px; border-radius: 20px; }

#respawn-msg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: white; font-size: 48px; font-weight: bold; text-shadow: 0px 0px 10px #00f;
    display: none; z-index: 20;
}

#game-over-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); display: none; flex-direction: column;
    justify-content: center; align-items: center; z-index: 100; color: white;
}
#game-over-screen h1 { font-size: 64px; margin: 0 0 20px 0; text-shadow: 4px 4px 0 #000; color: #ffcc00; }
#final-rank { font-size: 48px; margin-bottom: 40px; }
button {
    padding: 15px 40px; font-size: 24px; background: #ff4444; color: white;
    border: none; border-radius: 10px; cursor: pointer; box-shadow: 0 5px 0 #990000;
    font-weight: bold; font-family: inherit; pointer-events: auto;
}
button:hover { background: #ff6666; }
button:active { transform: translateY(5px); box-shadow: none; }