:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-purple: #bc13fe;
    --bg-color: #050510;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

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

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
    font-weight: bold;
    font-size: 24px;
}

.label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 16, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.hidden {
    display: none !important;
}

h1, h2 {
    font-size: 48px;
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--neon-pink), 2px 2px 0px var(--neon-blue);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
}

p {
    color: #fff;
    font-size: 18px;
    margin-bottom: 40px;
    text-shadow: 0 0 5px #fff;
}

.neon-btn {
    background: transparent;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
    padding: 15px 40px;
    font-size: 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-blue), inset 0 0 10px var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neon-btn:hover {
    background: var(--neon-blue);
    color: var(--bg-color);
    box-shadow: 0 0 30px var(--neon-blue);
}

.final-score {
    font-size: 32px;
    color: #fff;
    margin-bottom: 30px;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    20% { clip: rect(50px, 9999px, 80px, 0); }
    40% { clip: rect(10px, 9999px, 90px, 0); }
    60% { clip: rect(80px, 9999px, 20px, 0); }
    80% { clip: rect(20px, 9999px, 60px, 0); }
    100% { clip: rect(60px, 9999px, 30px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(60px, 9999px, 10px, 0); }
    20% { clip: rect(10px, 9999px, 50px, 0); }
    40% { clip: rect(90px, 9999px, 20px, 0); }
    60% { clip: rect(20px, 9999px, 80px, 0); }
    80% { clip: rect(50px, 9999px, 30px, 0); }
    100% { clip: rect(30px, 9999px, 70px, 0); }
}
