:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-green: #00ff9d;
    --neon-yellow: #ffea00;
    --hud-bg: rgba(0, 20, 40, 0.8);
    --text-main: #aaddff;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: #050505;
    color: var(--text-main);
    font-family: 'Share Tech Mono', monospace;
    user-select: none;
}

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* HUD Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.score-box { text-align: right; }

h1 {
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 24px;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

.hud-label {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-value {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

/* Bottom UI */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.weapon-systems { display: flex; gap: 15px; }

.weapon-card {
    background: var(--hud-bg);
    border: 1px solid #334;
    padding: 10px 15px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.weapon-card.active {
    opacity: 1;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-5px);
}

.weapon-card.active::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--neon-blue);
}

.key-hint {
    font-size: 10px;
    position: absolute;
    top: 2px; right: 4px;
    opacity: 0.5;
}

.wpn-title { font-weight: bold; }
.wpn-desc { font-size: 10px; }

/* Abilities */
.status-modules {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 250px;
}

.status-row { display: flex; justify-content: space-between; }

.bar-container {
    background: rgba(255,255,255,0.1);
    height: 6px;
    width: 100%;
    margin-top: 5px;
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 100%;
    transition: width 0.1s linear;
}

#health-bar { background: var(--neon-pink); box-shadow: 0 0 8px var(--neon-pink); }
#flux-bar { background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green); }

/* Log Console */
.log-console {
    position: absolute;
    bottom: 100px; left: 20px;
    width: 300px; height: 150px;
    overflow: hidden;
    font-size: 12px;
    display: flex;
    flex-direction: column-reverse;
    mask-image: linear-gradient(to bottom, transparent, black 20%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%);
}

.log-entry {
    margin-bottom: 4px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}
.log-entry.warn { color: var(--neon-pink); }
.log-entry.sys { color: var(--neon-yellow); }

@keyframes fadeIn { 
    from { opacity: 0; transform: translateX(-10px); } 
    to { opacity: 0.8; transform: translateX(0); } 
}

/* Screens */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.hidden { display: none !important; }

.title-large { font-size: 60px; margin-bottom: 10px; }
.title-large.error { color: var(--neon-pink); font-size: 50px; }
.instructions { color: #aaa; max-width: 500px; text-align: center; line-height: 1.5; }
.highlight-blue { color: var(--neon-blue); }
.highlight-green { color: var(--neon-green); }

.btn {
    background: transparent;
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn:hover {
    background: var(--neon-blue);
    color: black;
    box-shadow: 0 0 20px var(--neon-blue);
}