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

body, html {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at center, #1b0b2e 0%, #0d0517 50%, #000000 100%);
    font-family: system-ui, -apple-system, sans-serif;
    touch-action: none; /* Prevent zooming and scrolling on mobile */
}

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

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

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    pointer-events: none;
}

#score {
    font-size: 24px;
    color: #e0d4f5;
    text-shadow: 0 0 10px #b17df7;
    font-weight: 900;
    letter-spacing: 2px;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 5, 23, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#title {
    font-size: 48px;
    color: #fff;
    text-shadow: 0 0 20px #e100ff, 0 0 40px #e100ff;
    margin-bottom: 20px;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 900;
}

#instructions {
    font-size: 18px;
    color: #c8c8c8;
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 0 0 5px #fff;
    max-width: 80%;
}

#final-score {
    font-size: 28px;
    color: #00ffff;
    margin-bottom: 30px;
    text-shadow: 0 0 15px #00ffff;
    font-weight: bold;
}

#final-score.hidden {
    display: none;
}

button {
    padding: 15px 40px;
    font-size: 20px;
    background: transparent;
    color: #fff;
    border: 2px solid #e100ff;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(225, 0, 255, 0.5) inset, 0 0 15px rgba(225, 0, 255, 0.5);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

button:hover, button:active {
    background: #e100ff;
    color: #000;
    box-shadow: 0 0 30px #e100ff;
}
