body {
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#game-canvas {
    display: block;
}

#info {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
}

#score, #timer, #high-score {
    margin-bottom: 5px;
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
}

.score-popup {
    position: absolute;
    color: white;
    font-size: 24px;
    font-weight: bold;
    pointer-events: none; /* Allow clicks to pass through */
    animation: fadeOutUp 1s forwards;
}

@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

.celebration-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: white; /* Default color, will be randomized */
    border-radius: 50%; /* Make it a circle */
    opacity: 1;
    pointer-events: none;
    animation: celebrate 2s forwards;
}

@keyframes celebrate {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0) rotate(720deg);
        opacity: 0;
    }
}
