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

body {
    font-family: 'Courier New', monospace;
    overflow: hidden;
    background: #000;
}

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

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

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    color: #00ff00;
    font-size: 18px;
    z-index: 10;
    text-shadow: 0 0 10px #00ff00;
}

#health-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#health-bar {
    width: 200px;
    height: 30px;
    border: 2px solid #00ff00;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
    box-shadow: 0 0 10px #00ff00;
}

#health-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff00, #00aa00);
    transition: width 0.3s ease, background 0.3s ease;
}

#health-fill.low {
    background: linear-gradient(90deg, #ff0000, #aa0000);
}

#health-fill.medium {
    background: linear-gradient(90deg, #ffaa00, #ff6600);
}

#health-text {
    text-align: center;
    font-size: 16px;
}

.hud-label {
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;
}

#score-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

#score {
    font-size: 32px;
    font-weight: bold;
}

#start-screen,
#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #00ff00;
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border: 3px solid #00ff00;
    border-radius: 10px;
    box-shadow: 0 0 30px #00ff00;
    z-index: 100;
    min-width: 400px;
}

#start-screen h1,
#game-over h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #00ff00;
    animation: pulse 2s infinite;
}

#start-screen h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #00aaaa;
}

.instructions {
    margin: 30px 0;
    text-align: left;
    line-height: 1.8;
}

.instructions p {
    margin: 5px 0;
}

.instructions strong {
    color: #00ffff;
}

button {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px #00ff00;
    margin-top: 20px;
}

button:hover {
    background: #00ffff;
    box-shadow: 0 0 30px #00ffff;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}

.final-distance {
    font-size: 24px;
    margin: 20px 0;
    color: #ffaa00;
}

#game-over p {
    font-size: 18px;
    margin: 10px 0;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 20px #00ff00;
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 40px #00ff00;
    }
}
