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

html, body {
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', monospace;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    position: fixed;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
}

#hud {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #0f0;
    font-size: 18px;
    text-shadow: 2px 2px 0 #000;
    z-index: 100;
}

#score {
    margin-bottom: 10px;
    font-weight: bold;
}

#shields span {
    display: block;
    margin-bottom: 5px;
}

#shield-bar {
    width: 200px;
    height: 20px;
    background: #333;
    border: 2px solid #0f0;
}

#shield-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #0f0, #0a0);
    transition: width 0.3s;
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

#game-over h1 {
    color: #f00;
    font-size: 64px;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 #800;
}

#game-over p {
    color: #fff;
    font-size: 24px;
    margin-bottom: 30px;
}

#game-over button,
#start-screen button {
    padding: 15px 40px;
    font-size: 24px;
    font-family: 'Courier New', monospace;
    background: #0f0;
    color: #000;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}

#game-over button:hover,
#start-screen button:hover {
    background: #0a0;
}

#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #000 0%, #001 50%, #002 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

#start-screen h1 {
    color: #ff0;
    font-size: 72px;
    margin-bottom: 10px;
    text-shadow: 4px 4px 0 #f80, 8px 8px 0 #f00;
}

#start-screen > p {
    color: #0f0;
    font-size: 24px;
    margin-bottom: 40px;
}

.controls-info {
    color: #888;
    margin-bottom: 40px;
    text-align: center;
}

.controls-info p {
    margin: 10px 0;
    font-size: 16px;
}

.hidden {
    display: none !important;
}

/* Progress bar at bottom */
#progress-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
}

#progress-bar {
    width: 300px;
    height: 12px;
    background: #222;
    border: 2px solid #444;
    border-radius: 6px;
    overflow: hidden;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0af, #08f);
    transition: width 0.1s linear;
}

#boss-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 5px #f00);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Boss health bar at top */
#boss-health-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
}

#boss-health-container span {
    color: #f00;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    display: block;
    margin-bottom: 5px;
}

#boss-health-bar {
    width: 400px;
    height: 24px;
    background: #333;
    border: 2px solid #f00;
    border-radius: 4px;
    overflow: hidden;
}

#boss-health-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f00, #f44);
    transition: width 0.2s;
}

/* Stage complete screen */
#stage-complete {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 300;
}

#stage-complete h1 {
    color: #0f0;
    font-size: 96px;
    margin-bottom: 0;
    text-shadow: 4px 4px 0 #080, 8px 8px 0 #040;
    animation: stageIn 0.5s ease-out;
}

#stage-complete h2 {
    color: #ff0;
    font-size: 72px;
    margin-bottom: 40px;
    text-shadow: 4px 4px 0 #880;
    animation: stageIn 0.5s ease-out 0.2s both;
}

#stage-complete button {
    padding: 15px 40px;
    font-size: 24px;
    font-family: 'Courier New', monospace;
    background: #0f0;
    color: #000;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    animation: stageIn 0.5s ease-out 0.4s both;
}

#stage-complete button:hover {
    background: #0a0;
}

@keyframes stageIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
