/* star4.css */
/* ==================================================
   STAR 4: SPECIAL DATES CONSTELLATION
   ================================================== */

/* Dimming effect integrated with existing sky-bg */
#sky-bg.s4-dimmed {
    filter: brightness(0.6);
    transition: filter 3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Star 4 visual upgrade when clicked */
#star-4.interacted {
    animation: none;
    pointer-events: none;
}

/* Container for date nodes - perfectly fits inside sky-canvas */
#s4-dates-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Date Stars (The Memories) */
.date-star-wrapper {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.date-star-wrapper .date-star {
    width: 3px;
    height: 3px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 0px 0px transparent;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 1.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-star-wrapper.revealing .date-star {
    opacity: 1;
    transform: scale(1.5);
    box-shadow: 0 0 10px 2px rgba(226, 232, 240, 0.6);
    animation: memory-twinkle 4s infinite alternate ease-in-out;
    animation-delay: 1.5s; /* Wait for initial reveal to settle */
}

@keyframes memory-twinkle {
    0% { opacity: 0.6; transform: scale(1.2); box-shadow: 0 0 6px 1px rgba(226, 232, 240, 0.6); }
    100% { opacity: 1; transform: scale(1.6); box-shadow: 0 0 12px 2px rgba(226, 232, 240, 0.6); }
}

/* Date Labels */
.date-star-wrapper .date-label {
    position: absolute;
    font-family: 'Cormorant Garamond', 'Spectral', serif;
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #f8fafc;
    opacity: 0;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 255, 255, 0.2);
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1), 
                transform 2s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
}

.date-star-wrapper.revealing .date-label {
    opacity: 0.85;
}

/* Smart Positioning Classes */
.pos-top-right .date-label { top: -20px; left: 12px; transform: translate(5px, 5px); }
.pos-top-right.revealing .date-label { transform: translate(0, 0); }

.pos-top-left .date-label { top: -20px; right: 12px; transform: translate(-5px, 5px); }
.pos-top-left.revealing .date-label { transform: translate(0, 0); }

.pos-bottom-right .date-label { bottom: -20px; left: 12px; transform: translate(5px, -5px); }
.pos-bottom-right.revealing .date-label { transform: translate(0, 0); }

.pos-bottom-left .date-label { bottom: -20px; right: 12px; transform: translate(-5px, -5px); }
.pos-bottom-left.revealing .date-label { transform: translate(0, 0); }

@media (max-width: 768px) {
    .date-star-wrapper .date-label { font-size: 0.95rem; }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    #sky-bg.s4-dimmed { transition-duration: 0.5s; }
    .date-star-wrapper.revealing .date-star { animation: none; transition-duration: 0.5s; }
    .date-star-wrapper .date-label { transition-duration: 0.5s; }
}