/**
 * N'og nog - Stylesheet
 * HUD Panels 50% Transparent, Text 100% Visible
 */

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

body { 
    overflow: hidden; 
    background: #000; 
    font-family: 'Courier New', monospace;
    user-select: none;
}

#gameCanvas { display: block; }

/* UI Overlay */
#ui {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Main Menu */
#mainMenu {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0f0f23 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}

#mainMenu h1 {
    font-size: 4em;
    color: #00ff88;
    text-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

#mainMenu h2 {
    font-size: 1.2em;
    color: #888;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.menuButton {
    width: 280px;
    padding: 15px 30px;
    margin: 10px;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    color: #00ff88;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.menuButton:hover {
    background: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
}

/* Settings Panel */
#settingsPanel {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 30, 0.95);
    border: 2px solid #00ff88;
    padding: 30px;
    display: none;
    z-index: 101;
    pointer-events: auto;
    min-width: 400px;
}

#settingsPanel h3 {
    color: #00ff88;
    margin-bottom: 20px;
    text-align: center;
}

.settingRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    color: #fff;
}

.toggle {
    width: 50px;
    height: 25px;
    background: #333;
    border-radius: 25px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
}

.toggle.active {
    background: #00ff88;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2.5px;
    left: 2.5px;
    transition: left 0.3s;
}

.toggle.active::after {
    left: 27.5px;
}

/* HUD - 50% Transparent Background, 100% Visible Text */
#hud {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    pointer-events: none;
}

.hudPanel {
    position: absolute;
    background: rgba(0, 0, 0, 0.5); /* 50% transparent */
    border: 1px solid rgba(0, 255, 136, 0.5);
    color: #00ff88;
    padding: 10px;
    font-size: 12px;
    text-shadow: 0 0 5px #000, 0 0 10px #000; /* Ensure text visibility */
    font-weight: bold;
}

.hudPanel span {
    color: #fff; /* White for values */
    text-shadow: 0 0 5px #000;
}

#statsPanel {
    top: 10px;
    left: 10px;
    min-width: 200px;
}

#systemPanel {
    top: 10px;
    right: 10px;
    min-width: 180px;
    text-align: right;
}

/* Mini Map - Top Down View */
#miniMap {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 250px;
    height: 250px;
    background: rgba(0, 0, 0, 0.5); /* 50% transparent */
    border: 2px solid rgba(0, 255, 136, 0.5);
    pointer-events: auto;
    cursor: crosshair;
}

#miniMap canvas {
    width: 100%;
    height: 100%;
}

/* Camera Mode Indicator */
#cameraMode {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.5); /* 50% transparent */
    border: 1px solid rgba(0, 255, 136, 0.5);
    color: #00ff88;
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 0 0 5px #000;
}

/* Enhanced Crosshair */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    pointer-events: none;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: rgba(0, 255, 136, 1); /* Full opacity */
    box-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
}

#crosshair::before {
    width: 2px;
    height: 20px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#crosshair::after {
    width: 20px;
    height: 2px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Circular crosshair enhancement */
#crosshair-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0, 255, 136, 0.8);
    border-radius: 50%;
    pointer-events: none;
}

/* Loading Screen */
#loading {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    color: #00ff88;
}

#loadingBar {
    width: 300px;
    height: 4px;
    background: #333;
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
}

#loadingProgress {
    width: 0%;
    height: 100%;
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    transition: width 0.3s;
}

/* Credits */
#credits {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #444;
    font-size: 0.8em;
    text-align: center;
}

/* Control Hints */
#controlsHint {
    position: absolute;
    bottom: 270px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5); /* 50% transparent */
    border: 1px solid rgba(0, 255, 136, 0.5);
    color: #aaa;
    padding: 10px;
    font-size: 11px;
    max-width: 200px;
}

.key {
    display: inline-block;
    background: #333;
    padding: 2px 6px;
    border-radius: 3px;
    color: #fff;
    margin: 0 2px;
}

/* Touch Controls */
#touchControls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
    z-index: 50;
}

.touch-zone {
    position: absolute;
    pointer-events: auto;
}

/* Virtual Joystick */
#joystickZone {
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
}

#joystickBase {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.5);
    border-radius: 50%;
    top: 15px;
    left: 15px;
}

#joystickKnob {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 136, 0.6);
    border: 2px solid #00ff88;
    border-radius: 50%;
    top: 50px;
    left: 50px;
    transition: none;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

#joystickKnob.active {
    background: rgba(0, 255, 136, 0.9);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.8);
}

/* Fire Button */
#fireZone {
    bottom: 40px;
    right: 40px;
    width: 100px;
    height: 100px;
}

#fireButton {
    width: 100%;
    height: 100%;
    background: rgba(255, 68, 68, 0.3);
    border: 3px solid rgba(255, 68, 68, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    user-select: none;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

#fireButton:active, #fireButton.active {
    background: rgba(255, 68, 68, 0.6);
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.8);
    transform: scale(0.95);
}

/* Look Zone (right side) */
#lookZone {
    top: 100px;
    right: 0;
    width: 60%;
    height: 60%;
    background: transparent;
}

/* Thrust Button */
#thrustZone {
    bottom: 40px;
    right: 160px;
    width: 80px;
    height: 80px;
}

#thrustButton {
    width: 100%;
    height: 100%;
    background: rgba(0, 136, 255, 0.3);
    border: 3px solid rgba(0, 136, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    user-select: none;
    box-shadow: 0 0 15px rgba(0, 136, 255, 0.3);
}

#thrustButton:active, #thrustButton.active {
    background: rgba(0, 136, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 136, 255, 0.8);
}

/* Touch only on mobile */
@media (hover: none) and (pointer: coarse) {
    #touchControls {
        display: block !important;
    }
    #controlsHint {
        display: none !important;
    }
}

/* AOS Brain Status Indicator */
#aosStatus {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.5);
    color: #00ff88;
    padding: 10px;
    font-size: 10px;
    text-align: right;
}

#aosStatus.connected {
    border-color: #00ff88;
    color: #00ff88;
}

#aosStatus.disconnected {
    border-color: #ff4444;
    color: #ff4444;
}

/* Interior Camera View - Cockpit Overlay */
#cockpitView {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
    z-index: 20;
}

.cockpit-frame {
    position: absolute;
    background: linear-gradient(180deg, rgba(0, 20, 10, 0.8) 0%, rgba(0, 40, 20, 0.6) 100%);
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.cockpit-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 15%;
}

.cockpit-left {
    top: 15%;
    left: 0;
    width: 10%;
    height: 70%;
}

.cockpit-right {
    top: 15%;
    right: 0;
    width: 10%;
    height: 70%;
}

.cockpit-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
}

/* Far Out Camera Indicator */
#farOutIndicator {
    position: absolute;
    top: 60px;
    left: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.5);
    color: #00ff88;
    padding: 5px 10px;
    font-size: 10px;
    display: none;
}

/* Slingshot Indicator */
#slingshotIndicator {
    position: absolute;
    bottom: 250px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 200, 0, 0.9);
    color: #000;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    display: none;
    z-index: 100;
}

/* Landing Indicator */
#landingIndicator {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 255, 136, 0.9);
    color: #000;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    display: none;
    z-index: 100;
}

/* Death Warning */
#deathWarning {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    padding: 20px 40px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 24px;
    display: none;
    z-index: 1000;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
