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

body {
    background-color: #121212;
    background-image: 
        radial-gradient(circle at center, #2c2c3c 0%, #121212 100%),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    touch-action: none;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    padding: 20px 30px;
    z-index: 10;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.score-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.high-score {
    font-size: 1rem;
    color: #ffcc00;
    letter-spacing: 1px;
    margin-top: 5px;
}

.lives-box {
    font-size: 2.2rem;
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.life {
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.8));
}

.life.lost {
    opacity: 0.3;
    filter: grayscale(100%) drop-shadow(0 0 0 rgba(0,0,0,0));
    transform: scale(0.8);
}

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

#game-over-screen.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

#game-over-screen h1 {
    font-size: 5rem;
    color: #ff3333;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 51, 51, 0.8);
    letter-spacing: 4px;
}

#game-over-screen p {
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: bold;
    color: #fff;
}

.blink {
    animation: blinker 1.5s linear infinite;
    font-size: 1.5rem !important;
    color: #aaaaaa !important;
    font-weight: normal !important;
}

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

@media (max-width: 600px) {
    #ui-layer { padding: 15px; }
    .score-box { padding: 10px 15px; font-size: 1.5rem; }
    .lives-box { padding: 10px 15px; font-size: 1.5rem; }
    #game-over-screen h1 { font-size: 3.5rem; }
    #game-over-screen p { font-size: 2rem; }
}
