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

:root {
    --neon-cyan: #0ff;
    --neon-pink: #ff0055;
    --neon-green: #39ff14;
    --bg-dark: #05050f;
}

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

body {
    background-color: #020205;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    background: var(--bg-dark);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.15), inset 0 0 50px rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

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

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.hud-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green);
    background: rgba(0,0,0,0.5);
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 15, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(4px);
}

#overlay.active {
    opacity: 1;
    visibility: visible;
}

#title {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 6px;
    text-transform: uppercase;
    transition: color 0.3s, text-shadow 0.3s;
}

.title-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
}

.title-pink {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink), 0 0 40px var(--neon-pink);
}

#instructions {
    font-size: 18px;
    line-height: 1.8;
    color: #eee;
    margin-bottom: 30px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 5px;
}

.key {
    color: var(--neon-cyan);
    font-weight: bold;
    text-shadow: 0 0 5px var(--neon-cyan);
}

#finalScore {
    font-size: 28px;
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
    margin-bottom: 30px;
    font-weight: bold;
}
