:root {
    --bg-color: #0b0d17;
    --text-color: #ffffff;
    --accent-cyan: #00f3ff;
    --accent-orange: #ff9e00;
    --accent-red: #ff2a2a;
    --glass-bg: rgba(20, 25, 40, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: var(--font-main);
    color: var(--text-color);
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* HUD Elements */
#score-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 20px;
}

.metric {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

/* Hide Altitude Metric (Moved to Canvas) */
#score-panel .metric:first-child {
    display: none;
}

.metric .label {
    font-size: 0.7rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

.metric .value {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

#fuel-gauge-container {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: 8px;
}

#fuel-gauge-container .label {
    font-size: 0.7rem;
    margin-bottom: 5px;
    opacity: 0.7;
}

#fuel-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

#fuel-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-red));
    transform-origin: left;
    transition: width 0.1s linear;
}

/* Message Overlay */
#message-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    pointer-events: auto;
    transition: opacity 0.3s;
}

#message-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#message-title {
    font-size: 3rem;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#message-sub {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

#restart-btn {
    background: var(--accent-cyan);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 30px;
    pointer-events: auto;
    opacity: 0;
}

@media (hover: none) and (pointer: coarse) {
    #mobile-controls {
        opacity: 1;
    }
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.angle-btn svg {
    width: 40px;
    height: 40px;
}

.angle-btn {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.angle-btn:active {
    background: rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
}

.thrust-btn {
    width: 100px;
    height: 100px;
    border-color: var(--accent-orange);
    box-shadow: 0 0 20px rgba(255, 158, 0, 0.4);
}

.thrust-btn:active {
    background: rgba(255, 158, 0, 0.3);
    box-shadow: 0 0 35px rgba(255, 158, 0, 0.7);
}

.thrust-btn svg {
    width: 50px;
    height: 50px;
}