body {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    background-color: #000;
    margin: 0;
    padding: 0;
    color: white;
    overflow: hidden;
}

h1 {
    margin: 20px;
    animation: fadeIn 2s ease-in-out;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    border: 2px solid #fff;
    overflow: hidden;
    background: black;
}

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

#score {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    animation: fadeIn 2s ease-in-out;
}

.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

#stars {
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    animation: starMovement 30s linear infinite;
}

#comets {
    background: transparent;
    animation: cometMovement 5s linear infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes starMovement {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -800px -600px;
    }
}

@keyframes cometMovement {
    0% { background: transparent; }
    50% {
        background: url('https://www.transparenttextures.com/patterns/dark-triangles.png') no-repeat;
        background-size: 100px 100px;
        transform: translateX(-200px) translateY(600px) rotate(45deg);
    }
    100% { background: transparent; }
}
