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

body {
    background: #000;
    overflow: hidden;
}

canvas {
    display: block;
}

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    color: #fff;
    font: bold 18px monospace;
    pointer-events: none;
    text-shadow: 0 0 6px #000;
}

#score-disp {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 22px;
    color: #ff0;
}

#lives-disp {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 22px;
    color: #f55;
}

#boss-wrap {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    display: none;
    text-align: center;
}

#boss-label {
    font-size: 14px;
    color: #f88;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

#boss-bar-bg {
    width: 100%;
    height: 18px;
    background: #400;
    border: 2px solid #f44;
    border-radius: 4px;
    overflow: hidden;
}

#boss-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f00, #f80);
    transition: width 0.1s;
}

#overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.65);
}

#overlay h1 {
    font-size: 52px;
    color: #ff0;
    margin-bottom: 16px;
    letter-spacing: 4px;
    text-shadow: 0 0 20px #ff0;
}

#overlay .sub {
    font-size: 20px;
    color: #adf;
    margin: 6px;
}

#overlay .start {
    font-size: 26px;
    color: #0ff;
    margin-top: 24px;
    animation: blink 1s step-end infinite;
}

#overlay .hint {
    font-size: 13px;
    color: #777;
    margin-top: 12px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

#overlay.hidden {
    display: none;
}