@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

:root {
    --bg-color: #050510;
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-green: #0aff00;
    --ui-font: 'Orbitron', monospace;
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    overflow: hidden;
    color: white;
    font-family: var(--ui-font);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
}

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

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed, but buttons enable events */
    z-index: 10;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 16, 0.85);
    /* Dark semi-transparent overlay */
    backdrop-filter: blur(5px);
    transition: opacity 0.3s;
    pointer-events: auto;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
}

/* Typography & Glitch Effect */
h1 {
    font-size: 5rem;
    margin: 0 0 20px 0;
    text-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
    letter-spacing: 5px;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--neon-blue);
    margin-bottom: 50px;
    letter-spacing: 3px;
    text-shadow: 0 0 5px var(--neon-blue);
}

/* Buttons */
.cyber-btn {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    font-family: var(--ui-font);
    font-size: 1.5rem;
    padding: 15px 40px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    box-shadow: 0 0 10px var(--neon-green);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.cyber-btn:hover {
    background: var(--neon-green);
    color: black;
    box-shadow: 0 0 20px var(--neon-green), 0 0 40px var(--neon-green);
}

/* HUD */
#hud-screen {
    background: transparent;
    /* No backdrop for HUD */
    backdrop-filter: none;
    justify-content: flex-start;
    padding: 20px;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
}

.hud-stat {
    display: flex;
    align-items: center;
    gap: 15px;
}

.label {
    color: var(--neon-blue);
    font-weight: bold;
}

.val {
    font-size: 1.5rem;
}

.bar-container {
    width: 200px;
    height: 20px;
    background: #333;
    border: 1px solid var(--neon-pink);
    clip-path: skewX(-20deg);
}

#hp-bar {
    height: 100%;
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
    transition: width 0.2s;
}

/* Scanline Overlay */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 20;
}