/* CSS/star6.css */
/* ==================================================
   STAR 6: THE RESILIENT HEART FINALE
   ================================================== */

/* --- Interactive Star 6 Node --- */
.star-node#star-6 {
    z-index: 20;
}

.s6-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: s6-spin 15s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.s6-halo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px #fff;
}

.star-node#star-6.active .s6-halo {
    opacity: 1;
}

.s6-hint {
    position: absolute;
    bottom: -30px;
    width: max-content;
    font-family: 'Spectral', serif;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    font-weight: 300;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.star-node#star-6.active .s6-hint {
    opacity: 0.8;
}

/* Hover/Focus States for Star 6 */
.star-node#star-6.active:hover .star-core,
.star-node#star-6.active:focus-visible .star-core {
    transform: scale(1.4);
    box-shadow: 0 0 30px 8px rgba(200, 220, 255, 0.8), 0 0 60px 15px rgba(255, 255, 255, 0.6);
}

@keyframes s6-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Scene Transition Mechanics --- */
/* When Star 6 is clicked, we fade out the native DOM elements so the canvas particles take over */
.scene.s6-takeover #sky-canvas {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

/* --- Canvas & Finale UI Layer --- */
#content-scene-s6 {
    position: absolute;
    inset: 0;
    z-index: 40; /* Sit above the sky and UI */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#content-scene-s6.active {
    opacity: 1;
    pointer-events: auto;
}

#s6-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Elegant Typography --- */
#s6-finale-ui {
    position: absolute;
    bottom: 15%;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 45;
}

.s6-poetic-line {
    font-family: 'Spectral', serif;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-style: italic;
    font-weight: 300;
    color: rgba(240, 245, 255, 0.85); /* Soft silver-white */
    letter-spacing: 0.08em;
    text-align: center;
    max-width: 80%;
    
    /* Elegant subtle start state */
    opacity: 0;
    transform: translateY(12px);
    
    /* Soft, slow, graceful transition. NO blur, NO stagger. */
    transition: opacity 3s cubic-bezier(0.25, 0.1, 0.25, 1), transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(200, 220, 255, 0.1);
}

.s6-poetic-line.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .s6-halo { animation: none; }
    .s6-poetic-line { transition: opacity 3s ease; transform: none; }
}