/* Scoped Game Styles */

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-dark, #090b10);
    color: var(--text-primary, #f0f4f8);
    font-family: 'Outfit', sans-serif;
    position: relative;
    width: 100vw;
    height: 100vh;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to canvas */
    display: flex;
    flex-direction: column;
}

.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(9, 11, 16, 0.9) 0%, transparent 100%);
}

.score-board {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--neon-green, #39ff14);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

.health-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.health-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted, #8b9bb4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.health-bar-bg {
    width: 250px;
    height: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
}

#health-bar-fill {
    height: 100%;
    width: 100%; /* Will be updated via JS */
    background: linear-gradient(90deg, #ff416c, var(--neon-purple, #bd00ff));
    box-shadow: 0 0 10px rgba(189, 0, 255, 0.5);
    transition: width 0.2s ease-out;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(9, 11, 16, 0.95);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid var(--neon-purple, #bd00ff);
    box-shadow: 0 0 30px rgba(189, 0, 255, 0.3);
    text-align: center;
    pointer-events: auto; /* Allow buttons to be clicked */
    backdrop-filter: blur(10px);
}

#game-over.hidden {
    display: none;
}

#game-over h2 {
    font-size: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    color: #ff416c;
    margin-top: 0;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 65, 108, 0.5);
}

#game-over p {
    font-size: 1.2rem;
    color: var(--text-muted, #8b9bb4);
    margin-bottom: 25px;
}

.play-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 700;
}

.play-btn:hover {
    background: var(--neon-purple, #bd00ff);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.4);
}
