:root {
    --bg-color: #0d0d0f;
    --neon-blue: #00d2ff;
    --neon-pink: #cc00cc;
    --neon-green: #32cd32;
    --text-color: #e0e0e0;
    --font-main: 'Exo 2', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.03);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image:
        radial-gradient(circle at 50% 50%, #10101a 0%, #0d0d0f 100%);
}

#game-container {
    position: relative;
    width: 95%;
    max-width: 900px;
    height: 450px;
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 4px;
    background: #000;
    overflow: hidden;
}

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

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

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.82);
    pointer-events: all;
    transition: all 0.4s ease-out;
    z-index: 10;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
    letter-spacing: 6px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

p {
    margin-bottom: 35px;
    font-size: 0.9rem;
    color: var(--neon-blue);
    letter-spacing: 3px;
    opacity: 0.7;
}

.instructions {
    margin-bottom: 25px;
    padding: 8px 16px;
    border-left: 2px solid var(--neon-pink);
    background: rgba(204, 0, 204, 0.05);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

button {
    padding: 10px 50px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: #fff;
    color: #000;
    transform: translateY(-1px);
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    z-index: 5;
}

.hud-item {
    margin-bottom: 10px;
}

.hud-item {
    margin-bottom: 10px;
}

.score-data {
    position: absolute;
    top: 20px;
    left: 20px;
}

.stats-data {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-row {
    margin-bottom: 4px;
}

.stat-val {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
}

.hud-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 210, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
    backdrop-filter: blur(4px);
}

.hud-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--neon-blue);
    margin-right: 8px;
    opacity: 0.8;
}

#score {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: #fff;
}

.score-container {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.death-text {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--neon-pink);
    text-shadow: 0 0 15px rgba(204, 0, 204, 0.4);
    margin-bottom: 15px;
}

.score-container .label {
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 2px;
    margin-bottom: 2px;
}

#final-score {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: #fff;
}