/* constellation.css */
/* ==================================================
   CONSTELLATION THREAD BASE STYLES
   ================================================== */
.thread-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; }
.thread-layer line { stroke: rgba(200, 220, 255, 0.4); stroke-width: 1.5; stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s ease-in-out; }
.thread-layer line.drawn { stroke-dashoffset: 0; filter: drop-shadow(0 0 4px rgba(200,220,255,0.8)); }

.star-node { position: absolute; width: 40px; height: 40px; transform: translate(-50%, -50%); z-index: 20; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 1s ease; }
.star-node.active { opacity: 1; pointer-events: auto; cursor: pointer; }
.star-node.completed { opacity: 0.6; }

.star-core { width: 6px; height: 6px; background: #fff; border-radius: 50%; box-shadow: 0 0 10px 2px rgba(255,255,255,0.8); transition: all 0.3s; }
.star-node.active .star-core { animation: star-pulse 2s infinite; box-shadow: 0 0 20px 4px rgba(255,255,255,1); }
.star-core.tense { background: #ffcccc; box-shadow: 0 0 10px 2px rgba(255,100,100,0.8); }
.star-node.active .star-core.tense { animation: tense-pulse 0.5s infinite; }

.star-node.trigger-star .star-core { width: 12px; height: 12px; background: #eef8ff; box-shadow: 0 0 15px 5px rgba(100, 200, 255, 0.8); animation: special-twinkle 1.5s ease-in-out infinite alternate !important; }
@keyframes special-twinkle { 0% { transform: scale(0.8); box-shadow: 0 0 10px 2px rgba(100, 200, 255, 0.5); } 100% { transform: scale(1.3); box-shadow: 0 0 25px 8px rgba(150, 220, 255, 1); background: #fff; } }
@keyframes star-pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.5); opacity: 1; } }
@keyframes tense-pulse { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 1; } }

/* Expand the touch target of all active stars to 80x80px for mobile reliability */
.star-node.active::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    z-index: 50; /* Ensures the hitbox sits above other invisible elements */
    cursor: pointer;
    border-radius: 50%;
}

/* Ensure the browser doesn't try to native-scroll when touching a star */
.star-node { touch-action: pinch-zoom; }
