* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: #050510;
    /* Very dark blue/black */
    font-family: 'Outfit', sans-serif;
    color: white;
    user-select: none;
}

/* UI Layer sits on top of canvas */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas usually */
}

.score-container {
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.health-container {
    position: absolute;
    top: 60px;
    left: 30px;
    display: flex;
    gap: 10px;
}

.heart {
    width: 25px;
    height: 25px;
    background-color: #ff3366;
    transform: rotate(45deg);
    position: relative;
    box-shadow: 0 0 10px #ff3366;
    animation: pulse 1.5s infinite;
}

.heart::before,
.heart::after {
    content: '';
    width: 25px;
    height: 25px;
    background-color: #ff3366;
    border-radius: 50%;
    position: absolute;
}

.heart::before {
    left: -12.5px;
}

.heart::after {
    top: -12.5px;
}

@keyframes pulse {
    0% {
        transform: rotate(45deg) scale(1);
    }

    50% {
        transform: rotate(45deg) scale(1.1);
    }

    100% {
        transform: rotate(45deg) scale(1);
    }
}

/* Modals need pointer events back */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 3rem 4rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 90%;
}

.game-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
}

.game-instruction {
    color: #a0a0c0;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.score-label {
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#bigScoreEl {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0rem;
    line-height: 1;
}

button {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 50px;
    padding: 1rem 3rem;
    color: #000;
    /* Contrast text */
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.6);
}

button:active {
    transform: translateY(1px);
}