/* Space Mode Styles */
#space-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    pointer-events: none;
}

#space-bg.hidden {
    display: none;
}

/* Ensure canvas sits on top */
canvas {
    position: relative;
    z-index: 1;
}

/* Dynamic Stars (JS Controlled) */
.dynamic-star {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    opacity: 0;
    animation: blink-fade var(--duration, 3s) ease-in-out forwards;
}

@keyframes blink-fade {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: var(--max-opacity, 1);
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    width: 150px;
    height: 1px;
    /* Very thin tail */
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 100%);
    pointer-events: none;
    opacity: 0;
    transform-origin: left center;
}

/* The Head of the star */
.shooting-star::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px #fff, 0 0 8px #fff;
    /* Small glow around head only */
}
