* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #87CEEB;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI / HUD */
#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: bold;
    font-size: 18px;
    z-index: 10;
    pointer-events: none;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

#fuel-bar-container {
    width: 100px;
    height: 15px;
    background: rgba(0,0,0,0.5);
    border: 2px solid white;
    border-radius: 5px;
    overflow: hidden;
}

#fuel-bar {
    width: 100%;
    height: 100%;
    background: #00ff00;
    transition: width 0.1s linear, background-color 0.3s;
}

#home-btn {
    pointer-events: auto;
    text-decoration: none;
    background: #ff4757;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    font-size: 16px;
    transition: transform 0.1s;
}

#home-btn:active {
    transform: scale(0.95);
}

/* Touch Controls */
.touch-zone {
    position: absolute;
    bottom: 0;
    width: 40%;
    height: 40%;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: rgba(255,255,255,0.5);
    font-weight: bold;
    font-size: 24px;
}

#touch-left { left: 0; justify-content: flex-start; }
#touch-right { right: 0; justify-content: flex-end; }

@media (min-width: 1024px) {
    .touch-zone { display: none; } /* Hide on desktop */
}

/* Game Over Screen */
#game-over {
    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;
    color: white;
    z-index: 20;
    text-align: center;
}

#game-over h1 { font-size: 48px; color: #ff4757; margin-bottom: 10px; }
#game-over p { font-size: 24px; margin-bottom: 5px; }

#restart-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: #2ed573;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(46, 213, 115, 0.4);
}
#restart-btn:active { transform: scale(0.95); }