@import url('fonts.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Share Tech Mono', monospace;
    color: #fff;
}

/* Immersive 3D Canvas */
#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind UI */
    display: block;
}

/* UI Container - Heads Up Display */
.game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to game/canvas (if needed) */
    z-index: 10;
}

/* HUD Panels */
.ui-panel {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
    z-index: 20;
    /* Ensure strictly above */
}

.gauge {
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.8), rgba(0, 0, 0, 0.9));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    padding: 15px 25px;
    text-align: right;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transform: skewX(-10deg);
    min-width: 140px;
}

.gauge .label {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.gauge .value {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    font-weight: 700;
}

.gauge .unit {
    font-size: 16px;
    color: rgba(0, 255, 255, 0.6);
}

/* Gear specific style */
#gear-display {
    color: #ff9800;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.8);
}

/* Status Gauge - Specific Overrides */
/* We target the 3rd child which is Status */
.ui-panel .gauge:nth-child(3) {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    /* Center it */
    bottom: auto;
    right: auto;
    background: none;
    border: none;
    box-shadow: none;
    text-align: center;
    width: auto;
}

.ui-panel .gauge:nth-child(3) .label {
    display: none;
    /* Hide label for cleaner status */
}

.ui-panel .gauge:nth-child(3) .value {
    font-size: 32px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.ui-panel .gauge:nth-child(3) .value.ok {
    color: #4CAF50;
    text-shadow: 0 0 20px #4CAF50;
}

.ui-panel .gauge:nth-child(3) .value.warning {
    color: #FFC107;
    text-shadow: 0 0 20px #FFC107;
}


/* Menus / Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    transition: opacity 0.5s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.menu-content {
    background: rgba(0, 20, 30, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 60px 80px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.2);
    /* Sci-fi corners */
    clip-path: polygon(20px 0, 100% 0,
            100% calc(100% - 20px), calc(100% - 20px) 100%,
            0 100%,
            0 20px);
}

.title {
    font-family: 'Orbitron', sans-serif;
    font-size: 64px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    background: linear-gradient(to bottom, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 24px;
    color: #0ff;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.controls {
    margin-bottom: 40px;
    font-size: 16px;
    color: #888;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 20px 0;
}

button {
    background: #0099aa;
    /* Cyan base */
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

button:hover {
    background: #00ccdd;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

button:active {
    transform: scale(0.98);
}

/* Notification (gp-info) */
#gp-info {
    font-family: 'Share Tech Mono', monospace;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #0ff;
    border: 1px solid #0ff;
    padding: 10px 20px;
    z-index: 50;
    box-shadow: 0 0 10px #0ff;
}